﻿:root {
    --primary: #1ec6e6;
    --primary-dark: #25a4e9;
    --accent: #ffa200;
    --accent-light: #ffb740;
    --success: #15a223;
    --dark: #0f1535;
    --darker: #0a0f25;
    --light: #b8c6e0;
    --card-bg: rgba(20, 30, 60, 0.95);
    --text: #fff;
    --tabbar-height: 58px;
    --app-max: 480px;
}

html {
    -webkit-text-size-adjust: 100%;
    background: #070b18;
}

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

body {
    margin: 0 auto;
    padding: 0;
    width: 100%;
    max-width: var(--app-max);
    min-height: 100dvh;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #e0e6f5;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: relative;
    overflow-x: hidden;
    background: linear-gradient(135deg, #0a0f25 60%, #1e3c72 100%);
}

#root {
    width: 100%;
    position: relative;
    z-index: 10;
}

/* 叠加网格背景（科技感） */
body::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
            linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255,255,255,0.01) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
}

/* 动态流光（模拟数据流/股票曲线感） */
body::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg,
    transparent 0%,
    rgba(0, 255, 255, 0.1) 20%,
    rgba(0, 128, 255, 0.15) 40%,
    transparent 60%);
    background-size: 300% 300%;
    animation: flow 8s linear infinite;
    z-index: 1;
    pointer-events: none; /* 不影响交互 */
}

/* 动态流光动画 */
@keyframes flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}


/* 首屏优化 - 精简间距 */
.first-screen {
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 16px 16px 8px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.header {
    text-align: center;
    margin-bottom: 15px;
    width: 100%;
}

.ai-bot {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ai-bot-inner {
    width: 100%;
    height: 100%;
    background: url("../image/tou.gif") center/contain no-repeat;
    border-radius: 50%;
}

@keyframes ai-float {
    0%, 100% { transform: translateY(0) scale(1); filter: drop-shadow(0 5px 15px rgba(30, 198, 230, 0.5)); }
    50% { transform: translateY(-10px) scale(1.05); filter: drop-shadow(0 15px 25px rgba(30, 198, 230, 0.7)); }
}

.title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-align: center;
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 500;

    color: var(--light);
    text-align: center;
    line-height: 1.3;
}

.card {
    background: var(--card-bg);
    border-radius: 18px;
    margin-bottom: 15px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.accuracy {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text);
    text-align: center;
}

.accuracy .percent {
    color: var(--accent);
    font-weight: bold;
    font-size: 1.2rem;
}

.desc {
    font-size: 0.95rem;
    color: var(--light);
    margin-bottom: 10px;
    line-height: 1.5;
    text-align: center;
}

.input-group {
    width: 100%;
    margin-bottom: 15px;
    position: relative;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(35, 43, 69, 0.8);
    color: var(--text);
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 198, 230, 0.3);
}

.input-group input::placeholder {
    color: var(--light);
    opacity: 0.7;
}

.btn {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(30, 198, 230, 0.4);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

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

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30, 198, 230, 0.6);
}

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

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

/* 其他部分保持不变 */
.stats {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 0px 0 20px 0;
    width: 100%;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--light);
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap:5px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 5px;
    font-size: 12px;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.badge i {
    color: var(--accent);
}

.hot-rank {
    width: 100%;
    margin: 8px 0 22px;
}

.hot-rank-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 12px;
}

.hot-kicker {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 4px;
}

.hot-rank-head h3 {
    font-size: 1.15rem;
    color: var(--text);
}

