/* ============================================================
   ClownVPN — Личный кабинет (Telegram Mini App)
   Премиальная тёмная тема — стекло, градиенты, анимации
   ============================================================ */

:root {
	--bg: #0b0f1a;
	--bg-2: #0e1424;
	--surface: rgba(255, 255, 255, 0.04);
	--surface-2: rgba(255, 255, 255, 0.06);
	--surface-3: rgba(255, 255, 255, 0.09);
	--stroke: rgba(255, 255, 255, 0.08);
	--stroke-strong: rgba(255, 255, 255, 0.14);
	--text: #eef2fb;
	--text-dim: #9aa6bf;
	--text-faint: #66708a;
	--accent: #3b82f6;
	--accent-2: #6366f1;
	--accent-grad: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
	--green: #34d399;
	--green-bg: rgba(52, 211, 153, 0.14);
	--red: #f87171;
	--red-bg: rgba(248, 113, 113, 0.14);
	--yellow: #fbbf24;
	--yellow-bg: rgba(251, 191, 36, 0.14);
	--radius: 20px;
	--radius-sm: 14px;
	--radius-lg: 28px;
	--shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
	--shadow-soft: 0 6px 24px rgba(0, 0, 0, 0.3);
	--blur: saturate(160%) blur(20px);
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
	--tabbar-h: 76px;
	--safe-top: env(safe-area-inset-top, 0px);
	--safe-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="light"] {
	--bg: #eef1f8;
	--bg-2: #e6ebf5;
	--surface: rgba(15, 23, 42, 0.04);
	--surface-2: rgba(15, 23, 42, 0.06);
	--surface-3: rgba(15, 23, 42, 0.09);
	--stroke: rgba(15, 23, 42, 0.08);
	--stroke-strong: rgba(15, 23, 42, 0.16);
	--text: #0f172a;
	--text-dim: #475569;
	--text-faint: #94a3b8;
	--shadow: 0 10px 40px rgba(30, 41, 90, 0.16);
	--shadow-soft: 0 6px 24px rgba(30, 41, 90, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
	height: 100%;
	overflow: hidden;
}

body {
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background: var(--bg);
	color: var(--text);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	user-select: none;
	line-height: 1.45;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
img { display: block; }
.hidden { display: none !important; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

.glass {
	background: var(--surface-2);
	-webkit-backdrop-filter: var(--blur);
	backdrop-filter: var(--blur);
	border: 1px solid var(--stroke);
}

/* ==================== BOOT LOADER ==================== */
.boot-loader {
	position: fixed; inset: 0; z-index: 9999;
	display: flex; align-items: center; justify-content: center;
	background: var(--bg);
	transition: opacity 0.5s var(--ease);
}
.boot-loader.fade { opacity: 0; pointer-events: none; }
.boot-logo { position: relative; width: 84px; height: 84px; display: grid; place-items: center; }
.boot-ring {
	position: absolute; inset: 0; border-radius: 50%;
	border: 3px solid transparent;
	border-top-color: var(--accent);
	border-right-color: var(--accent-2);
	animation: spin 0.9s linear infinite;
}
.boot-glyph { font-size: 32px; animation: pulse 1.6s var(--ease) infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.15); opacity: 0.7; } }

/* ==================== GATE (браузер-вход) ==================== */
.gate {
	position: fixed; inset: 0; z-index: 500;
	display: flex; align-items: center; justify-content: center; padding: 24px;
	background: radial-gradient(1200px 800px at 50% -10%, rgba(99,102,241,0.25), transparent), var(--bg);
}
.gate-card { width: 100%; max-width: 380px; border-radius: var(--radius-lg); padding: 32px 26px; text-align: center; box-shadow: var(--shadow); animation: rise 0.6s var(--ease) both; }
.gate-icon { font-size: 44px; margin-bottom: 12px; }
.gate-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.gate-sub { color: var(--text-dim); font-size: 14px; margin: 8px 0 22px; }
.gate-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.gate-error { color: var(--red); font-size: 13px; min-height: 18px; text-align: center; }
.gate-tg { display: inline-block; margin-top: 16px; color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: none; }

/* ==================== APP SHELL ==================== */
.app { position: fixed; inset: 0; display: flex; flex-direction: column; }

.bg-aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.5; animation: float 18s var(--ease) infinite; }
.blob-1 { width: 360px; height: 360px; background: #3b82f6; top: -120px; left: -80px; }
.blob-2 { width: 320px; height: 320px; background: #8b5cf6; top: 20%; right: -120px; animation-delay: -6s; }
.blob-3 { width: 300px; height: 300px; background: #6366f1; bottom: -120px; left: 20%; animation-delay: -12s; }
@keyframes float {
	0%,100% { transform: translate(0,0) scale(1); }
	33% { transform: translate(40px,-30px) scale(1.1); }
	66% { transform: translate(-30px,20px) scale(0.95); }
}

/* ==================== TOPBAR ==================== */
.topbar {
	position: relative; z-index: 10;
	display: flex; align-items: center; gap: 12px;
	padding: calc(var(--safe-top) + 12px) 16px 12px;
}
.topbar-title { flex: 1; text-align: center; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.icon-btn {
	width: 40px; height: 40px; border-radius: 12px;
	display: grid; place-items: center; font-size: 19px; color: var(--text-dim);
	background: var(--surface); border: 1px solid var(--stroke);
	transition: transform 0.2s var(--ease-bounce), background 0.2s;
}
.icon-btn:active { transform: scale(0.9); background: var(--surface-3); }

.avatar { border-radius: 50%; object-fit: cover; background: var(--surface-3); }
.avatar-sm { width: 30px; height: 30px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar.fallback { display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--accent-grad); }

/* ==================== SCROLLER ==================== */
.scroller {
	position: relative; z-index: 5;
	flex: 1; overflow-y: auto; overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	padding: 4px 16px 0;
	scrollbar-width: none;
}
.scroller::-webkit-scrollbar { display: none; }
.view { display: flex; flex-direction: column; gap: 16px; animation: viewIn 0.4s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.tabbar-spacer { height: calc(var(--tabbar-h) + var(--safe-bottom) + 16px); }

.ptr { height: 0; overflow: hidden; display: grid; place-items: center; transition: height 0.2s var(--ease); }
.ptr-spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--stroke-strong); border-top-color: var(--accent); animation: spin 0.8s linear infinite; opacity: 0; transition: opacity 0.2s; }
.ptr.show { height: 48px; }
.ptr.show .ptr-spinner { opacity: 1; }

/* ==================== TABBAR ==================== */
.tabbar {
	position: relative; z-index: 20;
	display: flex; align-items: flex-end; justify-content: space-around;
	padding: 8px 8px calc(8px + var(--safe-bottom));
	height: calc(var(--tabbar-h) + var(--safe-bottom));
	border-top: 1px solid var(--stroke);
	border-radius: 0;
}
.tab {
	flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
	padding: 8px 0 4px; color: var(--text-faint); border-radius: 14px;
	transition: color 0.2s, transform 0.2s var(--ease-bounce);
}
.tab-ic { font-size: 21px; line-height: 1; transition: transform 0.3s var(--ease-bounce); }
.tab-label { font-size: 10px; font-weight: 600; letter-spacing: 0.01em; }
.tab.active { color: var(--text); }
.tab.active .tab-ic { transform: translateY(-2px) scale(1.12); }
.tab:active { transform: scale(0.92); }
.tab-fab .fab {
	width: 50px; height: 50px; margin-top: -22px; border-radius: 17px;
	display: grid; place-items: center; font-size: 28px; font-weight: 300; color: #fff;
	background: var(--accent-grad); box-shadow: 0 8px 22px rgba(59,130,246,0.5);
	transition: transform 0.25s var(--ease-bounce);
}
.tab-fab:active .fab { transform: scale(0.9) rotate(90deg); }
.tab-fab.active .fab { transform: rotate(45deg); }

/* ==================== САЙДБАР ==================== */
.sidebar-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,0.5); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: fade 0.3s var(--ease); }
.sidebar {
	position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
	width: 300px; max-width: 84vw;
	padding: calc(var(--safe-top) + 24px) 22px calc(var(--safe-bottom) + 24px);
	display: flex; flex-direction: column; gap: 18px;
	border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
	transform: translateX(-105%); transition: transform 0.4s var(--ease);
	box-shadow: var(--shadow);
}
.sidebar.open { transform: none; }
.sidebar-head { display: flex; align-items: center; gap: 14px; }
.side-name { font-weight: 800; font-size: 17px; }
.side-id { color: var(--text-faint); font-size: 12px; margin-top: 2px; }
.sidebar-rows { display: flex; flex-direction: column; gap: 2px; }
.side-row { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--stroke); font-size: 14px; }
.side-k { color: var(--text-dim); }
.side-v { font-weight: 700; }
.sidebar-foot { margin-top: auto; text-align: center; color: var(--text-faint); font-size: 12px; }

