/* ============================================
   CarbonFlow - Modern, Clean & Pastel Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  /* Ferah Arka Plan Renkleri */
  --bg-primary:    #f8fafc;  /* Açık gri/beyaz arası zemin */
  --bg-secondary:  #ffffff;  /* Kart ve alan zeminleri */
  --bg-card:       #ffffff;
  --bg-card-hover: #fcf8fa;  /* Hover durumunda çok hafif lila dokunuşu */
  
  /* Çizgi ve Kenarlıklar */
  --border:        #e2e8f0;
  --border-accent: #cbd5e1;

  /* Ana Marka Rengi (#46B295) ve Türevleri */
  --accent-primary: #46B295;
  --accent-primary-hover: #3a967c;
  
  /* Senin sevdiğin Pinterest estetiği için Pastel Tonlar */
  --accent-green:  #46B295; 
  --accent-blue:   #818cf8; /* Soft indigo/lila */
  --accent-orange: #fb923c; /* Soft turuncu */
  --accent-red:    #f472b6; /* Soft pembe (uyarılar için) */
  --accent-yellow: #fbbf24;

  /* Metin Renkleri (Koyu zeminlerdeki beyazlar yerine koyu griler) */
  --text-primary:  #1e293b;
  --text-secondary:#475569;
  --text-muted:    #94a3b8;

  /* Yazı Tipleri (Daha modern ve okunaklı) */
  --font-display: 'Poppins', sans-serif;
  --font-mono:    'Inter', monospace; /* Mono yerine Inter kullandım ki o 'robotik' hava kırılsın */
  --font-body:    'Inter', sans-serif;

  /* Gölgeler (Glow yerine modern drop-shadow) */
  --glow-green: 0 4px 14px 0 rgba(70, 178, 149, 0.25);
  --glow-blue:  0 4px 14px 0 rgba(129, 140, 248, 0.25);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Scrollbar ─────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-accent); border-radius: 4px; }

/* Noise texture kaldırıldı (Daha temiz bir görünüm için) */

/* ══════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════ */
.cf-navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.cf-navbar .navbar-brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-primary) !important;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cf-navbar .navbar-brand .brand-icon {
  width: 32px; height: 32px;
  background: var(--accent-primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  box-shadow: var(--glow-green);
}

.cf-navbar .navbar-brand .brand-dot {
  color: var(--accent-primary);
}

.cf-navbar .nav-link {
  color: var(--text-secondary) !important;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 1.5rem 1rem !important;
  position: relative;
  transition: color 0.2s;
}

.cf-navbar .nav-link:hover,
.cf-navbar .nav-link.active {
  color: var(--accent-primary) !important;
}

.cf-navbar .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 1rem; right: 1rem;
  height: 3px;
  background: var(--accent-primary);
  border-radius: 3px 3px 0 0;
}

.navbar-status {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 8px rgba(70, 178, 149, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ══════════════════════════════════════════════
   HERO SECTION
══════════════════════════════════════════════ */
.cf-hero {
  position: relative;
  padding: 60px 0 40px;
  overflow: hidden;
}

.cf-hero::before {
  content: '';
  position: absolute;
  top: -100px; left: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(70,178,149,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cf-hero::after {
  content: '';
  position: absolute;
  bottom: -100px; right: -100px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(244,114,182,0.06) 0%, transparent 70%); /* Soft pembe ışıltı */
  pointer-events: none;
}

.hero-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}

.hero-label::before {
  content: '';
  display: inline-block;
  width: 24px; height: 2px;
  background: var(--accent-primary);
  border-radius: 2px;
}

.cf-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 20px;
}

.cf-hero h1 .highlight {
  color: var(--accent-primary);
  position: relative;
}

.cf-hero p.lead {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 520px;
  line-height: 1.7;
}

.hero-stats {
  display: flex; gap: 30px;
  margin-top: 30px;
}

.hero-stat-item {
  border-left: 2px solid var(--border);
  padding-left: 16px;
}

.hero-stat-item .stat-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.hero-stat-item .stat-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ══════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════ */
.cf-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.cf-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

/* KPI Cards */
.kpi-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary) !important;
  line-height: 1;
}

.kpi-unit {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 4px;
}

.kpi-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.kpi-badge.up {
  background: rgba(244,114,182,0.15); /* Soft pembe zemin */
  color: var(--accent-red);
}

.kpi-badge.down {
  background: rgba(70,178,149,0.15); /* Soft yeşil zemin */
  color: var(--accent-primary);
}

/* ══════════════════════════════════════════════
   MAP PLACEHOLDER
══════════════════════════════════════════════ */
.map-container {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  min-height: 380px;
  display: flex; align-items: center; justify-content: center;
}

.map-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.6;
}

