* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --neon-blue: #00f0ff;
    --neon-purple: #a855f7;
    --neon-pink: #ff0080;
    --dark-bg: #0a0a0a;
    --card-bg: rgba(20, 20, 30, 0.8);
    --border-color: rgba(0, 240, 255, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--dark-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

.query-screen {
    display: block;
    padding: 18px 20px 42px;
}

.query-screen .container {
    margin: 0 auto;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: "";
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.15) 0%, rgba(0, 240, 255, 0.1) 25%, transparent 50%);
    animation: rotate 30s linear infinite;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1000px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.page-tools {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid rgba(0, 240, 255, 0.26);
    background: rgba(14, 18, 28, 0.78);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
}

.lang-option {
    min-width: 44px;
    height: 30px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: all 0.24s ease;
}

.lang-option.active {
    color: #041922;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.95), rgba(88, 181, 255, 0.92));
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.28);
}

.lang-option:not(.active):hover {
    color: var(--neon-blue);
    background: rgba(0, 240, 255, 0.08);
}

.header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease;
}

.header h1 {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    text-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
    letter-spacing: 2px;
}

.header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    animation: fadeIn 1s ease 0.2s backwards;
}

.nav-link {
    padding: 12px 30px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
    left: 100%;
}

.nav-link:hover,
.nav-link.active {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5), inset 0 0 20px rgba(0, 240, 255, 0.1);
    transform: translateY(-2px);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-bottom: 50px;
    overflow: hidden;
    position: relative;
    animation: fadeIn 1s ease 0.4s backwards;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple), var(--neon-pink));
    border-radius: 3px;
    transition: width 0.5s ease;
    box-shadow: 0 0 15px var(--neon-blue);
    position: relative;
}

.progress-fill::after,
.progress-bar-fill::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    animation: fadeIn 1s ease 0.6s backwards;
}

.step-indicator {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    transition: all 0.3s ease;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
}

.step-indicator.active .step-number {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    box-shadow: 0 0 20px var(--neon-blue);
    background: rgba(0, 240, 255, 0.1);
}

.step-indicator.completed .step-number {
    border-color: var(--neon-purple);
    background: var(--neon-purple);
    color: white;
    box-shadow: 0 0 20px var(--neon-purple);
}

.step-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.step-indicator.active .step-label {
    color: var(--neon-blue);
    font-weight: 600;
}

.card-wrapper {
    perspective: 1500px;
    min-height: 450px;
    position: relative;
}

.card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 40px 50px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateX(100px) rotateY(20deg);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
}

.card.active {
    opacity: 1;
    transform: translateX(0) rotateY(0);
    position: relative;
    pointer-events: all;
    animation: cardGlow 2s ease-in-out infinite alternate;
}

.card.exit-left {
    opacity: 0;
    transform: translateX(-100px) rotateY(-20deg);
}

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    background: rgba(0, 0, 0, 0.6);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: "Courier New", monospace;
}

.hint {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
    line-height: 1.6;
}

.hint a {
    color: var(--neon-blue);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.hint a:hover {
    border-bottom-color: var(--neon-blue);
}

.buttons {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.buttons-inline {
    margin-top: 30px;
}

.btn {
    flex: 1;
    padding: 16px 32px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
}

.btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 240, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn span {
    position: relative;
    z-index: 2;
}

.btn-primary {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    position: relative;
    z-index: 1;
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
}

.btn-secondary:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.query-page {
    max-width: 1280px;
    padding-top: 8px;
}

.query-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
}

.query-hero-title {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-size: 56px;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #39d7ff 0%, #56b7ff 55%, #6aa6ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 24px rgba(57, 215, 255, 0.18);
}

.query-hero-icon {
    display: inline-block;
    font-size: 54px;
    line-height: 1;
    filter: drop-shadow(0 0 18px rgba(57, 215, 255, 0.35));
}

.query-hero-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    letter-spacing: 1px;
}

.query-card-wrapper {
    min-height: auto;
}