/* ==================== КАРТОЧКИ ==================== */
.card {
	background: var(--surface-2); border: 1px solid var(--stroke);
	border-radius: var(--radius); padding: 18px;
	-webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
	box-shadow: var(--shadow-soft);
	animation: rise 0.5s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.card.tap { transition: transform 0.18s var(--ease-bounce); }
.card.tap:active { transform: scale(0.97); }

/* Приветствие */
.hero { display: flex; align-items: center; gap: 14px; }
.hero-hi { font-size: 14px; color: var(--text-dim); }
.hero-name { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.hero-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; margin-top: 4px; padding: 3px 10px; border-radius: 999px; }
.hero-status.ok { color: var(--green); background: var(--green-bg); }
.hero-status.no { color: var(--red); background: var(--red-bg); }

/* Баланс */
.balance-card { position: relative; overflow: hidden; background: var(--accent-grad); border: none; color: #fff; padding: 22px; }
.balance-card::after { content: ""; position: absolute; top: -50%; right: -20%; width: 240px; height: 240px; background: radial-gradient(circle, rgba(255,255,255,0.25), transparent 70%); }
.balance-label { font-size: 13px; opacity: 0.85; display: flex; align-items: center; gap: 6px; }
.balance-value { font-size: 40px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; margin-top: 2px; }
.balance-stars { font-size: 13px; opacity: 0.8; margin-top: 2px; }
.balance-actions { display: flex; gap: 10px; margin-top: 18px; position: relative; z-index: 1; }

/* Быстрые действия */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--stroke); transition: transform 0.18s var(--ease-bounce), background 0.2s; }
.quick:active { transform: scale(0.94); background: var(--surface-3); }
.quick-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; background: var(--surface-3); }
.quick-ic.indigo { background: rgba(99,102,241,0.18); }
.quick-ic.green { background: var(--green-bg); }
.quick-ic.yellow { background: var(--yellow-bg); }
.quick-label { font-size: 12px; font-weight: 600; color: var(--text-dim); }

