/* ============================================
   HAVA DEPREM FİNANS DASHBOARD
   Mobile-First Premium Design System
   Developed by Bayram Can TAŞKIN
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* --- CSS Custom Properties --- */
:root {
  --bg-primary: #f0f4ff;
  --bg-secondary: #e8edf8;
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-bg-solid: #ffffff;
  --card-border: rgba(255, 255, 255, 0.6);
  --card-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --card-shadow-hover: 0 8px 32px rgba(15, 23, 42, 0.12);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent: #3b82f6;
  --accent-dark: #2563eb;
  --accent-light: #dbeafe;
  --accent-glow: rgba(59, 130, 246, 0.15);

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --card-bg: rgba(30, 41, 59, 0.85);
  --card-bg-solid: #1e293b;
  --card-border: rgba(51, 65, 85, 0.5);
  --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  --card-shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.35);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-light: rgba(59, 130, 246, 0.15);
}

/* --- Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-bottom: 80px;
  min-height: 100vh;
  transition: background 0.4s ease, color 0.4s ease;
}

/* --- Top Bar --- */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 1050;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  padding: 10px 0;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  max-width: 600px;
  margin: 0 auto;
}

.logo-section h1 {
  font-size: 1.15rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}

.logo-section p {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
}

/* City Selector */
.city-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  border: 1px solid var(--accent);
  color: var(--accent-dark);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.city-btn:hover {
  background: var(--accent);
  color: white;
}

.city-btn i {
  font-size: 0.9rem;
}

/* City Dropdown */
.city-dropdown-wrapper {
  position: relative;
}

.city-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  max-height: 350px;
  background: var(--card-bg-solid);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow-hover);
  overflow: hidden;
  z-index: 2000;
}

.city-dropdown.show {
  display: block;
  animation: slideDown 0.25s ease;
}

.city-search {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-bottom: 1px solid var(--card-border);
  background: var(--bg-secondary);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
}

.city-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
}

.city-list a {
  display: block;
  padding: 10px 14px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.city-list a:hover {
  background: var(--accent-light);
  color: var(--accent-dark);
}

/* --- Main Container --- */
.main-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
}

/* --- Glass Card --- */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 20px;
  margin-bottom: 16px;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--card-shadow-hover);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.card-title i {
  font-size: 1rem;
}

/* --- Tab Content --- */
.tab-content {
  display: none;
  animation: fadeIn 0.35s ease;
}

.tab-content.active {
  display: block;
}

/* --- Weather Section --- */
.greeting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.greeting-text {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-primary);
}

.greeting-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 2px;
}

.countdown-box {
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  text-align: center;
}

.countdown-label {
  font-size: 0.6rem;
  font-weight: 900;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.countdown-time {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-primary);
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

/* Weather Hero */
.weather-hero {
  text-align: center;
  padding: 20px 0 24px;
}

.weather-emoji {
  font-size: 5rem;
  line-height: 1;
  margin-bottom: 8px;
  animation: floatIcon 3s ease-in-out infinite;
}

.temp-display {
  font-size: 4.5rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -3px;
  line-height: 1;
}

.temp-display span {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.city-name-display {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Weather Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.metric-item {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 14px 8px;
  text-align: center;
  transition: var(--transition);
}

.metric-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

.metric-icon {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.metric-label {
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.metric-value {
  font-size: 1rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-top: 2px;
}

/* --- Prayer Times --- */
.prayer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.prayer-item {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
  transition: var(--transition);
}

.prayer-item.active-prayer {
  border-color: var(--accent);
  background: var(--accent-light);
}

.prayer-name {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.prayer-time {
  font-size: 1rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-top: 2px;
}

/* --- Finance Cards --- */
.finance-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.finance-card {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: var(--transition);
}

.finance-card:hover {
  transform: translateY(-2px);
}

.finance-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.finance-value {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-top: 4px;
}

.finance-value.accent {
  color: var(--accent);
}

/* --- Converter --- */
.converter-section {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}

.conv-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.conv-input {
  flex: 1;
  min-width: 120px;
  padding: 14px 16px;
  border: 2px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  background: var(--card-bg-solid);
  outline: none;
  transition: border-color 0.2s;
}

.conv-input:focus {
  border-color: var(--accent);
}

.settings-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--card-bg-solid);
  outline: none;
  transition: border-color 0.2s;
}

.settings-input:focus {
  border-color: var(--accent);
}

.conv-select {
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 800;
  background: var(--accent);
  color: white;
  cursor: pointer;
  outline: none;
}

.conv-result {
  text-align: center;
  margin-top: 20px;
}

.conv-result-value {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent);
}

.conv-result-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* --- Earthquake Section --- */
#map {
  height: 300px;
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  z-index: 1;
}

.eq-list {
  max-height: 400px;
  overflow-y: auto;
}

.eq-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid var(--card-border);
  cursor: pointer;
  transition: background 0.15s;
}

.eq-item:last-child {
  border-bottom: none;
}

.eq-item:hover {
  background: var(--accent-light);
  border-radius: var(--radius-sm);
}

.eq-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
}

