/* ==========================================================================
   VoltTune - Tesla Cockpit Radio Master Stylesheet (v2.1 High-Density Edition)
   Strict No-Scroll Viewport, Big-Logo Tiles & Card Now Playing Track Display
   ========================================================================== */

:root {
  /* Dark Cockpit Theme (Default) */
  --bg-color: #0B0C10;
  --surface-color: #12141A;
  --card-bg: #161822;
  --card-hover: #1E212E;
  --border-color: #232736;
  --border-subtle: rgba(255, 255, 255, 0.08);

  --tesla-red: #E82127;
  --tesla-red-hover: #FF2E36;
  --tesla-red-glow: rgba(232, 33, 39, 0.55);
  --accent-cyan: #06B6D4;
  --accent-gold: #FFB703;

  --text-primary: #F9FAFB;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;

  --topbar-height: 48px;
  --player-height: 68px;
  --ticker-height: 36px;

  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.light-mode {
  /* Daylight Anti-Glare Theme */
  --bg-color: #F0F2F6;
  --surface-color: #E2E6ED;
  --card-bg: #FFFFFF;
  --card-hover: #F8FAFC;
  --border-color: #CBD5E1;
  --border-subtle: rgba(0, 0, 0, 0.08);

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;

  --tesla-red: #D71A20;
  --tesla-red-glow: rgba(215, 26, 32, 0.35);
}

/* ==========================================================================
   Zero-Scroll Strict Viewport Box
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  overflow: hidden !important;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: background-color 0.25s ease, color 0.25s ease;
  line-height: 1.3;
}

/* Scrollbar completely disabled for Tesla screen safety */
::-webkit-scrollbar {
  display: none;
}

#appContainer {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  overflow: hidden;
  position: relative;
}

/* ==========================================================================
   1. TOP COCKPIT BAR (48px)
   ========================================================================== */
.cockpit-top-bar {
  height: var(--topbar-height);
  min-height: var(--topbar-height);
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 20;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.brand-logo-svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 6px var(--tesla-red-glow));
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.5px;
}

.brand-title span {
  color: var(--tesla-red);
}

.cockpit-ev-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 16px;
  background: rgba(232, 33, 39, 0.12);
  border: 1px solid rgba(232, 33, 39, 0.35);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--tesla-red);
  letter-spacing: 0.5px;
}

.ev-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tesla-red);
  box-shadow: 0 0 6px var(--tesla-red);
  animation: pulseEv 2s infinite ease-in-out;
}