/* Секции */
.section-title { font-size: 13px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; margin: 6px 2px 0; }
.row-head { display: flex; align-items: center; justify-content: space-between; }
.link-more { font-size: 13px; color: var(--accent); font-weight: 600; }

/* Подписка / прогресс */
.sub-card { position: relative; overflow: hidden; }
.sub-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sub-name { font-weight: 700; font-size: 16px; }
.sub-meta { color: var(--text-dim); font-size: 13px; margin-top: 2px; }
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 14px; }
.progress-fill { height: 100%; border-radius: 999px; background: var(--accent-grad); width: 0; transition: width 0.9s var(--ease); }
.progress-fill.warn { background: linear-gradient(90deg,#fbbf24,#f87171); }
.sub-days { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-faint); margin-top: 8px; }

/* Пустая подписка / призыв */
.cta-card { text-align: center; padding: 26px 20px; background: radial-gradient(600px 300px at 50% -40%, rgba(99,102,241,0.3), transparent), var(--surface-2); }
.cta-emoji { font-size: 40px; }
.cta-title { font-size: 18px; font-weight: 800; margin-top: 8px; }
.cta-sub { color: var(--text-dim); font-size: 14px; margin: 6px 0 18px; }

/* Бейджи */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.badge.active { color: var(--green); background: var(--green-bg); }
.badge.expiring { color: var(--yellow); background: var(--yellow-bg); }
.badge.expired { color: var(--red); background: var(--red-bg); }
.badge.deposit { color: var(--green); background: var(--green-bg); }
.badge.purchase { color: var(--accent); background: rgba(59,130,246,0.14); }
.badge.referral_bonus { color: #c084fc; background: rgba(192,132,252,0.14); }
.badge.neutral { color: var(--text-dim); background: var(--surface-3); }

/* ==================== КНОПКИ ==================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 15px; padding: 13px 18px; border-radius: 14px; transition: transform 0.16s var(--ease-bounce), filter 0.2s, opacity 0.2s; }
.btn:active { transform: scale(0.95); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent-grad); color: #fff; box-shadow: 0 6px 18px rgba(59,130,246,0.4); }
.btn-primary:active { filter: brightness(1.08); }
.btn-glass { background: var(--surface-2); border: 1px solid var(--stroke-strong); color: var(--text); }
.btn-glass:active { background: var(--surface-3); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-sm { padding: 9px 14px; font-size: 13px; border-radius: 11px; }
.btn-light { background: rgba(255,255,255,0.18); color: #fff; }

/* ==================== ПОЛЯ ВВОДА ==================== */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; color: var(--text-dim); font-weight: 600; padding-left: 2px; }
.field input, .field textarea {
	width: 100%; padding: 14px 16px; border-radius: 14px;
	background: var(--surface); border: 1px solid var(--stroke-strong); color: var(--text);
	font-size: 16px; transition: border 0.2s, background 0.2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--surface-2); }