.eq-meta {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

.eq-badge {
  min-width: 44px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 900;
  color: white;
  flex-shrink: 0;
}

.eq-badge.low {
  background: var(--success);
}

.eq-badge.mid {
  background: var(--warning);
}

.eq-badge.high {
  background: var(--danger);
}

/* --- News Tabs --- */
.news-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--card-border);
}

.news-tabs::-webkit-scrollbar {
  height: 4px;
}

.news-tabs::-webkit-scrollbar-track {
  background: var(--card-border);
  border-radius: var(--radius-full);
}

.news-tabs::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: var(--radius-full);
}

.news-tab {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--card-border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.news-tab.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.news-frame {
  width: 100%;
  height: calc(100vh - 280px);
  min-height: 400px;
  border: none;
  border-radius: var(--radius-md);
}

/* --- Developer Section --- */
.dev-card {
  text-align: center;
  padding: 30px 20px;
}

.dev-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  object-fit: cover;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.dev-name {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--text-primary);
}

.dev-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 2px;
}

.dev-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
  transition: var(--transition);
}

.dev-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.dev-socials {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.dev-socials a {
  font-size: 1.4rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.dev-socials a:hover {
  color: var(--accent);
  transform: scale(1.2);
}

/* Theme Toggle */
.theme-toggle {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-full);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  margin-top: 16px;
  transition: var(--transition);
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-toggle-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.theme-toggle-icon {
  font-size: 1.2rem;
  color: var(--accent);
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 20px 16px 10px;
  margin-top: 8px;
}

.footer-text {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

.footer-text a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

/* --- Bottom Navigation --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px 0;
  padding-bottom: calc(6px + env(safe-area-inset-bottom));
  z-index: 1050;
  max-width: 100%;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  padding: 6px 12px;
  min-width: 56px;
  -webkit-tap-highlight-color: transparent;
}

.nav-btn i {
  font-size: 1.35rem;
  transition: var(--transition);
}

.nav-btn.active {
  color: var(--accent);
}

.nav-btn.active i {
  transform: translateY(-2px);
}

/* --- Loading Spinner --- */
.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--card-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 8px;
}

/* --- Animations --- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatIcon {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }

  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 4px;
}

/* --- Responsive Desktop --- */
@media (min-width: 768px) {
  .main-container {
    max-width: 700px;
    padding: 24px;
  }

  .bottom-nav {
    max-width: 700px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border: 1px solid var(--card-border);
    border-bottom: none;
  }

  #map {
    height: 400px;
  }

  .temp-display {
    font-size: 5.5rem;
  }

  .weather-emoji {
    font-size: 6rem;
  }
}

/* --- Extra small phones --- */
@media (max-width: 360px) {
  .temp-display {
    font-size: 3.5rem;
  }

  .metrics-grid {
    gap: 6px;
  }

  .metric-item {
    padding: 10px 4px;
  }

  .prayer-grid {
    gap: 6px;
  }

  .nav-btn {
    padding: 4px 6px;
    min-width: 44px;
    font-size: 0.55rem;
  }

  .nav-btn i {
    font-size: 1.1rem;
  }
}

/* --- Live Clock --- */
.live-clock-row {
  text-align: center;
  margin-bottom: 12px;
}

.live-clock {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--text-primary);
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  letter-spacing: 2px;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Chart Container --- */
.chart-container {
  height: 180px;
  width: 100%;
  position: relative;
}

/* --- 7-Day Forecast --- */
.forecast-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.forecast-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.forecast-item:hover {
  transform: translateX(4px);
}

.f-day {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 50px;
}

.f-emoji {
  font-size: 1.5rem;
}

.f-temps {
  font-size: 0.9rem;
  color: var(--text-primary);
  text-align: right;
  min-width: 70px;
}

.f-temps strong {
  font-weight: 900;
}

.f-temps small {
  color: var(--text-muted);
  font-weight: 600;
}

/* --- Earthquake Alert Banner --- */
.eq-alert {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  animation: slideDown 0.4s ease;
}

.eq-alert-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  max-width: 700px;
  margin: 0 auto;
}

.eq-alert-inner i {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.eq-alert-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
  margin-left: auto;
  padding: 0 4px;
  opacity: 0.8;
}

.eq-alert-close:hover {
  opacity: 1;
}

/* --- Weather Card Dynamic Background --- */
.weather-card {
  transition: background 0.8s ease, color 0.3s ease;
  overflow: hidden;
}

