/* Modern color palette */
:root {
  --primary: #4361ee;
  --secondary: #3f37c9;
  --accent: #f72585;
  --success: #4cc9f0;
  --warning: #f8961e;
  --danger: #e63946;
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
  --card-bg: #ffffff;
  --background: #f0f2f5;
  --border: #e0e0e0;
}

/* Dark mode variables */
[data-theme="dark"] {
  --primary: #5a7dff;
  --secondary: #5248ff;
  --accent: #ff4da6;
  --success: #66d6ff;
  --warning: #ffb347;
  --danger: #ff6b76;
  --light: #2d3748;
  --dark: #f8f9fa;
  --gray: #a0aec0;
  --card-bg: #1a202c;
  --background: #121826;
  --border: #2d3748;
}

/* Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Anek Telugu", 'Segoe UI', Roboto, 'Noto Sans Telugu', Arial, sans-serif;
  background: var(--background);
  color: var(--dark);
  line-height: 1.6;
  padding-bottom: 70px; /* Space for bottom nav */
  transition: background-color 0.3s, color 0.3s;
}

/* Dark mode toggle button */
.dark-mode-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
  transform: scale(1.1);
}

/* Header styles */
header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 16px 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.header-content h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  flex-grow: 1;
}

.header-left, .header-right {
  width: 30px;
  display: flex;
  align-items: center;
}

.menu-icon, .search-icon {
  font-size: 24px;
  cursor: pointer;
}

/* Main content */
main#news-container, .trending-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 12px;
  display: grid;
  gap: 16px;
}

/* News cards - Enhanced mobile-native design */
.card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  contain: layout style paint; /* Optimize rendering */
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card-image-container {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  /* Optimize image loading */
  loading: lazy;
  decoding: async;
}

.card:hover img {
  transform: scale(1.05);
}

.card-content {
  padding: 16px;
}

.title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px 0;
  line-height: 1.4;
  color: var(--dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.summary {
  color: var(--gray);
  margin-bottom: 12px;
  line-height: 1.5;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.date {
  font-size: 12px;
  color: var(--gray);
}

.card-actions {
  display: flex;
  gap: 8px;
}

.bookmark-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: var(--gray);
}

.bookmark-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.bookmark-btn.bookmarked {
  color: var(--accent);
}

.read-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.read-btn:hover {
  background: var(--secondary);
  transform: translateY(-1px);
}

.material-icons {
  font-size: 16px;
}

/* Ad cards */
.ad-card {
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
  border: 1px solid #ffd54f;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(255, 200, 0, 0.15);
  position: relative;
  overflow: hidden;
  contain: layout style paint; /* Optimize rendering */
}

.ad-card::before {
  content: "Ad";
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--warning);
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
}

.ad-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.ad-image {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 12px;
  height: 150px;
  object-fit: cover;
  /* Optimize image loading */
  loading: lazy;
  decoding: async;
}

.ad-title {
  font-weight: 700;
  margin: 8px 0 4px 0;
  color: #2c3e50;
  font-size: 16px;
}

.ad-description {
  color: #6b4f00;
  font-size: 14px;
  line-height: 1.4;
}

/* Ad CTA Button */
.ad-cta-btn {
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  box-shadow: 0 2px 6px rgba(255, 152, 0, 0.3);
  width: 100%;
  justify-content: center;
}

.ad-cta-btn:hover {
  background: linear-gradient(135deg, #f57c00, #ef6c00);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 152, 0, 0.4);
}

.ad-cta-btn .material-icons {
  font-size: 18px;
}

/* Detail Page Ad Styles */
.detail-ad {
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
  border: 1px solid #ffd54f;
  border-radius: 12px;
  padding: 16px;
  margin: 20px 0 0 0;
  box-shadow: 0 4px 12px rgba(255, 200, 0, 0.15);
  position: relative;
  contain: layout style paint; /* Optimize rendering */
}

.detail-ad::before {
  content: "Sponsored";
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--warning);
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
}

