/* css/common.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gold: #D4AF37;
    --gold-light: #F9E79F;
    --gold-dark: #B8942E;
    --gold-glow: rgba(212, 175, 55, 0.3);
    --bg-deep: #05070A;
    --bg-surface: #0B0F17;
    --bg-card: #11161F;
    --bg-card-hover: #19212E;
    --border-gold: linear-gradient(135deg, #D4AF37 0%, #FFE484 30%, #D4AF37 70%, #B8942E 100%);
    --border-light: rgba(212, 175, 55, 0.25);
    --success: #10B981;
    --danger: #EF4444;
    --text-primary: #FFFFFF;
    --text-secondary: #D1D5DB;
    --text-muted: #9CA3AF;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(125deg, var(--bg-deep) 0%, var(--bg-surface) 100%);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(transparent, transparent 2px, rgba(212,175,55,0.02) 2px, rgba(212,175,55,0.02) 4px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: -30%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(ellipse at 30% 40%, rgba(212,175,55,0.08), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* 导航栏 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(6,10,17,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #FFF8E7, var(--gold), var(--gold-dark));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--gold);
}

/* 主容器 */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

/* 页面头部 */
.market-header, .page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    border-left: 3px solid var(--gold);
    padding-left: 1.2rem;
}

.market-header h1, .page-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #FFFFFF, var(--gold-light));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.badge-live {
    background: rgba(212,175,55,0.12);
    border: 1px solid var(--gold);
    border-radius: 40px;
    padding: 0.3rem 1.2rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-live::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--gold);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.4; transform: scale(0.8);}
    100% { opacity: 1; transform: scale(1.2);}
}

/* 卡片网格 */
.coins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.8rem;
}

/* 币种卡片 */
.coin-card {
    background: rgba(17,22,31,0.8);
    backdrop-filter: blur(2px);
    border-radius: 28px;
    border: 1px solid transparent;
    background-clip: padding-box;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.2,0,0,1);
    position: relative;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.coin-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    padding: 1px;
    background: var(--border-gold);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.coin-card:hover::before { opacity: 1; }
.coin-card:hover {
    transform: translateY(-6px);
    background: rgba(25,33,46,0.95);
    box-shadow: 0 20px 30px -8px rgba(0,0,0,0.5), 0 0 0 1px var(--gold);
}

