@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg-primary: #0E1514;
  --bg-card: rgba(255, 255, 255, 0.055);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-card-solid: #172221;
  --accent: #2DD4A8;
  --accent-dark: #1A9E7A;
  --accent-muted: rgba(45, 212, 168, 0.12);
  --accent-gold: #E8C547;
  --accent-gold-bg: rgba(232, 197, 71, 0.1);
  --accent-gold-border: rgba(232, 197, 71, 0.25);
  --accent-red: #E85D5D;
  --text-main: #EDF2F0;
  --text-secondary: #9AABA8;
  --text-dim: #566B68;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.12);
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

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

html, body {
  width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden;
  background: #080E0D; color: var(--text-main); font-family: var(--font);
}
body { display: flex; justify-content: center; align-items: center; }

/* ═══ App Shell ═══ */
.app-container {
  width: 100%; max-width: 420px; height: 100%; max-height: 900px;
  background: var(--bg-primary);
  display: flex; flex-direction: column; position: relative; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  border-radius: 32px;
  border: 1px solid var(--border-subtle);
}
@media (max-width: 450px) {
  .app-container { height: 100%; max-height: 100%; border-radius: 0; border: none; }
}

/* ═══ Header ═══ */
.app-header {
  flex-shrink: 0;
  height: calc(52px + var(--safe-top));
  padding: var(--safe-top) 18px 0;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 30;
  background: transparent;
}
.header-btn {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary);
  transition: all 0.15s;
}
.header-btn:active { transform: scale(0.93); background: var(--bg-card-hover); }
.header-btn-crown {
  color: var(--accent-gold);
  border-color: var(--accent-gold-border);
  background: var(--accent-gold-bg);
}
.app-brand { display: flex; align-items: center; gap: 8px; }
.app-brand h1 { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; color: var(--text-main); }
.app-brand span {
  font-size: 8px; font-weight: 700;
  background: var(--accent-muted);
  color: var(--accent);
  padding: 2px 5px; border-radius: 3px;
  letter-spacing: 1.2px;
}

/* ═══ Screens ═══ */
.screens-viewport { flex: 1 1 0; min-height: 0; position: relative; overflow: hidden; width: 100%; }
.screen {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: none !important; flex-direction: column;
  overflow-y: auto !important; overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch !important;
  padding-bottom: 100px !important;
  touch-action: pan-y !important;
}
.screen.active { display: flex !important; animation: fadeIn 0.18s ease-out; }
.screen::-webkit-scrollbar { width: 3px; }
.screen::-webkit-scrollbar-track { background: transparent; }
.screen::-webkit-scrollbar-thumb { background: rgba(45, 212, 168, 0.2); border-radius: 3px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ═══════════════ HOME SCREEN ═══════════════ */
.home-screen {
  padding: 30px 20px 110px 20px !important;
  flex-direction: column; align-items: center;
  justify-content: flex-start !important; gap: 6px;
  background:
    linear-gradient(180deg, rgba(14,21,20,0.5) 0%, rgba(14,21,20,0.85) 40%, var(--bg-primary) 65%),
    url('assets/makkah_haram.jpg') center top / cover no-repeat,
    var(--bg-primary);
}

/* Bismillah */
.home-bismillah {
  font-size: 15px; font-weight: 600;
  color: var(--accent-gold);
  text-align: center; letter-spacing: 0.2px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.9);
  margin-bottom: 0; flex-shrink: 0;
  opacity: 0.9;
}

/* Timer Area */
.connecting-time-wrap { text-align: center; margin-top: 2px; }
.time-caption {
  font-size: 11px; color: var(--text-secondary); font-weight: 500;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
  letter-spacing: 0.5px; text-transform: uppercase;
}
.time-value {
  font-size: 36px; font-weight: 800; color: var(--text-main);
  letter-spacing: 1px; font-variant-numeric: tabular-nums;
  line-height: 1.1; text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}
.user-ip-sub {
  font-size: 11px; color: var(--text-secondary); font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  margin-top: 3px; text-shadow: 0 1px 4px rgba(0,0,0,0.9);
}

