/* modern-web-guidance styles for News App */

/* Design Tokens & CSS Variables */
:root {
  /* Font Family */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Harmonious Palette (Light Mode Default) */
  --color-brand-light: hsl(250, 85%, 56%);
  --color-brand-dark: hsl(250, 95%, 66%);
  --color-brand: var(--color-brand-light);

  --color-accent-light: hsl(180, 90%, 40%);
  --color-accent-dark: hsl(180, 100%, 45%);
  --color-accent: var(--color-accent-light);

  --bg-app-light: hsl(220, 25%, 97%);
  --bg-app-dark: hsl(222, 24%, 10%);
  --bg-app: var(--bg-app-light);

  --bg-card-light: hsl(0, 0%, 100%);
  --bg-card-dark: hsl(222, 22%, 15%);
  --bg-card: var(--bg-card-light);

  --border-color-light: hsla(220, 20%, 10%, 0.08);
  --border-color-dark: hsla(0, 0%, 100%, 0.08);
  --border-color: var(--border-color-light);

  --text-primary-light: hsl(220, 30%, 12%);
  --text-primary-dark: hsl(210, 20%, 98%);
  --text-primary: var(--text-primary-light);

  --text-secondary-light: hsl(220, 15%, 45%);
  --text-secondary-dark: hsl(215, 15%, 70%);
  --text-secondary: var(--text-secondary-light);

  --shadow-sm: 0 2px 8px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 20px -3px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px -4px rgba(0, 0, 0, 0.12);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Glassmorphism values */
  --glass-bg-light: hsla(0, 0%, 100%, 0.7);
  --glass-bg-dark: hsla(222, 22%, 15%, 0.7);
  --glass-bg: var(--glass-bg-light);
  --glass-border-light: hsla(0, 0%, 100%, 0.4);
  --glass-border-dark: hsla(222, 22%, 25%, 0.3);
  --glass-border: var(--glass-border-light);

  /* Scrollbar configuration */
  --scrollbar-thumb: hsl(220, 15%, 80%);
  --scrollbar-track: transparent;

  color-scheme: light dark;
  accent-color: var(--color-brand);
}

/* Dark Mode Overrides */
@media (prefers-color-scheme: dark) {
  :root {
    --color-brand: var(--color-brand-dark);
    --color-accent: var(--color-accent-dark);
    --bg-app: var(--bg-app-dark);
    --bg-card: var(--bg-card-dark);
    --border-color: var(--border-color-dark);
    --text-primary: var(--text-primary-dark);
    --text-secondary: var(--text-secondary-dark);
    --glass-bg: var(--glass-bg-dark);
    --glass-border: var(--glass-border-dark);
    --scrollbar-thumb: hsl(222, 15%, 30%);
  }
}

/* Explicit Custom Class-based Theme overrides (pinned themes) */
:root[data-theme="light"] {
  --color-brand: var(--color-brand-light);
  --color-accent: var(--color-accent-light);
  --bg-app: var(--bg-app-light);
  --bg-card: var(--bg-card-light);
  --border-color: var(--border-color-light);
  --text-primary: var(--text-primary-light);
  --text-secondary: var(--text-secondary-light);
  --glass-bg: var(--glass-bg-light);
  --glass-border: var(--glass-border-light);
  --scrollbar-thumb: hsl(220, 15%, 80%);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --color-brand: var(--color-brand-dark);
  --color-accent: var(--color-accent-dark);
  --bg-app: var(--bg-app-dark);
  --bg-card: var(--bg-card-dark);
  --border-color: var(--border-color-dark);
  --text-primary: var(--text-primary-dark);
  --text-secondary: var(--text-secondary-dark);
  --glass-bg: var(--glass-bg-dark);
  --glass-border: var(--glass-border-dark);
  --scrollbar-thumb: hsl(222, 15%, 30%);
  color-scheme: dark;
}

