.d-none { display: none !important; }
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
    --bg-primary: #17212B;
    --bg-secondary: #1C2733;
    --bg-card: #232E3C;
    --bg-card-hover: #2A3644;
    --bg-elevated: #2B3947;
    --border: #2F3D4C;
    --border-light: #3A4959;
    --text-primary: #F5F7FA;
    --text-secondary: #8B9AAB;
    --text-muted: #6B7B8C;
    --accent: #4A90E2;
    --accent-hover: #5B9EF7;
    --success: #4ADE80;
    --danger: #F87171;
    --radius: 12px;
    --radius-sm: 10px;
}

html, body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.loader { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg-primary); z-index: 100; }
.spinner { width: 32px; height: 32px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.app { max-width: 480px; margin: 0 auto; padding: 20px 18px 40px; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.header-left { display: flex; align-items: center; gap: 10px; }
.brand { font-size: 17px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.2px; }

.greet { margin-bottom: 22px; }
.greet h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 4px; color: var(--text-primary); }
.greet h1 span { color: var(--accent); }
.greet p { font-size: 13.5px; color: var(--text-secondary); }

.sub { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.sub-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.sub-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.sub-meta { font-size: 11.5px; color: var(--text-secondary); }
.sub-state { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: rgba(248, 113, 113, 0.12); color: var(--danger); }
.sub-state.active { background: rgba(74, 222, 128, 0.12); color: var(--success); }

.sub-row { display: flex; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sub-col { display: flex; flex-direction: column; align-items: center; flex: 1; }
.sub-num { font-size: 18px; font-weight: 700; line-height: 1.2; }
.sub-cap { font-size: 10.5px; color: var(--text-secondary); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.3px; }

.progress { margin-top: 14px; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.4s ease; }

.sub-key { display: none; margin-top: 12px; padding: 10px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; font-size: 11px; word-break: break-all; font-family: 'SF Mono', Menlo, Consolas, monospace; color: var(--text-secondary); line-height: 1.5; }

.btn-primary { width: 100%; padding: 15px; border: none; border-radius: var(--radius-sm); background: var(--accent); color: #fff; font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: background 0.15s, transform 0.1s; margin-bottom: 14px; font-family: inherit; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.98); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.grid-btn { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 15px 13px; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.1s; font-family: inherit; font-size: 13px; font-weight: 500; }
.grid-btn:hover { background: var(--bg-card-hover); border-color: var(--border-light); }
.grid-btn:active { transform: scale(0.97); }
.grid-btn svg { color: var(--accent); }
.grid-btn span { color: var(--text-primary); font-size: 13.5px; font-weight: 600; }

.footer { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11.5px; color: var(--text-muted); padding-top: 16px; border-top: 1px solid var(--border); }
.footer svg { color: var(--accent); opacity: 0.7; }

.screen { padding-top: 4px; animation: fadeIn 0.25s ease; }
.screen-title { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; margin-bottom: 6px; }
.screen-sub { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }
.back-btn { background: transparent; border: none; color: var(--text-secondary); font-size: 13px; font-family: inherit; cursor: pointer; padding: 0 0 14px; font-weight: 500; transition: color 0.15s; }
.back-btn:hover { color: var(--accent); }

.list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.list-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; display: flex; align-items: center; gap: 12px; transition: border-color 0.15s; }
.list-item:hover { border-color: var(--border-light); }
.list-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0; }
.list-body { flex: 1; }
.list-title { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.list-desc { font-size: 12px; color: var(--text-secondary); }
.note { font-size: 12px; color: var(--text-secondary); background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; line-height: 1.55; }

.faq { display: flex; flex-direction: column; gap: 8px; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.faq-item summary { padding: 14px 16px; font-size: 13.5px; font-weight: 600; cursor: pointer; list-style: none; position: relative; padding-right: 36px; color: var(--text-primary); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); font-size: 18px; transition: transform 0.2s; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 16px 14px; font-size: 13px; color: var(--text-secondary); line-height: 1.55; }

.plans { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.plan { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.1s; }
.plan:hover { border-color: var(--accent); background: var(--bg-card-hover); }
.plan:active { transform: scale(0.98); }
.plan-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.plan-desc { font-size: 12px; color: var(--text-secondary); }
.plan-action { font-size: 12.5px; color: var(--accent); font-weight: 600; }

.support-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 16px; }
.support-card p { font-size: 13.5px; line-height: 1.5; margin-bottom: 10px; }
.support-card p:last-child { margin-bottom: 0; }
.support-hint { color: var(--text-secondary) !important; font-size: 12.5px !important; }

.promo-list { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.promo-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; align-items: center; gap: 14px; transition: border-color 0.15s, background 0.15s; }
.promo-item:hover { border-color: var(--border-light); }
.promo-item.active { border-color: var(--accent); background: var(--bg-card-hover); }
.promo-anim { width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--bg-elevated); color: var(--accent); }
.promo-anim svg { width: 24px; height: 24px; }
.promo-info { flex: 1; min-width: 0; }
.promo-name { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.promo-date { font-size: 11.5px; color: var(--text-secondary); margin-bottom: 4px; }
.promo-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
.promo-badge { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.3px; background: rgba(74, 144, 226, 0.12); color: var(--accent); }
.promo-badge.now { background: rgba(74, 222, 128, 0.12); color: var(--success); }
.promo-badge.done { background: rgba(107, 123, 140, 0.15); color: var(--text-muted); }