/* ═══ Power Button — Premium, nicht AI-Template ═══ */
.central-power-section {
  position: relative; width: 160px; height: 160px;
  display: flex; align-items: center; justify-content: center;
  margin: 10px 0 4px; flex-shrink: 0;
}

/* Äußerer Ring: solid, kein dashed */
.glow-halo-outer {
  position: absolute; width: 160px; height: 160px; border-radius: 50%;
  background: transparent;
  border: 2px solid rgba(45, 212, 168, 0.1);
  transition: all 0.4s ease;
}

/* Mittlerer Ring */
.glow-halo-mid {
  position: absolute; width: 130px; height: 130px; border-radius: 50%;
  background: rgba(23, 34, 33, 0.9);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.04);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.4s ease;
  backdrop-filter: blur(4px);
}

/* Power Button selbst */
.umra-power-btn {
  width: 100px; height: 100px; border-radius: 50%;
  background: linear-gradient(165deg, #1E302E, #142120);
  border: 2px solid rgba(45, 212, 168, 0.18);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--accent);
  box-shadow:
    0 8px 24px rgba(0,0,0,0.5),
    inset 0 2px 4px rgba(255,255,255,0.03),
    inset 0 -2px 6px rgba(0,0,0,0.3);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.umra-power-btn:active { transform: scale(0.92); }
.umra-power-icon {
  width: 42px; height: 42px; stroke: currentColor; stroke-width: 2.8;
  stroke-linecap: round; fill: none; transition: all 0.3s;
}

/* Connecting */
.central-power-section.connecting .glow-halo-outer {
  animation: pulseRing 2s ease-in-out infinite;
  border-color: rgba(45, 212, 168, 0.35);
}
.central-power-section.connecting .umra-power-btn {
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(45, 212, 168, 0.2);
}
.central-power-section.connecting .umra-power-icon { animation: rotateSlow 2s linear infinite; }

/* Connected */
.central-power-section.connected .glow-halo-outer {
  border-color: rgba(45, 212, 168, 0.3);
  box-shadow: 0 0 40px rgba(45, 212, 168, 0.08);
}
.central-power-section.connected .glow-halo-mid {
  border-color: rgba(45, 212, 168, 0.2);
  box-shadow: 0 0 30px rgba(45, 212, 168, 0.1);
}
.central-power-section.connected .umra-power-btn {
  background: linear-gradient(165deg, var(--accent), var(--accent-dark));
  color: #0A1413;
  border-color: var(--accent);
  box-shadow:
    0 4px 20px rgba(45, 212, 168, 0.35),
    inset 0 2px 4px rgba(255,255,255,0.3),
    inset 0 -2px 6px rgba(0,0,0,0.15);
}

@keyframes pulseRing {
  0%, 100% { transform: scale(0.97); opacity: 0.5; }
  50% { transform: scale(1.04); opacity: 1; }
}
@keyframes rotateSlow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Status Text */
.connection-status-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  margin-top: 2px;
}
.connection-status-label.connected { color: var(--accent); }

/* VoIP Badge */
.voip-unblock-badge {
  background: transparent; border: none;
  color: var(--accent); font-size: 11px; font-weight: 600;
  padding: 0; display: none;
  align-items: center; justify-content: center; gap: 5px;
  margin-top: 2px; margin-bottom: 4px;
}

/* ═══ Download/Upload ═══ */
.rates-summary-row {
  width: 100%; display: flex; justify-content: space-around;
  background: var(--bg-card); backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}
