/* Modern Dark Theme CSS */
:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --border-color: #30363d;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin-bottom: 60px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

/* Dark theme overrides */
.bg-dark {
  background-color: var(--bg-secondary) !important;
}

.text-light {
  color: var(--text-primary) !important;
}

.text-muted {
  color: var(--text-secondary) !important;
}

.border-secondary {
  border-color: var(--border-color) !important;
}

/* Card styling */
.card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.card-header {
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  border-radius: 12px 12px 0 0 !important;
}

/* Button styling */
.btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #0056b3);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0056b3, var(--primary-color));
  transform: translateY(-1px);
}

/* Navigation styling */
.navbar {
  backdrop-filter: blur(10px);
  background-color: rgba(13, 17, 23, 0.95) !important;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.nav-link {
  border-radius: 6px;
  margin: 0 2px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background-color: var(--bg-tertiary);
  color: var(--primary-color) !important;
}

/* Weather specific styling */
.weather-card {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.weather-alert {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  border-left: 4px solid #ffc107;
}

.weather-info {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .card {
    margin-bottom: 1rem;
  }
  
  .weather-card {
    padding: 1rem;
  }
  
  .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 576px) {
  html {
    font-size: 13px;
  }
  
  .navbar-nav {
    text-align: center;
  }
  
  .nav-link {
    padding: 0.75rem 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
}

/* Footer styling */
.footer {
  background-color: var(--bg-secondary) !important;
  border-top: 1px solid var(--border-color) !important;
  margin-top: auto;
}

/* Loading animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border-color);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

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

/* Utility classes */
/* .text-gradient class removed */

.text-white {
  color: white !important;
  -webkit-text-fill-color: white !important;
}

.weather-title {
  color: white !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: white !important;
  background-clip: initial !important;
}

/* Force white text for weather dashboard */
div[style*="color: red"] {
  color: white !important;
  -webkit-text-fill-color: white !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
}

.shadow-custom {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Form styling */
.form-control {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 8px;
}

.form-control:focus {
  background-color: var(--bg-tertiary);
  border-color: var(--primary-color);
  color: var(--text-primary);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-control::placeholder {
  color: var(--text-secondary);
}