/* Basic Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
}

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Scrollbars styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-brand);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
}

a {
  color: var(--color-brand);
  text-decoration: none;
  transition: opacity 0.2s ease;
}
a:hover {
  opacity: 0.8;
}

/* Layout Utilities */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Custom Buttons with vibrant gradients & micro-animations */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-brand), var(--color-accent));
  color: #fff;
  box-shadow: 0 4px 12px hsla(250, 85%, 60%, 0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px hsla(250, 85%, 60%, 0.4);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  transform: translateY(-2px);
  background-color: var(--bg-app);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-outline:hover {
  background-color: var(--border-color);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-icon:hover {
  transform: scale(1.05);
  background-color: var(--border-color);
}

/* Glassmorphic elements */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

/* Top Nav Bar */
header {
  position: sticky;
  top: 0;
  z-index: 1100;
  width: 100%;
  height: 72px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

header.scrolled {
  box-shadow: var(--shadow-md);
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-brand), var(--color-accent));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 10px hsla(250, 85%, 60%, 0.3);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Main Hero Landing Page */
#landing-view {
  padding: 40px 0 100px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero {
  text-align: center;
  max-width: 800px;
  margin: 60px auto 80px auto;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: hsla(250, 85%, 60%, 0.1);
  color: var(--color-brand);
  border: 1px solid hsla(250, 85%, 60%, 0.2);
  margin-bottom: 24px;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.hero h1 {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary), var(--color-brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  width: 100%;
  margin-top: 40px;
}

.feature-card {
  padding: 32px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-brand);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--color-brand), var(--color-accent));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: hsla(250, 85%, 60%, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand);
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 700;
}

.feature-card p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Auth Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

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

.modal-header h2 {
  font-size: 28px;
  font-weight: 700;
}

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.input-container svg {
  position: absolute;
  left: 16px;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px hsla(250, 85%, 60%, 0.15);
}

.form-submit {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  margin-top: 10px;
}

.auth-toggle-text {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 20px;
}

.auth-toggle-text a {
  font-weight: 600;
  color: var(--color-brand);
}

/* Dashboard View Styles */
#dashboard-view {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 72px);
  position: relative;
}

.dashboard-nav {
  height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-card);
  padding: 0 24px;
}

.tabs {
  display: flex;
  gap: 8px;
}

.tab {
  padding: 8px 16px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-full);
  border: none;
  background-color: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab.active {
  background-color: hsla(250, 85%, 60%, 0.1);
  color: var(--color-brand);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-brand), var(--color-accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
}

/* Dashboard Panel & News View Split Container */
.dashboard-content {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.dashboard-content.active {
  display: flex;
}

/* Global News panel with Map & Story List */
.split-view {
  display: flex;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.news-sidebar {
  width: 440px;
  border-right: 1px solid var(--border-color);
  background-color: var(--bg-card);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  position: relative;
  z-index: 10;
}

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

.sidebar-header h2 {
  font-size: 20px;
  font-weight: 700;
}

.last-updated-badge {
  font-size: 11px;
  color: var(--text-secondary);
}

.news-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

/* Beautiful Premium News Cards */
.news-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-brand);
}

.news-card.highlighted {
  border-color: var(--color-accent);
  box-shadow: 0 0 15px hsla(180, 100%, 45%, 0.2);
}

.card-image-container {
  width: 100%;
  height: 140px;
  overflow: hidden;
  background-color: var(--bg-app);
  position: relative;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .card-image {
  transform: scale(1.05);
}

.card-source-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  color: white;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
  flex-shrink: 0;
  flex-basis: auto;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-secondary);
}

.card-meta .location-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--color-accent);
  font-weight: 600;
}

.news-card h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 6px;
  word-wrap: break-word;
}

.news-card p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 8px;
  word-wrap: break-word;
}

/* Map area */
.map-container {
  flex: 1;
  height: 100%;
  position: relative;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
}

/* Custom styles for Leaflet elements to look Premium */
.leaflet-popup-content-wrapper {
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  padding: 0;
}

.leaflet-popup-content {
  margin: 0;
  font-family: var(--font-body);
}

.leaflet-popup-tip {
  background: var(--bg-card);
}