.weather-card .temp-display,
.weather-card .temp-display span,
.weather-card .city-name-display {
  transition: color 0.3s ease;
}

.weather-card[style*="background"] .temp-display,
.weather-card[style*="background"] .city-name-display {
  color: white;
}

.weather-card[style*="background"] .temp-display span {
  color: rgba(255, 255, 255, 0.7);
}

.weather-card[style*="background"] .metric-item {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.weather-card[style*="background"] .metric-label {
  color: rgba(255, 255, 255, 0.7);
}

.weather-card[style*="background"] .metric-value {
  color: white;
}

/* --- Sports Table --- */
.sports-table {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sports-header {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid var(--card-border);
}

.sports-row {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  margin-bottom: 2px;
}

.sports-row:hover {
  transform: translateX(4px);
}

.sports-row.top3 {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
}

.sports-row.bottom {
  background: rgba(239, 68, 68, 0.08);
  border-left: 3px solid var(--danger);
}

.s-pos {
  width: 36px;
  font-size: 0.9rem;
  font-weight: 900;
  text-align: center;
  flex-shrink: 0;
}

.s-team {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.s-stat {
  width: 40px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.s-pts {
  font-weight: 900;
  color: var(--accent);
}

/* --- Bottom Nav 6/7 items --- */
.nav-btn {
  padding: 6px 6px;
  min-width: 44px;
}

.nav-btn span {
  font-size: 0.55rem;
}

/* --- News Cards (RSS) --- */
.news-frame {
  display: none;
  /* iframe artık kullanılmıyor */
}

.news-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--accent);
}

.news-card-img {
  width: 80px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--card-border);
}

.news-card-body {
  flex: 1;
  min-width: 0;
}

.news-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
}

.news-card-source {
  background: var(--accent-light);
  color: var(--accent-dark);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 800;
}

.news-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 5px 12px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.news-read-btn:hover {
  background: var(--accent-dark);
}

.news-loading {
  text-align: center;
  padding: 40px 0;
}

/* --- System Stats --- */
.sys-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.sys-stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  transition: var(--transition);
}

.sys-stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.sys-stat-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.sys-stat-label {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sys-stat-value {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-top: 2px;
}

.sys-stat-sub {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Progress Bar */
.sys-bar-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sys-bar-item {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.sys-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sys-bar-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-primary);
}

.sys-bar-pct {
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--accent);
}

.sys-bar-track {
  height: 8px;
  background: var(--card-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.sys-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.sys-bar-fill.warn {
  background: linear-gradient(90deg, var(--warning), #f97316);
}

.sys-bar-fill.danger {
  background: linear-gradient(90deg, var(--danger), #dc2626);
}

.sys-uptime-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-dark);
  margin-top: 4px;
}

.sys-temp-card {
  background: linear-gradient(135deg, #fbbf24, #f97316);
  color: white;
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  margin-bottom: 10px;
}

.sys-temp-card.cool {
  background: linear-gradient(135deg, #10b981, #059669);
}

.sys-temp-card.warm {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.sys-temp-card.hot {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.sys-temp-value {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
}

.sys-temp-label {
  font-size: 0.7rem;
  font-weight: 800;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.sys-refresh-note {
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 8px;
}

/* --- Passcode Modal --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  width: 90%;
  max-width: 340px;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-icon {
  font-size: 3rem;
  color: var(--warning);
  margin-bottom: 10px;
}

.modal-box h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.modal-box p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 16px;
}

/* --- Timeline Görünümü (Ajanda) --- */
.timeline {
  position: relative;
  padding: 10px 0;
  margin: 10px 16px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 12px;
  width: 2px;
  background: var(--card-border);
}

.timeline-item {
  position: relative;
  padding-left: 36px;
  margin-bottom: 20px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-year {
  font-size: 0.75rem;
  font-weight: 900;
  color: #fff;
  background: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
  display: inline-block;
}

.timeline-content {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-primary);
  font-weight: 500;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 8px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--card-bg);
}

/* --- Toggle Switch --- */
.tg-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 4px 0;
}

.tg-toggle-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--card-border);
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: '';
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: var(--accent);
}

input:checked+.slider:before {
  transform: translateX(18px);
}
/* --- Bot Promo Modal Refinements --- */
#bot-promo-modal .modal-box {
  max-width: 360px;
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

#bot-promo-modal .modal-icon {
  width: 72px;
  height: 72px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

#bot-promo-modal h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-primary);
}

#bot-promo-modal p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.promo-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.btn-promo-main {
  width: 100%;
  padding: 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-promo-main:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.btn-promo-skip {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 600px) {
  #bot-promo-modal .modal-box {
    width: 92%;
    padding: 40px 20px;
    border-radius: var(--radius-md);
  }
  
  #bot-promo-modal h3 {
    font-size: 1.5rem;
  }
  
  #bot-promo-modal p {
    font-size: 1.05rem;
  }
}

