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


@font-face {
    font-family: 'LocalEmoji';
    src: url('1.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: block;  
    unicode-range: U+1F000-1F9FF, U+2600-27BF, U+FE00-FE0F, U+200D, U+20E3;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
}


#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(180deg, #ffffff 0%, #f3f3f3 100%);
}


.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* 顶部通栏 */
.top-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 85px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.06);
}

.top-banner-inner {
    --banner-gap: 150px; /* 统一间距：标题之间、标题与logo之间 */
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: var(--banner-gap);
    width: 100%;
    max-width: 1600px;
    padding: 0 15px;
    position: relative;
    z-index: 1;
    height: 85px;
}

/* 左右导航组 */
.banner-nav-group {
    display: flex;
    align-items: stretch;
    gap: var(--banner-gap);
    flex: 1;
}

.banner-nav-group:first-child {
    justify-content: flex-end;
}

.banner-nav-group:last-child {
    justify-content: flex-start;
}

/* 导航项 */
.banner-nav-item {
    color: #333;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 2px;
    white-space: nowrap;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.banner-nav-item::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #66ddea, #4ab8d4);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.banner-nav-item:hover {
    color: #4ab8d4;
}

.banner-nav-item:hover::after {
    width: 100%;
}

.banner-nav-item.banner-active {
    color: #4ab8d4 !important;
}

.banner-nav-item.banner-active::after {
    width: 100%;
}

/* 中间 Logo */
.banner-logo-center {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
}

.banner-logo-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.1));
    transition: transform 0.3s ease;
}

.banner-logo-center:hover .banner-logo-img {
    transform: scale(1.1);
}

/* Banner flip card - mini version of main logo flip */
.banner-flip-card {
    width: 60px;
    height: 60px;
    perspective: 500px;
    cursor: pointer;
    position: relative;
}

.banner-flip-inner {
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.banner-flip-inner.flipped {
    transform: rotateY(180deg);
}

.banner-flip-front,
.banner-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.banner-flip-front {
    background: transparent;
    overflow: visible;
}

.banner-flip-front .banner-logo-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.1));
    transition: transform 0.3s ease;
}

.banner-flip-back {
    background: linear-gradient(145deg, #b91c1c 0%, #dc2626 25%, #ef4444 50%, #fbbf24 88%, #f59e0b 100%);
    transform: rotateY(180deg);
    border: 2px solid rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.4), 0 0 25px rgba(251, 191, 36, 0.12);
    transition: border-radius 0.5s ease, box-shadow 0.5s ease;
}

.banner-idiom-text {
    font-family: 'Ma Shan Zheng', 'STXingkai', 'KaiTi', 'Kai', serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    display: inline-block;
    width: 2.15em;
    word-break: break-all;
    overflow-wrap: break-word;
    background: linear-gradient(
        90deg,
        #fef3c7 0%,
        #fef3c7 30%,
        #ffffff 45%,
        #fef3c7 60%,
        #fef3c7 100%
    );
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 0.1px rgba(254, 243, 199, 0.7);
    animation: textSweep 5s ease-in-out infinite;
}

/* Banner shimmer sweep */
.banner-flip-back::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-25deg);
    animation: blessingShimmer 3s ease-in-out infinite;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Banner corner decorations */
.banner-flip-back::before {
    content: '';
    position: absolute;
    width: 130%;
    height: 130%;
    background:
        radial-gradient(circle at 8% 8%, rgba(251, 191, 36, 0.45) 0%, transparent 14%),
        radial-gradient(circle at 92% 8%, rgba(251, 191, 36, 0.45) 0%, transparent 14%),
        radial-gradient(circle at 8% 92%, rgba(251, 191, 36, 0.45) 0%, transparent 14%),
        radial-gradient(circle at 92% 92%, rgba(251, 191, 36, 0.45) 0%, transparent 14%);
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s ease;
}

/* Hide decorations during charging */
.banner-flip-card.charging .banner-flip-back::before,
.banner-flip-card.charging .banner-flip-back::after {
    opacity: 0;
}

/* Banner flip glow when flipped */
.banner-flip-card.flipped-glow {
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.35)) drop-shadow(0 0 18px rgba(251, 191, 36, 0.18));
    animation: bannerGoldPulse 2.5s ease-in-out infinite;
}

@keyframes bannerGoldPulse {
    0%, 100% {
        filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.3)) drop-shadow(0 0 14px rgba(251, 191, 36, 0.12));
    }
    50% {
        filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.6)) drop-shadow(0 0 30px rgba(251, 191, 36, 0.25));
    }
}

/* Banner flip charging state */
/* Charging: circular shape + energy glow */
.banner-flip-card.charging .banner-flip-back {
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5), 0 0 40px rgba(255, 215, 0, 0.25), 0 0 60px rgba(255, 215, 0, 0.1);
    animation: chargeGlow 0.6s ease-in-out infinite alternate;
}

.banner-flip-card.charging .banner-idiom-text {
    animation: chargeTextVibrate 0.12s ease-in-out infinite alternate;
}

.banner-flip-center:hover .banner-flip-card:not(.flipped-glow) .banner-logo-img {
    transform: scale(1.1);
}

/* ====== 导航栏响应式适配 ====== */

/* 中小桌面（769px ~ 1280px）：紧凑间距 */
@media (min-width: 769px) and (max-width: 1280px) {
    .top-banner-inner {
        --banner-gap: 80px;
    }
    .banner-nav-item {
        font-size: 14px;
        letter-spacing: 1.5px;
    }
    .banner-logo-img {
        width: 54px;
        height: 54px;
    }
    .banner-flip-card {
        width: 54px;
        height: 54px;
    }
    .banner-flip-front .banner-logo-img {
        width: 54px;
        height: 54px;
    }
}

/* 宽屏（>1280px）：默认宽松间距，无需覆盖 */

/* 手机端：隐藏通栏（banner整体隐藏，内部控件随之隐藏） */
@media (max-width: 768px) {
    .top-banner {
        display: none;
    }
}


.usage-counter {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    padding: 6px 12px;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0.7;
    cursor: pointer;
}



.help-icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #4a90e2;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    opacity: 0.7;
    margin: 0; /* 确保没有额外的边距 */
}

.help-icon-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    color: #357abd;
    transform: scale(1.1) rotate(15deg);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.usage-counter:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(calc(-50% - 1px));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.usage-counter:focus {
    outline: none;
}

.usage-counter:active {
    outline: none;
}

.usage-icon {
    font-size: 1em;
    line-height: 1;
    opacity: 0.8;
}

.usage-text {
    font-size: 0.85em;
    color: #555;
    font-weight: 500;
    min-width: 15px;
    text-align: center;
}

.visitor-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.visitor-stats:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.visitor-icon {
    font-size: 1em;
    line-height: 1;
    opacity: 0.8;
}

.visitor-text {
    font-size: 0.85em;
    color: #555;
    font-weight: 500;
    min-width: 15px;
    text-align: center;
}


