/* ===== FONT FACE ===== */
@font-face {
    font-family: 'NeeNoo';
    src: url('../assets/fonts/NeeNoo-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ===== CSS VARIABLES ===== */
[data-theme="dark"] {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #222240;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --text-muted: #6b6b80;
    --accent: #7c3aed;
    --accent-light: #a855f7;
    --accent-gradient: linear-gradient(135deg, #7c3aed, #c026d3, #e040a0);
    --yellow: #fbbf24;
    --border: #2a2a3e;
    --success: #22c55e;
    --shadow: 0 4px 24px rgba(124, 58, 237, 0.15);
}

[data-theme="light"] {
    --bg-primary: #f5f3ff;
    --bg-secondary: #ede9fe;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f3ff;
    --text-primary: #1a1a2e;
    --text-secondary: #6b6b80;
    --text-muted: #a0a0b8;
    --accent: #7c3aed;
    --accent-light: #a855f7;
    --accent-gradient: linear-gradient(135deg, #7c3aed, #c026d3, #e040a0);
    --yellow: #f59e0b;
    --border: #e5e7eb;
    --success: #16a34a;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'NeeNoo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    padding-bottom: 80px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Apply NeeNoo font to all key elements */
.user-name,
.stat-value,
.stat-label,
.section-title,
.plan-badge,
.plan-desc,
.btn-primary,
.btn-card,
.btn-text,
.banner-title,
.banner-text,
.nav-label,
.balance-amount,
.balance-label,
.bonus-text,
.bonus-value,
.ref-value,
.ref-label,
.social-name,
.social-desc,
.faq-question,
.faq-answer,
.modal-title {
    font-family: 'NeeNoo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== HEADER ===== */
.header {
    background: var(--bg-secondary);
    padding: 16px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
}

.balance-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 8px;
}

.balance-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--yellow);
}

.balance-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-light);
    background: rgba(124, 58, 237, 0.2);
    padding: 2px 8px;
    border-radius: 8px;
    margin-top: 2px;
}

.header-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    flex: 1;
}

.btn-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
}

.btn-card:active { transform: scale(0.95); background: var(--bg-card-hover); }
.btn-icon { font-size: 20px; }
.btn-text { font-size: 11px; margin-top: 4px; color: var(--text-secondary); }

/* ===== MAIN CONTENT ===== */
.main-content { padding: 16px; }
.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== USER CARD ===== */
.user-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
}

.user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.user-name { font-size: 18px; font-weight: 700; }
.user-id { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.stat-value { font-size: 20px; font-weight: 700; color: var(--accent-light); }
.stat-label { font-size: 10px; color: var(--text-muted); margin-top: 4px; }

/* ===== SECTION CARD ===== */
.section-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; }

/* ===== PLAN INFO ===== */
.plan-info { text-align: center; }
.plan-badge {
    display: inline-block;
    padding: 6px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
}
.plan-badge.free { background: rgba(124, 58, 237, 0.2); color: var(--accent-light); }
.plan-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }

/* ===== BUTTONS ===== */
.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}
.btn-primary:active { transform: scale(0.97); opacity: 0.9; }

/* ===== BANNER ===== */
.banner-card {
    background: var(--accent-gradient);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}
.banner-tag {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: 8px;
}
.banner-title { font-size: 22px; font-weight: 800; color: #fff; }
.banner-text { font-size: 13px; color: rgba(255,255,255,0.8); margin-top: 4px; }

/* ===== SERVER TIME ===== */
.server-time {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    padding: 12px 0;
}

/* ===== REFERRAL ===== */
.referral-box {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.referral-link {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    color: var(--text-primary);
    outline: none;
}
.btn-copy {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.btn-copy:active { transform: scale(0.95); }

.referral-stats { display: flex; gap: 16px; }
.ref-stat { flex: 1; text-align: center; }
.ref-value { display: block; font-size: 24px; font-weight: 700; color: var(--yellow); }
.ref-label { font-size: 12px; color: var(--text-muted); }

/* ===== BONUS LIST ===== */
.bonus-list { display: flex; flex-direction: column; gap: 10px; }
.bonus-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 12px;
}
.bonus-icon { font-size: 20px; }
.bonus-text { flex: 1; font-size: 14px; color: var(--text-secondary); }
.bonus-value { font-size: 14px; font-weight: 700; color: var(--success); }

/* ===== PROMO ===== */
.promo-box { display: flex; flex-direction: column; gap: 12px; }
.promo-input {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    text-align: center;
}
.promo-input:focus { border-color: var(--accent); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 24px 0; }
.empty-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.empty-state p { color: var(--text-secondary); font-size: 14px; }
.empty-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ===== SOCIAL LIST ===== */
.social-list { display: flex; flex-direction: column; gap: 10px; }
.social-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg-primary);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
}
.social-item:active { background: var(--bg-card-hover); }
.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.social-icon.tg { background: rgba(0, 136, 204, 0.2); }
.social-icon.ig { background: rgba(225, 48, 108, 0.2); }
.social-icon.yt { background: rgba(255, 0, 0, 0.2); }
.social-info { flex: 1; }
.social-name { display: block; font-size: 14px; font-weight: 600; }
.social-desc { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.social-arrow { color: var(--text-muted); font-size: 18px; }

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    justify-content: center;
    align-items: flex-end;
    backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg-secondary);
    border-radius: 20px 20px 0 0;
    padding: 24px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-title { font-size: 18px; font-weight: 700; }
.modal-close {
    background: var(--bg-card);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    color: var(--text-secondary);
    cursor: pointer;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 4px;
    color: var(--text-muted);
    transition: color 0.2s;
}
.nav-item.active { color: var(--accent-light); }
.nav-icon { font-size: 22px; }
.nav-label { font-size: 10px; font-weight: 600; }

/* ===== FAQ ITEMS ===== */
.faq-item { margin-bottom: 12px; }
.faq-question {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    padding: 12px;
    background: var(--bg-card);
    border-radius: 10px;
    cursor: pointer;
}
.faq-answer {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 8px 12px;
    display: none;
    line-height: 1.5;
}
.faq-item.open .faq-answer { display: block; }

/* ===== SUBSCRIPTION CARD ===== */
.subscription-info {
    margin-bottom: 16px;
}
.subscription-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.subscription-expiry {
    font-size: 13px;
    color: var(--text-muted);
}
.tokens-info {
    margin: 12px 0;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 10px;
}
.token-row {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}
.token-type {
    font-size: 13px;
    color: var(--text-secondary);
}
.token-amount {
    font-size: 14px;
    font-weight: 600;
    color: var(--yellow);
}
.token-row.video-tokens .token-amount {
    color: #f87171;
}
.token-row.universal-tokens .token-amount {
    color: #a78bfa;
}