@keyframes pulseEv {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

/* Center Category Filter */
.top-bar-center {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 6px;
}

.top-bar-center::-webkit-scrollbar {
  display: none;
}

.category-filter-wrap {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 2px 4px;
  border-radius: 20px;
  gap: 3px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.category-pill {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.category-pill:hover {
  color: var(--text-primary);
}

.category-pill.active {
  background: var(--tesla-red);
  color: #FFFFFF;
  box-shadow: 0 2px 6px var(--tesla-red-glow);
}

.category-pill.fav-filter-pill {
  color: #FFB800;
  border-color: rgba(255, 184, 0, 0.35);
}

.category-pill.fav-filter-pill:hover {
  border-color: #FFB800;
  background: rgba(255, 184, 0, 0.12);
}

.category-pill.fav-filter-pill.active {
  background: linear-gradient(135deg, #FFB800, #F59E0B);
  color: #0B0C10;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.45);
}

/* Right Tools */
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Live GPS Weather Widget */
.cockpit-weather {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
  flex-shrink: 0;
}

.cockpit-weather:hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.weather-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 6px #10B981;
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.weather-pulse.pulse-live {
  animation: gpsPulse 2.4s infinite ease-in-out;
}

.weather-pulse.pulse-offline {
  background: #F59E0B;
  box-shadow: 0 0 6px #F59E0B;
}

@keyframes gpsPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.weather-icon {
  font-size: 1rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cockpit-weather.is-refreshing .weather-icon {
  animation: weatherSpin 0.7s linear infinite;
}

@keyframes weatherSpin {
  100% { transform: rotate(360deg); }
}

.weather-temp {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  -webkit-font-feature-settings: "tnum";
  font-feature-settings: "tnum";
  color: var(--text-primary);
  letter-spacing: 0.3px;
  min-width: 38px;
  text-align: center;
}

.weather-city {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  max-width: 95px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.cockpit-weather.weather-updated {
  border-color: #10B981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

/* Rock-steady Clock: strictly fixed width & tabular numbers so second ticks NEVER shift the header */
.clock-display {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  -webkit-font-feature-settings: "tnum";
  font-feature-settings: "tnum";
  color: var(--text-primary);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 4px 0;
  width: 84px;
  text-align: center;
  border-radius: 6px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.top-action-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.top-action-btn:hover {
  border-color: var(--tesla-red);
  color: var(--tesla-red);
}

/* ==========================================================================
   2. DASHBOARD AREA: BIG-LOGO HIGH-DENSITY ZERO-SCROLL GRID
   ========================================================================== */
.radio-dashboard-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
}

.radio-dashboard-area::-webkit-scrollbar {
  display: none;
}

.radio-grid {
  display: grid;
  width: 100%;
  height: 100%;
  gap: 6px;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(5, 1fr);
}

/* Filtered categories / Favorites view: Elegant cards centered */
.radio-grid.sparse-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 130px));
  grid-auto-rows: 105px;
  gap: 10px;
  justify-content: center;
  align-content: start;
  height: auto;
  min-height: 100%;
}

@media (max-width: 960px) {
  .radio-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 95px;
    height: auto;
  }
}

@media (max-width: 650px) {
  .radio-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 90px;
    height: auto;
  }
}

/* ==========================================================================
   STATION CARD: TESLA COCKPIT APP-ICON TILE
   ========================================================================== */
.station-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  height: 100%;
  min-height: 0;
  user-select: none;
}

.station-card:hover {
  background: var(--card-hover);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  z-index: 5;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.station-card:active {
  transform: scale(0.96);
}

/* Active Playing Card */
.station-card.active-station {
  border-color: var(--tesla-red);
  box-shadow: 0 0 12px var(--tesla-red-glow), inset 0 0 8px rgba(232, 33, 39, 0.12);
}

/* 1. Main Logo Box (Full-Bleed Vector SVG Tile) */
.card-logo-box {
  flex: 1;
  min-height: 0;
  width: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  padding: 3px;
}

.card-logo-box .station-svg-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 7px;
}

/* Equalizer Overlay on Active Card */
.card-playing-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: 7px;
}

.station-card.is-playing .card-playing-overlay {
  display: flex;
}

.mini-eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}

.mini-eq-bars span {
  width: 3.5px;
  background: var(--tesla-red);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--tesla-red);
}

.mini-eq-bars span:nth-child(1) { height: 6px; animation: eqBounce 0.6s infinite alternate ease-in-out; }
.mini-eq-bars span:nth-child(2) { height: 16px; animation: eqBounce 0.8s infinite alternate ease-in-out 0.15s; }
.mini-eq-bars span:nth-child(3) { height: 20px; animation: eqBounce 0.5s infinite alternate ease-in-out 0.3s; }
.mini-eq-bars span:nth-child(4) { height: 12px; animation: eqBounce 0.7s infinite alternate ease-in-out 0.2s; }

@keyframes eqBounce {
  0% { height: 4px; }
  100% { height: 20px; }
}

/* 2. Station Name Footer */
.card-name-label {
  height: 20px;
  min-height: 20px;
  line-height: 20px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
  background: var(--surface-color);
  border-top: 1px solid var(--border-subtle);
  letter-spacing: 0.2px;
}

.station-card.active-station .card-name-label {
  color: var(--tesla-red);
  font-weight: 800;
}

/* Card Favorite Star Button */
.card-fav-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  color: rgba(255, 255, 255, 0.65);
  padding: 0;
  transition: all 0.15s ease;
}

.card-fav-btn:hover {
  transform: scale(1.15);
  background: rgba(0, 0, 0, 0.85);
  border-color: #FFB800;
  color: #FFB800;
}

.card-fav-btn.is-favorite {
  background: rgba(255, 184, 0, 0.22);
  border-color: #FFB800;
  color: #FFB800;
  box-shadow: 0 0 8px rgba(255, 184, 0, 0.5);
}