.ad-label {
  font-weight: 700;
  color: #b35c00;
  margin-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-ad a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.ad-image {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
  /* Optimize image loading */
  loading: lazy;
  decoding: async;
}

.ad-title {
  font-weight: 700;
  margin: 8px 0 4px 0;
  color: #2c3e50;
  font-size: 16px;
}

.ad-description {
  color: #6b4f00;
  font-size: 14px;
  line-height: 1.4;
}

/* Detail Page Ad CTA Button */
.detail-ad .ad-cta-btn {
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  box-shadow: 0 2px 6px rgba(255, 152, 0, 0.3);
  width: 100%;
  justify-content: center;
}

.detail-ad .ad-cta-btn:hover {
  background: linear-gradient(135deg, #f57c00, #ef6c00);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 152, 0, 0.4);
}

.detail-ad .ad-cta-btn .material-icons {
  font-size: 18px;
}

/* Bottom Navigation - Mobile native style */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 12px;
  min-width: 60px;
}

.nav-item.active {
  color: var(--primary);
  background: rgba(67, 97, 238, 0.1);
}

.nav-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.nav-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.nav-label {
  font-size: 12px;
  font-weight: 500;
}

/* News Detail Page Styles */
.detail-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 16px 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.detail-header .header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.detail-header .page-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  flex-grow: 1;
  text-align: center;
}

.back-btn {
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.detail-container {
  margin: 0 auto;
  max-width: 900px;
  padding: 16px;
}

.detail-card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  contain: layout style paint; /* Optimize rendering */
}

.detail-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  /* Optimize image loading */
  loading: lazy;
  decoding: async;
}

.detail-content {
  padding: 20px;
}

.detail-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 12px 0;
  line-height: 1.3;
  color: var(--dark);
}

.detail-date {
  color: var(--gray);
  font-size: 14px;
  margin: 0 0 16px 0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-text {
  color: var(--dark);
  line-height: 1.7;
  font-size: 16px;
  margin: 0 0 20px 0;
}

.detail-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 16px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  text-align: center;
}

.action-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
  font-size: 16px;
  width: 100%;
  justify-content: center;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(67, 97, 238, 0.4);
}

.action-btn.secondary {
  background: linear-gradient(135deg, #6c757d, #495057);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.action-btn.secondary:hover {
  box-shadow: 0 6px 16px rgba(108, 117, 125, 0.4);
}

.action-icon {
  font-size: 18px;
}

.action-label {
  font-size: 16px;
  font-weight: 600;
}

/* Loading and error states */
.loading, .error {
  text-align: center;
  padding: 40px 20px;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.loading p, .error p {
  margin: 0;
  font-size: 16px;
}

/* Login Modal */
.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.login-modal-content {
  background: var(--card-bg);
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.login-modal-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login-modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.close-modal {
  font-size: 24px;
  cursor: pointer;
  background: none;
  border: none;
  color: white;
}

.login-modal-body {
  padding: 24px;
  text-align: center;
}

.login-modal-body p {
  margin: 0 0 20px 0;
  font-size: 16px;
}

.input-group {
  margin-bottom: 20px;
  text-align: left;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark);
}

.input-group input {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  transition: border 0.3s ease;
  box-sizing: border-box;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

.input-group input::placeholder {
  color: var(--gray);
}

/* Profile Page Styles */
.profile-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.profile-card {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  overflow: hidden;
}

.profile-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 30px 20px;
  text-align: center;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

#userName {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 5px 0;
}

.user-mobile {
  font-size: 16px;
  opacity: 0.9;
  margin: 0;
}

.profile-stats {
  display: flex;
  justify-content: space-around;
  padding: 20px;
  background: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid var(--border);
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 14px;
  color: var(--gray);
}

.profile-actions {
  padding: 20px;
}

.profile-actions .action-btn {
  width: 100%;
  margin-bottom: 15px;
}

.profile-actions .action-btn:last-child {
  margin-bottom: 0;
}

.toggle-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-top: 1px solid var(--border);
  margin-top: 15px;
}

.toggle-container span {
  font-weight: 600;
  color: var(--dark);
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark);
}