.query-panel {
    padding: 24px 24px 22px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 120%, rgba(0, 240, 255, 0.08), transparent 40%),
        linear-gradient(180deg, rgba(20, 23, 35, 0.98), rgba(18, 19, 31, 0.96));
    box-shadow:
        0 12px 38px rgba(0, 0, 0, 0.36),
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 0 24px rgba(0, 240, 255, 0.08);
}

.query-panel::before,
.query-results::before,
.query-stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.55), transparent);
}

.query-panel::after,
.query-results::after,
.query-stat-card::after {
    content: "";
    position: absolute;
    inset: -20% auto auto 50%;
    width: 40%;
    height: 35%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(0, 240, 255, 0.09), transparent 70%);
    pointer-events: none;
    opacity: 0.8;
}

.query-section-title {
    color: var(--neon-blue);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 18px;
    text-shadow: 0 0 18px rgba(0, 240, 255, 0.3);
}

.query-textarea {
    min-height: 96px;
    overflow-y: hidden;
    resize: none;
    scrollbar-width: none;
    background: linear-gradient(180deg, rgba(10, 14, 20, 0.98), rgba(9, 10, 18, 0.95));
    box-shadow: inset 0 0 0 1px rgba(0, 240, 255, 0.05);
}

.query-textarea::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.query-buttons {
    justify-content: flex-start;
    margin-top: 18px;
    gap: 12px;
}

.query-btn-small {
    flex: 0 0 auto;
    min-width: 88px;
    height: 38px;
    padding: 0 22px;
    border-width: 1px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1;
}

#queryCardsBtn {
    background: rgba(0, 240, 255, 0.03);
    box-shadow: inset 0 0 0 1px rgba(0, 240, 255, 0.04);
}

#queryCardsBtn:hover:not(:disabled) {
    transform: none;
    box-shadow:
        inset 0 0 0 1px rgba(0, 240, 255, 0.08),
        0 0 16px rgba(0, 240, 255, 0.18);
}

#queryCardsBtn.is-loading {
    background: rgba(10, 54, 66, 0.72);
    border-color: rgba(0, 240, 255, 0.28);
    color: rgba(0, 240, 255, 0.56);
    box-shadow:
        inset 0 0 0 1px rgba(0, 240, 255, 0.04),
        0 0 0 1px rgba(0, 240, 255, 0.02);
}

#queryCardsBtn.is-loading .spinner {
    width: 14px;
    height: 14px;
    border-width: 2px;
    border-color: rgba(0, 240, 255, 0.18);
    border-top-color: rgba(0, 240, 255, 0.75);
}

#queryCardsBtn.is-loading span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#queryCardsBtn.is-loading:disabled {
    opacity: 1;
    cursor: wait;
}

#queryClearBtn,
#clearCardsBtn {
    min-width: 68px;
    border-color: rgba(255, 255, 255, 0.26);
    color: rgba(255, 255, 255, 0.76);
}

.query-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.query-stat-card {
    --stat-accent-rgb: 0, 240, 255;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(18, 20, 31, 0.98), rgba(18, 19, 31, 0.94));
    border: 1px solid rgba(0, 240, 255, 0.28);
    border-radius: 18px;
    padding: 22px 18px 18px;
    min-height: 142px;
    box-shadow:
        0 10px 26px rgba(0, 0, 0, 0.32),
        0 0 0 1px rgba(0, 240, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transform: translateY(0);
    transition:
        transform 0.24s ease,
        border-color 0.28s ease,
        box-shadow 0.28s ease,
        background 0.28s ease;
}