.field input::placeholder { color: var(--text-faint); }

/* Пресеты сумм */
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.preset { padding: 12px 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--stroke); font-weight: 700; font-size: 14px; text-align: center; transition: transform 0.16s var(--ease-bounce), border 0.2s, background 0.2s; }
.preset:active { transform: scale(0.93); }
.preset.sel { border-color: var(--accent); background: rgba(59,130,246,0.16); color: var(--accent); }

/* Методы оплаты */
.pay-methods { display: flex; flex-direction: column; gap: 10px; }
.pay-method { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--stroke); transition: transform 0.16s var(--ease-bounce), border 0.2s; }
.pay-method:active { transform: scale(0.98); }
.pay-method.sel { border-color: var(--accent); background: rgba(59,130,246,0.1); }
.pay-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; flex-shrink: 0; }
.pay-ic.sbp { background: linear-gradient(135deg,#16a34a,#22c55e); }
.pay-ic.crypto { background: linear-gradient(135deg,#f59e0b,#f97316); }
.pay-ic.stars { background: linear-gradient(135deg,#fbbf24,#f59e0b); }
.pay-info { flex: 1; }
.pay-name { font-weight: 700; font-size: 15px; }
.pay-desc { font-size: 12px; color: var(--text-dim); margin-top: 1px; }
.pay-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--stroke-strong); display: grid; place-items: center; flex-shrink: 0; transition: all 0.2s; }
.pay-method.sel .pay-check { border-color: var(--accent); background: var(--accent); color: #fff; }

/* ==================== ТАРИФЫ ==================== */
.plan-card { position: relative; overflow: hidden; padding: 20px; }
.plan-card.featured { border-color: rgba(99,102,241,0.5); background: radial-gradient(500px 200px at 80% -20%, rgba(99,102,241,0.28), transparent), var(--surface-2); }
.plan-card.active-plan { border-color: var(--green); }
.plan-shimmer::before { content: ""; position: absolute; top: 0; left: -60%; width: 50%; height: 100%; background: linear-gradient(110deg, transparent, rgba(255,255,255,0.13), transparent); transform: skewX(-18deg); animation: shimmer 3.4s var(--ease) infinite; }
@keyframes shimmer { 0% { left: -60%; } 60%,100% { left: 130%; } }
.plan-head { display: flex; align-items: baseline; justify-content: space-between; }
.plan-name { font-size: 17px; font-weight: 800; }
.plan-tag { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--accent-grad); color: #fff; }
.plan-price { font-size: 30px; font-weight: 900; letter-spacing: -0.02em; margin: 10px 0 2px; }
.plan-price small { font-size: 14px; color: var(--text-dim); font-weight: 600; }
.plan-per { font-size: 12px; color: var(--text-faint); }
.plan-feats { display: flex; flex-direction: column; gap: 9px; margin: 16px 0; }
.plan-feat { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-dim); }
.plan-feat .fi { color: var(--green); }

/* ==================== СПИСКИ / ТРАНЗАКЦИИ ==================== */
.list { display: flex; flex-direction: column; gap: 8px; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--stroke); animation: rise 0.4s var(--ease) both; }
.lrow-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; flex-shrink: 0; background: var(--surface-3); }
.lrow-main { flex: 1; min-width: 0; }
.lrow-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow-sub { font-size: 12px; color: var(--text-faint); margin-top: 1px; }
.lrow-amt { font-weight: 800; font-size: 15px; }
.lrow-amt.pos { color: var(--green); }
.lrow-amt.neg { color: var(--text); }

.filter-pills { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.filter-pills::-webkit-scrollbar { display: none; }
.pill { white-space: nowrap; padding: 8px 15px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--stroke); color: var(--text-dim); transition: all 0.2s; }
.pill.active { background: var(--accent-grad); color: #fff; border-color: transparent; }

/* ==================== СКЕЛЕТОНЫ ==================== */
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: var(--radius-sm); }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--surface-3), transparent); transform: translateX(-100%); animation: sk 1.4s infinite; }
@keyframes sk { 100% { transform: translateX(100%); } }
.sk-line { height: 14px; border-radius: 7px; margin: 6px 0; }
.sk-card { height: 96px; border-radius: var(--radius); margin-bottom: 12px; }

