/* ===== FootPredict · 紫色深色主题 ===== */
:root {
    --bg: #0b0a12;
    --bg2: #12101e;
    --bg3: #1a1730;
    --bg4: #241f40;
    --purple: #7c3aed;
    --purple-light: #a78bfa;
    --purple-dark: #5b21b6;
    --purple-glow: rgba(124,58,237,0.25);
    --text: #f0edf8;
    --text2: #a8a0c0;
    --text3: #6b6380;
    --border: rgba(124,58,237,0.15);
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 8px 40px rgba(0,0,0,0.4);
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== Nav ===== */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(11,10,18,0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; align-items: center;
    justify-content: space-between;
    height: 60px; padding: 0 20px;
}
.nav-brand {
    font-size: 20px; font-weight: 800; text-decoration: none;
    color: var(--text); letter-spacing: -0.5px;
}
.nav-brand span { color: var(--purple-light); }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
    color: var(--text3); text-decoration: none;
    padding: 8px 16px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; transition: 0.2s;
    cursor: pointer;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--bg3); }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; font-family: inherit; font-weight: 600;
    border-radius: var(--radius-sm); cursor: pointer;
    transition: 0.2s; border: none; font-size: 14px;
    padding: 10px 20px;
}
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-full { width: 100%; }
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-dark); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text2); }
.btn-outline:hover { border-color: var(--purple); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text3); }
.btn-ghost:hover { color: var(--text); background: var(--bg3); }
.btn-disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ===== Pages ===== */
.page { display: none; }
.page.active { display: block; }

/* ===== Hero ===== */
.hero { text-align: center; padding: 50px 20px 30px; }
.hero h1 {
    font-size: 38px; font-weight: 800; letter-spacing: -1px;
    margin-bottom: 10px;
}
.hero h1 span {
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p { color: var(--text2); font-size: 16px; }

/* ===== Main ===== */
.main { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px;
}
.section-header h2 { font-size: 20px; font-weight: 700; }
.match-count { color: var(--text3); font-size: 14px; }

/* ===== Match Grid ===== */
.match-grid {
    display: grid; gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    margin-bottom: 50px;
}
.match-card {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
    transition: 0.25s; cursor: pointer; position: relative; overflow: hidden;
}
.match-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--purple), transparent);
    opacity: 0; transition: 0.3s;
}
.match-card:hover { background: var(--bg3); transform: translateY(-2px); box-shadow: var(--shadow); }
.match-card:hover::before { opacity: 1; }
.match-card.featured { border-color: rgba(124,58,237,0.3); }
.match-header {
    display: flex; justify-content: space-between;
    margin-bottom: 14px; font-size: 12px;
}
.match-league {
    color: var(--purple-light); font-weight: 600; letter-spacing: 0.5px;
    text-transform: uppercase; font-size: 11px;
}
.match-time { color: var(--text3); }
.match-teams {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 16px;
}
.team { display: flex; align-items: center; gap: 10px; flex: 1; }
.team.away { flex-direction: row-reverse; }
.team-crest {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--bg4); display: flex; align-items: center;
    justify-content: center; font-size: 13px; font-weight: 700;
    flex-shrink: 0; color: var(--text2);
}
.team-name { font-size: 14px; font-weight: 600; }
.team.away .team-name { text-align: right; }
.match-vs { font-size: 11px; font-weight: 700; color: var(--text3); flex-shrink: 0; }
.match-odds {
    display: flex; gap: 8px; justify-content: center;
    margin-bottom: 12px;
}
.odds-item {
    text-align: center; padding: 6px 14px;
    background: var(--bg3); border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 700; min-width: 56px;
}
.odds-label { display: block; font-size: 10px; color: var(--text3); font-weight: 500; margin-bottom: 2px; }
.odds-high { color: var(--purple-light); }
.match-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.04);
}
.pred-badge {
    padding: 4px 12px; border-radius: 6px;
    font-size: 12px; font-weight: 700;
}
.pred-home { background: rgba(124,58,237,0.15); color: var(--purple-light); }
.pred-away { background: rgba(239,68,68,0.15); color: #ef4444; }
.pred-draw { background: rgba(99,102,241,0.15); color: #818cf8; }
.pred-correct { background: rgba(34,197,94,0.15); color: #22c55e; }
.pred-wrong { background: rgba(239,68,68,0.15); color: #ef4444; }

.confidence {
    font-size: 12px; color: var(--text3);
    display: flex; align-items: center; gap: 6px;
}
.conf-bar { width: 50px; height: 3px; background: var(--bg4); border-radius: 2px; overflow: hidden; }
.conf-fill { height: 100%; border-radius: 2px; }
.conf-high { background: linear-gradient(90deg, var(--purple), var(--purple-light)); }
.conf-mid { background: var(--purple); }
.conf-low { background: #f59e0b; }

/* ===== Match Detail Modal ===== */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
}
.modal-overlay.active { display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); max-width: 640px; width: 100%;
    max-height: 85vh; overflow-y: auto; padding: 32px;
    position: relative; box-shadow: var(--shadow);
}
.modal::-webkit-scrollbar { width: 4px; }
.modal::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 2px; }
.modal-close {
    position: absolute; top: 16px; right: 16px;
    background: var(--bg3); border: none;
    width: 32px; height: 32px; border-radius: 50%;
    color: var(--text2); font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--bg4); color: var(--text); }

/* Modal content */
.modal-header { text-align: center; margin-bottom: 24px; }
.modal-teams { display: flex; align-items: center; justify-content: center; gap: 24px; margin-bottom: 16px; }
.modal-team { text-align: center; }
.modal-team .crest {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--bg4); display: flex; align-items: center;
    justify-content: center; font-size: 18px; font-weight: 700;
    margin: 0 auto 8px;
}
.modal-team .name { font-size: 16px; font-weight: 700; }
.modal-vs { font-size: 16px; font-weight: 800; color: var(--purple-light); }
.modal-date { font-size: 13px; color: var(--text3); }