.query-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.query-stat-label {
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.query-stat-icon {
    color: rgba(255, 255, 255, 0.55);
    font-size: 24px;
    line-height: 1;
    transition: color 0.28s ease, filter 0.28s ease;
}

.query-stat-value {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 16px;
}

.query-stat-bar {
    position: relative;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.query-stat-bar span {
    position: absolute;
    inset: 0 auto 0 0;
    display: block;
    width: 0;
    border-radius: inherit;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.08);
}

.query-stat-total .query-stat-value {
    color: #1de9ff;
}

.query-stat-total {
    --stat-accent-rgb: 29, 233, 255;
}

.query-stat-total .query-stat-bar span {
    background: linear-gradient(90deg, #1de9ff, #40c4ff);
}

.query-stat-valid .query-stat-value {
    color: #22d3a6;
}

.query-stat-valid {
    --stat-accent-rgb: 34, 211, 166;
}

.query-stat-valid .query-stat-bar span {
    background: linear-gradient(90deg, #22d3a6, #34d399);
}

.query-stat-used .query-stat-value {
    color: #c06bff;
}

.query-stat-used {
    --stat-accent-rgb: 192, 107, 255;
}

.query-stat-used .query-stat-bar span {
    background: linear-gradient(90deg, #a855f7, #d946ef);
}

.query-stat-invalid .query-stat-value {
    color: #ffb020;
}

.query-stat-invalid {
    --stat-accent-rgb: 255, 176, 32;
}

.query-stat-invalid .query-stat-bar span {
    background: linear-gradient(90deg, #ffb020, #f59e0b);
}

.query-stat-card::before {
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        rgba(var(--stat-accent-rgb), 0) 0%,
        rgba(var(--stat-accent-rgb), 0.18) 18%,
        rgba(var(--stat-accent-rgb), 0.9) 50%,
        rgba(var(--stat-accent-rgb), 0.18) 82%,
        rgba(var(--stat-accent-rgb), 0) 100%
    );
    border-radius: 18px 18px 999px 999px;
    opacity: 0;
    transition:
        opacity 0.28s ease,
        box-shadow 0.28s ease;
}

.query-stat-card::after {
    inset: -8% auto auto 78%;
    width: 34%;
    height: 30%;
    transform: translateX(-50%) scale(0.9);
    background: radial-gradient(circle, rgba(var(--stat-accent-rgb), 0.24), rgba(var(--stat-accent-rgb), 0.06) 38%, transparent 74%);
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.28s ease, filter 0.28s ease;
}

.query-stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 240, 255, 0.22);
    background:
        radial-gradient(circle at 82% -6%, rgba(var(--stat-accent-rgb), 0.12), transparent 24%),
        linear-gradient(180deg, rgba(21, 24, 37, 0.99), rgba(19, 21, 33, 0.96));
    box-shadow:
        0 16px 28px rgba(0, 0, 0, 0.38),
        0 0 0 1px rgba(0, 240, 255, 0.04),
        0 0 18px rgba(var(--stat-accent-rgb), 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.query-stat-card:hover::before {
    opacity: 1;
    box-shadow:
        0 0 10px rgba(var(--stat-accent-rgb), 0.26),
        0 0 14px rgba(var(--stat-accent-rgb), 0.1);
}

.query-stat-card:hover::after {
    opacity: 0.52;
    transform: translateX(-50%) scale(0.96);
    filter: blur(12px);
}

.query-stat-card:hover .query-stat-icon {
    color: rgba(255, 255, 255, 0.64);
    filter: drop-shadow(0 0 6px rgba(var(--stat-accent-rgb), 0.14));
}

.query-stat-card:hover .query-stat-bar span {
    box-shadow:
        0 0 12px rgba(var(--stat-accent-rgb), 0.22),
        0 0 20px rgba(var(--stat-accent-rgb), 0.08);
}

.query-results-dashboard {
    margin-top: 22px;
}

.query-results {
    position: relative;
    overflow: hidden;
    background: rgba(16, 19, 31, 0.86);
    border: 1px solid rgba(0, 240, 255, 0.28);
    border-radius: 20px;
    padding: 28px 24px 24px;
    backdrop-filter: blur(20px);
    background:
        radial-gradient(circle at 50% -10%, rgba(0, 240, 255, 0.05), transparent 36%),
        linear-gradient(180deg, rgba(20, 23, 35, 0.98), rgba(18, 19, 31, 0.96));
    box-shadow:
        0 12px 38px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.query-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.query-results-header h2 {
    color: var(--neon-blue);
    font-size: 18px;
    font-weight: 700;
}

.query-results-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.query-search-box {
    width: 270px;
    height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 240, 255, 0.45);
    background: linear-gradient(180deg, rgba(7, 10, 18, 0.92), rgba(10, 13, 21, 0.88));
    box-shadow: inset 0 0 0 1px rgba(0, 240, 255, 0.04);
}

.query-search-box:focus-within {
    box-shadow:
        inset 0 0 0 1px rgba(0, 240, 255, 0.12),
        0 0 18px rgba(0, 240, 255, 0.16);
}

.query-search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: white;
    font-size: 13px;
}

.query-search-box input::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

.query-search-icon {
    color: rgba(255, 255, 255, 0.54);
    font-size: 14px;
}

.query-export-btn {
    flex: 0 0 auto;
    min-width: 74px;
    padding: 9px 18px;
    border-color: rgba(255, 255, 255, 0.28);
    color: rgba(255, 255, 255, 0.86);
}

.query-filter-tabs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.query-filter-tab {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 240, 255, 0.4);
    background: rgba(11, 15, 24, 0.72);
    color: rgba(255, 255, 255, 0.84);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.query-filter-tab.active[data-filter="all"] {
    color: #07212d;
    background: linear-gradient(135deg, #15f2ff, #4ad0ff);
    box-shadow: 0 0 20px rgba(21, 242, 255, 0.4);
}

.query-filter-tab.active[data-filter="valid"] {
    color: #061f17;
    background: linear-gradient(135deg, #22d3a6, #34d399);
    border-color: rgba(34, 211, 166, 0.45);
    box-shadow: 0 0 20px rgba(34, 211, 166, 0.32);
}

.query-filter-tab.active[data-filter="invalid"] {
    color: #2a1700;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.28);
}

.query-table-wrapper {
    overflow-x: auto;
    border: 1px solid rgba(0, 240, 255, 0.35);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(10, 16, 24, 0.96), rgba(9, 12, 20, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.query-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    background: rgba(12, 16, 26, 0.72);
}

.query-table thead {
    background: linear-gradient(180deg, rgba(11, 56, 68, 0.86), rgba(10, 43, 52, 0.88));
}

.query-table th,
.query-table td {
    padding: 12px 14px;
    text-align: left;
    white-space: nowrap;
}

.query-table th {
    color: var(--neon-blue);
    font-size: 14px;
    font-weight: 700;
}

.query-table td {
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.query-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.query-table-code {
    font-weight: 600;
}

.query-table-empty td {
    padding: 28px 14px;
    text-align: center;
    color: rgba(255, 255, 255, 0.62);
}

.query-empty-state {
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.query-empty-icon {
    position: relative;
    width: 82px;
    height: 88px;
}

.query-empty-icon::before {
    content: "";
    position: absolute;
    left: 27px;
    bottom: 0;
    width: 6px;
    height: 34px;
    border-radius: 3px;
    background: rgba(90, 72, 52, 0.5);
}

.query-empty-icon::after {
    content: "";
    position: absolute;
    left: 18px;
    top: 18px;
    width: 46px;
    height: 30px;
    background: linear-gradient(180deg, rgba(56, 61, 71, 0.95), rgba(34, 38, 47, 0.95));
    border-radius: 8px 8px 6px 6px;
    box-shadow:
        inset 0 -8px 0 rgba(16, 18, 24, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.query-empty-flag {
    position: absolute;
    top: 34px;
    left: 48px;
    width: 14px;
    height: 4px;
    background: rgba(116, 35, 35, 0.75);
    border-radius: 2px;
}

.query-empty-flag::after {
    content: "";
    position: absolute;
    right: -2px;
    top: 0;
    width: 4px;
    height: 12px;
    background: rgba(90, 72, 52, 0.55);
    border-radius: 2px;
}

.query-empty-text {
    color: rgba(255, 255, 255, 0.56);
    font-size: 13px;
}

.query-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 66px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.query-status-used {
    color: #e9d5ff;
    background: rgba(168, 85, 247, 0.22);
    border: 1px solid rgba(168, 85, 247, 0.5);
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.18);
}

.query-status-unused {
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.45);
}

.query-status-unknown {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.45);
}

.query-copy-btn {
    min-width: 44px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 240, 255, 0.65);
    background: rgba(0, 240, 255, 0.12);
    color: var(--neon-blue);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.query-copy-btn:hover {
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.35);
}

.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
    animation: slideDown 0.3s ease;
    border-left: 4px solid;
}

.alert.show {
    display: block;
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #6ee7b7;
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #fca5a5;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
    color: #fcd34d;
}

.alert-info {
    background: rgba(0, 240, 255, 0.2);
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 240, 255, 0.2);
    border: 1px solid var(--neon-blue);
    border-radius: 20px;
    color: var(--neon-blue);
    font-size: 14px;
    margin-top: 10px;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.confirm-box {
    background: rgba(0, 0, 0, 0.4);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    margin-bottom: 25px;
}

.confirm-box h3 {
    color: var(--neon-blue);
    margin-bottom: 15px;
    font-size: 18px;
}

.confirm-box p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    line-height: 1.6;
}

.confirm-box strong {
    color: white;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--neon-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.result-section {
    text-align: center;
    padding: 40px 20px;
}

.result-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    position: relative;
}

.result-icon::before {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: rotate 3s linear infinite;
}

.result-icon.success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.5);
}

.result-icon.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.5);
}