.card-fav-btn svg {
  pointer-events: none;
  transition: transform 0.2s ease, fill 0.2s ease;
}

.card-fav-btn:active svg {
  transform: scale(0.85);
}

/* Empty Favorites View Placeholder */
.favorites-empty-view {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  background: var(--card-bg);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  color: var(--text-secondary);
  height: 100%;
}

.fav-empty-star {
  font-size: 2.6rem;
  color: #FFB800;
  margin-bottom: 12px;
  opacity: 0.9;
  filter: drop-shadow(0 0 10px rgba(255, 184, 0, 0.4));
}

.fav-empty-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.fav-empty-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 440px;
  line-height: 1.5;
}

/* ==========================================================================
   3. STICKY BOTTOM PLAYER BAR (68px)
   ========================================================================== */
.cockpit-player-bar {
  height: var(--player-height);
  min-height: var(--player-height);
  background: var(--surface-color);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 30;
  box-shadow: 0 -3px 14px rgba(0, 0, 0, 0.25);
}

.player-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
  max-width: 360px;
}

.player-station-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.player-station-logo svg {
  width: 100%;
  height: 100%;
}

.player-info-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.player-station-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-station-freq {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

.player-track-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}

.live-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tesla-red);
  box-shadow: 0 0 6px var(--tesla-red);
  flex-shrink: 0;
}

.player-track-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Center Transport Controls */
.player-center {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ctrl-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ctrl-btn:hover {
  border-color: var(--tesla-red);
  transform: scale(1.06);
}

.step-btn {
  width: 44px;
  height: 44px;
}

.play-main-btn {
  width: 54px;
  height: 54px;
  background: var(--tesla-red);
  border: none;
  color: #FFFFFF;
  box-shadow: 0 4px 14px var(--tesla-red-glow);
}

.play-main-btn:hover {
  background: var(--tesla-red-hover);
  transform: scale(1.08);
  box-shadow: 0 6px 18px var(--tesla-red-glow);
}

/* Right Volume Controls */
.player-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
  justify-content: flex-end;
}

.mute-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mute-btn.muted {
  color: var(--tesla-red);
  border-color: var(--tesla-red);
}

.volume-slider-wrap {
  width: 110px;
  display: flex;
  align-items: center;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--card-bg);
  outline: none;
  border: 1px solid var(--border-color);
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--tesla-red);
  cursor: pointer;
  box-shadow: 0 0 6px var(--tesla-red-glow);
}

/* ==========================================================================
   4. BOTTOM TICKER BAR (36px) - 100% REAL LIVE NEWS & LIVE FINANCE
   ========================================================================== */
.cockpit-ticker-bar {
  height: var(--ticker-height);
  min-height: var(--ticker-height);
  background: var(--bg-color);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  z-index: 25;
  overflow: hidden;
}

.ticker-news-area {
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 100%;
}

.ticker-badge-prefix {
  background: var(--tesla-red);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  margin-right: 10px;
  flex-shrink: 0;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.ticker-badge-prefix.is-breaking {
  background: #FF1E27;
  box-shadow: 0 0 10px rgba(255, 30, 39, 0.65);
}

.ticker-marquee-track {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  cursor: grab;
  contain: layout paint style;
}

.ticker-marquee-content {
  display: flex;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  perspective: 1000px;
  -webkit-perspective: 1000px;
  user-select: none;
}

.ticker-stream-set {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-ribbon-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 0.73rem;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: default;
}

.ticker-dot-sep {
  display: inline-block;
  color: var(--tesla-red);
  margin: 0 16px;
  font-size: 0.85rem;
  opacity: 0.75;
  user-select: none;
}

.ticker-new-badge {
  background: rgba(16, 185, 129, 0.22);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.6);
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1.5px 6px;
  border-radius: 4px;
  margin-right: 6px;
  letter-spacing: 0.4px;
}

.ticker-time-badge {
  font-family: var(--font-display);
  font-size: 0.63rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 8px;
  opacity: 0.85;
}

