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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: #0a0e27;
    background-image: 
        radial-gradient(at 20% 30%, rgba(28, 35, 82, 0.4) 0%, transparent 50%),
        radial-gradient(at 80% 70%, rgba(20, 25, 60, 0.4) 0%, transparent 50%),
        radial-gradient(at 50% 50%, rgba(15, 20, 45, 0.3) 0%, transparent 50%);
    color: #ffffff;
    min-height: 100vh;
    padding-bottom: 65px;
    position: relative;
    transition: background 0.5s ease, color 0.3s ease;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, rgba(50, 70, 150, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(50, 70, 150, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

/* 头部导航 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(50, 70, 150, 0.1);
    transition: all 0.3s ease;
    position: relative;
    z-index: 100;
}

/* 主题切换按钮 */
.theme-toggle {
    width: 38px;
    height: 38px;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-icon {
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.moon-icon,
.sun-icon {
    transition: all 0.3s ease;
}

.theme-toggle:hover .moon-icon,
.theme-toggle:hover .sun-icon {
    transform: rotate(15deg);
}

.language-switch {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    padding: 8px 16px;
    background: rgba(60, 80, 160, 0.2);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-switch:hover {
    background: rgba(60, 80, 160, 0.3);
}

.language-switch svg {
    color: #b0c4de;
}

.language-menu {
    position: absolute;
    top: 50px;
    right: 16px;
    background: rgba(15, 20, 40, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(60, 80, 160, 0.3);
    border-radius: 12px;
    padding: 8px;
    min-width: 180px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    animation: fadeInDown 0.3s ease;
}

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

.lang-option {
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-option:hover {
    background: rgba(102, 126, 234, 0.2);
}

.lang-option span {
    font-size: 14px;
    color: #e0e7ff;
    font-weight: 500;
}

/* 主Banner区域 */
.hero-banner {
    background: linear-gradient(135deg, #1a2456 0%, #2a3466 100%);
    padding: 24px 16px 16px;
    position: relative;
    border-bottom: 1px solid rgba(60, 80, 160, 0.15);
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.banner-text {
    flex: 1;
}

.banner-text h1 {
    font-size: 20px;
    margin-bottom: 2px;
    font-weight: 600;
}

.banner-text h2 {
    font-size: 13px;
    margin-bottom: 16px;
    font-weight: 400;
    opacity: 0.9;
}

.stats-numbers {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.stats-numbers span {
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    min-width: 28px;
    text-align: center;
}

.download-btn {
    background: linear-gradient(135deg, #5a9fd4 0%, #4a8bc2 100%);
    border: none;
    padding: 10px 28px;
    border-radius: 20px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(90, 159, 212, 0.4);
}

.banner-image {
    position: relative;
    width: 100px;
    height: 100px;
}

.cube-group {
    position: relative;
    width: 100%;
    height: 100%;
}

.cube {
    position: absolute;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #6ba3d8 0%, #5a93c8 100%);
    border-radius: 8px;
    opacity: 0.85;
    animation: float 3s ease-in-out infinite;
}

.cube1 {
    top: 0;
    right: 20px;
    animation-delay: 0s;
}

.cube2 {
    top: 30px;
    right: 50px;
    animation-delay: 0.3s;
}

.cube3 {
    bottom: 15px;
    right: 0;
    animation-delay: 0.6s;
}

.cube4 {
    top: 50px;
    right: 20px;
    width: 35px;
    height: 35px;
    animation-delay: 0.9s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(5deg); }
}

.banner-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
}

.dot.active {
    background: #ffffff;
}

/* 用户中心横幅 */
.user-center-banner {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    padding: 8px 12px;
    margin: 10px 16px 12px;
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-center-banner:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4) 0%, rgba(118, 75, 162, 0.4) 100%);
    border-color: rgba(102, 126, 234, 0.5);
}

.user-center {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-icon {
    font-size: 14px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4) 0%, rgba(118, 75, 162, 0.4) 100%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.announcement-text {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 20px;
}

.announcement-text span {
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    display: inline-block;
    white-space: nowrap;
    animation: scroll-text 15s linear infinite;
}

/* 文字滚动动画 */
@keyframes scroll-text {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* 如果文字不长，不需要滚动 */
.announcement-text span.no-scroll {
    animation: none;
}

/* 主要交易对 */
.main-markets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 16px 18px;
}

.market-card {
    background: rgba(30, 40, 80, 0.6);
    padding: 12px 8px;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    border: 1px solid rgba(60, 80, 160, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.market-label {
    font-size: 11px;
    margin-bottom: 8px;
    opacity: 0.9;
    font-weight: 500;
}

.market-price {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 6px;
}

.market-change {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

.market-change.positive {
    color: #4ade80;
}

.market-change.negative {
    color: #f87171;
}

.market-cny {
    font-size: 9px;
    opacity: 0.6;
}

/* 功能区 */
.features {
    padding: 0 16px 18px;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* 左边大卡片 */
.feature-card-large {
    background: rgba(40, 50, 100, 0.6);
    padding: 18px 12px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(60, 80, 160, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

/* 右边列 */
.feature-right-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 右边小卡片 */
.feature-card-small {
    background: rgba(40, 50, 100, 0.6);
    padding: 8px 6px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(60, 80, 160, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

/* 图标样式 */
.feature-icon {
    font-size: 30px;
    margin-bottom: 8px;
}

.feature-icon-small {
    font-size: 20px;
    margin-bottom: 4px;
}

.feature-title {
    font-size: 13px;
    font-weight: 400;
    text-align: center;
    line-height: 1.3;
}

.feature-subtitle {
    font-size: 10px;
    opacity: 0.8;
    text-align: center;
    margin-top: 4px;
}

/* 安全横幅 */
.security-banner {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.6) 0%, rgba(59, 130, 246, 0.6) 100%);
    padding: 18px 16px;
    margin: 0 16px 18px;
    border-radius: 10px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    backdrop-filter: blur(10px);
}

.security-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.security-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.security-icon {
    font-size: 40px;
}

.security-text h3 {
    font-size: 16px;
    margin-bottom: 4px;
    font-weight: 600;
}

.security-text p {
    font-size: 12px;
    opacity: 0.9;
}

.security-image {
    font-size: 48px;
}

.person-icon {
    opacity: 0.8;
}

/* 涨幅榜 */
.gainers-list {
    background: rgba(20, 30, 60, 0.5);
    margin: 0 16px 20px;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid rgba(60, 80, 160, 0.15);
    backdrop-filter: blur(10px);
}

.list-header {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.list-headers {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 8px 0;
    font-size: 11px;
    opacity: 0.6;
    margin-bottom: 8px;
}

.col-name {
    text-align: left;
}

.col-price {
    text-align: center;
}

.col-change {
    text-align: right;
}

.gainer-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.gainer-item:last-child {
    border-bottom: none;
}

.gainer-name {
    font-size: 13px;
    font-weight: 600;
}

.pair-suffix {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.7;
}

.gainer-price {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
}

.gainer-change {
    text-align: right;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    float: right;
}

.gainer-change.positive {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.2);
}

.gainer-change.negative {
    color: #f87171;
    background: rgba(248, 113, 113, 0.2);
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    padding: 8px 16px;
    border-top: 1px solid rgba(60, 80, 160, 0.2);
    gap: 20px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.nav-item svg {
    opacity: 0.6;
    transition: all 0.3s ease;
}

.nav-item span {
    font-size: 10px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.nav-item:hover svg {
    opacity: 0.8;
}

.nav-item:hover span {
    opacity: 0.8;
}

.nav-item.active svg {
    opacity: 1;
    color: #667eea;
}

.nav-item.active span {
    opacity: 1;
    color: #667eea;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    display: none;
}

/* ========== 白天模式 ========== */
body.light-mode {
    background: #f5f7fa;
    background-image: 
        radial-gradient(at 20% 30%, rgba(200, 210, 255, 0.3) 0%, transparent 50%),
        radial-gradient(at 80% 70%, rgba(180, 200, 255, 0.3) 0%, transparent 50%);
    color: #1a202c;
}

body.light-mode::before {
    background-image: 
        linear-gradient(90deg, rgba(100, 120, 200, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(100, 120, 200, 0.05) 1px, transparent 1px);
}

body.light-mode .header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(100, 120, 200, 0.15);
}

body.light-mode .language-switch {
    color: #2d3748;
    background: rgba(102, 126, 234, 0.15);
}

body.light-mode .language-switch:hover {
    background: rgba(102, 126, 234, 0.25);
}

body.light-mode .language-menu {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(100, 120, 200, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

body.light-mode .lang-option:hover {
    background: rgba(102, 126, 234, 0.15);
}

body.light-mode .lang-option span {
    color: #1e293b;
}

body.light-mode .hero-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.light-mode .user-center-banner {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

body.light-mode .user-center-banner:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.25) 100%);
}

body.light-mode .user-icon {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border-color: rgba(102, 126, 234, 0.4);
}

body.light-mode .announcement-text span {
    color: #2d3748;
}

body.light-mode .market-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(100, 120, 200, 0.2);
    color: #2d3748;
}

body.light-mode .market-label {
    color: #4a5568;
}

body.light-mode .market-price {
    color: #1a202c;
}

body.light-mode .feature-card-large,
body.light-mode .feature-card-small {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(100, 120, 200, 0.2);
    color: #2d3748;
}

body.light-mode .security-banner {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
}

body.light-mode .gainers-list {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(100, 120, 200, 0.2);
    color: #2d3748;
}

body.light-mode .list-header {
    color: #1a202c;
}

body.light-mode .list-headers {
    color: #4a5568;
}

body.light-mode .gainer-name,
body.light-mode .gainer-price {
    color: #2d3748;
}

body.light-mode .bottom-nav {
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(100, 120, 200, 0.2);
}

body.light-mode .nav-item svg {
    color: #4a5568;
}

body.light-mode .nav-item span {
    color: #4a5568;
}

body.light-mode .nav-item.active svg {
    color: #667eea;
}

body.light-mode .nav-item.active span {
    color: #667eea;
}

body.light-mode .nav-item:hover svg {
    color: #667eea;
}

body.light-mode .nav-item:hover span {
    color: #667eea;
}

body.light-mode .theme-toggle {
    background: transparent;
    border: none;
}

body.light-mode .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .theme-icon {
    color: #2d3748;
}

/* 联系方式弹窗 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

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

.modal-contact {
    background: linear-gradient(135deg, #1a1f3a 0%, #2d3561 100%);
    border-radius: 20px;
    padding: 0;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

.btn-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 28px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.3s ease;
}

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

.modal-body {
    padding: 25px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.contact-icon {
    font-size: 32px;
    margin-right: 15px;
}

.contact-info {
    flex: 1;
}

.contact-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.contact-value {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
    word-break: break-all;
}

.btn-copy {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

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

.contact-note {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin-top: 15px;
    margin-bottom: 0;
}

/* 浅色模式下的弹窗样式 */
body.light-mode .modal-contact {
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

body.light-mode .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.light-mode .contact-item {
    background: rgba(102, 126, 234, 0.05);
}

body.light-mode .contact-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

body.light-mode .contact-label {
    color: #718096;
}

body.light-mode .contact-value {
    color: #2d3748;
}

body.light-mode .contact-note {
    color: #a0aec0;
}
