/* ==========================================================================
   SVAZ VPN - ULTRA COMPACT LUXURY DARK THEME
   Strict rules: Deep black, glowing white text, dark gray glass buttons, zero emojis.
   Ergonomics: Ultra-compact, razor-sharp padding, sleek proportions.
   ========================================================================== */

:root {
  --bg-main: #060608;
  --bg-card: rgba(14, 14, 18, 0.75);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --bg-dock: rgba(14, 14, 18, 0.88);
  --bg-dock-border: rgba(255, 255, 255, 0.1);
  
  --btn-primary-bg: #181820;
  --btn-primary-border: rgba(255, 255, 255, 0.18);
  --btn-secondary-bg: #101014;
  --btn-secondary-border: rgba(255, 255, 255, 0.08);

  --text-pure: #ffffff;
  --text-main: #dcdce6;
  --text-muted: #6e6e80;
  --text-glow: 0 0 10px rgba(255, 255, 255, 0.45);
  --text-glow-subtle: 0 0 6px rgba(255, 255, 255, 0.25);

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;
  
  --font-main: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, Consolas, "Liberation Mono", monospace;
}

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

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.05) 0%, rgba(6, 6, 8, 0) 50%),
    radial-gradient(circle at 50% 110%, rgba(255, 255, 255, 0.02) 0%, rgba(6, 6, 8, 0) 40%);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.35;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 12px));
  font-size: 13px;
}

/* App Container */
.app-container {
  max-width: 420px;
  margin: 0 auto;
  padding: 10px 12px 0 12px;
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  padding: 2px 0 10px 0;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-logo .svg-icon {
  width: 17px;
  height: 17px;
  color: var(--text-pure);
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-pure);
  text-shadow: var(--text-glow);
}

.network-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.pulse-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #2ed573;
  box-shadow: 0 0 6px #2ed573;
  animation: pulse 2s infinite ease-in-out;
}

.badge-text {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #b0b0c2;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* Tab panes */
.tab-pane {
  display: none;
  animation: fadeIn 0.2s ease-out;
}

.tab-pane.active {
  display: block;
}

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

/* Cards Base */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.card-subtitle {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.card-header {
  margin-bottom: 8px;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-title-row .svg-icon {
  width: 14px;
  height: 14px;
  color: var(--text-pure);
}

.card-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-pure);
}

/* Hero Status Card */
.hero-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(20, 20, 26, 0.8) 0%, rgba(12, 12, 16, 0.6) 100%);
  position: relative;
  overflow: hidden;
  padding: 12px 14px;
}

.hero-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
}

.hero-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.hero-status-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.status-pill {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-pure);
}

.status-pill.active {
  background: rgba(46, 213, 115, 0.1);
  border-color: rgba(46, 213, 115, 0.3);
  color: #2ed573;
  box-shadow: 0 0 8px rgba(46, 213, 115, 0.15);
}

.status-pill.inactive {
  background: rgba(255, 71, 87, 0.1);
  border-color: rgba(255, 71, 87, 0.3);
  color: #ff4757;
}

.hero-remaining-time {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-pure);
  text-shadow: var(--text-glow);
  margin-top: 2px;
}

.hero-expiry-date {
  font-size: 10.5px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  margin-top: 1px;
  margin-bottom: 10px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.metric-box {
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  padding: 5px 2px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.metric-val {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-pure);
  letter-spacing: 0.5px;
}

.metric-lbl {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Key section */
.key-preview-box {
  background: rgba(7, 7, 10, 0.85);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  margin-bottom: 10px;
  word-break: break-all;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #9898aa;
  max-height: 48px;
  overflow: hidden;
  line-height: 1.3;
}

.inactive-note {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
}

/* Compact Buttons */
.btn-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.btn-row {
  display: flex;
  gap: 7px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  cursor: pointer;
  transition: all 0.15s ease-out;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--btn-primary-bg);
  border: 1px solid var(--btn-primary-border);
  color: var(--text-pure);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.btn-primary:active {
  background: #22222a;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-secondary {
  background: var(--btn-secondary-bg);
  border: 1px solid var(--btn-secondary-border);
  color: #c4c4d4;
}

.btn-secondary:active {
  background: #181820;
}

.btn-svg {
  width: 13px;
  height: 13px;
}

/* Platform Tabs & Guide */
.platform-tabs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  margin-bottom: 10px;
  scrollbar-width: none;
}

.platform-tabs::-webkit-scrollbar {
  display: none;
}

.platform-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.platform-btn.active {
  background: #1e1e26;
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--text-pure);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.08);
}

.guide-step-item {
  display: flex;
  gap: 8px;
  margin-bottom: 7px;
}

.step-num-badge {
  width: 17px;
  height: 17px;
  min-width: 17px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-pure);
  font-size: 9.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-text {
  font-size: 11px;
  color: #c0c0d0;
  line-height: 1.35;
}