.usage-modal {
    position: fixed;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

@media (min-width: 769px) {
    .usage-modal {
        top: 145px;
        right: 20px;
    }
}

@media (max-width: 768px) {
    .usage-modal {
        bottom: 70px;
        left: 20px;
    }
}

.usage-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    /*box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25),
                0 0 30px rgba(52, 152, 219, 0.2);*/
    max-width: 380px;
    width: 320px;
    overflow: hidden;
    transform: scale(0.9) translateY(-10px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid rgba(52, 152, 219, 0.2);
    position: relative;
}

@media (min-width: 769px) {
    .modal-content::before {
        content: '';
        position: absolute;
        top: -10px;
        right: 25px;
        width: 0;
        height: 0;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        border-bottom: 10px solid rgba(255, 255, 255, 0.98);
        filter: drop-shadow(0 -2px 2px rgba(0, 0, 0, 0.05));
    }
    
    .modal-content::after {
        content: '';
        position: absolute;
        top: -13px;
        right: 24px;
        width: 0;
        height: 0;
        border-left: 11px solid transparent;
        border-right: 11px solid transparent;
        border-bottom: 11px solid rgba(52, 152, 219, 0.2);
        z-index: -1;
    }
}

@media (max-width: 768px) {
    .modal-content::before {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 25px;
        width: 0;
        height: 0;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        border-top: 10px solid rgba(255, 255, 255, 0.98);
        filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.05));
    }
    
    .modal-content::after {
        content: '';
        position: absolute;
        bottom: -13px;
        left: 24px;
        width: 0;
        height: 0;
        border-left: 11px solid transparent;
        border-right: 11px solid transparent;
        border-top: 11px solid rgba(52, 152, 219, 0.2);
        z-index: -1;
    }
}

.usage-modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    background: linear-gradient(135deg, #66ddea 0%, #fcc2ef 100%);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.modal-title {
    font-size: 1.05em;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modal-close {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    font-size: 1.6em;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding-bottom: 3px;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px 18px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-icon {
    font-size: 1.9em;
    flex-shrink: 0;
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 0.82em;
    color: #7f8c8d;
    margin-bottom: 3px;
    font-weight: 500;
}

.stat-value {
    font-size: 1.1em;
    color: #2c3e50;
    font-weight: 600;
}

.stat-value strong {
    color: #ea4c89de;
    font-size: 1.25em;
}

.number-placeholder {
    font-size: 1em;
    opacity: 0.2;
}

@media (max-width: 768px) {
    .number-placeholder {
        display: none;
    }
}

.emoji-subtle {
    font-size: 0.75em;
    opacity: 0.5;
    margin-left: 12px;
}

.stat-desc {
    font-size: 0.88em;
    color: #555;
    line-height: 1.4;
}

/* 模式切换区块 */
.mode-switch-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 35px 0 20px;
    text-align: center;
    opacity: 0;
    animation: modeSwitchFadeIn 2.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
}

@keyframes modeSwitchFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.mode-switch-container {
    margin: 8px 8px 0px 8px;
    display: flex;
    justify-content: center;
}

.mode-description {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-top: 8px;
    text-align: center;
    display: inline;
}

.mode-description-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 0px;
}

/* 模式信息提示 */
.mode-info-tooltip {
    position: relative;
    display: inline-block;
    margin-top: 8px;
    z-index: 999998; /* 确保父容器层级也足够高 */
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: #ea4c898f;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.info-icon:hover {
    /*background: #2980b9;*/
    transform: scale(1.1);
}

.tooltip-bubble {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: rgba(255, 255, 255, 0.95);
    color: #686969;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.8em;
    line-height: 1.5;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.tooltip-bubble.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.tooltip-arrow {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(250, 250, 250, 0.95);
}

.tooltip-content {
    text-align: center;
}

/* 气泡内容样式增强 */
.tooltip-content strong,
.tooltip-content b {
    font-weight: 700;
    color: #ea4c89de;
}

.tooltip-content .highlight {
    color: #ea4c89de;
    font-weight: 600;
}

.tooltip-content .divider-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.3), transparent);
    margin: 8px 0;
}

.tooltip-content .primary-text {
    color: #2c3e50;
    font-weight: 500;
}

.tooltip-content .secondary-text {
    color: #7f8c8d;
    font-size: 0.9em;
}

.tooltip-content .accent-text {
    color: #667eea;
    font-weight: 600;
}

/* 移动端气泡定位优化 */
@media (max-width: 768px) {
    .tooltip-bubble {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) scale(0.8) !important;
        width: calc(100vw - 40px) !important;
        max-width: 320px;
        white-space: normal;
        z-index: 999999 !important; /* 确保在最顶层，高于所有元素 */
    }
    
    .tooltip-bubble.show {
        transform: translate(-50%, -50%) scale(1) !important;
        z-index: 999999 !important;
    }
    
    .tooltip-arrow {
        display: none !important;
    }
    
    /* 确保气泡容器也有足够的层级 */
    .mode-info-tooltip {
        z-index: auto !important;
    }
}

/* 模式开关 */
.mode-switch {
    position: relative;
    display: inline-flex;
    width: 180px;
    height: 36px;
    background: rgba(245, 247, 250, 0.8);
    border-radius: 18px;
    cursor: pointer;
    overflow: hidden;
    border: 2px solid rgba(52, 152, 219, 0.2);
    transition: all 0.3s ease;
    user-select: none;
}

.mode-switch:hover {
    border-color: rgba(52, 152, 219, 0.4);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
}

/* 查询进行中时的禁止切换样式 */
.mode-switch.disabled-anim {
    animation: shake 0.15s cubic-bezier(.36,.07,.19,.97) both;
    border-color: rgba(231, 76, 60, 0.4) !important;
    cursor: not-allowed !important;
}

@keyframes shake {
    10% { transform: translate3d(-3px, 0, 0); }
    20% { transform: translate3d(3px, -3px, 0); }
    30% { transform: translate3d(-3px, 3px, 0); }
    40% { transform: translate3d(3px, 0, 0); }
    50% { transform: translate3d(-3px, -3px, 0); }
    60% { transform: translate3d(3px, 3px, 0); }
    70% { transform: translate3d(-3px, 0, 0); }
    80% { transform: translate3d(0, -3px, 0); }
    90% { transform: translate3d(0, 3px, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

/* 滑动块 */
.mode-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(50% - 3px);
    height: calc(100% - 6px);
    background: linear-gradient(65deg, #66ddea 0%, #fcc2ef 100%);
    border-radius: 15px;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 选项文本 */
.mode-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    font-weight: 600;
    color: #7f8c8d;
    transition: color 0.3s ease;
    z-index: 1;
}

.mode-option.mode-active {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.3), transparent);
    margin: 14px 0;
}

.modal-footer {
    margin-top: 16px;
    text-align: center;
}

.footer-text {
    font-size: 0.85em;
    color: #95a5a6;
    letter-spacing: 0.5px;
    margin: 0;
}

/* 帮助卡片样式 */
.help-modal {
    max-width: 420px;
    text-align: left;
}

/* 帮助悬浮窗定位（跟随帮助按钮） */
#helpModal {
    position: fixed;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

@media (min-width: 769px) {
    #helpModal {
        top: 145px;
        right: 20px;
    }
}

@media (max-width: 768px) {
    #helpModal {
        bottom: 70px;
        left: 20px;
    }
}

#helpModal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.help-modal ul {
    padding-left: 20px;
    margin: 8px 0 16px 0;
    color: #666;
}

.help-modal li {
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.6;
}

.help-modal p {
    margin: 12px 0 4px 0;
    font-size: 15px;
    color: #95a5a6;
}


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