.form-control {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  transition: border 0.3s ease;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  width: 100%;
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(67, 97, 238, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 10px;
}

.btn-outline:hover {
  background: rgba(67, 97, 238, 0.1);
}

.logout-section {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Bookmarks Page Styles */
.bookmarks-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 12px;
}

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

.bookmarks-header h1 {
  margin: 0;
  font-size: 24px;
  color: var(--dark);
}

.empty-bookmarks {
  text-align: center;
  padding: 40px 20px;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.empty-bookmarks p {
  font-size: 18px;
  color: var(--gray);
  margin: 0 0 20px 0;
}

/* Trending Page Styles */
.trending-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 12px;
}

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

.trending-header h1 {
  margin: 0;
  font-size: 24px;
  color: var(--dark);
}

.trending-header .trending-icon {
  font-size: 28px;
  color: var(--accent);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header-content h1 {
    font-size: 18px;
  }
  
  main#news-container, .trending-container {
    padding: 12px 8px;
  }
  
  .card {
    border-radius: 12px;
  }
  
  .title {
    font-size: 16px;
  }
  
  .summary {
    font-size: 13px;
  }
  
  .detail-title {
    font-size: 20px;
  }
  
  .detail-text {
    font-size: 15px;
  }
  
  .detail-content {
    padding: 16px;
  }
  
  .action-btn {
    padding: 12px 20px;
    font-size: 15px;
    width: 95%;
  }
  
  .profile-container, .bookmarks-container, .trending-container {
    padding: 16px 12px;
  }
  
  .profile-header {
    padding: 20px 15px;
  }
  
  .profile-name {
    font-size: 20px;
  }
  
  .profile-stats {
    padding: 15px;
  }
  
  .stat-number {
    font-size: 20px;
  }
  
  .profile-actions {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  body {
    padding-bottom: 60px;
  }
  
  header {
    padding: 14px 10px;
  }
  
  .header-content h1 {
    font-size: 16px;
  }
  
  main#news-container, .trending-container {
    padding: 10px 6px;
    gap: 12px;
  }
  
  .card-content {
    padding: 12px;
  }
  
  .title {
    font-size: 15px;
  }
  
  .summary {
    font-size: 12px;
  }
  
  .read-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .bottom-nav {
    padding: 8px 0;
  }
  
  .nav-label {
    font-size: 10px;
  }
  
  .detail-content {
    padding: 14px;
  }
  
  .detail-title {
    font-size: 18px;
  }
  
  .login-modal-content {
    width: 95%;
  }
  
  .profile-header {
    padding: 15px 10px;
  }
  
  .profile-avatar {
    width: 80px;
    height: 80px;
    font-size: 32px;
  }
  
  .profile-stats {
    padding: 12px;
  }
  
  .stat-number {
    font-size: 18px;
  }
  
  .profile-actions {
    padding: 12px;
  }
}

/* Drawer Navigation Styles */
.drawer {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100%;
  background: var(--card-bg);
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1100;
  transition: left 0.3s ease;
  overflow-y: auto;
}

.drawer.open {
  left: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-bottom: 1px solid var(--border);
}

.drawer-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.close-drawer {
  cursor: pointer;
  font-size: 24px;
}

.drawer-content {
  padding: 16px 0;
}

.drawer-menu {
  list-style: none;
}

.drawer-menu li {
  padding: 0;
}

.drawer-link {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  text-decoration: none;
  color: var(--dark);
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.drawer-link:hover {
  background: rgba(0, 0, 0, 0.05);
}

.drawer-link.active {
  background: rgba(67, 97, 238, 0.1);
  color: var(--primary);
  border-left: 3px solid var(--primary);
}

.drawer-link .material-icons {
  margin-right: 16px;
  font-size: 20px;
}

.drawer-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Search Styles */
.search-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--card-bg);
  padding: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  display: none;
}

.search-container.active {
  transform: translateY(0);
  display: block;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--light);
  border-radius: 24px;
  padding: 8px 16px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-back-icon, .search-clear-icon {
  cursor: pointer;
  font-size: 20px;
  color: var(--gray);
}

.search-back-icon {
  margin-right: 8px;
}

.search-clear-icon {
  margin-left: 8px;
}

#searchInput {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 0;
  font-size: 16px;
  outline: none;
}

.search-results {
  max-height: 70vh;
  overflow-y: auto;
  margin-top: 12px;
  display: none;
}

.search-results.active {
  display: block;
}

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-result-item:hover {
  background: rgba(0, 0, 0, 0.03);
}

.search-result-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.search-result-summary {
  font-size: 14px;
  color: var(--gray);
}

/* Notification Settings Styles */
.settings-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.settings-section h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
  color: var(--dark);
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.setting-info {
  flex: 1;
}

.setting-label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--dark);
}

.setting-description {
  font-size: 14px;
  color: var(--gray);
}

/* Switch Styles */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.toggle-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-top: 1px solid var(--border);
  margin-top: 15px;
}

.toggle-container span {
  font-weight: 600;
  color: var(--dark);
}