.ticker-headline-text {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.ticker-category-tag {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.63rem;
  padding: 1.5px 6px;
  border-radius: 4px;
  margin-right: 6px;
  letter-spacing: 0.3px;
  display: inline-block;
  line-height: 1.35;
  vertical-align: middle;
}

/* Distinct Vibrant Cockpit Colors for News Badges */
.tag-sondakika {
  background: rgba(232, 33, 39, 0.2);
  color: #FF4D4D;
  border: 1px solid rgba(232, 33, 39, 0.6);
  box-shadow: 0 0 8px rgba(232, 33, 39, 0.35);
}

.tag-ev {
  background: rgba(0, 210, 255, 0.16);
  color: #00D2FF;
  border: 1px solid rgba(0, 210, 255, 0.55);
  box-shadow: 0 0 8px rgba(0, 210, 255, 0.25);
}

.tag-cnnturk {
  background: rgba(220, 38, 38, 0.2);
  color: #F87171;
  border: 1px solid rgba(220, 38, 38, 0.65);
}

.tag-haberturk {
  background: rgba(190, 18, 60, 0.2);
  color: #FB7185;
  border: 1px solid rgba(190, 18, 60, 0.65);
}

.tag-ahaber {
  background: rgba(249, 115, 22, 0.2);
  color: #FB923C;
  border: 1px solid rgba(249, 115, 22, 0.65);
}

.tag-trthaber {
  background: rgba(225, 29, 72, 0.2);
  color: #FDA4AF;
  border: 1px solid rgba(225, 29, 72, 0.6);
}

.tag-ntv {
  background: rgba(22, 163, 74, 0.2);
  color: #4ADE80;
  border: 1px solid rgba(22, 163, 74, 0.55);
}

.tag-teknoloji {
  background: rgba(139, 92, 246, 0.2);
  color: #C084FC;
  border: 1px solid rgba(139, 92, 246, 0.55);
}

.tag-ekonomi {
  background: rgba(217, 119, 6, 0.2);
  color: #FBBF24;
  border: 1px solid rgba(217, 119, 6, 0.55);
}

.tag-general {
  background: rgba(59, 130, 246, 0.18);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.5);
}

.ticker-news-title {
  color: var(--text-primary);
  font-weight: 500;
}

.ticker-dot {
  color: var(--text-muted);
  margin: 0 14px;
  font-size: 0.75rem;
}

/* Right Dynamic Real Finance Corner */
.ticker-finance-area {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding-left: 12px;
  border-left: 1px solid var(--border-color);
  cursor: pointer;
}

.finance-card {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: 5px;
  transition: all 0.25s ease;
}

.finance-card:hover {
  border-color: var(--tesla-red);
}

.finance-label {
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.finance-value {
  color: var(--text-primary);
  font-weight: 800;
}

.finance-change {
  font-size: 0.68rem;
  display: flex;
  align-items: center;
  gap: 2px;
}

.trend-up .finance-change {
  color: #10B981;
}

.trend-down .finance-change {
  color: #EF4444;
}

.animate-fade-in {
  animation: fadeInFinance 0.35s ease-out;
}

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

/* ==========================================================================
   5. MODALS & POPUPS (Glassmorphic)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-overlay.modal-open {
  display: flex;
}

.modal-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  width: 90%;
  max-width: 560px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  animation: modalEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.legal-box {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 10px 0;
  font-size: 0.8rem;
  color: var(--text-primary);
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-primary {
  background: var(--tesla-red);
  color: #FFFFFF;
  border: none;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary:hover {
  background: var(--tesla-red-hover);
  box-shadow: 0 4px 12px var(--tesla-red-glow);
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 9px 12px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.82rem;
  outline: none;
}

.form-input:focus {
  border-color: var(--tesla-red);
}

/* ==========================================================================
   TESLA COCKPIT RESPONSIVE RULES
   ========================================================================== */
@media (max-width: 1350px) {
  .cockpit-ev-pill {
    display: none;
  }
}

@media (max-width: 1100px) {
  .top-bar {
    padding: 0 8px;
    height: 46px;
  }
  .brand-title {
    font-size: 0.95rem;
  }
  .cockpit-weather {
    padding: 3px 6px;
    gap: 4px;
  }
  .weather-temp {
    font-size: 0.78rem;
  }
  .weather-city {
    max-width: 65px;
    font-size: 0.68rem;
  }
}