.map-placeholder-text {
  position: relative; z-index: 2;
  text-align: center;
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.map-placeholder-text .map-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.map-placeholder-text p {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ══════════════════════════════════════════════
   CHART PLACEHOLDERS
══════════════════════════════════════════════ */
.chart-container {
  position: relative;
  width: 100%;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-top: 20px;
}

.chart-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  transition: height 1s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  cursor: pointer;
}

.chart-bar.green {
  background: var(--accent-primary);
}

.chart-bar.blue {
  background: var(--accent-blue);
}

.chart-bar.orange {
  background: var(--accent-red); /* Turuncu yerine soft pembe kullandık */
}

.chart-bar:hover { opacity: 0.8; }

.chart-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
}

/* ══════════════════════════════════════════════
   FORM / INPUT SECTION
══════════════════════════════════════════════ */
.cf-form-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.cf-form-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.cf-form-subtitle {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.form-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.cf-input, .cf-select {
  background: var(--bg-primary) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  color: var(--text-primary) !important;
  font-family: var(--font-body) !important;
  font-size: 0.9rem !important;
  padding: 12px 16px !important;
  transition: all 0.2s !important;
  box-shadow: none !important;
}

.cf-input:focus, .cf-select:focus {
  border-color: var(--accent-primary) !important;
  background: white !important;
  box-shadow: 0 0 0 3px rgba(70, 178, 149, 0.15) !important;
  outline: none !important;
}

/* ── Mode Toggle ─────────────── */
.mode-toggle {
  display: flex;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 28px;
}

.mode-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}

.mode-btn.active {
  background: white;
  color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

/* ── Buttons ─────────────────── */
.btn-cf-primary {
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 28px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
}

.btn-cf-primary:hover {
  background: var(--accent-primary-hover);
  box-shadow: var(--glow-green);
  transform: translateY(-1px);
}

.btn-cf-secondary {
  background: white;
  color: var(--text-secondary);
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 11px 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cf-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* ══════════════════════════════════════════════
   PREDICTION RESULT
══════════════════════════════════════════════ */
.result-panel {
  background: #f0fdf4; /* Çok uçuk yeşil zemin */
  border: 1px solid #dcfce7;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.result-value {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1;
}

.result-breakdown {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 16px;
}

.result-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.85rem;
}

.result-row:last-child { border-bottom: none; }

.result-row span:first-child {
  color: var(--text-secondary);
  font-family: var(--font-body);
}

.result-row span:last-child {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text-primary);
}

/* ══════════════════════════════════════════════
   LIVE DATA TICKER
══════════════════════════════════════════════ */
.data-ticker {
  background: white;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.ticker-inner {
  display: flex;
  gap: 48px;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}

.ticker-item {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.ticker-item .t-label {
  color: var(--text-muted);
  font-weight: 500;
}

.ticker-item .t-value { 
  color: var(--text-primary); 
  font-weight: 600;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ══════════════════════════════════════════════
   SECTION HEADERS
══════════════════════════════════════════════ */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 12px;
}

.section-title .s-number {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-primary);
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  padding: 4px 10px;
  border-radius: 6px;
}

.section-meta {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════
   TRAFFIC LEVEL INDICATOR
══════════════════════════════════════════════ */
.traffic-meter {
  display: flex; gap: 3px; align-items: flex-end;
  height: 24px;
}

.traffic-bar {
  width: 8px; border-radius: 2px;
  background: var(--border);
}

.traffic-bar.active.low    { background: var(--accent-primary); height: 40%; }
.traffic-bar.active.medium { background: var(--accent-yellow); height: 70%; }
.traffic-bar.active.high   { background: var(--accent-red);    height: 100%; }

/* ══════════════════════════════════════════════
   TABLE
══════════════════════════════════════════════ */
.cf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.cf-table thead th {
  font-family: var(--font-body);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 16px;
  border-bottom: 2px solid var(--border);
  text-align: left;
  font-weight: 600;
  background: var(--bg-primary);
}

.cf-table tbody td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-body);
}

.cf-table tbody tr:hover td {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.cf-table tbody tr:last-child td { border-bottom: none; }

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.cf-footer {
  background: white;
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 60px;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-links {
  display: flex; gap: 24px;
}

.footer-links a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent-primary); }

.footer-copy {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ══════════════════════════════════════════════
   UTILITY & RESPONSIVE
══════════════════════════════════════════════ */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

@media (max-width: 768px) {
  .hero-stats { flex-direction: column; gap: 20px; }
  .cf-hero h1 { font-size: 2.2rem; }
  .cf-form-section { padding: 20px; }
  .footer-links { flex-wrap: wrap; gap: 12px; }
}

/* Fade-in animation */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.5s ease forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.fade-up:nth-child(1) { animation-delay: 0.05s; }
.fade-up:nth-child(2) { animation-delay: 0.10s; }
.fade-up:nth-child(3) { animation-delay: 0.15s; }
.fade-up:nth-child(4) { animation-delay: 0.20s; }

#locationList::-webkit-scrollbar {
    width: 4px;
}
#locationList::-webkit-scrollbar-track {
    background: transparent;
}
#locationList::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}
#locationList::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

@media (max-width: 768px) {
    .cf-table th:nth-child(3),
    .cf-table td:nth-child(3),
    .cf-table th:nth-child(5),
    .cf-table td:nth-child(5) {
        display: none;
    }
}