.rate-item { display: flex; align-items: center; gap: 10px; }
.rate-icon-pill {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  background: var(--accent-muted); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.rate-texts p { font-size: 10px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.rate-texts h6 { font-size: 14px; font-weight: 700; color: var(--text-main); }

/* ═══ Server Card (Bottom) ═══ */
.server-bottom-card {
  width: 100%;
  background: var(--bg-card); backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--border-subtle);
  cursor: pointer; transition: all 0.15s;
}
.server-bottom-card:active { transform: scale(0.98); background: var(--bg-card-hover); }
.server-card-left { display: flex; align-items: center; gap: 12px; }
.server-flag-wrap {
  width: 38px; height: 28px; border-radius: 6px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: #0A0F0E;
}
.server-text-col h5 { font-size: 14px; font-weight: 700; color: var(--text-main); }
.server-text-col p { font-size: 11px; color: var(--text-secondary); }
.server-title-row { display: flex; align-items: center; gap: 8px; }
.server-badge-status {
  font-size: 9px; font-weight: 700; padding: 2px 6px;
  border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px;
}
.server-badge-status.free { background: var(--accent-muted); color: var(--accent); }
.server-badge-status.vip { background: var(--accent-gold-bg); color: var(--accent-gold); }

/* ═══ Freemium Banner ═══ */
.freemium-ad-banner {
  width: 100%; margin-top: 10px;
  background: var(--bg-card); backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
}
.ad-tag {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-dim); margin-bottom: 4px;
}
.ad-content-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ad-text-col h6 { font-size: 13px; font-weight: 700; color: var(--text-main); }
.ad-text-col p { font-size: 11px; color: var(--text-secondary); }
.btn-ad-upgrade {
  background: var(--accent); color: #0A1413;
  border: none; font-size: 11px; font-weight: 700;
  padding: 7px 14px; border-radius: var(--radius-sm);
  cursor: pointer; white-space: nowrap;
}
.btn-ad-upgrade:active { transform: scale(0.95); }
.btn-details-white {
  background: var(--text-main); color: var(--bg-primary);
  border: none; font-size: 12px; font-weight: 700;
  padding: 7px 16px; border-radius: var(--radius-md);
  cursor: pointer;
}