.hot-rank-head a {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.hot-rank-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hot-rank-item {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 14px;
    background: rgba(16, 28, 58, 0.9);
    border: 1px solid rgba(90, 130, 190, 0.18);
    text-decoration: none;
    color: inherit;
}

.hot-rank-n {
    color: #7be7ff;
    font-weight: 800;
    font-size: 13px;
}

.hot-rank-item b {
    display: block;
    color: #fff;
}

.hot-rank-item small {
    color: var(--light);
    font-size: 11px;
}

.hot-tone {
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 4px 8px;
}

.hot-tone-pos { background: rgba(62, 224, 138, 0.14); color: #3ee08a; }
.hot-tone-neg { background: rgba(255, 107, 122, 0.14); color: #ff6b7a; }
.hot-tone-neu { background: rgba(255, 255, 255, 0.08); color: #c4d2ea; }

.hot-rank-empty {
    color: var(--light);
    font-size: 13px;
    padding: 8px 2px 4px;
}

.hot-rank-skel {
    height: 54px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
}

.testimonials {
    width: 100%;
    margin: 20px 0 0;
}

.testimonial {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid var(--accent);
}

.testimonial-text {
    color: var(--light);
    font-style: italic;
    margin-bottom: 10px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.author-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.ai-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

#ai-result {
    display: none;
}

.ai-progress, .ai-result {
    background-image: linear-gradient(rgba(22, 49, 114, 0.55), rgba(22, 49, 114, 0.15)), url('../image/kongbg.jpg');
    border-radius: 18px;
    padding: 35px 25px;
    max-width: 400px;
    width: 90%;
    color: var(--text);
    box-shadow: 0 5px 20px rgba(0, 0,0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.progress-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom:10px;
    font-size: 1.2rem;
    font-weight: bold;
}

.progress-box {
    margin: 20px 0;
}

.progress-item {
    margin-bottom: 20px;
}

.progress-label {
    font-size: 1rem;
    margin-bottom: 8px;
    text-align: left;
    color: var(--light);
}

.progress-bar-container {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 10px;
    width: 0%;
    transition: width 0.8s ease;
}

.result-content {
    font-size: .95rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

#chat-btn {
    background: linear-gradient(90deg, var(--success), #1db954);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(21, 162, 35, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(21, 162, 35, 0); }
    100% { box-shadow: 0 0 0 0 rgba(21, 162, 35, 0); }
}

.footer {
    width: 100%;
    max-width: 100%;
    margin: 28px auto 0 auto;
    padding: 0 16px 12px 16px;
    box-sizing: border-box;
    text-align: center;
    font-size: 0.9rem;
    color: var(--light);
}

.page-shell {
    position: relative;
    z-index: 10;
    padding-bottom: calc(var(--tabbar-height) + 16px + env(safe-area-inset-bottom, 0px));
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--accent);
    text-decoration: underline;
}

#cookie-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: min(100%, var(--app-max));
    right: auto;
    bottom: calc(var(--tabbar-height) + 22px + env(safe-area-inset-bottom, 0px));
    z-index: 1100;
    background: rgba(10, 15, 37, 0.6);
    color: var(--text);
    padding: 16px 20px;
    font-size: 0.95rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

#cookie-accept {
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
}

#cookie-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 198, 230, 0.4);
}

@media (max-width: 480px) {
    .ai-bot {
        width: 88px;
        height: 88px;
    }

    .title {
        font-size: 1.42rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .stats {
        gap: 12px;
    }

    .stat-value {
        font-size: 1.28rem;
    }

    .input-group input,
    .btn {
        font-size: 1rem;
    }

    #cookie-banner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    #cookie-accept {
        margin-left: 0;
    }

    .trust-badges {
        align-items: center;
    }
}

@media (hover: none) {
    .btn:hover,
    .footer a:hover,
    #cookie-accept:hover {
        transform: none;
    }
}

.app-tabbar {
    position: fixed;
    left: 50%;
    bottom: 8px;
    z-index: 1000;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    width: min(calc(100% - 16px), calc(var(--app-max) - 16px));
    transform: translateX(-50%);
    min-height: var(--tabbar-height);
    height: auto;
    padding: 6px 4px calc(8px + env(safe-area-inset-bottom, 0px));
    border-radius: 18px;
    background: rgba(8, 18, 42, 0.96);
    border: 1px solid rgba(80, 120, 180, 0.28);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
}

.tab-item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #7f93b8;
    text-decoration: none;
    font-size: 10px;
    line-height: 1;
    font-weight: 500;
    letter-spacing: -0.02em;
    -webkit-tap-highlight-color: transparent;
}

.tab-icon {
    width: 22px;
    height: 22px;
    display: block;
}

.tab-item.is-active {
    color: #4ec8ff;
}

.tab-item.is-active .tab-icon {
    filter: drop-shadow(0 0 6px rgba(78, 200, 255, 0.55));
}

.placeholder-page {
    position: relative;
    z-index: 10;
    padding: 32px 20px calc(var(--tabbar-height) + 24px + env(safe-area-inset-bottom, 0px));
    text-align: center;
}

.placeholder-page h1 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text);
}

.placeholder-page p {
    color: var(--light);
    line-height: 1.5;
}

main {
    position: relative;
    z-index: 10;
    width: 100%;
}

