/* -------------------------------------------------------------
 * RESET & ROOT VARIABLES (VISIONOS / IOS 18 DARK THEME)
 * ------------------------------------------------------------- */
:root {
  --bg-color: #060911;
  --bg-gradient: radial-gradient(circle at 50% 0%, #111a33 0%, #060911 75%);
  --card-bg: rgba(15, 23, 42, 0.72);
  --card-border: rgba(255, 255, 255, 0.09);
  --card-highlight: rgba(255, 255, 255, 0.04);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #38bdf8;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-purple: #c084fc;
  --accent-rose: #f43f5e;

  --color-green: #10b981;
  --color-yellow: #f59e0b;
  --color-orange: #f97316;
  --color-red: #ef4444;

  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: var(--font-family);
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 24px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

/* -------------------------------------------------------------
 * AMBIENT BACKGROUND GLOWS
 * ------------------------------------------------------------- */
.ambient-glow {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(110px);
  z-index: 0;
  opacity: 0.35;
}

.glow-top {
  top: -120px;
  right: -90px;
  background: radial-gradient(circle, #38bdf8 0%, #6366f1 70%, transparent 100%);
}

.glow-bottom {
  bottom: -120px;
  left: -90px;
  background: radial-gradient(circle, #ec4899 0%, #3b82f6 70%, transparent 100%);
}

/* -------------------------------------------------------------
 * CONTAINER & GLASS CARDS
 * ------------------------------------------------------------- */
.hub-container {
  width: 100%;
  max-width: 580px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.glass-card {
  background: var(--card-bg);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--card-border);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.65), inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* -------------------------------------------------------------
 * HEADER
 * ------------------------------------------------------------- */
.hub-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 2px 2px;
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hub-badge-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hub-logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(99, 102, 241, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.28);
}

.hub-icon {
  font-size: 24px;
}

.hub-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background-color: var(--color-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--color-green);
}

.hub-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.4px;
  line-height: 1.2;
}

.hub-subtitle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.digital-clock {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-cyan);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.6px;
}

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.4px;
  position: relative;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #38bdf8;
  border-radius: 50%;
}

.pulse-ring {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid #38bdf8;
  animation: pulse-ring 1.8s infinite cubic-bezier(0.2, 0, 0, 1);
}

@keyframes pulse-ring {
  0% { transform: translateY(-50%) scale(1); opacity: 0.9; }
  100% { transform: translateY(-50%) scale(3.6); opacity: 0; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-btn {
  height: 40px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 13px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.action-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.14);
}

.push-btn {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(99, 102, 241, 0.15));
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
}

.push-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.live-push-btn {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(220, 38, 38, 0.25));
  border-color: rgba(239, 68, 68, 0.45);
  color: #f87171;
}

.test-btn {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(129, 140, 248, 0.25));
  border-color: rgba(99, 102, 241, 0.45);
  color: #a5b4fc;
}

.refresh-btn {
  width: 40px;
  padding: 0;
}

.icon-refresh {
  width: 19px;
  height: 19px;
  transition: transform 0.5s ease;
}

.refreshing .icon-refresh {
  animation: spin 0.75s linear infinite;
}

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

.sync-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-muted);
  padding: 0 4px;
}

.sync-left {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-green);
  box-shadow: 0 0 8px var(--color-green);
}

.countdown-badge {
  font-weight: 800;
  color: var(--accent-cyan);
  font-variant-numeric: tabular-nums;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 9px;
  border-radius: 12px;
}

/* -------------------------------------------------------------
 * DASHBOARD GRID
 * ------------------------------------------------------------- */
.hub-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.2px;
}