/* ═══════════════ SERVER LIST ═══════════════ */
.servers-screen { padding: 14px 20px 110px 20px !important; }
.server-tier-segment {
  display: flex; background: var(--bg-card); backdrop-filter: blur(12px);
  border-radius: var(--radius-md); padding: 3px;
  border: 1px solid var(--border-subtle); margin-bottom: 16px;
}
.segment-btn {
  flex: 1; border: none; background: transparent;
  color: var(--text-secondary); font-weight: 600; font-size: 13px;
  padding: 9px 0; border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.2s;
}
.segment-btn.active { background: var(--accent); color: #0A1413; font-weight: 700; }
.servers-group-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-dim); margin-bottom: 8px;
}
.servers-list-col { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.server-row-item {
  background: var(--bg-card); backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--border-subtle);
  cursor: pointer; transition: all 0.15s;
}
.server-row-item:active { background: var(--bg-card-hover); }
.server-row-item.active { border-color: rgba(45, 212, 168, 0.3); background: rgba(45, 212, 168, 0.06); }
.server-row-left { display: flex; align-items: center; gap: 12px; }
.server-row-title h6 { font-size: 14px; font-weight: 700; color: var(--text-main); }
.server-row-title p { font-size: 11px; color: var(--text-secondary); }
.btn-server-connect {
  background: transparent; color: var(--accent);
  border: 1.5px solid rgba(45, 212, 168, 0.3);
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 700; cursor: pointer;
}
.server-row-item.active .btn-server-connect { background: var(--accent); color: #0A1413; border-color: var(--accent); }
.btn-server-vip-lock {
  background: var(--accent-gold-bg); color: var(--accent-gold);
  border: 1px solid var(--accent-gold-border);
  padding: 5px 12px; border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 4px;
}

/* ═══════════════ SPEED TEST ═══════════════ */
.speed-screen { padding: 14px 20px 110px 20px !important; flex-direction: column; align-items: center; }
.speed-info-banner {
  width: 100%; background: var(--bg-card); backdrop-filter: blur(12px);
  border-radius: var(--radius-lg); padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  display: flex; justify-content: space-between; margin-bottom: 20px;
}
.speed-info-cell p { font-size: 10px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.speed-info-cell h5 { font-size: 13px; font-weight: 700; color: var(--text-main); margin-top: 2px; }
.umra-gauge-wrap {
  width: 280px; height: 210px; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  margin-bottom: 20px;
}
.gauge-svg { width: 270px; height: 170px; }
.gauge-readout-center { position: absolute; bottom: 8px; text-align: center; }
.gauge-val-big { font-size: 48px; font-weight: 800; color: var(--text-main); line-height: 1; letter-spacing: -1px; }
.gauge-unit { font-size: 14px; font-weight: 700; color: var(--accent); letter-spacing: 0.5px; margin-top: 2px; }
.speed-metrics-trio { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.speed-metric-item {
  background: var(--bg-card); backdrop-filter: blur(12px);
  border-radius: var(--radius-md); padding: 12px 6px; text-align: center;
  border: 1px solid var(--border-subtle);
}
.speed-metric-item p { font-size: 10px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; }
.speed-metric-item h5 { font-size: 14px; font-weight: 700; color: var(--text-main); margin-top: 2px; }
.btn-primary-emerald {
  width: 100%; height: 48px;
  background: var(--accent); color: #0A1413;
  border: none; border-radius: var(--radius-md);
  font-size: 15px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.15s;
}
.btn-primary-emerald:active { transform: scale(0.98); }

/* ═══════════════ PILGRIM PASS ═══════════════ */
.pass-screen { padding: 14px 20px 110px 20px !important; }
.pass-hero-card {
  text-align: center;
  background: linear-gradient(155deg, #1A2726, #111B1A);
  border-radius: 22px; padding: 22px 18px;
  border: 1px solid var(--accent-gold-border);
  margin-bottom: 16px;
}
.crown-badge-large {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  background: var(--accent-gold-bg); color: var(--accent-gold);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px auto; border: 1px solid var(--accent-gold-border);
}
.pass-hero-card h3 { font-size: 18px; font-weight: 800; color: var(--text-main); margin-bottom: 4px; }
.pass-hero-card p { font-size: 12px; color: var(--text-secondary); }
.pass-pricing-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.pass-tier-card {
  background: var(--bg-card); backdrop-filter: blur(12px);
  border-radius: var(--radius-lg); padding: 14px 16px;
  border: 1.5px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; transition: all 0.15s; position: relative;
}
.pass-tier-card.selected {
  border-color: var(--accent-gold);
  background: rgba(232, 197, 71, 0.06);
}
.pass-badge-pill {
  position: absolute; top: -9px; right: 16px;
  background: var(--accent-gold); color: #111B1A;
  font-size: 9px; font-weight: 800;
  padding: 2px 7px; border-radius: 3px;
  letter-spacing: 0.8px; text-transform: uppercase;
}
.pass-tier-left h5 { font-size: 14px; font-weight: 700; color: var(--text-main); }
.pass-tier-left p { font-size: 11px; color: var(--text-secondary); }
.pass-tier-price { font-size: 17px; font-weight: 800; color: var(--accent-gold); }

/* ═══════════════ LANGUAGE ═══════════════ */
.lang-screen { padding: 14px 20px 110px 20px !important; }
.lang-screen-hero { margin-bottom: 14px; }
.lang-screen-hero h4 { font-size: 17px; font-weight: 700; color: var(--text-main); }
.lang-screen-hero p { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
.lang-list-col { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.lang-item-row {
  background: var(--bg-card); backdrop-filter: blur(12px);
  border-radius: var(--radius-md); padding: 13px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border: 1.5px solid var(--border-subtle); cursor: pointer; transition: all 0.15s;
}
.lang-item-row.selected { border-color: var(--accent); background: rgba(45, 212, 168, 0.06); }
.lang-item-title { font-size: 14px; font-weight: 600; color: var(--text-main); display: flex; align-items: center; gap: 10px; }
.lang-checkbox {
  width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
}
.lang-item-row.selected .lang-checkbox {
  background: var(--accent); border-color: var(--accent); color: #0A1413;
}

/* ═══════════════ TAB BAR ═══════════════ */
.bottom-tab-bar {
  position: absolute; bottom: 0; left: 0; width: 100%;
  height: calc(60px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(14, 21, 20, 0.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-around;
  z-index: 50;
}
.tab-btn {
  flex: 1; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; border: none; background: transparent;
  color: var(--text-dim); cursor: pointer; transition: color 0.15s;
}
.tab-btn svg {
  width: 20px; height: 20px; stroke: currentColor;
  stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round;
}
.tab-btn span { font-size: 10px; font-weight: 600; }
.tab-btn.active { color: var(--accent); }

/* ═══ RTL ═══ */
[dir="rtl"] { direction: rtl; text-align: right; }
[dir="rtl"] .pass-badge-pill { right: auto; left: 16px; }