.header h1 {
    font-size: 45px;
    color: #61676c;
    margin-bottom: 15px;
    font-weight: 300;
    letter-spacing: 8px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
    animation: glow 3s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
}

/* Logo Flip Card */
.logo-flip-card {
    width: 82px;
    height: 82px;
    perspective: 600px;
    cursor: pointer;
    flex-shrink: 0;
    display: inline-block;
    position: relative;
    animation: logoFloat 3.5s ease-in-out infinite;
    filter: drop-shadow(0 3px 8px rgba(52, 152, 219, 0.12));
    transition: filter 0.4s ease;
    -webkit-tap-highlight-color: transparent;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25%      { transform: translateY(-6px) rotate(1deg); }
    75%      { transform: translateY(3px) rotate(-0.5deg); }
}

/* Idle ambient sparkles */
.logo-sparkle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.95), rgba(180,210,240,0.3));
    pointer-events: none;
    z-index: 2;
    animation: sparklePop var(--dur) ease-out forwards;
}

@keyframes sparklePop {
    0%   { opacity: 0; transform: scale(0); }
    25%  { opacity: 0.9; transform: scale(1.3); }
    100% { opacity: 0; transform: scale(0); }
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.flip-card-inner.flipped {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.flip-card-front {
    background: transparent;
}

.flip-card-front .logo-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(52, 152, 219, 0.15));
    transition: transform 0.3s ease;
}

.logo-flip-card:hover {
    filter: drop-shadow(0 4px 14px rgba(52, 152, 219, 0.25));
}

.logo-flip-card:hover .logo-img {
    transform: scale(1.12) rotate(-2deg);
}

.logo-flip-card:hover {
    animation-play-state: paused;
}

/* --- Back: Red-envelope hongbao style --- */
.flip-card-back {
    background: linear-gradient(145deg, #b91c1c 0%, #dc2626 25%, #ef4444 50%, #fbbf24 88%, #f59e0b 100%);
    transform: rotateY(180deg);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 3px;
    text-align: center;
    padding: 6px;
    border: 2px solid rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.45), 0 0 35px rgba(251, 191, 36, 0.15);
    transition: border-radius 0.5s ease, box-shadow 0.5s ease;
}

/* Charging state: circular shape + energy glow */
.logo-flip-card.charging .flip-card-back {
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5), 0 0 40px rgba(255, 215, 0, 0.25), 0 0 60px rgba(255, 215, 0, 0.1);
    animation: chargeGlow 0.6s ease-in-out infinite alternate;
}

@keyframes chargeGlow {
    0%   { box-shadow: 0 0 15px rgba(255, 215, 0, 0.3), 0 0 30px rgba(255, 215, 0, 0.15); }
    100% { box-shadow: 0 0 28px rgba(255, 215, 0, 0.7), 0 0 55px rgba(255, 215, 0, 0.35), 0 0 80px rgba(255, 215, 0, 0.15); }
}

/* Golden glow pulse when flipped */
.logo-flip-card.flipped-glow {
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.35)) drop-shadow(0 0 24px rgba(251, 191, 36, 0.18));
    animation: logoFloat 3.5s ease-in-out infinite, goldPulse 2.5s ease-in-out infinite;
}

@keyframes goldPulse {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.3)) drop-shadow(0 0 18px rgba(251, 191, 36, 0.12));
    }
    50% {
        filter: drop-shadow(0 0 18px rgba(255, 215, 0, 0.6)) drop-shadow(0 0 38px rgba(251, 191, 36, 0.28));
    }
}

/* Shimmer sweep */
.flip-card-back::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-25deg);
    animation: blessingShimmer 3s ease-in-out infinite;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

@keyframes blessingShimmer {
    0%   { left: -120%; }
    45%  { left: 160%; }
    100% { left: 160%; }
}

/* Corner decorations */
.flip-card-back::before {
    content: '';
    position: absolute;
    width: 130%;
    height: 130%;
    background:
        radial-gradient(circle at 8% 8%, rgba(251, 191, 36, 0.5) 0%, transparent 14%),
        radial-gradient(circle at 92% 8%, rgba(251, 191, 36, 0.5) 0%, transparent 14%),
        radial-gradient(circle at 8% 92%, rgba(251, 191, 36, 0.5) 0%, transparent 14%),
        radial-gradient(circle at 92% 92%, rgba(251, 191, 36, 0.5) 0%, transparent 14%);
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s ease;
}

/* Blessing text - calligraphy font + bold + slow sweep shimmer */
.idiom-text {
    font-family: 'Ma Shan Zheng', 'STXingkai', 'KaiTi', 'Kai', serif;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
    position: relative;
    z-index: 1;
    background: linear-gradient(
        90deg,
        #fef3c7 0%,
        #fef3c7 30%,
        #ffffff 45%,
        #fef3c7 60%,
        #fef3c7 100%
    );
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 0.1px rgba(254, 243, 199, 0.7);
    animation: textSweep 5s ease-in-out infinite;
}

@keyframes textSweep {
    0%   { background-position: 100% center; }
    100% { background-position: -100% center; }
}

/* Gold burst particles on flip */
.gold-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100;
    animation: particleFly 0.85s ease-out forwards;
}

@keyframes particleFly {
    0%   { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0.2); }
}

/* Confetti ribbons */
.confetti-piece {
    position: absolute;
    pointer-events: none;
    z-index: 99;
    border-radius: 2px;
    animation: confettiFly var(--dur) cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes confettiFly {
    0%   { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
    55%  { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.35); }
}

/* Shockwave ring */
.shockwave-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    margin-left: -8px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 215, 0, 0.75);
    pointer-events: none;
    z-index: 98;
    animation: shockwaveExpand 0.65s ease-out forwards;
}

@keyframes shockwaveExpand {
    0%   { transform: scale(0); opacity: 1; border-width: 3px; }
    100% { transform: scale(7); opacity: 0; border-width: 0.5px; }
}

/* Falling gold dust after flip */
.gold-dust {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 97;
    animation: dustFall var(--dur) ease-in forwards;
}

@keyframes dustFall {
    0%   { opacity: 0.85; transform: translateY(0) rotate(0deg); }
    100% { opacity: 0; transform: translateY(var(--fall)) rotate(200deg); }
}


/* Hide decorations during charging */
.logo-flip-card.charging .flip-card-back::before,
.logo-flip-card.charging .flip-card-back::after {
    opacity: 0;
}

/* Idiom text vibration during charging */
.logo-flip-card.charging .flip-card-back .idiom-text {
    animation: chargeTextVibrate 0.12s ease-in-out infinite alternate;
}

@keyframes chargeTextVibrate {
    0%   { transform: scale(1) translateX(-0.5px); }
    100% { transform: scale(1.06) translateX(0.5px); }
}

/* Charging ring - contracts inward before burst */
.charge-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90px;
    height: 90px;
    margin-top: -45px;
    margin-left: -45px;
    border-radius: 50%;
    border: 2.5px solid transparent;
    border-top-color: #ffd700;
    border-right-color: #fbbf24;
    border-bottom-color: #f59e0b;
    pointer-events: none;
    z-index: 98;
    animation: chargeRingSpin 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.3), inset 0 0 12px rgba(255, 215, 0, 0.15);
}