.modal-odds { display: flex; gap: 12px; justify-content: center; margin-bottom: 24px; }

/* 分析区域 — 付费墙 */
.analysis-section { margin-bottom: 20px; }
.analysis-section h3 {
    font-size: 15px; font-weight: 700; margin-bottom: 12px;
    color: var(--text);
}
.analysis-item {
    background: var(--bg3); border-radius: var(--radius-sm);
    padding: 14px; margin-bottom: 10px;
}
.analysis-item .label {
    font-size: 12px; font-weight: 600; color: var(--purple-light);
    display: block; margin-bottom: 4px; text-transform: uppercase;
    letter-spacing: 0.5px;
}
.analysis-item .value { font-size: 14px; color: var(--text2); line-height: 1.7; }

.paywall {
    text-align: center; padding: 32px 20px;
    background: linear-gradient(135deg, var(--bg3), var(--bg4));
    border-radius: var(--radius); margin: 20px 0;
    border: 1px solid var(--border);
}
.paywall-icon { font-size: 36px; margin-bottom: 12px; }
.paywall h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.paywall p { color: var(--text2); font-size: 14px; margin-bottom: 20px; }

/* Comments */
.comments-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.comments-section h3 { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.comment-input { display: flex; gap: 8px; margin-bottom: 16px; }
.comment-list { display: flex; flex-direction: column; gap: 12px; }
.comment-item {
    background: var(--bg3); border-radius: var(--radius-sm);
    padding: 12px 16px;
}
.comment-user { font-size: 12px; font-weight: 700; color: var(--purple-light); margin-bottom: 4px; }
.comment-text { font-size: 14px; color: var(--text2); line-height: 1.6; }
.comment-date { font-size: 11px; color: var(--text3); margin-top: 4px; }

/* ===== Pricing ===== */
.pricing-grid {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    margin-bottom: 50px;
}
.pricing-card {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px; text-align: center;
    transition: 0.25s; position: relative;
}
.pricing-card:hover { background: var(--bg3); transform: translateY(-2px); }
.pricing-card.featured {
    border-color: var(--purple);
    background: linear-gradient(135deg, var(--bg2), rgba(124,58,237,0.08));
}
.pricing-card.featured::before {
    content: '推荐'; position: absolute; top: -10px; left: 50%;
    transform: translateX(-50%);
    background: var(--purple); color: #fff; font-size: 11px;
    font-weight: 700; padding: 3px 14px; border-radius: 10px;
    text-transform: uppercase; letter-spacing: 1px;
}
.pricing-name { font-size: 14px; font-weight: 600; color: var(--text3); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.pricing-price { font-size: 32px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.pricing-price span { font-size: 14px; color: var(--text3); font-weight: 400; }
.pricing-daily { font-size: 12px; color: var(--text3); margin-bottom: 20px; }
.pricing-card .btn { width: 100%; }

/* ===== Auth ===== */
.auth-form {
    max-width: 400px; margin: 40px auto;
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 32px;
}
.auth-form h2 { text-align: center; font-size: 22px; margin-bottom: 16px; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 20px; }
.auth-tab {
    flex: 1; padding: 10px; text-align: center;
    background: transparent; border: 1px solid var(--border);
    color: var(--text3); font-size: 14px; font-weight: 600;
    cursor: pointer; transition: 0.2s; font-family: inherit;
}
.auth-tab:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.auth-tab:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.auth-tab.active { background: var(--purple); border-color: var(--purple); color: #fff; }

.input {
    width: 100%; padding: 12px 16px; margin-bottom: 12px;
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text);
    font-size: 14px; font-family: inherit; outline: none;
    transition: 0.2s;
}
.input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-glow); }
.input::placeholder { color: var(--text3); }

.auth-error { color: #ef4444; font-size: 13px; min-height: 20px; margin-bottom: 8px; }

/* ===== Footer ===== */
.footer {
    text-align: center; padding: 32px 20px;
    border-top: 1px solid var(--border); color: var(--text3); font-size: 14px;
}
.footer-sub { font-size: 12px; margin-top: 4px; }

/* ===== Toast ===== */
.toast {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: var(--bg3); border: 1px solid var(--border);
    color: var(--text); padding: 12px 24px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; z-index: 300;
    box-shadow: var(--shadow); display: none;
}
.toast.show { display: block; animation: toastIn 0.3s; }
@keyframes toastIn { from { opacity:0; transform:translateX(-50%) translateY(20px); } to { opacity:1; transform:translateX(-50%) translateY(0); } }

/* ===== 广告位 ===== */
.ad-container {
    width: 100%; overflow: hidden; display: flex;
    justify-content: center; align-items: center;
}
.ad-placeholder {
    background: var(--bg3); border: 1px dashed var(--border);
    border-radius: var(--radius-sm); color: var(--text3);
    font-size: 12px; display: flex; align-items: center;
    justify-content: center; width: 100%; min-height: 60px;
}
.ad-top { margin-bottom: 24px; }
.ad-bottom { margin-bottom: 20px; }
.ad-inline { margin: 16px 0; }
.ad-placeholder.ad-rect { min-height: 250px; max-width: 300px; }
.ad-placeholder.ad-banner { min-height: 90px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero h1 { font-size: 26px; }
    .match-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }
    .modal { padding: 24px 16px; }
    .modal-teams { gap: 12px; }
    .modal-team .crest { width: 44px; height: 44px; font-size: 14px; }
    .nav-links a { padding: 6px 10px; font-size: 13px; }
}
@media (max-width: 480px) {
    .pricing-grid { grid-template-columns: 1fr; }
    .team-crest { width: 30px; height: 30px; font-size: 11px; }
    .team-name { font-size: 12px; }
}
