:root {
    --bg-main: #080d1a;
    --bg-card: #0f172a;
    --bg-input: #050811;
    --text-main: #ffffff;
    --text-hint: #64748b;
    --accent-blue: #2481cc;
    --accent-glow: #38bdf8;
    --accent-yellow: #ffcc00;
    --status-red: #ef4444;
    --border-color: #1e293b;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    padding: 16px;
    padding-bottom: 100px;
    max-width: 100vw;
    overflow-x: hidden;
    user-select: none;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px 16px 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}
.logo-zone {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-icon { font-size: 22px; }
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: 0.5px; }
.lang-selector {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    border: 1px solid var(--border-color);
}
.lang-selector small { color: var(--text-hint); margin-left: 4px; }

.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }

.welcome-container { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding: 0 4px; }
.avatar-gradient { width: 54px; height: 54px; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #3b82f6); flex-shrink: 0; }
.welcome-text h2 { margin: 0; font-size: 20px; font-weight: 800; }
.status-badge { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; }
.secure-false { color: var(--status-red); }

.promo-banner {
    background: linear-gradient(135deg, #131e35, #0f172a);
    border: 1px solid #1e293b;
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 24px;
    position: relative;
}
.promo-header { display: flex; gap: 14px; align-items: flex-start; }
.tg-circle-icon {
    background: var(--accent-blue); width: 36px; height: 36px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center; font-size: 16px; flex-shrink: 0;
}
.promo-title h3 { margin: 0; font-size: 15px; font-weight: 700; }
.promo-title p { margin: 4px 0 0 0; font-size: 13px; color: var(--text-hint); line-height: 1.4; padding-right: 20px; }
.close-banner-btn { position: absolute; top: 14px; right: 14px; background: transparent; border: none; color: var(--text-hint); font-size: 20px; cursor: pointer; }
.promo-action-row {
    display: flex; background: rgba(5, 8, 17, 0.6); border-radius: 14px; padding: 8px 12px;
    margin-top: 14px; justify-content: space-between; align-items: center; border: 1px solid rgba(255,255,255,0.02);
}
.channel-tag { font-weight: bold; font-size: 14px; color: #cbd5e1; }
.btn-follow { background: transparent; border: none; color: #94a3b8; font-weight: bold; font-size: 13px; cursor: pointer; }

.main-tariff-card {
    background: radial-gradient(circle at right bottom, rgba(36, 129, 204, 0.15), transparent 70%), var(--bg-card);
    border: 1px solid var(--border-color); border-radius: 24px; padding: 24px; position: relative; overflow: hidden; width: 100%; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.card-bg-globe {
    position: absolute; right: -20px; bottom: -20px; width: 180px; height: 180px;
    border: 1px dashed rgba(56, 189, 248, 0.15); border-radius: 50%; pointer-events: none;
}
.card-bg-globe::before { content: ''; position: absolute; top: 20px; left: 20px; right: 20px; bottom: 20px; border: 1px dashed rgba(56, 189, 248, 0.08); border-radius: 50%; }
.card-top-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.badge-expired {
    background: rgba(239, 68, 68, 0.15); color: var(--status-red); padding: 4px 10px;
    border-radius: 8px; font-size: 11px; font-weight: bold; letter-spacing: 0.5px; border: 1px solid rgba(239, 68, 68, 0.2);
}
.settings-gear-btn { background: rgba(255,255,255,0.05); border: 1px solid var(--border-color); color: #fff; width: 36px; height: 36px; border-radius: 10px; cursor: pointer; display: flex; justify-content: center; align-items: center; }
.tariff-title { margin: 0; font-size: 28px; font-weight: 900; }
.tariff-deadline { margin: 6px 0 0 0; font-size: 14px; color: var(--text-hint); }
.tariff-hint { font-size: 13px; color: #475569; margin: 28px 0 14px 0; text-align: center; }

.features-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.feature-item { background: rgba(5, 8, 17, 0.4); border: 1px solid rgba(255,255,255,0.03); border-radius: 12px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.feat-label { font-size: 9px; font-weight: bold; color: var(--text-hint); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 6px; }
.feat-value { font-size: 14px; font-weight: bold; color: #f1f5f9; }
.feat-value small { color: var(--text-hint); font-size: 11px; }

.btn-action-glow { width: 100%; background: linear-gradient(135deg, #1d4ed8, #2563eb); color: #fff; border: none; padding: 14px; border-radius: 14px; font-weight: bold; font-size: 15px; cursor: pointer; box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4); transition: transform 0.1s; }
.btn-action-glow:active { transform: scale(0.98); }

.section-title { font-size: 13px; font-weight: bold; color: var(--text-hint); text-transform: uppercase; letter-spacing: 1px; margin: 28px 0 12px 4px; }

.deposit-card-new { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 20px; padding: 16px; }
.balance-display-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; padding: 0 4px; }
.balance-display-row span { color: var(--text-hint); font-size: 14px; }
.balance-display-row strong { font-size: 20px; color: var(--accent-glow); font-weight: 900; }
.deposit-box { display: flex; align-items: center; gap: 8px; background: var(--bg-input); padding: 6px; border-radius: 14px; border: 1px solid var(--border-color); }
.deposit-box input { flex: 1; background: transparent; border: none; color: #fff; font-size: 16px; outline: none; padding: 10px; min-width: 40px; }

.btn { border: none; padding: 12px 18px; border-radius: 10px; font-weight: bold; font-size: 14px; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.btn-primary { background: var(--accent-blue); color: #fff; }
.user-id-footer { text-align: center; font-size: 11px; color: #334155; margin-top: 12px; }

.tariffs-grid { display: flex; flex-direction: column; gap: 10px; }
.tariff-card-new { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 18px; padding: 16px; display: flex; justify-content: space-between; align-items: center; }
.t-info h3 { margin: 0; font-size: 16px; color: #fff; }
.t-info p { margin: 4px 0 0 0; font-size: 13px; color: var(--text-hint); }
.t-price-zone { display: flex; align-items: center; gap: 12px; }
.t-price { font-size: 16px; font-weight: 800; color: var(--accent-glow); }
.btn-buy-new { background: rgba(255, 204, 0, 0.1); color: var(--accent-yellow); border: 1px solid rgba(255, 204, 0, 0.2); padding: 8px 16px; border-radius: 10px; font-weight: bold; font-size: 13px; cursor: pointer; }

.subs-container, .gift-container-new, .info-container-new { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 20px; padding: 16px; }
.empty-state { text-align: center; color: var(--text-hint); font-size: 14px; padding: 10px 0; }
.sub-item { border-bottom: 1px solid var(--border-color); padding-bottom: 12px; margin-bottom: 12px; }
.sub-item:last-child { border: none; padding: 0; margin: 0; }
.key-box { background: var(--bg-input); padding: 12px; border-radius: 10px; font-family: monospace; font-size: 11px; word-break: break-all; margin-top: 8px; color: #00ffcc; border: 1px solid var(--border-color); }
.hint-text { font-size: 13px; color: var(--text-hint); line-height: 1.4; margin: 0 0 14px 0; }
#gift-target-id { width: 100%; background: var(--bg-input); border: 1px solid var(--border-color); padding: 12px; border-radius: 12px; color: #fff; font-size: 15px; outline: none; }
.tariffs-list-gift { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.gift-item-row { display: flex; justify-content: space-between; align-items: center; background: rgba(5,8,17,0.3); padding: 8px 12px; border-radius: 10px; font-size: 14px; }
.btn-sm { padding: 8px 14px; font-size: 12px; border-radius: 8px; }

.info-step { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.info-step:last-child { margin-bottom: 0; }
.step-badge { background: var(--accent-blue); color: #fff; font-weight: bold; width: 26px; height: 26px; border-radius: 50%; display: flex; justify-content: center; align-items: center; flex-shrink: 0; font-size: 13px; }
.info-step p { margin: 0; font-size: 13px; line-height: 1.4; color: #cbd5e1; }

.tab-bar {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 72px; background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid rgba(255, 255, 255, 0.04);
    display: flex; justify-content: space-around; align-items: center; z-index: 1000; padding-bottom: env(safe-area-inset-bottom);
}
.tab-item { display: flex; flex-direction: column; align-items: center; color: #475569; cursor: pointer; transition: color 0.15s; width: 20%; }
.tab-item.active { color: var(--text-main); }
.tab-icon { font-size: 22px; margin-bottom: 3px; opacity: 0.5; transition: opacity 0.15s; }
.tab-item.active .tab-icon { opacity: 1; }
.tab-label { font-size: 10px; font-weight: 700; }

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(5, 8, 17, 0.9); justify-content: center; align-items: center; z-index: 9999; }
.modal-content { background: var(--bg-card); padding: 24px; border-radius: 24px; text-align: center; max-width: 85%; border: 1px solid var(--border-color); }
.btn-secondary { background: #334155; color: #fff; margin-top: 14px; width: 100%; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