@keyframes chargeRingSpin {
    0%   { transform: scale(1.8) rotate(0deg); opacity: 0; border-width: 2px; }
    15%  { opacity: 1; }
    70%  { transform: scale(0.6) rotate(540deg); opacity: 1; border-width: 3px;
           box-shadow: 0 0 24px rgba(255, 215, 0, 0.6), inset 0 0 18px rgba(255, 215, 0, 0.3); }
    100% { transform: scale(0.1) rotate(720deg); opacity: 0; border-width: 4px;
           box-shadow: 0 0 40px rgba(255, 215, 0, 0.9); }
}

/* Charging particles - converge from outside then vanish */
.charge-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99;
    animation: chargeConverge 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes chargeConverge {
    0%   { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(0.5); }
    20%  { opacity: 1; }
    80%  { opacity: 1; transform: translate(0, 0) scale(1.3); }
    100% { opacity: 0; transform: translate(0, 0) scale(0); }
}

/* Channel busy bubble notification */
.channel-busy-bubble {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(238, 90, 36, 0.4);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    white-space: nowrap;
}

.channel-busy-bubble.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==================== Queue Card ==================== */

/* --- Tier colors via CSS custom properties --- */
.queue-card {
    --q-accent: #22c55e;
    --q-accent-soft: rgba(34, 197, 94, 0.08);
    --q-accent-glow: rgba(34, 197, 94, 0.15);
    --q-gradient: linear-gradient(135deg, #16a34a, #22c55e, #4ade80);
    --q-progress-bg: rgba(34, 197, 94, 0.1);
    margin: 20px auto 0;
    max-width: 420px;
    padding: 0;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.06),
        0 0 0 1px var(--q-accent-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: queueSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    transition: box-shadow 0.5s ease, border-color 0.5s ease;
}

/* Tier: calm (green) */
.queue-calm {
    --q-accent: #22c55e;
    --q-accent-soft: rgba(34, 197, 94, 0.08);
    --q-accent-glow: rgba(34, 197, 94, 0.15);
    --q-gradient: linear-gradient(135deg, #16a34a, #22c55e, #4ade80);
    --q-progress-bg: rgba(34, 197, 94, 0.1);
}

/* Tier: moderate (amber) */
.queue-moderate {
    --q-accent: #f59e0b;
    --q-accent-soft: rgba(245, 158, 11, 0.08);
    --q-accent-glow: rgba(245, 158, 11, 0.18);
    --q-gradient: linear-gradient(135deg, #d97706, #f59e0b, #fbbf24);
    --q-progress-bg: rgba(245, 158, 11, 0.1);
}

/* Tier: heavy (red) */
.queue-heavy {
    --q-accent: #ef4444;
    --q-accent-soft: rgba(239, 68, 68, 0.08);
    --q-accent-glow: rgba(239, 68, 68, 0.2);
    --q-gradient: linear-gradient(135deg, #dc2626, #ef4444, #f87171);
    --q-progress-bg: rgba(239, 68, 68, 0.1);
}

@keyframes queueSlideIn {
    0%   { opacity: 0; transform: translateY(-16px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Top accent bar */
.queue-card::before {
    content: '';
    display: block;
    height: 3px;
    background: var(--q-gradient);
    background-size: 200% 100%;
    animation: queueBarShimmer 3s ease-in-out infinite;
}

@keyframes queueBarShimmer {
    0%   { background-position: 200% center; }
    100% { background-position: -200% center; }
}

.queue-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 24px 0;
}

.queue-icon {
    font-size: 18px;
    filter: drop-shadow(0 0 4px var(--q-accent-glow));
    animation: queueIconFloat 2s ease-in-out infinite;
}

@keyframes queueIconFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
}

.queue-title {
    font-size: 14px;
    font-weight: 500;
    color: #6b5e52;
    letter-spacing: 1px;
    transition: color 0.4s ease;
}

.queue-title.queue-status-ready {
    color: var(--q-accent);
    font-weight: 600;
}

.queue-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    gap: 0;
}

.queue-stat {
    flex: 1;
    text-align: center;
}

.queue-stat-value {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    background: var(--q-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.4s ease;
}

.queue-stat-value.queue-ready {
    font-size: 30px;
    animation: queueReadyPulse 1s ease-in-out infinite;
}

@keyframes queueReadyPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.12); opacity: 0.85; }
}

.queue-stat-value.queue-pulse {
    animation: queueValuePulse 0.5s ease;
}

@keyframes queueValuePulse {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.queue-stat-label {
    font-size: 11px;
    color: #a09080;
    margin-top: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.queue-stat-divider {
    width: 1px;
    height: 32px;
    background: linear-gradient(to bottom, transparent, rgba(180, 160, 130, 0.2), transparent);
    flex-shrink: 0;
}

.queue-progress-bar {
    height: 4px;
    margin: 0 24px 14px;
    border-radius: 2px;
    background: var(--q-progress-bg);
    overflow: hidden;
}

.queue-progress-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--q-gradient);
    background-size: 200% 100%;
    animation: queueProgressShimmer 2.5s ease-in-out infinite;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    position: relative;
}

.queue-progress-fill::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 20px; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6));
    border-radius: 2px;
}

@keyframes queueProgressShimmer {
    0%   { background-position: 200% center; }
    100% { background-position: -200% center; }
}

.queue-footer {
    display: flex;
    justify-content: space-between;
    padding: 10px 24px 14px;
    font-size: 11px;
    color: #b0a090;
    letter-spacing: 0.3px;
    border-top: 1px solid rgba(180, 160, 130, 0.08);
}