.coin-card.locked::after { content: '🔒'; position: absolute; top: 1.25rem; right: 1.5rem; font-size: 1rem; opacity: 0.6; }
.coin-card.unlocked::after { content: '🔓'; position: absolute; top: 1.25rem; right: 1.5rem; font-size: 0.9rem; opacity: 0.7; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.coin-info { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.coin-rank { font-size: 0.7rem; font-weight: 600; background: rgba(212,175,55,0.2); padding: 0.2rem 0.6rem; border-radius: 40px; color: var(--gold); }
.coin-symbol { font-weight: 800; font-size: 1.25rem; }
.coin-name { font-size: 0.75rem; color: var(--text-muted); }

.price-section { margin: 1rem 0 0.75rem; }
.current-price { font-size: 1.8rem; font-weight: 700; }
.price-change {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.2rem 0.7rem;
    border-radius: 30px;
    margin-top: 0.5rem;
}
.price-change.positive { background: rgba(16,185,129,0.15); color: var(--success); }
.price-change.negative { background: rgba(239,68,68,0.15); color: var(--danger); }

.stats-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin: 0.5rem 0;
}

.signal-indicator {
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(212,175,55,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.signal-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.9rem;
    border-radius: 40px;
    background: rgba(255,255,255,0.03);
}
.signal-badge.long { background: rgba(16,185,129,0.2); color: var(--success); border-left: 2px solid var(--success); }
.signal-badge.short { background: rgba(239,68,68,0.2); color: var(--danger); border-left: 2px solid var(--danger); }
.signal-badge.neutral { background: rgba(212,175,55,0.2); color: var(--gold); border-left: 2px solid var(--gold); }

.unlock-btn {
    background: linear-gradient(115deg, rgba(212,175,55,0.9), rgba(184,148,46,0.9));
    border: none;
    padding: 0.35rem 1rem;
    border-radius: 40px;
    color: #0A0F1A;
    font-weight: 700;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.unlock-btn:hover { transform: scale(0.96); background: var(--gold); box-shadow: 0 0 8px var(--gold); color: #000; }

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6,10,17,0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.modal.active { display: flex; }
.modal-content {
    background: var(--bg-card);
    border-radius: 2rem;
    max-width: 500px;
    width: 90%;
    padding: 2rem;
    position: relative;
    box-shadow: 0 20px 35px -12px black;
    border: 1px solid transparent;
}
.modal-content::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 2rem;
    padding: 1px;
    background: var(--border-gold);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.close-modal, .close-crypto-modal { background: none; border: none; font-size: 1.8rem; color: var(--gold); cursor: pointer; }

.plans { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 2rem; }
.plan-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    background: rgba(212,175,55,0.05);
    border-radius: 1.2rem;
    border: 1px solid rgba(212,175,55,0.3);
    cursor: pointer;
}
.plan-option.selected { border-color: var(--gold); background: rgba(212,175,55,0.15); box-shadow: 0 0 12px var(--gold-glow); }

.payment-methods { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.payment-btn {
    flex: 1;
    padding: 0.7rem;
    border-radius: 2rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
}
.payment-btn.selected { background: linear-gradient(115deg, var(--gold), var(--gold-dark)); color: #0A0F1A; border-color: var(--gold); font-weight: 800; }

.pay-now-btn {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(105deg, var(--gold), var(--gold-dark));
    border: none;
    border-radius: 3rem;
    font-weight: 800;
    color: #0A0F1A;
    cursor: pointer;
    transition: 0.2s;
}
.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(0,0,0,0.3);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
    text-align: center;
    padding: 3rem;
    background: var(--bg-card);
    border-radius: 28px;
}
.volume {
     font-size: 0.7rem;
     color: var(--text-muted);
 }

/* 响应式 */
@media (max-width: 768px) {
    .container { padding: 1rem; }
    .coins-grid { grid-template-columns: 1fr; }
}
/* 推广弹框专属大尺寸样式 */
#promo-modal .modal-content {
    width: 80vw;
    max-width: 600px;
    height: auto;
    min-height: 50vh;          /* 最小高度为屏幕的一半 */
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
}

#promo-modal .modal-content h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

#promo-modal .modal-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

#promo-modal #promo-register-btn {
    font-size: 1.2rem;
    padding: 0.8rem 1.8rem;
}

/* 响应式：小屏幕时适当缩小 */
@media (max-width: 768px) {
    #promo-modal .modal-content {
        width: 90vw;
        min-height: 40vh;
        padding: 1.5rem;
    }
    #promo-modal .modal-content h2 {
        font-size: 1.4rem;
    }
    #promo-modal .modal-content p {
        font-size: 1rem;
    }
}
/* 页脚样式 */
.site-footer {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-light);
    text-align: center;
}
.footer-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}
.social-links a {
    color: var(--gold);
    text-decoration: none;
    margin: 0 0.75rem;
}
.social-links a:hover {
    text-decoration: underline;
}
.footer-copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
}/* 提现表单样式 */
.withdraw-form {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.withdraw-form input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-light);
    border-radius: 28px;
    padding: 0.7rem 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.2s;
}
.withdraw-form input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}
.withdraw-form input::placeholder {
    color: var(--text-muted);
}
#request-withdraw {
    background: linear-gradient(115deg, var(--gold), var(--gold-dark));
    border: none;
    border-radius: 40px;
    padding: 0.7rem 1rem;
    font-weight: 700;
    font-size: 1rem;
    color: #0A0F1A;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 0.5rem;
}
#request-withdraw:hover {
    transform: scale(0.98);
    box-shadow: 0 0 12px var(--gold);
}
.withdraw-history {
    margin-top: 1.5rem;
}
.withdraw-history h4 {
    color: var(--gold);
    margin-bottom: 0.5rem;
}
.withdraw-history ul {
    list-style: none;
    padding-left: 0;
}
.withdraw-history li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    font-size: 0.85rem;
}
/* 固定顶部工具栏，不参与滚动 */
.flex-toolbar {
    position: sticky;
    top: 0;
    background: #f5f7fb;      /* 与页面背景一致，避免滚动时内容透出 */
    z-index: 100;
    padding: 8px 0;           /* 可根据需要调整间距 */
    margin: 0;                /* 确保与边缘贴合 */
}