.step-download-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-pure);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 10.5px;
  font-weight: 700;
  margin-top: 3px;
}

/* TAB 2: Subscriptions */
.sub-summary-card {
  text-align: center;
  padding: 14px 12px;
}

.sub-countdown {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-pure);
  text-shadow: var(--text-glow);
  margin: 4px 0 10px 0;
}

.sub-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sub-info-item {
  text-align: center;
}

.sub-info-lbl {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.sub-info-val {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-pure);
  margin-top: 1px;
}

.trial-card {
  background: linear-gradient(180deg, rgba(24, 24, 30, 0.7) 0%, rgba(14, 14, 18, 0.7) 100%);
  border-color: rgba(255, 255, 255, 0.12);
  padding: 10px 12px;
}

.trial-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--text-pure);
  text-shadow: var(--text-glow-subtle);
  margin-bottom: 2px;
}

.trial-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.section-title-wrap {
  margin: 12px 0 8px 2px;
  display: flex;
  flex-direction: column;
}

.section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--text-pure);
}

.section-sub {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Plans List */
.plans-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 10px;
}

.plan-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  transition: all 0.15s;
}

.plan-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.plan-info-left {
  display: flex;
  flex-direction: column;
}

.plan-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.plan-title {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--text-pure);
}

.plan-badge {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 1px 5px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-pure);
}

.plan-days {
  font-size: 9.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

.plan-price-block {
  text-align: right;
  margin-right: 10px;
}

.plan-stars-amount {
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--text-pure);
  text-shadow: var(--text-glow-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.stars-svg {
  width: 11px;
  height: 11px;
  color: var(--text-pure);
}

.plan-orig-stars {
  font-size: 9.5px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.plan-buy-btn {
  width: auto;
  min-width: 72px;
  padding: 7px 11px;
  font-size: 10.5px;
  border-radius: var(--radius-sm);
}

/* Promo Card */
.promo-input-row {
  display: flex;
  gap: 6px;
}

.text-input {
  flex: 1;
  background: rgba(7, 7, 10, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--text-pure);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  outline: none;
  transition: border-color 0.15s;
}

.text-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

.promo-submit-btn {
  width: auto;
  padding: 8px 13px;
  font-size: 10.5px;
  border-radius: var(--radius-sm);
}

.promo-feedback {
  font-size: 10.5px;
  margin-top: 5px;
  min-height: 14px;
  line-height: 1.3;
}

.promo-feedback.success {
  color: #2ed573;
}

.promo-feedback.error {
  color: #ff4757;
}

/* TAB 3: Profile */
.profile-header-card {
  text-align: center;
  padding: 16px 14px 12px 14px;
}

.avatar-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.avatar-ring {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.05) 100%);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #101014;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #14141a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-svg {
  width: 26px;
  height: 26px;
  color: #a8a8ba;
}

.profile-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--text-pure);
  text-shadow: var(--text-glow);
}

.profile-username {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  margin-top: 1px;
}

.profile-id-pill {
  display: inline-block;
  margin-top: 6px;
  font-size: 9.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #9292a4;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* Info Group */
.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
}

.info-title {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.info-value {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--text-pure);
}

.info-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.04);
  margin: 1px 0;
}

/* Referral Card */
.ref-desc {
  font-size: 10.5px;
  color: #b0b0c0;
  line-height: 1.4;
  margin-bottom: 8px;
}

.text-glow {
  color: var(--text-pure);
  font-weight: 800;
  text-shadow: var(--text-glow-subtle);
}

.ref-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 8px;
}

.ref-metric-item {
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  padding: 6px 2px;
}

.ref-metric-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-pure);
}

.ref-metric-lbl {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-top: 1px;
}

.ref-link-box {
  background: rgba(7, 7, 10, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 7px 9px;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: #88889a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Bottom Glassmorphism Navigation Dock (Slim Proportions) */
.bottom-dock {
  position: fixed;
  bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 1000;
  padding: 0 12px;
  pointer-events: none;
}

.dock-container {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-dock);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--bg-dock-border);
  border-radius: 20px;
  padding: 3px 5px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 1px 1px rgba(255, 255, 255, 0.06);
  width: 100%;
  max-width: 320px;
}

.dock-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 5px 2px;
  background: transparent;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.dock-svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: all 0.2s;
}

.dock-label {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  transition: all 0.2s;
}

.dock-btn.active {
  background: rgba(255, 255, 255, 0.08);
}

.dock-btn.active .dock-svg {
  color: var(--text-pure);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.7));
  transform: translateY(-0.5px);
}

.dock-btn.active .dock-label {
  color: var(--text-pure);
  text-shadow: var(--text-glow-subtle);
}

/* Toast */
.toast-overlay {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-25px);
  background: rgba(20, 20, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
  color: var(--text-pure);
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
  text-align: center;
}

.toast-overlay.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