.queue-load, .queue-avg {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.queue-load span, .queue-avg span {
    color: #8b7e74;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}


/* Queue network warning */
.queue-net-warn {
    margin: 0 24px 14px;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
    font-size: 12px;
    text-align: center;
    letter-spacing: 0.5px;
    animation: queueSlideIn 0.3s ease;
}


.header p {
    font-size: 1.1em;
    color: #95a5a6;
    letter-spacing: 2px;
}

.blessing-text {
    font-size: 1.15em;
    background: linear-gradient(135deg, #ff9a9e 0%, #4a9be7 50%, #fecfef 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-weight: 500;
    letter-spacing: 3px;
    animation: blessingFade 4s ease-in-out infinite;
    margin-top: 18px;
    opacity: 0.85;
}

.blessing-text .blessing-decorate {
    opacity: 0.6;
    font-weight: 300;
}

@keyframes blessingFade {
    0%, 100% {
        opacity: 0.7;
        transform: translateY(0);
    }
    50% {
        opacity: 0.9;
        transform: translateY(-2px);
    }
}


.service-tip {
    text-align: center;
    margin: 10px auto 0;
    padding: 10px 20px;
    font-size: 0.85em;
    color: #95a5a6;
    letter-spacing: 1px;
    opacity: 0.7;
    transition: all 0.3s ease;
    max-width: 600px;
    font-family: 'LocalEmoji', 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

.service-tip:hover {
    opacity: 1;
    color: #7f8c8d;
}


.search-container {
    max-width: 800px;
    margin: 0 auto 50px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.search-box {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1),
                0 0 40px rgba(52, 152, 219, 0.1);
    border: 2px solid rgba(52, 152, 219, 0.1);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 100%;
}

.search-box:hover {
    
    transform: translateY(-5px);  
    
    
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15),
                0 0 60px rgba(52, 152, 219, 0.2);
    border-color: rgba(52, 152, 219, 0.3);
}

.search-input-wrapper {
    display: flex;
    gap: 15px;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 18px 30px;
    font-size: 1.1em;
    border: 2px solid rgba(52, 152, 219, 0.2);
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(248, 250, 252, 0.8);
    color: #2c3e50;
    font-family: 'LocalEmoji', 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

.search-input:focus {
    border-color: rgba(52, 152, 219, 0.6);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 30px rgba(52, 152, 219, 0.2);
    transform: scale(1.02);
}

.search-btn {
    padding: 18px 50px;
    font-size: 1.1em;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #66ddea 0%, #fcc2ef 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.captcha-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    animation: slideDown 0.3s ease-out;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

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

.captcha-box {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    /*box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);*/
    border: 1.5px solid rgba(52, 152, 219, 0.2);
    width: auto;
    min-width: 250px;
}

.captcha-question {
    flex: 0 0 auto;
    font-size: 1.8em;
    font-weight: 700;
    text-align: center;
    letter-spacing: 2px;
    text-shadow: none;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.2));
    min-width: 120px;
    color: #667eea;
}

/* 桌面版：题目和刷新按钮在同一行 */
.captcha-top-row {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.captcha-refresh {
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 1.1em;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    border: 1.5px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.captcha-refresh:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
    transform: rotate(180deg);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.captcha-refresh:active {
    transform: rotate(180deg) scale(0.9);
}

.captcha-input {
    flex: 0 1 auto;
    width: 160px;
    padding: 12px 20px;
    font-size: 14px;
    border: 2px solid rgba(52, 152, 219, 0.3);
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(248, 250, 252, 0.8);
    color: #2c3e50;
    text-align: center;
}

.captcha-input:focus {
    border-color: rgba(52, 152, 219, 0.6);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.2);
}

.captcha-submit {
    padding: 12px 32px;
    font-size: 1em;
    font-weight: 700;
    color: white;
    background: linear-gradient(325deg, #66ddea 0%, #fcc2ef 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.35),
                0 4px 12px rgba(118, 75, 162, 0.2);
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

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

.captcha-submit:hover::before {
    left: 100%;
}

.captcha-submit:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5),
                0 6px 16px rgba(118, 75, 162, 0.3);
}

.captcha-submit:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4),
                0 3px 10px rgba(118, 75, 162, 0.25);
}

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

.search-btn:hover::before {
    left: 100%;
}

.search-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

.search-btn:active {
    transform: translateY(-1px) scale(1.03);
}

.search-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}


.search-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
}

.search-btn:disabled:hover {
    transform: none !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
}

.search-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}


.input-tooltip {
    position: absolute;
    top: calc(100% + 15px);  
    left: 50%;
    transform: translateX(-50%);  
    background: rgba(255, 255, 255, 0.98);  
    color: #2c3e50;  
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.9em;
    white-space: nowrap;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);  
    pointer-events: none;
    border: 1px solid rgba(0, 0, 0, 0.1);  
    
    
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.input-tooltip::after {
    content: '';
    position: absolute;
    top: -8px;  
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom-color: rgba(255, 255, 255, 0.98);  
}

.input-tooltip.show {
    opacity: 1;
    visibility: visible;
    
    transform: translateX(-50%);
    
    
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.input-tooltip.error {
    
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.input-tooltip.error::after {
    border-bottom-color: rgba(255, 255, 255, 0.98);
}

.input-tooltip.success {
    
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.input-tooltip.success::after {
    border-bottom-color: rgba(255, 255, 255, 0.98);
}


.results-container {
    animation: fadeInUp 0.6s ease-out 0.4s both;
    max-width: 1100px;  
    margin: 0 auto;  
}

.results-header {
    display: flex;
    justify-content: center;  
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.results-count {
    font-size: 1.1em;
    color: #7f8c8d;
    text-align: center;  
}

.results-count strong {
    color: #ea4c89de;
    font-size: 1.3em;
    margin-left: 10px;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr;  
    gap: 30px;
    width: 100%;  
}


.results-grid .streaming-output {
    width: 100% !important;  
}



.result-table-container {
    width: 100%;  
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    border: 2px solid rgb(255 255 255 / 10%);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
    opacity: 1;  
    position: relative;
}

.result-table-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(52, 152, 219, 0.3), 
        rgba(155, 89, 182, 0.3), 
        rgba(52, 152, 219, 0.3));
    border-radius: 17px;
    z-index: -1;
    opacity: 0;
    animation: holographicGlow 0.2s ease-out forwards;
}

@keyframes holographicGlow {
    0% {
        opacity: 0;
        filter: blur(20px);
    }
    50% {
        opacity: 1;
        filter: blur(10px);
    }
    100% {
        opacity: 0;
        filter: blur(0);
    }
}

@keyframes fadeInTableContainer {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.8) rotateX(15deg);
        filter: blur(20px) brightness(2.5) saturate(0);
        box-shadow: 0 0 60px rgba(52, 152, 219, 0.8), 0 0 100px rgba(52, 152, 219, 0.4);
    }
    30% {
        opacity: 0.4;
        transform: translateY(15px) scale(0.9) rotateX(8deg);
        filter: blur(10px) brightness(2) saturate(0.3);
        box-shadow: 0 0 40px rgba(52, 152, 219, 0.6), 0 0 70px rgba(52, 152, 219, 0.3);
    }
    60% {
        opacity: 0.7;
        transform: translateY(5px) scale(1.03) rotateX(-3deg);
        filter: blur(4px) brightness(1.3) saturate(0.8);
        box-shadow: 0 0 20px rgba(52, 152, 219, 0.4), 0 0 40px rgba(52, 152, 219, 0.2);
    }
    80% {
        opacity: 0.9;
        transform: translateY(-2px) scale(1.01) rotateX(1deg);
        filter: blur(1px) brightness(1.05) saturate(0.95);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
        filter: blur(0) brightness(1) saturate(1);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    }
}

.result-table-container:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1),
                0 0 30px rgba(52, 152, 219, 0.15);
    border-color: rgba(52, 152, 219, 0.3);
}


.slide-in {
    opacity: 0;
    transform: translateX(-20px) scale(0.95);
    filter: blur(5px);
    animation: slideInContent 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes slideInContent {
    0% {
        opacity: 0;
        transform: translateX(-20px) scale(0.95);
        filter: blur(5px);
    }
    50% {
        opacity: 0.6;
        transform: translateX(5px) scale(1.02);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }
}


.result-table {
    display: flex;
    flex-direction: column;
}


.table-header {
    display: grid;
    grid-template-columns: 60px 200px 380px 1fr;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    font-weight: 600;
    font-size: 1.05em;
    letter-spacing: 0.5px;
    opacity: 0;
    animation: fadeInHeader 0.35s ease-out 0.15s forwards; 
}

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

.header-cell {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(200, 210, 220, 0.3);
}

.header-cell:last-child {
    border-right: none;
}

.badge-cell {
    justify-content: center;
    background: rgba(0, 0, 0, 0.03);
}


.table-row {
    display: grid;
    grid-template-columns: 60px 200px 380px 1fr;
    border-bottom: 1px solid rgba(200, 210, 220, 0.15);
    transition: all 0.3s ease;
}

.table-row:first-child {
    animation: fadeInRow 0.35s ease-out 0.2s forwards; 
    opacity: 0;
}

.table-row:not(:first-child) {
    opacity: 0;  
}


.table-row.recommended-row,
.table-row.alternative-row {
    animation: fadeInRow 0.35s ease-out forwards;  
}

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

.table-row:last-child {
    border-bottom: none;
}

.table-row:hover {
    background: rgba(248, 249, 250, 0.6);
}


.row-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-right: 2px solid rgba(200, 210, 220, 0.2);
}