/* Weather View Tabs */
.weather-view-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  background: var(--bg-secondary, #f1f5f9);
  border-radius: 12px;
  padding: 4px;
}
.weather-view-tab {
  flex: 1;
  padding: 10px 8px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}
.weather-view-tab.active {
  background: var(--accent, #3b82f6);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}
.weather-view-panel { display: none; }
.weather-view-panel.active { display: block; }

/* Hourly Detail Grid */
.hourly-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-top: 14px;
  max-height: 300px;
  overflow-y: auto;
}
.hourly-detail-item {
  text-align: center;
  padding: 10px 4px;
  border-radius: 12px;
  background: var(--bg-secondary, #f8fafc);
  border: 1px solid var(--card-border, #e2e8f0);
  transition: transform 0.2s ease;
}
.hourly-detail-item:hover { transform: translateY(-2px); }
.hourly-detail-item .h-time {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent, #3b82f6);
  margin-bottom: 4px;
}
.hourly-detail-item .h-emoji { font-size: 1.2rem; }
.hourly-detail-item .h-temp {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary, #1e293b);
}
.hourly-detail-item .h-detail {
  font-size: 0.6rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
  margin-top: 2px;
}

/* Daily Detail View */
.daily-detail-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.daily-detail-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--bg-secondary, #f8fafc);
  border: 1px solid var(--card-border, #e2e8f0);
  transition: transform 0.2s ease;
}
.daily-detail-card:hover { transform: translateY(-2px); }
.daily-detail-card.today {
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(99,102,241,0.1));
  border-color: var(--accent, #3b82f6);
}
.daily-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.daily-emoji { font-size: 1.6rem; }
.daily-info .daily-day {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary, #1e293b);
}
.daily-info .daily-date {
  font-size: 0.68rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
}
.daily-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.daily-temps {
  text-align: right;
}
.daily-temps .d-max {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary, #1e293b);
}
.daily-temps .d-min {
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
}
.daily-extras {
  display: flex;
  gap: 10px;
  font-size: 0.68rem;
  color: var(--text-secondary, #64748b);
  font-weight: 600;
}
.daily-extras span {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ======== To-Do List ======== */
.todo-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.todo-input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid var(--card-border, #e2e8f0);
  border-radius: 12px;
  background: var(--bg-secondary, #f8fafc);
  color: var(--text-primary, #1e293b);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.todo-input:focus { border-color: var(--accent, #3b82f6); }
.todo-add-btn {
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 12px;
  background: var(--accent, #3b82f6);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
  flex-shrink: 0;
}
.todo-add-btn:hover { background: #2563eb; transform: scale(1.05); }
.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-secondary, #f8fafc);
  border: 1.5px solid var(--card-border, #e2e8f0);
  transition: all 0.25s ease;
}
.todo-item.done {
  opacity: 0.5;
  border-color: transparent;
}
.todo-item.done .todo-text { text-decoration: line-through; color: var(--text-muted); }
.todo-check {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--accent, #3b82f6);
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.todo-check:hover { transform: scale(1.2); }
.todo-text {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  word-break: break-word;
}
.todo-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted, #94a3b8);
  font-size: 0.95rem;
  padding: 4px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.todo-delete:hover { color: #ef4444; background: rgba(239,68,68,0.1); }
.todo-empty {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 30px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

/* ======== Portfolio ======== */
.portfolio-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.portfolio-coin-select {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid var(--card-border, #e2e8f0);
  border-radius: 12px;
  background: var(--bg-secondary, #f8fafc);
  color: var(--text-primary, #1e293b);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}
.portfolio-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 15px; }
.portfolio-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-secondary, #f8fafc);
  border: 1.5px solid var(--card-border, #e2e8f0);
}
.portfolio-coin-info { display: flex; flex-direction: column; gap: 2px; }
.portfolio-coin-name { font-weight: 600; font-size: 0.9rem; color: var(--text-primary); }
.portfolio-coin-amount { font-size: 0.8rem; color: var(--text-muted); }
.portfolio-coin-val { font-weight: 700; font-size: 1rem; color: var(--accent); }
.portfolio-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 15px;
  border-top: 1.5px dashed var(--card-border);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}
.portfolio-total-num { color: #10b981; font-size: 1.2rem; }

/* ======== Drag and Drop ======== */
.sortable-ghost {
  opacity: 0.4;
  background-color: var(--card-border);
}
.sortable-drag {
  cursor: grabbing !important;
}
.bottom-nav .nav-btn {
  cursor: grab;
}
.bottom-nav .nav-btn:active {
  cursor: grabbing;
}