.sec-icon {
  font-size: 16px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

/* -------------------------------------------------------------
 * 1. FİNANS VE KURLAR ŞERİDİ
 * ------------------------------------------------------------- */
.finance-strip {
  padding: 16px 18px;
}

.finance-strip .section-label {
  margin-bottom: 14px;
}

.finance-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.finance-item {
  background: rgba(11, 17, 33, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 11px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.finance-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.f-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}

.f-val {
  font-size: 17px;
  font-weight: 900;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}

.f-change {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.1px;
}

.f-change.pos {
  color: #34d399;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.f-change.neg {
  color: #f87171;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.f-change.neutral {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
}

/* -------------------------------------------------------------
 * 2. İBB TRAFİK KARTI
 * ------------------------------------------------------------- */
.traffic-content {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.traffic-circle-wrap {
  position: relative;
  width: 116px;
  height: 116px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.traffic-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 12;
}

.ring-value {
  fill: none;
  stroke: var(--color-green);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 414.7;
  stroke-dashoffset: 414.7;
  transition: stroke-dashoffset 1s ease, stroke 0.4s ease;
  filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.45));
}

.ring-center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ring-symbol {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: -5px;
}

.ring-number {
  font-size: 34px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}

.ring-sub {
  font-size: 9.5px;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 2px;
}

.district-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.d-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.d-name {
  font-size: 12.5px;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.d-name strong {
  color: #fff;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.d-track {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  overflow: hidden;
}

.d-fill {
  height: 100%;
  border-radius: 5px;
  background: var(--color-green);
  transition: width 0.8s ease, background-color 0.4s ease;
}

.badge-status {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 20px;
}

.badge-neutral {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.badge-free {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.badge-moderate {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.badge-heavy {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.45);
}

.badge-congested {
  background: rgba(239, 68, 68, 0.22);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.5);
}

/* Incidents inside traffic card */
.traffic-incidents-block {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.incidents-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.incident-count-pill {
  font-size: 10.5px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}

.incident-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
}

.incident-mini-card {
  background: rgba(11, 17, 33, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left-width: 4px;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #e2e8f0;
  transition: transform 0.2s ease;
}

.incident-mini-card:hover {
  transform: translateX(2px);
}

.card-accident { border-left-color: var(--color-red); }
.card-breakdown { border-left-color: var(--color-yellow); }
.card-roadwork { border-left-color: var(--color-orange); }
.card-closure { border-left-color: var(--color-purple); }
.card-warning { border-left-color: var(--color-blue); }

.inc-icon {
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}

.inc-body strong {
  font-size: 11.5px;
  font-weight: 800;
  margin-right: 5px;
}

/* -------------------------------------------------------------
 * 3. SICAK HABER AKIŞI
 * ------------------------------------------------------------- */
.news-live-pill {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #f87171;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 2px 8px;
  border-radius: 12px;
}

.news-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.news-item {
  background: rgba(11, 17, 33, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.news-item:hover, .news-item:active {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.source-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.news-time {
  font-size: 11.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.news-headline {
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.4;
}

/* -------------------------------------------------------------
 * 4. GÜNÜN KÜRASYONU (TABS)
 * ------------------------------------------------------------- */
.curation-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  background: rgba(11, 17, 33, 0.7);
  padding: 5px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.c-tab {
  flex: 1;
  padding: 9px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.c-tab.active {
  background: var(--accent-indigo);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Menu Panel */
.menu-day-banner {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-cyan);
}

.meals-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.meal-row {
  background: rgba(11, 17, 33, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meal-badge {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-secondary);
}

.meal-desc {
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.45;
}

.nutrition-tip-box {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  color: #fde68a;
  line-height: 1.45;
}

.tip-icon {
  font-size: 15px;
}

/* Video Panel */
.video-card-inner {
  background: rgba(11, 17, 33, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.video-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.video-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 5px;
  background: rgba(192, 132, 252, 0.18);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.3);
}

.video-channel {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.video-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  line-height: 1.35;
}

.video-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.watch-video-btn {
  margin-top: 8px;
  align-self: flex-start;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  padding: 9px 18px;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.watch-video-btn:active {
  transform: scale(0.95);
}

/* -------------------------------------------------------------
 * IOS HOME SCREEN PROMPT
 * ------------------------------------------------------------- */
.ios-prompt {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(11, 17, 33, 0.95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.prompt-icon {
  font-size: 26px;
}

.prompt-content {
  flex: 1;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.45;
}

.prompt-content strong {
  color: #fff;
}

.share-sym {
  color: #38bdf8;
  font-weight: bold;
}

.close-p-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 17px;
  cursor: pointer;
  padding: 4px;
}

/* -------------------------------------------------------------
 * SKELETON LOADERS
 * ------------------------------------------------------------- */
.skeleton-line {
  height: 40px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-news {
  height: 64px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* -------------------------------------------------------------
 * FOOTER
 * ------------------------------------------------------------- */
.hub-footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  padding: 8px 12px 14px 12px;
}