.recommended-badge {
    background: linear-gradient(135deg, #fff9db 0%, #fff3bf 100%);
    color: #a88b2a;
}

.alternative-badge {
    background: linear-gradient(135deg, #e6f7f1 0%, #d4f0e6 100%);
    color: #2d8a6a;
}


.table-cell {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #495057;
    font-size: 0.9em;
    border-right: 1px solid rgba(200, 210, 220, 0.15);
}

.table-cell:last-child {
    border-right: none;
}

.name-cell {
    
    color: #343a40;
    font-size: 18px;
}

.category-cell {
    color: #868e96;
    font-size: 16px;
}


.code-cell {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #555555;
    font-size: 23px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}


.copy-btn-small {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: #495057;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    opacity: 0;  
}

.copy-btn-small:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #dee2e6 0%, #ced4da 100%);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.copy-btn-small:active {
    transform: translateY(0);
}

.copy-btn-small.copied {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}


.description-cell {
    color: #adb5bd;
    font-size: 0.85em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: calc(1.6em * 2 + 2px);
}


.explanation-row {
    padding: 18px 30px;
    background: linear-gradient(135deg, rgba(233, 236, 239, 0.5) 0%, rgba(222, 226, 230, 0.5) 100%);
    border-top: 2px solid rgba(200, 210, 220, 0.3);
}

.explanation-content {
    color: #b46363;
    font-size: 0.9em;
    line-height: 1.7;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    border-left: 4px solid #b46363;
    border-right: 4px solid #b46363;
    white-space: pre-line;
    opacity: 0;  
    animation: slideInContent 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.disclaimer-row {
    padding: 14px 30px;
    background: linear-gradient(135deg, rgb(234 237 240) 0%, rgb(234 237 240) 100%);
    border-top: 1px solid rgb(162 175 185 / 38%);
}

.disclaimer-content {
    color: rgb(162, 175, 185);
    font-size: 0.75em;
    line-height: 1.6;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    border-left: 3px solid rgb(162, 175, 185);
    border-right: 3px solid rgb(162, 175, 185);
    opacity: 0;
    animation: slideInContent 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}


.error-card-container {
    width: 100%;
    animation: fadeInTableContainer 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.error-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    padding: 40px 30px;
    box-shadow: 0 5px 20px rgba(231, 76, 60, 0.15),
                0 0 30px rgba(231, 76, 60, 0.1);
    border: 2px solid rgba(231, 76, 60, 0.2);
    text-align: center;
    transition: all 0.3s ease;
}

.error-card:hover {
    box-shadow: 0 10px 40px rgba(231, 76, 60, 0.25),
                0 0 40px rgba(231, 76, 60, 0.15);
    border-color: rgba(231, 76, 60, 0.4);
}

.error-icon {
    font-size: 3.5em;
    margin-bottom: 15px;
    animation: shake 0.5s ease-in-out;
    color: #999;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.error-title {
    font-size: 1.8em;
    color: #d2d2d2;
    font-weight: 600;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

.error-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: rgba(245, 247, 250, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(231, 76, 60, 0.1);
}

.error-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
}

.error-label {
    font-weight: 600;
    color: #7f8c8d;
    font-size: 0.95em;
    min-width: 60px;
    flex-shrink: 0;
}

.error-value {
    color: #2c3e50;
    font-size: 0.95em;
    line-height: 1.6;
}

.error-code {
    font-family: 'Courier New', monospace;
    color: #e74c3c;
    font-weight: 600;
    letter-spacing: 0.5px;
}


.tax-code-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: linear-gradient(135deg, rgba(252, 186, 200, 0.1) 0%, rgba(212, 90, 185, 0.1) 100%);
    border-top: 2px solid rgba(52, 152, 219, 0.15);
}

.tax-code-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1em;
    font-weight: 600;
    color: #ea4c89de;
    letter-spacing: 1px;
}

.tax-code-value {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.4em;
    font-weight: 700;
    color: #2c3e50;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.result-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    
    padding: 25px 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    border: 2px solid rgba(52, 152, 219, 0.1);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: visible;  
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.result-card:hover::before {
    transform: scaleX(1);
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1),
                0 0 30px rgba(52, 152, 219, 0.15);
    border-color: rgba(52, 152, 219, 0.3);
}

.result-item {
    margin-bottom: 0;
    line-height: 1.6;
}

.result-item.flex-grow {
    flex-grow: 1;
}


.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}


.copy-btn-large {
    background: linear-gradient(135deg, #66ddea 0%, #ca81ba 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.copy-btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.copy-btn-large:active {
    transform: translateY(0);
}

.copy-btn-large.copied {
    background: linear-gradient(135deg, #a79428 0%, #c96c20 100%);
}


.copy-btn {
    background: linear-gradient(135deg, #fcbac8 0%, #d45ab9 100%);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn.copied {
    background: linear-gradient(135deg, #a79428 0%, #c96c20 100%);
}



.result-category-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
}


.result-description-row {
    width: 100%;
    padding: 12px 15px;
    background: rgba(245, 247, 250, 0.5);
    
    border-left: 3px solid #711cab54;
    position: relative;
    cursor: pointer;
}


.description-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}


.description-text {
    flex: 1;
    color: #7f8c8d;
    font-size: 0.9em;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: calc(1.6em * 2 + 2px);
}


.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.98);
    color: #333;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 0.9em;
    line-height: 1.6;
    max-width: 400px;
    width: max-content;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(0, 0, 0, 0.05);
    pointer-events: none;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(255, 255, 255, 0.98);
}

.result-description-row:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

.result-label {
    display: inline-block;
    width: 80px;
    color: #95a5a6;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    font-weight: 600;
    flex-shrink: 0;
}

.result-value {
    color: #2c3e50;
    font-weight: 500;
    font-size: 1.05em;
}

.result-value.highlight {
    color: #ea4c89de;
    font-weight: 600;
    font-size: 20px;
}