.result-icon.processing {
    background: rgba(0, 240, 255, 0.2);
    color: var(--neon-blue);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.5);
}

.result-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
    color: white;
}

.result-message {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 30px 0;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    border-radius: 4px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--neon-blue);
    position: relative;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.modal-box {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    backdrop-filter: blur(20px);
    box-shadow: 0 0 50px rgba(0, 240, 255, 0.3);
    animation: scaleIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.modal-icon {
    text-align: center;
    margin-bottom: 20px;
    font-size: 60px;
    filter: drop-shadow(0 0 20px var(--neon-purple));
}

.modal-title {
    font-size: 24px;
    font-weight: 600;
    color: white;
    text-align: center;
    margin-bottom: 15px;
}

.modal-message {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 30px;
}

.modal-buttons {
    display: flex;
    gap: 15px;
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(transparent, rgba(0, 240, 255, 0.05), transparent);
    animation: scan 4s linear infinite;
    pointer-events: none;
    z-index: 10;
}

[hidden] {
    display: none !important;
}

@keyframes gridMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(50px); }
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes cardGlow {
    0% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1) inset, 0 0 20px rgba(0, 240, 255, 0.1);
    }
    100% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1) inset, 0 0 40px rgba(168, 85, 247, 0.2);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes statEdgeSweep {
    0% { transform: translateX(0); }
    100% { transform: translateX(290%); }
}

@keyframes scan {
    0% { transform: translateY(-100px); }
    100% { transform: translateY(100vh); }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 32px;
    }

    .card {
        padding: 30px 25px;
    }

    .buttons,
    .modal-buttons {
        flex-direction: column;
    }

    .steps-container {
        gap: 10px;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .step-label {
        font-size: 12px;
    }

    .query-stats {
        grid-template-columns: 1fr;
    }

    .page-tools {
        margin-bottom: 10px;
    }

    .lang-switch {
        margin-left: auto;
    }

    .query-hero-title {
        font-size: 34px;
        gap: 10px;
    }

    .query-hero-icon {
        font-size: 34px;
    }

    .query-results-header,
    .query-results-tools {
        flex-direction: column;
        align-items: flex-start;
    }

    .query-search-box {
        width: 100%;
    }

    .query-filter-tabs {
        flex-wrap: wrap;
    }
}