.map-popup-card {
  width: 240px;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.map-popup-img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.map-popup-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-popup-body h4 {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.map-popup-body p {
  font-size: 11px;
  color: var(--text-secondary);
}

.map-popup-link {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-brand);
  margin-top: 4px;
  display: inline-block;
}

/* Curated RSS feeds Tab Styles */
.custom-feeds-layout {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.feeds-sidebar {
  width: 320px;
  border-right: 1px solid var(--border-color);
  background-color: var(--bg-card);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.feed-form-panel {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.feed-form-panel h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.feed-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feed-form input,
.feed-form textarea {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-app);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}

.feed-form input:focus,
.feed-form textarea:focus {
  outline: none;
  border-color: var(--color-brand);
}

.feeds-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.feeds-list-container h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.feeds-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feed-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  transition: all 0.2s ease;
  cursor: pointer;
}

.feed-item-row:hover {
  border-color: var(--color-brand);
  background-color: var(--bg-app);
}

.feed-item-row.active {
  border-color: var(--color-brand);
  background-color: hsla(250, 85%, 60%, 0.05);
}

.feed-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.feed-item-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-item-url {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-delete-feed {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-delete-feed:hover {
  color: hsl(0, 80%, 60%);
  background-color: hsla(0, 80%, 60%, 0.1);
}

.custom-feed-content-area {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.feed-content-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.feed-content-header h2 {
  font-size: 20px;
}

.custom-feed-items-grid {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  min-height: 0;
}

/* Skeleton Loading Shimmer for Cards */
.shimmer-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
}

.shimmer-card {
  height: 320px;
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shimmer-img {
  width: 100%;
  height: 140px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--border-color) 25%, var(--bg-app) 50%, var(--border-color) 75%);
  background-size: 200% 100%;
  animation: shimmer-animation 1.5s infinite;
}

.shimmer-line {
  height: 12px;
  background: linear-gradient(90deg, var(--border-color) 25%, var(--bg-app) 50%, var(--border-color) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-full);
  animation: shimmer-animation 1.5s infinite;
}

.shimmer-line.title {
  width: 80%;
  height: 18px;
}
.shimmer-line.desc-1 {
  width: 100%;
}
.shimmer-line.desc-2 {
  width: 90%;
}
.shimmer-line.desc-3 {
  width: 60%;
}

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

/* Alert Notification toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 12px 24px;
  border-radius: var(--radius-full);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.active {
  transform: translateY(0);
  opacity: 1;
}

.toast-success {
  border-color: hsl(140, 80%, 45%);
}

.toast-error {
  border-color: hsl(0, 80%, 45%);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .split-view {
    flex-direction: column-reverse;
  }
  .news-sidebar {
    width: 100%;
    height: 400px;
  }
  .map-container {
    height: calc(100vh - 72px - 56px - 400px);
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 40px;
  }
  .custom-feeds-layout {
    flex-direction: column;
  }
  .feeds-sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .custom-feed-content-area {
    height: 500px;
  }
}

/* PWA Network Status Badge and Notification Styling */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  user-select: none;
}

.status-badge.online {
  background-color: hsla(140, 80%, 45%, 0.08);
  border-color: hsla(140, 80%, 45%, 0.2);
  color: hsl(140, 80%, 40%);
}

.status-badge.offline {
  background-color: hsla(24, 90%, 50%, 0.08);
  border-color: hsla(24, 90%, 50%, 0.2);
  color: hsl(24, 90%, 48%);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.online .status-dot {
  background-color: hsl(140, 80%, 45%);
  box-shadow: 0 0 8px hsl(140, 80%, 45%);
  animation: pulse-green 2s infinite;
}

.offline .status-dot {
  background-color: hsl(24, 90%, 50%);
  box-shadow: 0 0 8px hsl(24, 90%, 50%);
  animation: pulse-orange 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 hsla(140, 80%, 45%, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px hsla(140, 80%, 45%, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 hsla(140, 80%, 45%, 0); }
}

@keyframes pulse-orange {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 hsla(24, 90%, 50%, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px hsla(24, 90%, 50%, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 hsla(24, 90%, 50%, 0); }
}

/* --- PROFILE DROPDOWN STYLES --- */
.profile-dropdown-container {
  position: relative;
  display: inline-block;
}

.profile-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-dropdown-btn:hover {
  background-color: var(--border-color);
  border-color: var(--text-secondary);
}

.profile-dropdown-btn .chevron-icon {
  transition: transform 0.2s ease;
  color: var(--text-secondary);
}

.profile-dropdown-container.open .chevron-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 1000;
  transform: translateY(-10px);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  pointer-events: none;
}

.profile-dropdown-container.open .dropdown-menu {
  display: flex;
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background-color: hsla(250, 85%, 60%, 0.1);
  color: var(--color-brand);
}

.dropdown-item.danger {
  color: hsl(0, 85%, 60%);
}

.dropdown-item.danger:hover {
  background-color: hsla(0, 85%, 60%, 0.1);
  color: hsl(0, 85%, 60%);
}

.dropdown-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 4px 0;
}

/* --- PUBLIC EMBEDDED MAP STYLES --- */
.landing-map-section {
  width: 100%;
  max-width: 100%;
  margin: 60px 0 0 0;
  padding: 0;
}

.landing-news-map-section {
  width: 100%;
  height: 800px; /* Taller height */
  overflow: hidden;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  background-color: var(--bg-card);
  display: flex;
  flex-direction: column;
}

.landing-news-map-section #content-global {
  height: 100%;
  width: 100%;
}

#dashboard-news-container {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

#dashboard-news-container:has(#content-global.active) {
  display: flex;
}

/* Ensure Leaflet Container background color matches app theme in both modes to avoid white top/bottom bars */
#map, .leaflet-container {
  background: var(--bg-app) !important;
}