.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.recommended-badge {
    background: linear-gradient(177deg, #ffffff 0%, #ffffff 100%);
    color: #5a4a00;
}

.alternative-badge {
    background: linear-gradient(177deg, #ffffff 0%, #ffffff 100%);
    color: #1a5c3a;
}

.similarity-badge {
    display: inline-block;
    padding: 5px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}


.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #95a5a6;
}

.empty-state-icon {
    font-size: 5em;
    margin-bottom: 20px;
    opacity: 0.3;
    font-family: 'LocalEmoji' !important;
}

.empty-state-text {
    font-size: 1.1em;
    letter-spacing: 1.5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.empty-main-text {
    color: #7f8c8d;
    font-size: 1.15em;
    font-weight: 500;
    letter-spacing: 2px;
}

.empty-sub-text {
    color: #95a5a6;
    font-size: 0.95em;
    letter-spacing: 1px;
    opacity: 0.8;
}


.streaming-output {
    width: 100%;  
    min-height: 200px;
    max-height: 400px;
    overflow-y: hidden;  
    padding: 30px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    line-height: 1.8;
    color: #2c3e50;
    white-space: pre-wrap;
    word-break: break-word;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    border: 2px dashed rgba(52, 152, 219, 0.2);
    animation: fadeIn 0.3s ease;
    box-sizing: border-box; 
    transition: opacity 0.4s ease, transform 0.4s ease; 
}

.typing-cursor {
    display: inline-block;
    color: #66ddea;
    animation: blink 1s infinite;
    font-weight: bold;
}


.streaming-output.simulated-typing {
    background: rgba(255, 255, 255, 0.7);
    border-style: solid;
    border-color: rgba(52, 152, 219, 0.3);
    box-shadow: 0 0 30px rgba(52, 152, 219, 0.1);
}


.local-result-container {
    margin-top: 20px;
    animation: fadeInUp 0.5s ease-out;
}

.local-result-container .result-table {
    border: 2px solid rgba(52, 152, 219, 0.3);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.15);
}

.local-result-container .explanation-row {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(76, 209, 220, 0.1));
    border-left: 4px solid #3498db;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}


.result-table-container.fade-in {
    animation: fadeInTable 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) both;
}

@keyframes fadeInTable {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


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

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

@keyframes glow {
    0% {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
    }
    50% {
        text-shadow: 0 0 25px rgba(255, 255, 255, 0.3),
                    0 0 35px rgba(255, 255, 255, 0.2);
    }
    100% {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
    }
}

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


@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.02);
    }
}


.loading-symbols {
    display: inline-block;
    width: 20px;  
    text-align: center;
    font-weight: bold;
    color: #66ddea;
    margin-left: 8px;  
    font-family: 'LocalEmoji' !important;
}


@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    /* 移动端控制组随banner隐藏，无需额外定位 */

    .header h1 {
        font-size: 1.6em;
        letter-spacing: 4px;
        gap: 20px;
    }
    
    .logo-flip-card {
        display: none;
    }

    .header p {
        font-size: 1em;
        letter-spacing: 1.5px;
    }
    
    
    .results-count {
        font-size: 0.9em;
        line-height: 1.5;
        padding: 0 15px;
        word-wrap: break-word;
        white-space: normal;
    }
    .empty-state-text {
        font-size: 13px;
        letter-spacing: 0.8px;
        line-height: 1.6;
        gap: 6px;
    }
    
    .empty-main-text {
        font-size: 14px;
        letter-spacing: 1px;
    }
    
    .empty-sub-text {
        font-size: 12px;
        letter-spacing: 0.5px;
    }
    
    
    .empty-state {
        padding: 50px 15px;  
    }
    
    .empty-state-icon {
        font-size: 4em;  
        margin-bottom: 15px;  
    }
    
    
    .input-tooltip {
        white-space: pre-wrap;  
        max-width: 280px;       
        text-align: center;     
        line-height: 1.5;       
        font-size: 13px;        
        padding: 12px 15px;     
    }

    
    .usage-counter {
        top: auto;
        bottom: 20px;
        left: 20px;
        right: auto;
    }
    
    .modal-content {
        width: 280px;
        max-width: 80vw;
        border-radius: 14px;
    }
    
    .modal-header {
        padding: 14px 18px;
    }
    
    .modal-title {
        font-size: 0.95em;
        letter-spacing: 0.3px;
    }
    
    .modal-close {
        width: 28px;
        height: 28px;
        font-size: 1.6em;
    }
    
    .modal-body {
        padding: 18px 16px;
    }
    
    .stat-item {
        gap: 10px;
        margin-bottom: 12px;
    }
    
    .stat-icon {
        font-size: 1.6em;
    }
    
    .stat-label {
        font-size: 0.75em;
        margin-bottom: 2px;
    }
    
    .stat-value {
        font-size: 0.95em;
    }
    
    .stat-value strong {
        font-size: 1.2em;
    }
    
    .stat-desc {
        font-size: 0.8em;
        line-height: 1.3;
    }
    
    .divider {
        margin: 12px 0;
    }
    
    .modal-footer {
        margin-top: 15px;
    }
    
    .footer-text {
        font-size: 0.8em;
    }
    
    
    .service-tip {
        margin: 10px auto 30px;
        padding: 8px 15px;
        font-size: 0.8em;
        letter-spacing: 0.5px;
    }
    
    
    .results-before-input {
        display: block;  
        margin-bottom: 20px;
        order: -1;
    }
    
    .results-after-input {
        display: none !important;  
    }

    .search-box {
        flex-direction: column;
        border-radius: 30px;
        padding: 20px;
    }
    
    .search-input-wrapper {
        flex-direction: column;
        gap: 12px;
    }
    
    /* 移动版验证码区域优化 - 居中 + 紧凑排版 */
    .captcha-container {
        max-width: 100%;
        margin: 0 auto;
        padding: 0 5px;
    }
    
    .captcha-box {
        flex-direction: column;
        padding: 18px 12px;
        gap: 12px;
        width: 100%;
        border-radius: 18px;
    }
    
    /* 第一行：题目 + 刷新按钮容器 */
    .captcha-top-row {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }
    
    /* 题目文字 */
    .captcha-question {
        font-size: 1.3em;
        text-align: center;
        flex: 1;
    }
    
    /* 刷新按钮 */
    .captcha-refresh {
        width: 34px;
        height: 34px;
        font-size: 1em;
        flex-shrink: 0;
    }
    
    /* 第二行：输入框（全宽） */
    .captcha-input {
        width: 100%;
        font-size: 15px;
        padding: 11px 16px;
    }
    
    /* 第三行：验证按钮（全宽） */
    .captcha-submit {
        width: 100%;
        font-size: 0.95em;
        padding: 13px 28px;
    }

    .search-input {
        width: 100%;
        font-size: 1em;
        padding: 15px 20px;
    }

    .search-btn {
        width: 100%;
        padding: 15px 40px;
        font-size: 1em;
    }
    
    
    .table-header {
        display: none;  
    }
    
    .table-row {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 16px 15px;
        border-bottom: 2px solid rgba(200, 210, 220, 0.15);
        display: flex;
        flex-direction: column;
    }
    
    .table-row:last-child {
        border-bottom: none;
    }
    
    .row-badge {
        display: none;  
    }
    
    .name-cell {
        font-size: 16px;
        font-weight: 600;
        color: #2c3e50;
        padding: 0;
        justify-content: flex-start;
        border-right: none;
        margin-bottom: 4px;
    }
    
    .category-cell {
        font-size: 13px;
        color: #7f8c8d;
        padding: 0;
        background: transparent;
        white-space: normal;
        line-height: 1.5;
        border-right: none;
        justify-content: flex-start;
        margin-bottom: 8px;
    }
    
    .code-cell {
        padding: 8px 0;
        background: transparent;
        font-size: 14px;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 10px;
        border-right: none;
        border-top: 1px solid rgba(200, 210, 220, 0.2);
        padding-top: 10px;
        margin-top: 4px;
    }
    
    .code-cell svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }
    
    .copy-btn-small {
        padding: 6px 12px;
        font-size: 0.85em;
        opacity: 1;
    }
    
    .copy-btn-small svg {
        width: 16px;
        height: 16px;
    }
    
    .explanation-row {
        padding: 15px 20px;
    }
    
    .explanation-content {
        font-size: 0.9em;
        padding: 14px 16px;
        line-height: 1.8;
    }
    
    .disclaimer-row {
        padding: 12px 20px;
    }
    
    .disclaimer-content {
        font-size: 0.7em;
        padding: 8px 12px;
        line-height: 1.5;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .result-table-container {
        border-radius: 12px;
    }
    
    
    .streaming-output {
        padding: 20px 15px;
        font-size: 13px;
        line-height: 1.7;
        white-space: pre-wrap;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
        text-align: left;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.6);
        border: 2px dashed rgba(52, 152, 219, 0.25);
    }
    
    .streaming-output.simulated-typing {
        background: rgba(255, 255, 255, 0.75);
        border-color: rgba(52, 152, 219, 0.35);
    }
    
    .typing-cursor {
        font-size: 14px;
    }
}