/* ==================== МОДАЛКИ ==================== */
.overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; animation: fade 0.25s var(--ease); }
.sheet { width: 100%; max-width: 520px; background: var(--bg-2); border: 1px solid var(--stroke); border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 8px 20px calc(24px + var(--safe-bottom)); box-shadow: var(--shadow); animation: sheetUp 0.4s var(--ease) both; max-height: 88vh; overflow-y: auto; scrollbar-width: none; }
.sheet::-webkit-scrollbar { display: none; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet-grip { width: 40px; height: 4px; border-radius: 999px; background: var(--stroke-strong); margin: 6px auto 16px; }
.sheet-title { font-size: 19px; font-weight: 800; margin-bottom: 4px; }
.sheet-sub { color: var(--text-dim); font-size: 14px; margin-bottom: 18px; }

/* Таймер ожидания оплаты */
.pay-wait { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 10px 0; }
.timer-ring { position: relative; width: 130px; height: 130px; }
.timer-ring svg { transform: rotate(-90deg); }
.timer-ring .track { fill: none; stroke: var(--surface-3); stroke-width: 9; }
.timer-ring .bar { fill: none; stroke: url(#tg); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.timer-text { position: absolute; inset: 0; display: grid; place-items: center; font-size: 24px; font-weight: 800; }
.qr-box { background: #fff; padding: 14px; border-radius: 18px; }
.qr-box img { width: 200px; height: 200px; }

/* ==================== TOAST ==================== */
.toast-root { position: fixed; left: 0; right: 0; top: calc(var(--safe-top) + 12px); z-index: 600; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; color: #fff; box-shadow: var(--shadow); animation: toastIn 0.35s var(--ease-bounce) both; max-width: 92%; }
.toast.success { background: linear-gradient(135deg,#16a34a,#22c55e); }
.toast.error { background: linear-gradient(135deg,#dc2626,#ef4444); }
.toast.info { background: linear-gradient(135deg,#3b82f6,#6366f1); }
.toast.hide { animation: toastOut 0.3s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px) scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-14px); } }

/* ==================== ДОСТИЖЕНИЯ ==================== */
.ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ach { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--stroke); text-align: center; }
.ach.locked { opacity: 0.4; filter: grayscale(0.8); }
.ach-ic { font-size: 28px; }
.ach-name { font-size: 11px; font-weight: 600; color: var(--text-dim); }

/* ==================== FAQ / НАСТРОЙКИ ==================== */
.faq-item { border-bottom: 1px solid var(--stroke); }
.faq-q { display: flex; align-items: center; justify-content: space-between; padding: 15px 2px; font-weight: 600; font-size: 14px; }
.faq-q .chev { transition: transform 0.3s var(--ease); color: var(--text-faint); }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease), padding 0.35s var(--ease); color: var(--text-dim); font-size: 13px; }
.faq-item.open .faq-a { max-height: 240px; padding: 0 2px 15px; }

.setting-row { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--stroke); }
.setting-row:last-child { border-bottom: none; }
.setting-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; background: var(--surface-3); flex-shrink: 0; }
.setting-main { flex: 1; }
.setting-name { font-weight: 600; font-size: 14px; }
.setting-desc { font-size: 12px; color: var(--text-faint); }
.seg { display: flex; background: var(--surface); border-radius: 11px; padding: 3px; border: 1px solid var(--stroke); }
.seg button { padding: 7px 13px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--text-dim); transition: all 0.2s; }
.seg button.on { background: var(--accent-grad); color: #fff; }
.switch { width: 48px; height: 28px; border-radius: 999px; background: var(--surface-3); position: relative; transition: background 0.25s; flex-shrink: 0; }
.switch.on { background: var(--green); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.25s var(--ease-bounce); }
.switch.on::after { transform: translateX(20px); }

/* ==================== CONFETTI ==================== */
.confetti { position: fixed; inset: 0; z-index: 700; pointer-events: none; }

/* ==================== УСПЕХ ==================== */
.success-screen { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 30px 10px; gap: 8px; }
.success-ring { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; font-size: 48px; background: var(--green-bg); animation: pop 0.6s var(--ease-bounce) both; }
@keyframes pop { 0% { transform: scale(0); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.success-title { font-size: 22px; font-weight: 800; margin-top: 10px; }
.success-sub { color: var(--text-dim); font-size: 14px; }

.empty { text-align: center; padding: 40px 20px; color: var(--text-faint); }
.empty-emoji { font-size: 40px; margin-bottom: 8px; }

.copy-field { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--stroke-strong); }
.copy-field input { flex: 1; background: none; border: none; color: var(--text); font-size: 13px; font-family: inherit; }
.copy-field input:focus { outline: none; }

@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