.dx-page {
    padding: 12px 16px calc(var(--tabbar-height) + 18px);
}

.dx-recent-wrap h2,
.dx-empty-card h2 {
    font-size: 0.95rem;
    margin: 16px 0 10px;
    color: #fff;
}

.dx-empty,
.profile-note {
    color: var(--light);
    font-size: 13px;
    line-height: 1.5;
}

.dx-recent-item {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 12px 14px;
    border: 1px solid rgba(90, 130, 190, 0.2);
    border-radius: 14px;
    background: rgba(16, 28, 58, 0.9);
    color: #fff;
}

.dx-result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 8px 0 12px;
}

.dx-result-grid div {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 10px;
}

.dx-result-grid span {
    display: block;
    color: var(--light);
    font-size: 11px;
    margin-bottom: 4px;
}

.dx-empty-card {
    text-align: center;
    padding: 28px 12px;
}

.dx-empty-card .btn {
    display: inline-block;
    width: auto;
    padding: 12px 22px;
    text-decoration: none;
}

.wallet-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(16, 28, 58, 0.92);
    border: 1px solid rgba(90, 130, 190, 0.2);
}

.wallet-card b { display: block; color: #fff; }
.wallet-card small { color: var(--light); }
.wallet-actions { display: flex; gap: 8px; }
.wallet-actions a,
.wallet-actions button {
    border: 0;
    background: rgba(255,255,255,0.08);
    color: #d7e7ff;
    text-decoration: none;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
}

.profile-hero {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(16, 28, 58, 0.92);
}

.profile-avatar {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), #4f7dff);
    font-weight: 800;
}

.profile-stats {
    display: flex;
    gap: 10px;
    margin: -6px 0 16px;
}

.profile-stats span {
    flex: 1;
    padding: 12px;
    border-radius: 14px;
    background: rgba(16, 28, 58, 0.92);
    color: #9eb0d1;
    font-size: 13px;
}

.profile-stats b {
    color: #e7eefc;
    font-size: 18px;
    display: block;
}

.profile-list a,
.profile-list button {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    color: #e7eefc;
    text-decoration: none;
    padding: 14px 4px;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: transparent;
    font: inherit;
    text-align: left;
}

.profile-list a span {
    color: #9eb0d1;
    font-size: 12px;
}

.profile-note { margin-top: 18px; }

.ticker-hint {
    margin: 8px 2px 0;
    color: #9eb0d1;
    font-size: 12px;
    min-height: 16px;
}

.ticker-hint.is-error { color: #ff6b7a; }

.ticker-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 4px);
    z-index: 30;
    display: flex;
    flex-direction: column;
    max-height: 260px;
    overflow: auto;
    border-radius: 14px;
    background: rgba(10, 18, 42, 0.98);
    border: 1px solid rgba(90, 130, 190, 0.28);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.ticker-suggest-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border: 0;
    background: transparent;
    color: #e7eefc;
    text-align: left;
}

.ticker-suggest-item span {
    color: #9eb0d1;
    font-size: 12px;
}

.ticker-suggest-item.is-active,
.ticker-suggest-item:hover {
    background: rgba(30, 198, 230, 0.12);
}

.wallet-card-full {
    display: block;
}

.wallet-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.wallet-news {
    margin: 0 0 12px;
    color: #d7e7ff;
    font-size: 13px;
    line-height: 1.45;
}

.wallet-news em {
    font-style: normal;
    margin-right: 6px;
    font-weight: 700;
}

.wallet-news-empty { color: #9eb0d1; }

.lang-card {
    width: 100%;
    margin-bottom: 10px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(90, 130, 190, 0.22);
    background: rgba(16, 28, 58, 0.92);
    color: #e7eefc;
    text-align: left;
}

.lang-card small {
    display: block;
    margin-top: 4px;
    color: #9eb0d1;
}

.lang-card.is-active {
    border-color: rgba(30, 198, 230, 0.55);
}

.lang-card:disabled { opacity: 0.5; }

.legal-page h2 {
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.legal-page p {
    color: #c4d2ea;
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 12px;
}

.btn-ghost {
    margin-top: 8px;
    background: rgba(255,255,255,0.08);
}

.tone-pos { color: #3ee08a; }
.tone-neg { color: #ff6b7a; }
.tone-neu { color: #b7c6e0; }

#save-btn {
    background: linear-gradient(90deg, #2a4d8f, #1ec6e6);
    margin-bottom: 8px;
}