.loading-dots {
    display: inline-block;
}

.loading-dots span {
    animation: loadingDot 1.4s infinite ease-in-out both;
    font-size: 2em;
    color: #667eea;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loadingDot {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
}


@media (min-width: 769px) {
    .results-before-input {
        display: none !important;  
    }
    
    .results-after-input {
        display: block;  
    }
}

/* 增强模式理由说明样式 */
.streaming-output .reason-text {
    display: block;
    margin-top: 15px;
    padding: 15px;
    background: rgba(52, 152, 219, 0.08);
    border-left: 4px solid #3498db;
    border-radius: 4px;
    font-style: italic;
    color: #2c3e50;
    line-height: 1.8;
}

/* 增强模式错误提示样式 */
.streaming-output .error-reason {
    display: block;
    margin-top: 15px;
    padding: 15px;
    background: rgba(231, 76, 60, 0.08);
    border-left: 4px solid #e74c3c;
    border-radius: 4px;
    color: #c0392b;
    line-height: 1.8;
}


/* ==================== 验证码点选面板（九宫格盲盒） ==================== */
.captcha-picker-panel {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    animation: slideDown 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.captcha-picker-card {
    padding: 18px 20px 14px;
    background: linear-gradient(135deg, rgba(255,255,255,0.92) 0%, rgba(248,250,252,0.88) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 20px;
    border: 1.5px solid rgba(102,126,234,0.18);
    box-shadow: 0 8px 32px rgba(102,126,234,0.10), 0 2px 8px rgba(0,0,0,0.04);
}

.captcha-picker-hint {
    text-align: center;
    font-size: 0.78em;
    color: #a0aab4;
    margin: 10px 0 4px;
    letter-spacing: 0.5px;
}

/* 九宫格 */
.captcha-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
}

/* 盲盒卡片 */
.picker-box {
    position: relative;
    aspect-ratio: 3 / 1;
    perspective: 600px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.picker-box-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.picker-box.flipped .picker-box-inner {
    transform: rotateY(180deg);
}

.picker-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1.5px solid rgba(102,126,234,0.15);
    user-select: none;
    -webkit-user-select: none;
    overflow: hidden;
}

/* 正面：盲盒问号 */
.picker-front {
    background: linear-gradient(145deg, rgba(255,255,255,0.85), rgba(240,243,250,0.9));
    transition: all 0.25s ease;
}

/* CSS动态图标：旋转渐变光环 + 脉冲内核 */
.picker-spin {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #667eea, #66ddea, #a78bfa, #667eea
    );
    -webkit-mask: radial-gradient(farthest-side, transparent 52%, #000 54%);
    mask: radial-gradient(farthest-side, transparent 52%, #000 54%);
    animation: pickerRing 2.2s linear infinite;
    position: relative;
}
.picker-spin::after {
    content: '';
    position: absolute;
    inset: 35%;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #a78bfa);
    -webkit-mask: none;
    mask: none;
    animation: pickerPulse 1.6s ease-in-out infinite;
}
@keyframes pickerRing {
    to { transform: rotate(360deg); }
}
@keyframes pickerPulse {
    0%, 100% { opacity: 0.45; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.1); }
}

.picker-box:hover .picker-front {
    border-color: rgba(102,126,234,0.35);
    background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(235,240,252,0.95));
}
.picker-box:hover .picker-spin {
    animation-duration: 1s;
}
.picker-box:hover .picker-spin::after {
    background: linear-gradient(135deg, #667eea, #66ddea);
}

/* 背面：答案（旋转180度使其正向显示） */
.picker-back {
    transform: rotateY(180deg);
    background: linear-gradient(160deg, rgba(255,255,255,0.95), rgba(245,248,255,0.9));
    font-size: 1.2em;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 4px 6px;
    color: #2c3e50;
    border-bottom: 2.5px solid rgba(102,126,234,0.25);
}

/* 按住确认进度条 */
.picker-hold-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, #66ddea, #667eea);
    border-radius: 0 0 14px 14px;
    transition: none;
    z-index: 2;
}

.picker-box.holding .picker-hold-bar {
    width: 100%;
    transition: width 0.8s linear;
}

/* 状态 */
.picker-box.picker-correct {
    pointer-events: none;
}
.picker-box.picker-correct .picker-back {
    border-color: rgba(46,204,113,0.6);
    background: rgba(46,204,113,0.12);
    box-shadow: 0 0 16px rgba(46,204,113,0.25);
}

.picker-box.picker-wrong .picker-back {
    border-color: rgba(231,76,60,0.5);
    background: rgba(231,76,60,0.08);
    animation: pickerShake 0.4s ease;
}

.picker-box.picker-frozen {
    pointer-events: none;
    opacity: 0.4;
}

.picker-box.picker-disabled {
    pointer-events: none;
    opacity: 0.5;
}

@keyframes pickerShake {
    0%, 100% { transform: rotateY(180deg) translateX(0); }
    20% { transform: rotateY(180deg) translateX(-5px); }
    40% { transform: rotateY(180deg) translateX(4px); }
    60% { transform: rotateY(180deg) translateX(-3px); }
    80% { transform: rotateY(180deg) translateX(2px); }
}

/* IP冻结信息框 */
.ip-freeze-bar {
    text-align: center;
    padding: 12px 20px;
    border-radius: 14px;
    margin: 10px 0 4px;
    font-size: 0.9em;
    background: rgba(231,76,60,0.06);
    border: 1.5px solid rgba(231,76,60,0.2);
    color: #c0392b;
    display: none;
    animation: slideDown 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing: 0.5px;
    line-height: 1.6;
}
.ip-freeze-bar.show { display: block; }
.ip-freeze-bar .ip-freeze-secs {
    font-weight: 700;
    color: #e74c3c;
    font-variant-numeric: tabular-nums;
    min-width: 2.5em;
    display: inline-block;
}

/* 冻结倒计时 */
.picker-freeze-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(6px);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    font-size: 0.85em;
    color: #e74c3c;
    gap: 4px;
}

.picker-freeze-timer {
    font-size: 1.8em;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* 移动端 */
@media (max-width: 480px) {
    .captcha-picker-card {
        padding: 14px 12px 10px;
        border-radius: 16px;
    }
    .captcha-picker-grid {
        gap: 6px;
    }
    .picker-face {
        border-radius: 10px;
    }
    .picker-front {
        font-size: 1.3em;
    }
    .picker-back {
        font-size: 1.05em;
        letter-spacing: 1px;
    }
}

