/* Smart Health Recommendation System - CSS Styles */

/* ===== CSS VARIABLES ===== */
:root {
  --primary-color: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #818cf8;
  --secondary-color: #06b6d4;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #3b82f6;
  
  --light-bg: #ffffff;
  --light-surface: #f7f7f8;
  --light-border: #cacbcc;
  --light-text: #111827;
  --light-text-secondary: #6b7280;
  --light-text-muted: #9ca3af;
  
  --dark-bg: #1f2937;
  --dark-surface: #374151;
  --dark-border: #4b5563;
  --dark-text: #f9fafb;
  --dark-text-secondary: #d1d5db;
  --dark-text-muted: #9ca3af;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 0.5rem;
  --radius-lg: 1rem;
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --light-bg: var(--dark-bg);
  --light-surface: var(--dark-surface);
  --light-border: var(--dark-border);
  --light-text: var(--dark-text);
  --light-text-secondary: var(--dark-text-secondary);
  --light-text-muted: var(--dark-text-muted);
}

/* ===== BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--light-text);
  background: var(--light-bg);
  transition: var(--transition);
}

/* ===== CONTAINER ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== HEADER & NAVIGATION ===== */
.header {
  background: var(--light-surface);
  border-bottom: 1px solid var(--light-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-logo i {
  font-size: 2rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--light-text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
  background: rgba(79, 70, 229, 0.1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Dropdown Styles */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dropdown-toggle i {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle i,
.dropdown.active .dropdown-toggle i {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--light-text-secondary);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.875rem;
}

.dropdown-item:hover {
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary-color);
}

.dropdown-item:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
}

/* Dark Mode Dropdown Styles */
.dark-mode .dropdown-menu {
  background: var(--dark-surface);
  border-color: var(--dark-border);
}

.dark-mode .dropdown-item {
  color: var(--dark-text-secondary);
}

.dark-mode .dropdown-item:hover {
  background: rgba(79, 70, 229, 0.2);
  color: var(--primary-color);
}

/* First Aid Guide Styles */
.first-aid-header {
  text-align: center;
  margin-bottom: 3rem;
}

.first-aid-header h2 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 2.5rem;
}

.first-aid-header p {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

/* Emergency Quick Actions */
.emergency-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.emergency-card {
  background: var(--light-surface);
  border: 2px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: var(--transition);
}

.emergency-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.emergency-card.emergency-call {
  border-color: #dc3545;
  background: linear-gradient(135deg, #dc354508 0%, #dc354515 100%);
}

.emergency-card.emergency-guide {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(79, 70, 229, 0.15) 100%);
}

.emergency-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.emergency-call .emergency-icon {
  background: #dc3545;
  color: white;
}

.emergency-guide .emergency-icon {
  background: var(--primary-color);
  color: white;
}

.emergency-content h3 {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.emergency-number {
  font-size: 2rem;
  font-weight: bold;
  color: #dc3545;
  margin-bottom: 1rem;
}

.btn-emergency {
  background: #dc3545;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-emergency:hover {
  background: #c82333;
  transform: scale(1.05);
}

/* First Aid Categories */
.first-aid-categories {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  background: var(--light-bg);
  border-bottom: 1px solid var(--light-border);
}

.category-tab {
  flex: 1;
  min-width: 120px;
  padding: 1rem;
  background: none;
  border: none;
  border-right: 1px solid var(--light-border);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.category-tab:last-child {
  border-right: none;
}

.category-tab:hover {
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary-color);
}

.category-tab.active {
  background: var(--primary-color);
  color: white;
}

.category-tab i {
  font-size: 1.25rem;
}

/* First Aid Content */
.first-aid-content {
  padding: 2rem;
}

.category-content {
  display: none;
}

.category-content.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

.procedure-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--light-border);
}

.procedure-header h3 {
  color: var(--text);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.severity-badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
}

.severity-badge.critical {
  background: #dc3545;
  color: white;
}

.severity-badge.moderate {
  background: #ffc107;
  color: #000;
}

/* Procedure Steps */
.procedure-steps {
  margin-bottom: 2rem;
}

.step-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--light-bg);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary-color);
  transition: var(--transition);
}

.step-item:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.step-item.emergency {
  border-left-color: #dc3545;
  background: #dc354508;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

.step-item.emergency .step-number {
  background: #dc3545;
}

.step-content h4 {
  color: var(--text);
  margin-bottom: 0.5rem;
}

.step-content p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.technique-tip {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: rgba(79, 70, 229, 0.1);
  border-radius: var(--radius);
  color: var(--primary-color);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* CPR Demo */
.cpr-demo {
  background: var(--light-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-top: 2rem;
}

.rhythm-guide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.rhythm-song {
  padding: 0.75rem;
  background: white;
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  text-align: center;
  font-weight: 500;
}

/* Procedure Types */
.procedure-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.procedure-type {
  background: var(--light-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--light-border);
}

.procedure-type h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

/* Burn Types */
.burn-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.burn-type {
  background: var(--light-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--light-border);
}

.burn-type h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

/* Don'ts Lists */
.burn-donts,
.seizure-donts {
  background: #dc354508;
  border: 1px solid #dc3545;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 2rem;
}

.burn-donts h4,
.seizure-donts h4 {
  color: #dc3545;
  margin-bottom: 1rem;
}

.burn-donts ul,
.seizure-donts ul {
  list-style: none;
  padding: 0;
}

.burn-donts li,
.seizure-donts li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  position: relative;
  padding-left: 1.5rem;
}

.burn-donts li::before,
.seizure-donts li::before {
  content: "❌";
  position: absolute;
  left: 0;
}

/* Emergency Contact */
.emergency-contact {
  margin-bottom: 2rem;
}

.contact-card {
  background: linear-gradient(135deg, #dc354508 0%, #dc354515 100%);
  border: 2px solid #dc3545;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.contact-card h4 {
  color: #dc3545;
  margin-bottom: 0.5rem;
}

.poison-number {
  font-size: 2rem;
  font-weight: bold;
  color: #dc3545;
  margin: 1rem 0;
}

/* Allergy Types */
.allergy-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.allergy-type {
  background: var(--light-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--light-border);
}

.allergy-type h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.symptoms {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid #ffc107;
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.symptoms.critical {
  background: #dc354508;
  border-color: #dc3545;
}

.symptoms p {
  margin: 0;
  font-weight: 500;
}

/* Emergency Criteria */
.emergency-criteria {
  background: #dc354508;
  border: 1px solid #dc3545;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 2rem;
}

.emergency-criteria h4 {
  color: #dc3545;
  margin-bottom: 1rem;
}

.emergency-criteria ul {
  list-style: none;
  padding: 0;
}

.emergency-criteria li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  position: relative;
  padding-left: 1.5rem;
}

.emergency-criteria li::before {
  content: "🚨";
  position: absolute;
  left: 0;
}

/* DRSABCD Modal */
.drsabcd-modal {
  max-width: 600px;
}

.drsabcd-steps {
  display: grid;
  gap: 1rem;
}

.drsabcd-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--light-bg);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary-color);
  transition: var(--transition);
}

.drsabcd-step:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.step-letter {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: bold;
  flex-shrink: 0;
}

.step-info h4 {
  color: var(--text);
  margin-bottom: 0.25rem;
}

.step-info p {
  color: var(--text-secondary);
  margin: 0;
}

/* Dark Mode for First Aid */
.dark-mode .emergency-card {
  background: var(--dark-surface);
  border-color: var(--dark-border);
}

.dark-mode .emergency-card.emergency-call {
  background: linear-gradient(135deg, #dc354515 0%, #dc354520 100%);
}

.dark-mode .emergency-card.emergency-guide {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.15) 0%, rgba(79, 70, 229, 0.25) 100%);
}

.dark-mode .first-aid-categories {
  background: var(--dark-surface);
  border-color: var(--dark-border);
}

.dark-mode .category-tabs {
  background: var(--dark-bg);
  border-bottom-color: var(--dark-border);
}

.dark-mode .category-tab {
  border-right-color: var(--dark-border);
  color: var(--dark-text-secondary);
}

.dark-mode .category-tab:hover {
  background: rgba(79, 70, 229, 0.2);
}

.dark-mode .procedure-header {
  border-bottom-color: var(--dark-border);
}

.dark-mode .procedure-header h3 {
  color: var(--dark-text);
}

.dark-mode .step-item {
  background: var(--dark-bg);
}

.dark-mode .step-item.emergency {
  background: #dc354515;
}

.dark-mode .step-content h4 {
  color: var(--dark-text);
}

.dark-mode .step-content p {
  color: var(--dark-text-secondary);
}

.dark-mode .technique-tip {
  background: rgba(79, 70, 229, 0.2);
}

.dark-mode .cpr-demo,
.dark-mode .procedure-type,
.dark-mode .burn-type,
.dark-mode .allergy-type {
  background: var(--dark-bg);
  border-color: var(--dark-border);
}

.dark-mode .procedure-type h4,
.dark-mode .burn-type h4,
.dark-mode .allergy-type h4 {
  color: var(--primary-color);
}

.dark-mode .rhythm-song {
  background: var(--dark-surface);
  border-color: var(--dark-border);
}

.dark-mode .drsabcd-step {
  background: var(--dark-bg);
}

.dark-mode .drsabcd-step h4 {
  color: var(--dark-text);
}

.dark-mode .drsabcd-step p {
  color: var(--dark-text-secondary);
}

/* Additional Emergency Category Styles */
.symptoms-critical {
  background: #dc354508;
  border: 1px solid #dc3545;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.symptoms-critical h4 {
  color: #dc3545;
  margin-bottom: 1rem;
}

.symptoms-critical ul {
  list-style: none;
  padding: 0;
}

.symptoms-critical li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  position: relative;
  padding-left: 1.5rem;
}

.symptoms-critical li::before {
  content: "⚠️";
  position: absolute;
  left: 0;
}

/* Stroke FAST Test */
.stroke-test {
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.fast-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.fast-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
}

.fast-letter {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.fast-desc strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.25rem;
}

.fast-desc p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.875rem;
}

/* Hypothermia Stages */
.hypothermia-stages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stage-item {
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}

.stage-item h4 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.stage-item p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.875rem;
}

/* Diabetes Types */
.diabetes-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.diabetes-type {
  background: var(--light-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--light-border);
}

.diabetes-type h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

/* Dark Mode for New Categories */
.dark-mode .symptoms-critical {
  background: #dc354515;
  border-color: #dc3545;
}

.dark-mode .symptoms-critical li {
  color: var(--dark-text-secondary);
}

.dark-mode .stroke-test {
  background: var(--dark-bg);
  border-color: var(--dark-border);
}

.dark-mode .fast-item {
  background: var(--dark-surface);
  border-color: var(--dark-border);
}

.dark-mode .fast-desc strong {
  color: var(--dark-text);
}

.dark-mode .fast-desc p {
  color: var(--dark-text-secondary);
}

.dark-mode .hypothermia-stages .stage-item,
.dark-mode .diabetes-type {
  background: var(--dark-bg);
  border-color: var(--dark-border);
}

.dark-mode .hypothermia-stages .stage-item h4,
.dark-mode .diabetes-type h4 {
  color: var(--primary-color);
}

.dark-mode .hypothermia-stages .stage-item p {
  color: var(--dark-text-secondary);
}

/* Mobile Responsive for New Categories */
@media (max-width: 768px) {
  .fast-steps {
    grid-template-columns: 1fr;
  }
  
  .fast-item {
    flex-direction: column;
    text-align: center;
  }
  
  .hypothermia-stages {
    grid-template-columns: 1fr;
  }
  
  .diabetes-types {
    grid-template-columns: 1fr;
  }
}

/* Health Blog Styles */
.health-blog-section {
  padding: 5rem 0;
  background: var(--light-bg);
}

.health-blog-section .section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.health-blog-section .section-header h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.health-blog-section .section-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Blog Controls */
.blog-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  gap: 2rem;
  flex-wrap: wrap;
}

.search-bar {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--light-border);
  border-radius: 50px;
  padding: 0.5rem 1.5rem;
  min-width: 300px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-bar input {
  border: none;
  outline: none;
  flex: 1;
  padding: 0.5rem;
  font-size: 0.875rem;
  color: var(--text);
}

.search-bar input::placeholder {
  color: var(--text-secondary);
}

.search-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.3s ease;
}

.search-btn:hover {
  color: var(--primary-hover);
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: white;
  border: 1px solid var(--light-border);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  font-weight: 500;
}

.filter-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.filter-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Featured Article */
.featured-article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 4rem;
  position: relative;
}

.featured-content {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-badge {
  position: absolute;
  top: 2rem;
  left: 3rem;
  background: var(--accent-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.featured-content h3 {
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.featured-excerpt {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
  font-size: 1.125rem;
}

.featured-meta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.featured-meta .author {
  font-weight: 600;
  color: var(--primary-color);
}

.featured-image {
  position: relative;
  overflow: hidden;
}

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

.featured-article:hover .featured-image img {
  transform: scale(1.05);
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.blog-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.blog-image {
  position: relative;
  height: 250px;
  overflow: hidden;
}

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

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

.blog-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-content {
  padding: 1.5rem;
}

.blog-content h3 {
  font-size: 1.25rem;
  color: var(--text);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.blog-excerpt {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
  font-size: 0.875rem;
}

.blog-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.blog-meta .author {
  font-weight: 600;
  color: var(--primary-color);
}

.read-more-btn {
  background: none;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  font-weight: 500;
}

.read-more-btn:hover {
  background: var(--primary-color);
  color: white;
}

/* Load More */
.load-more-container {
  text-align: center;
  margin-bottom: 4rem;
}

.load-more-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-weight: 500;
}

.load-more-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* Newsletter */
.blog-newsletter {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  border-radius: var(--radius);
  padding: 3rem;
  text-align: center;
  color: white;
}

.newsletter-content h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.newsletter-content p {
  margin-bottom: 2rem;
  opacity: 0.9;
}

.newsletter-form {
  display: flex;
  justify-content: center;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 25px;
  font-size: 0.875rem;
}

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

.subscribe-btn {
  background: white;
  color: var(--primary-color);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.subscribe-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Dark Mode for Health Blog */
.dark-mode .health-blog-section {
  background: var(--dark-bg);
}
.fast-steps,.cpr-demo,.article-actions{
  color:black
}

.dark-mode .health-blog-section .section-header p {
  color: var(--dark-text-secondary);
}

.dark-mode .search-bar {
  background: var(--dark-surface);
  border-color: var(--dark-border);
}
.blog-content,.featured-content,.filter-buttons,.search-bar{
  color:black;
}
.dark-mode .search-bar input {
  color: var(--dark-text);
}

.dark-mode .search-bar input::placeholder {
  color: var(--dark-text-secondary);
}

.dark-mode .filter-btn {
  background: var(--dark-surface);
  border-color: var(--dark-border);
  color: var(--dark-text-secondary);
}

.dark-mode .filter-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.dark-mode .featured-article,
.dark-mode .blog-card {
  background: var(--dark-surface);
  border-color: var(--dark-border);
}
.notification-container{
  color:black;
}

.dark-mode .featured-content h3,
.dark-mode .blog-content h3 {
  color: var(--dark-text);
}

.dark-mode .featured-excerpt,
.dark-mode .blog-excerpt {
  color: var(--dark-text-secondary);
}

.dark-mode .featured-meta,
.dark-mode .blog-meta {
  color: var(--dark-text-secondary);
}

.dark-mode .featured-meta .author,
.dark-mode .blog-meta .author {
  color: var(--primary-color);
}

.dark-mode .read-more-btn {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.dark-mode .read-more-btn:hover {
  background: var(--primary-color);
  color: white;
}

.dark-mode .load-more-btn {
  background: var(--primary-color);
  color: white;
}

.dark-mode .load-more-btn:hover {
  background: var(--primary-hover);
}

.dark-mode .newsletter-form input {
  background: var(--dark-surface);
  color: var(--dark-text);
}

.dark-mode .newsletter-form input::placeholder {
  color: var(--dark-text-secondary);
}

/* Health Records Styles */
.health-records-section {
  margin-top: 1rem;
}

.health-records-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--light-border);
}

.health-records-header h5 {
  margin: 0;
  color: var(--text);
  font-size: 1.125rem;
}

.no-records {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-secondary);
}

.no-records i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.no-records p {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.health-record-item {
  background: white;
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: var(--transition);
}

.health-record-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.record-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--light-border);
}

.record-type-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: white;
}

.record-type-badge.checkup {
  background: var(--success-color);
}

.record-type-badge.emergency {
  background: var(--danger-color);
}

.record-type-badge.specialist {
  background: var(--info-color);
}

.record-type-badge.vaccination {
  background: var(--warning-color);
}

.record-type-badge.test {
  background: var(--primary-color);
}

.record-type-badge.medication {
  background: var(--secondary-color);
}

.record-date {
  color: var(--text-secondary);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.record-content {
  margin-bottom: 1rem;
}

.record-doctor,
.record-reason,
.record-diagnosis,
.record-treatment,
.record-followup,
.record-cost,
.record-notes {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.record-doctor i,
.record-reason i,
.record-diagnosis i,
.record-treatment i,
.record-followup i,
.record-cost i,
.record-notes i {
  color: var(--primary-color);
  width: 16px;
  flex-shrink: 0;
}

.record-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* Dark Mode for Health Records */
.dark-mode .health-record-item {
  background: var(--dark-surface);
  border-color: var(--dark-border);
}

.dark-mode .health-records-header {
  border-color: var(--dark-border);
}

.dark-mode .health-records-header h5 {
  color: var(--dark-text);
}

.dark-mode .record-header {
  border-color: var(--dark-border);
}

.dark-mode .record-doctor,
.dark-mode .record-reason,
.dark-mode .record-diagnosis,
.dark-mode .record-treatment,
.dark-mode .record-followup,
.dark-mode .record-cost,
.dark-mode .record-notes {
  color: var(--dark-text-secondary);
}

.dark-mode .record-doctor i,
.dark-mode .record-reason i,
.dark-mode .record-diagnosis i,
.dark-mode .record-treatment i,
.dark-mode .record-followup i,
.dark-mode .record-cost i,
.dark-mode .record-notes i {
  color: var(--primary-color);
}

/* Mobile Responsive for Health Records */
@media (max-width: 768px) {
  .health-records-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .record-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
  
  .record-actions {
    justify-content: center;
    margin-top: 1rem;
  }
}
@media (max-width: 768px) {
  .health-blog-section .section-header h2 {
    font-size: 2rem;
  }
  
  .blog-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .search-bar {
    min-width: auto;
  }
  
  .filter-buttons {
    justify-content: center;
  }
  
  .featured-article {
    grid-template-columns: 1fr;
  }
  
  .featured-content {
    padding: 2rem;
  }
  
  .featured-content h3 {
    font-size: 1.5rem;
  }
  
  .featured-meta {
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .newsletter-form input,
  .subscribe-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .health-blog-section {
    padding: 3rem 0;
  }
  
  .featured-content {
    padding: 1.5rem;
  }
  
  .blog-content {
    padding: 1rem;
  }
  
  .blog-newsletter {
    padding: 2rem 1.5rem;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background-color: white;
  margin: auto;
  padding: 0;
  border: none;
  width: 90%;
  max-width: 500px;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

.modal-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.25rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--light-bg);
  color: var(--primary-color);
}

.modal-body {
  padding: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

/* Article Modal Styles */
.article-modal {
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

.article-modal .modal-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid var(--light-border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.article-modal .modal-header h2 {
  font-size: 2rem;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
  flex: 1;
  margin-right: 1rem;
}

.article-modal .modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.article-modal .modal-close:hover {
  background: var(--light-bg);
  color: var(--primary-color);
}

.article-modal .modal-body {
  padding: 0;
}

.article-header {
  padding: 0 2rem 2rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.article-meta .author {
  font-weight: 600;
  color: var(--primary-color);
}

.article-meta .category {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.article-header .featured-image {
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.article-header .featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-content {
  padding: 0 2rem 2rem;
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text);
}

.article-content h3 {
  font-size: 1.5rem;
  color: var(--text);
  margin: 2rem 0 1rem;
}

.article-content h4 {
  font-size: 1.25rem;
  color: var(--text);
  margin: 1.5rem 0 0.75rem;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content ul, .article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-secondary);
}

.article-footer {
  padding: 2rem;
  border-top: 1px solid var(--light-border);
  background: var(--light-bg);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  background: var(--light-border);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.75rem;
  transition: all 0.3s ease;
}

.tag:hover {
  background: var(--primary-color);
  color: white;
}

.article-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.action-btn {
  background: white;
  border: 1px solid var(--light-border);
  color: var(--text-secondary);
  padding: 0.75rem 1rem;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.action-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* Dark Mode for Article Modal */
.dark-mode .article-modal {
  background: var(--dark-surface);
}

.dark-mode .article-modal .modal-header {
  border-color: var(--dark-border);
}

.dark-mode .article-modal .modal-header h2 {
  color: var(--dark-text);
}

.dark-mode .article-modal .modal-close {
  color: var(--dark-text-secondary);
}

.dark-mode .article-modal .modal-close:hover {
  background: var(--dark-bg);
  color: var(--primary-color);
}

.dark-mode .article-meta {
  color: var(--dark-text-secondary);
}

.dark-mode .article-content {
  color: var(--dark-text);
}

.dark-mode .article-content h3,
.dark-mode .article-content h4 {
  color: var(--dark-text);
}

.dark-mode .article-content blockquote {
  color: var(--dark-text-secondary);
}

.dark-mode .article-footer {
  background: var(--dark-bg);
  border-color: var(--dark-border);
}

.dark-mode .tag {
  background: var(--dark-border);
  color: var(--dark-text-secondary);
}

.dark-mode .tag:hover {
  background: var(--primary-color);
  color: white;
}

.dark-mode .action-btn {
  background: var(--dark-surface);
  border-color: var(--dark-border);
  color: var(--dark-text-secondary);
}

.dark-mode .action-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Mobile Responsive for Article Modal */
@media (max-width: 768px) {
  .article-modal {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .article-modal .modal-header {
    padding: 1.5rem 1.5rem 1rem;
  }
  
  .article-modal .modal-header h2 {
    font-size: 1.5rem;
  }
  
  .article-header {
    padding: 0 1.5rem 1.5rem;
  }
  
  .article-header .featured-image {
    height: 250px;
  }
  
  .article-content {
    padding: 0 1.5rem 1.5rem;
    font-size: 1rem;
  }
  
  .article-footer {
    padding: 1.5rem;
  }
  
  .article-meta {
    font-size: 0.75rem;
  }
  
  .article-actions {
    justify-content: center;
  }
}

/* Mobile Responsive for First Aid */
@media (max-width: 768px) {
  .first-aid-header h2 {
    font-size: 2rem;
  }
  
  .emergency-quick-actions {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .emergency-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }
  
  .category-tabs {
    flex-direction: column;
  }
  
  .category-tab {
    border-right: none;
    border-bottom: 1px solid var(--light-border);
  }
  
  .dark-mode .category-tab {
    border-bottom-color: var(--dark-border);
  }
  
  .first-aid-content {
    padding: 1rem;
  }
  
  .procedure-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .procedure-types,
  .burn-types,
  .allergy-types {
    grid-template-columns: 1fr;
  }
  
  .step-item {
    flex-direction: column;
    text-align: center;
  }
  
  .drsabcd-step {
    flex-direction: column;
    text-align: center;
  }
  
  .rhythm-guide {
    grid-template-columns: 1fr;
  }
}

.theme-toggle-btn {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  color: var(--light-text-secondary);
  padding: 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background: var(--primary-color);
  color: rgb(197, 121, 121);
  border-color: var(--primary-color);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
}

.user-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--light-text-secondary);
  padding: 0.25rem;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--light-text);
  margin: 2px 0;
  transition: var(--transition);
}

/* Mobile Responsive - Navigation */
@media (max-width: 768px) {
  .nav-container {
    padding: 0.75rem 1rem;
    position: relative;
  }
  
  .nav-logo {
    gap: 0.5rem;
  }
  
  .nav-logo i {
    font-size: 1.5rem;
  }
  
  .nav-logo h1 {
    font-size: 1.25rem;
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--light-bg);
    border: 1px solid var(--light-border);
    border-radius: var(--radius);
    flex-direction: column;
    gap: 0;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-radius: var(--radius);
    text-align: left;
    width: 100%;
  }
  
  .nav-link:hover,
  .nav-link.active {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
  }
  
  /* Mobile Dropdown Styles */
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    margin-top: 0.5rem;
    margin-left: 1rem;
    padding: 0;
  }
  
  .dropdown-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: var(--radius);
    margin-bottom: 0.25rem;
  }
  
  .dropdown-toggle i {
    transform: none !important;
  }
  
  .dark-mode .dropdown-menu {
    background: transparent;
    border: none;
  }
  
  .nav-actions {
    gap: 0.5rem;
  }
  
  .theme-toggle-btn {
    padding: 0.375rem;
    font-size: 0.875rem;
  }
  
  .mobile-menu-toggle {
    display: flex;
    padding: 0.375rem;
  }
  
  .mobile-menu-toggle span {
    width: 20px;
    height: 2px;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0.5rem 0.75rem;
  }
  
  .nav-logo {
    gap: 0.375rem;
  }
  
  .nav-logo i {
    font-size: 1.25rem;
  }
  
  .nav-logo h1 {
    font-size: 1rem;
  }
  
  .nav-menu {
    padding: 0.75rem;
  }
  
  .nav-link {
    padding: 0.625rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .nav-actions {
    gap: 0.375rem;
  }
  
  .theme-toggle-btn {
    padding: 0.3125rem;
    font-size: 0.75rem;
  }
  
  .mobile-menu-toggle {
    padding: 0.3125rem;
  }
  
  .mobile-menu-toggle span {
    width: 18px;
    height: 1.5px;
  }
}

@media (max-width: 360px) {
  .nav-container {
    padding: 0.375rem 0.5rem;
  }
  
  .nav-logo {
    gap: 0.25rem;
  }
  
  .nav-logo i {
    font-size: 1.125rem;
  }
  
  .nav-logo h1 {
    font-size: 0.9375rem;
  }
  
  .nav-menu {
    padding: 0.5rem;
  }
  
  .nav-link {
    padding: 0.5rem 0.625rem;
    font-size: 0.6875rem;
  }
  
  .nav-actions {
    gap: 0.25rem;
  }
  
  .theme-toggle-btn {
    padding: 0.25rem;
    font-size: 0.6875rem;
  }
  
  .mobile-menu-toggle {
    padding: 0.25rem;
  }
  
  .mobile-menu-toggle span {
    width: 16px;
    height: 1px;
  }
}

@media (max-width: 320px) {
  .nav-container {
    flex-wrap: wrap;
    padding: 0.25rem;
  }
  
  .nav-logo {
    order: 1;
    flex: 1;
  }
  
  .nav-actions {
    order: 2;
    gap: 0.125rem;
  }
  
  .mobile-menu-toggle {
    order: 3;
  }
  
  .nav-menu {
    order: 4;
    width: 100%;
  }
  
  .nav-logo i {
    font-size: 1rem;
  }
  
  .nav-logo h1 {
    font-size: 0.875rem;
  }
  
  .nav-link {
    padding: 0.375rem 0.5rem;
    font-size: 0.625rem;
  }
  
  .theme-toggle-btn {
    padding: 0.1875rem;
    font-size: 0.625rem;
  }
  
  .mobile-menu-toggle span {
    width: 14px;
    height: 1px;
  }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: 0.25rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-size: 0.875rem;
  min-height: 48px;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--light-surface);
  color: var(--light-text);
  border: 1px solid var(--light-border);
}

.btn-secondary:hover {
  background: var(--light-border);
}

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

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-sm {
  padding: 0.75rem 1.5rem;
  font-size: 0.75rem;
  border-radius: 0.25rem;
  min-height: 40px;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  min-height: calc(100vh - 80px);
  padding: 2rem 0;
}

.section {
  display: none;
  animation: fadeIn 0.5s ease-out;
}

.section.active {
  display: block;
}

/* ===== LOGIN SECTION ===== */
.particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.login-container {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 200px);
  padding: 4rem 8rem;
}

.login-card {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: 0;
  padding: 4rem;
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow-xl);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.login-header h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--light-text);
}

.login-header p {
  color: var(--light-text-secondary);
}

.login-tabs {
  display: flex;
  margin-bottom: 2rem;
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: 0.25rem;
}

.tab-btn {
  flex: 1;
  padding: 0.75rem;
  border: none;
  background: transparent;
  color: var(--light-text-secondary);
  cursor: pointer;
  border-radius: var(--radius);
  transition: var(--transition);
  font-weight: 500;
}

.tab-btn.active {
  background: var(--primary-color);
  color: white;
}

.login-form {
  display: none;
}

.login-form.active {
  display: block;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--light-text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--light-bg);
  color: var(--light-text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Mobile Responsive - Schedule Appointment Forms */
@media (max-width: 768px) {
  .login-container {
    padding: 2rem 1rem;
  }
  
  .login-card {
    padding: 2.5rem;
    max-width: 500px;
    border-radius: 0;
  }
  
  .form-group {
    margin-bottom: 1rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .form-group label {
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 0.625rem;
    font-size: 0.875rem;
  }
  
  .form-group textarea {
    min-height: 80px;
    resize: vertical;
  }
  
  .btn {
    padding: 0.875rem 1.75rem;
    font-size: 0.875rem;
    min-height: 44px;
  }
  
  .btn-full {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .login-container {
    padding: 1rem 0.75rem;
  }
  
  .login-card {
    padding: 2rem;
    max-width: 450px;
    border-radius: 0;
  }
  
  .form-group {
    margin-bottom: 0.75rem;
  }
  
  .form-row {
    gap: 0.5rem;
  }
  
  .form-group label {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 0.5rem;
    font-size: 0.75rem;
  }
  
  .form-group textarea {
    min-height: 60px;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
    min-height: 40px;
  }
  
  .btn-full {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .login-container {
    padding: 0.75rem 0.5rem;
  }
  
  .login-card {
    padding: 1.5rem;
    max-width: 350px;
    border-radius: 0;
  }
  
  .form-group {
    margin-bottom: 0.5rem;
  }
  
  .form-row {
    gap: 0.375rem;
  }
  
  .form-group label {
    font-size: 0.6875rem;
    margin-bottom: 0.1875rem;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 0.375rem;
    font-size: 0.6875rem;
  }
  
  .form-group textarea {
    min-height: 50px;
  }
  
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.6875rem;
    min-height: 36px;
  }
  
  .btn-full {
    width: 100%;
  }
}

/* ===== PASSWORD INPUT CONTAINER ===== */
.password-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-container input {
  padding-right: 3rem;
}

.password-toggle-btn {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--light-text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: var(--transition);
  font-size: 0.875rem;
}

.password-toggle-btn:hover {
  color: var(--primary-color);
  background: rgba(79, 70, 229, 0.1);
}

.password-toggle-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.form-footer {
  text-align: center;
  margin-top: 1rem;
}

.form-footer a {
  color: var(--primary-color);
  text-decoration: none;
}

.form-footer a:hover {
  text-decoration: underline;
}

/* ===== DASHBOARD ===== */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.dashboard-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--light-text);
}

.dashboard-actions {
  display: flex;
  gap: 1rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* Mobile Responsive - Dashboard */
@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
  }
  
  .dashboard-header h2 {
    font-size: 1.5rem;
  }
  
  .dashboard-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .dashboard-actions .btn {
    flex: 1;
    min-width: 120px;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
  }
  
  .dashboard-actions .btn i {
    margin-right: 0.5rem;
  }
  
  .dashboard-grid {
    gap: 1.5rem;
  }
  
  .health-check-section {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  
  .section-header h3 {
    font-size: 1.125rem;
  }
  
  .health-check-form {
    padding: 1rem;
    margin-top: 0.75rem;
  }
  
  .health-input-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  
  .health-analysis {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .health-analysis h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
  }
  
  .analysis-content {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .score-circle {
    width: 100px;
    height: 100px;
  }
  
  .score-value {
    font-size: 1.5rem;
  }
  
  .score-label {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .dashboard-header {
    margin-bottom: 1rem;
  }
  
  .dashboard-header h2 {
    font-size: 1.25rem;
  }
  
  .dashboard-actions {
    gap: 0.5rem;
    flex-direction: column;
    width: 100%;
  }
  
  .dashboard-actions .btn {
    width: 100%;
    font-size: 0.75rem;
    padding: 0.625rem 0.875rem;
    min-width: auto;
  }
  
  .dashboard-actions .btn i {
    margin-right: 0.375rem;
    font-size: 0.75rem;
  }
  
  .dashboard-grid {
    gap: 1rem;
  }
  
  .health-check-section {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .section-header h3 {
    font-size: 1rem;
  }
  
  .health-check-form {
    padding: 0.75rem;
    margin-top: 0.5rem;
  }
  
  .health-input-grid {
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }
  
  .health-analysis {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .health-analysis h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .analysis-content {
    gap: 0.75rem;
  }
  
  .score-circle {
    width: 80px;
    height: 80px;
  }
  
  .score-value {
    font-size: 1.25rem;
  }
  
  .score-label {
    font-size: 0.625rem;
  }
}

@media (max-width: 360px) {
  .dashboard-header h2 {
    font-size: 1.125rem;
  }
  
  .dashboard-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.375rem;
  }
  
  .dashboard-actions .btn {
    width: 100%;
    font-size: 0.6875rem;
    padding: 0.5rem 0.75rem;
    min-width: auto;
  }
  
  .dashboard-actions .btn i {
    margin-right: 0.25rem;
    font-size: 0.6875rem;
  }
  
  .health-check-section {
    padding: 0.75rem;
  }
  
  .section-header h3 {
    font-size: 0.9375rem;
  }
  
  .health-check-form {
    padding: 0.5rem;
  }
  
  .health-analysis {
    padding: 0.75rem;
  }
  
  .health-analysis h3 {
    font-size: 0.9375rem;
  }
  
  .score-circle {
    width: 70px;
    height: 70px;
  }
  
  .score-value {
    font-size: 1.125rem;
  }
  
  .score-label {
    font-size: 0.5625rem;
  }
}

/* ===== HEALTH CHECK SECTION ===== */
.health-check-section {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--light-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.health-check-form {
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1rem;
}

.health-input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* ===== HEALTH ANALYSIS ===== */
.health-analysis {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.health-analysis h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 1.5rem;
}

.analysis-content {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.analysis-score {
  flex-shrink: 0;
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
}

.score-circle span:first-child {
  font-size: 2.5rem;
  line-height: 1;
}

.score-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.analysis-details {
  flex: 1;
}

.analysis-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--light-border);
}

.analysis-item:last-child {
  border-bottom: none;
}

.analysis-item i {
  font-size: 1.25rem;
  width: 1.5rem;
}

.text-success {
  color: var(--success-color);
}

.text-warning {
  color: var(--warning-color);
}

.text-info {
  color: var(--info-color);
}

.text-danger {
  color: var(--danger-color);
}

/* ===== UTILITY CLASSES ===== */
.text-success {
  color: var(--success-color);
}

.text-warning {
  color: var(--warning-color);
}

.text-info {
  color: var(--info-color);
}

.text-danger {
  color: var(--danger-color);
}

.health-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.health-card {
  background: var(--light-surface);
  padding: 1.5rem;
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.health-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.card-icon {
  width: 3rem;
  height: 3rem;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.card-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--light-text-secondary);
  margin-bottom: 0.5rem;
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--light-text);
  margin-bottom: 0.25rem;
}

.metric-value span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--light-text-secondary);
}

.metric-status {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  display: inline-block;
}

.metric-status.normal {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.metric-status.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.metric-status.danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

/* ===== ACTIVITIES ===== */
.recent-activities {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.recent-activities h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 1.5rem;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.activity-item:hover {
  border-color: var(--primary-color);
  background: rgba(79, 70, 229, 0.05);
}

.activity-icon {
  width: 3rem;
  height: 3rem;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.activity-details {
  flex: 1;
}

.activity-details h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 0.25rem;
}

.activity-details p {
  color: var(--light-text-secondary);
  margin-bottom: 0.25rem;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--light-text-muted);
}

.activity-actions {
  display: flex;
  gap: 0.5rem;
}

.activity-delete-btn {
  background: none;
  border: none;
  color: var(--danger-color);
  padding: 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
}

.activity-delete-btn:hover {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger-color);
}

.activity-delete-btn:active {
  transform: scale(0.95);
}

/* ===== TODO LIST ===== */
.todo-list-section {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.todo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.todo-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--light-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.todo-input-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex: 1;
  max-width: 400px;
}

.todo-input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: var(--light-bg);
  color: var(--light-text);
  transition: var(--transition);
}

.todo-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.todo-input::placeholder {
  color: var(--light-text-muted);
}

.todo-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.todo-item:hover {
  border-color: var(--primary-color);
  background: rgba(79, 70, 229, 0.05);
}

.todo-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.todo-text {
  flex: 1;
  font-size: 0.875rem;
  color: var(--light-text);
  transition: var(--transition);
}

.todo-item.completed .todo-text {
  text-decoration: line-through;
  color: var(--light-text-muted);
}

.todo-actions {
  display: flex;
  gap: 0.5rem;
}

.todo-delete-btn {
  background: none;
  border: none;
  color: var(--danger-color);
  padding: 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.75rem;
}

.todo-delete-btn:hover {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger-color);
}

.todo-delete-btn:active {
  transform: scale(0.95);
}

.todo-empty {
  text-align: center;
  padding: 2rem;
  color: var(--light-text-muted);
  font-style: italic;
}

/* Mobile Responsive - Todo List */
@media (max-width: 768px) {
  .todo-list-section {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .todo-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .todo-input-group {
    max-width: none;
  }
  
  .todo-input {
    padding: 0.625rem;
    font-size: 0.75rem;
  }
  
  .todo-item {
    padding: 0.75rem;
    gap: 0.5rem;
  }
  
  .todo-checkbox {
    width: 1rem;
    height: 1rem;
  }
  
  .todo-text {
    font-size: 0.75rem;
  }
  
  .todo-delete-btn {
    padding: 0.375rem;
    font-size: 0.6875rem;
  }
}

@media (max-width: 480px) {
  .todo-list-section {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .todo-header h3 {
    font-size: 1.125rem;
  }
  
  .todo-input {
    padding: 0.5rem;
    font-size: 0.6875rem;
  }
  
  .todo-item {
    padding: 0.5rem;
    gap: 0.375rem;
  }
  
  .todo-text {
    font-size: 0.6875rem;
  }
  
  .todo-delete-btn {
    padding: 0.25rem;
    font-size: 0.625rem;
  }
}

@media (max-width: 360px) {
  .todo-header h3 {
    font-size: 1rem;
  }
  
  .todo-input {
    padding: 0.375rem;
    font-size: 0.625rem;
  }
  
  .todo-item {
    padding: 0.375rem;
    gap: 0.25rem;
  }
  
  .todo-text {
    font-size: 0.625rem;
  }
  
  .todo-delete-btn {
    padding: 0.1875rem;
    font-size: 0.5625rem;
  }
}

/* ===== RECOMMENDATIONS ===== */
.health-recommendations {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.health-recommendations h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 1.5rem;
}

.recommendation-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.recommendation-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.recommendation-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.recommendation-card.priority-high {
  border-left: 4px solid var(--danger-color);
}

.recommendation-card.priority-medium {
  border-left: 4px solid var(--warning-color);
}

.recommendation-card.priority-low {
  border-left: 4px solid var(--success-color);
}

.recommendation-icon {
  width: 3rem;
  height: 3rem;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.recommendation-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 0.5rem;
}

.recommendation-content p {
  color: var(--light-text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* ===== SYMPTOM CHECKER ===== */
.symptom-checker {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.search-section {
  margin-bottom: 2rem;
}

.search-input {
  width: 100%;
  padding: 1rem 1.5rem;
  border: 2px solid var(--light-border);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--light-bg);
  color: var(--light-text);
  margin-bottom: 1rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.symptom-categories {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.category-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--light-border);
  background: var(--light-bg);
  color: var(--light-text-secondary);
  border-radius: 2rem;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
  font-weight: 500;
}

.category-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.category-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.symptom-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ===== RECOMMENDATIONS GRID ===== */
.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.recommendation-card {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
}

.recommendation-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.recommendation-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.recommendation-header i {
  width: 3rem;
  height: 3rem;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.recommendation-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--light-text);
}

.recommendation-body p {
  color: var(--light-text-secondary);
  margin-bottom: 1rem;
}

.recommendation-body ul {
  list-style: none;
  padding: 0;
}

.recommendation-body li {
  padding: 0.5rem 0;
  color: var(--light-text-secondary);
  position: relative;
  padding-left: 1.5rem;
}

.recommendation-body li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success-color);
  font-weight: bold;
}

/* ===== SYMPTOMS ===== */
.symptom-checker {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

/* Mobile Responsive - Symptoms */
@media (max-width: 768px) {
  .symptom-checker {
    padding: 1rem;
  }
  
  .search-section {
    margin-bottom: 1rem;
  }
  
  .search-input {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
  }
  
  .symptom-categories {
    gap: 0.375rem;
    margin-bottom: 1rem;
  }
  
  .category-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .symptom-results {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .symptom-card {
    padding: 1rem;
  }
  
  .symptom-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  .symptom-header h4 {
    font-size: 1rem;
  }
  
  .symptom-category {
    padding: 0.1875rem 0.625rem;
    font-size: 0.6875rem;
  }
  
  .symptom-severity {
    padding: 0.1875rem 0.625rem;
    font-size: 0.6875rem;
  }
  
  .symptom-description {
    font-size: 0.75rem;
  }
  
  .symptom-detail-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }
  
  .symptom-detail-section.warning {
    padding: 1rem;
  }
  
  .symptom-detail-section h4 {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
  }
  
  .symptom-detail-section ul {
    padding-left: 1rem;
  }
  
  .symptom-detail-section li {
    font-size: 0.75rem;
    margin-bottom: 0.375rem;
  }
  
  .symptom-meta {
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.75rem;
  }
}

@media (max-width: 480px) {
  .symptom-checker {
    padding: 0.75rem;
  }
  
  .search-input {
    padding: 0.625rem 0.875rem;
    font-size: 0.75rem;
  }
  
  .symptom-categories {
    justify-content: center;
  }
  
  .category-btn {
    padding: 0.3125rem 0.625rem;
    font-size: 0.6875rem;
  }
  
  .symptom-card {
    padding: 0.75rem;
  }
  
  .symptom-header h4 {
    font-size: 0.9375rem;
  }
  
  .symptom-category,
  .symptom-severity {
    padding: 0.125rem 0.5rem;
    font-size: 0.625rem;
  }
  
  .symptom-description {
    font-size: 0.6875rem;
  }
  
  .symptom-detail-section {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
  }
  
  .symptom-detail-section.warning {
    padding: 0.75rem;
  }
  
  .symptom-detail-section h4 {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
  }
  
  .symptom-detail-section li {
    font-size: 0.6875rem;
  }
}

@media (max-width: 360px) {
  .symptom-checker {
    padding: 0.5rem;
  }
  
  .search-input {
    padding: 0.5rem 0.75rem;
    font-size: 0.6875rem;
  }
  
  .category-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.625rem;
  }
  
  .symptom-card {
    padding: 0.625rem;
  }
  
  .symptom-header h4 {
    font-size: 0.875rem;
  }
  
  .symptom-description {
    font-size: 0.625rem;
  }
  
  .symptom-detail-section h4 {
    font-size: 0.6875rem;
  }
  
  .symptom-detail-section li {
    font-size: 0.625rem;
  }
}

.search-section {
  margin-bottom: 2rem;
}

.search-input {
  width: 100%;
  padding: 1rem 1.5rem;
  border: 2px solid var(--light-border);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--light-bg);
  color: var(--light-text);
  margin-bottom: 1rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.symptom-categories {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.category-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--light-border);
  background: var(--light-bg);
  color: var(--light-text-secondary);
  border-radius: 2rem;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
  font-weight: 500;
}

.category-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.category-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.symptom-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.symptom-card {
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.symptom-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.symptom-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 0.5rem;
}

.symptom-header h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--light-text);
  margin: 0;
}

.symptom-category {
  background: var(--secondary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.symptom-severity {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.severity-mild {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.severity-moderate {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.severity-severe {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.symptom-description {
  color: var(--light-text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

.symptom-description p {
  margin: 0;
}

/* ===== SYMPTOM DETAILS MODAL ===== */
.symptom-detail-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--light-border);
}

.symptom-detail-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.symptom-detail-section.warning {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.symptom-detail-section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.symptom-detail-section h4 i {
  color: var(--primary-color);
}

.symptom-detail-section ul {
  margin: 0;
  padding-left: 1.5rem;
}

.symptom-detail-section li {
  margin-bottom: 0.5rem;
  color: var(--light-text-secondary);
}

.symptom-detail-section li:last-child {
  margin-bottom: 0;
}

.symptom-meta {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.category-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

.category-neurological {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

.category-general {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.category-respiratory {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.category-cardiovascular {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.category-digestive {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.category-musculoskeletal {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
}

.severity-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

.symptom-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--light-border);
}

/* ===== SYMPTOM ANALYSIS ===== */
.analysis-summary {
  background: var(--light-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.analysis-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.chart-section {
  background: var(--light-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
}

.chart-section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 1rem;
}

.severity-chart {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.severity-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.severity-bar span {
  min-width: 100px;
  font-size: 0.875rem;
  color: var(--light-text-secondary);
}

.bar-container {
  flex: 1;
  height: 20px;
  background: var(--light-border);
  border-radius: 10px;
  overflow: hidden;
}

.bar {
  height: 100%;
  border-radius: 10px;
  transition: var(--transition);
}

.bar.mild {
  background: var(--success-color);
}

.bar.moderate {
  background: var(--warning-color);
}

.bar.severe {
  background: var(--danger-color);
}

.bar.category {
  background: var(--primary-color);
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.category-item span {
  min-width: 120px;
  font-size: 0.875rem;
  color: var(--light-text-secondary);
}

.recommendations-section {
  background: var(--light-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
}

.recommendations-section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 1rem;
}

.recommendation-item {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border-left: 4px solid var(--light-border);
}

.recommendation-item.priority-high {
  border-left-color: var(--danger-color);
  background: rgba(239, 68, 68, 0.05);
}

.recommendation-item.priority-medium {
  border-left-color: var(--warning-color);
  background: rgba(245, 158, 11, 0.05);
}

.recommendation-item.priority-low {
  border-left-color: var(--success-color);
  background: rgba(16, 185, 129, 0.05);
}

.recommendation-item p {
  margin-bottom: 1rem;
  color: var(--light-text);
}

.recommendation-item p:last-child {
  margin-bottom: 0;
}

/* ===== FOOD DATABASE ===== */
.food-search-section {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.search-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.search-input-group {
  display: flex;
  gap: 1rem;
  align-items: stretch;
}

.search-input-group .search-input {
  flex: 1;
  padding: 1rem 1.5rem;
  border: 2px solid var(--light-border);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--light-bg);
  color: var(--light-text);
}

.search-input-group .search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.filter-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  background: var(--light-bg);
  color: var(--light-text);
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  min-width: 150px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.alphabet-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-label {
  font-weight: 600;
  color: var(--light-text);
  white-space: nowrap;
}

.alphabet-buttons {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.alphabet-btn {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--light-border);
  background: var(--light-bg);
  color: var(--light-text-secondary);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.75rem;
  font-weight: 500;
  min-width: 2.5rem;
}

.alphabet-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.alphabet-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.food-results-section {
  margin-bottom: 2rem;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.results-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--light-text);
  margin: 0;
}

.results-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#results-count {
  color: var(--light-text-secondary);
  font-size: 0.875rem;
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.food-card {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.food-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.food-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.food-icon {
  width: 3rem;
  height: 3rem;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.food-info {
  flex: 1;
}

.food-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.food-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--secondary-color);
  color: white;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.nutrition-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.nutrition-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background: var(--light-bg);
  border-radius: var(--radius);
}

.nutrition-label {
  font-size: 0.75rem;
  color: var(--light-text-secondary);
}

.nutrition-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--light-text);
}

.nutrition-value.high {
  color: var(--success-color);
}

.nutrition-value.low {
  color: var(--warning-color);
}

.food-actions {
  display: flex;
  gap: 0.5rem;
}

.food-actions .btn {
  flex: 1;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
}

/* ===== NUTRITION CALCULATOR ===== */
.nutrition-calculator {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.nutrition-calculator h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 1.5rem;
}

.calculator-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.selected-foods h4,
.nutrition-summary h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 1rem;
}

.selected-foods-list {
  max-height: 300px;
  overflow-y: auto;
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 1rem;
}

.selected-food-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}

.selected-food-item:last-child {
  margin-bottom: 0;
}

.selected-food-info {
  flex: 1;
}

.selected-food-name {
  font-weight: 500;
  color: var(--light-text);
  margin-bottom: 0.25rem;
}

.selected-food-quantity {
  font-size: 0.875rem;
  color: var(--light-text-secondary);
}

.remove-food-btn {
  background: var(--danger-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.remove-food-btn:hover {
  background: #dc2626;
}

.empty-state {
  text-align: center;
  color: var(--light-text-secondary);
  font-style: italic;
  padding: 2rem;
}

.nutrition-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.nutrition-card {
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nutrition-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.nutrition-info {
  display: flex;
  flex-direction: column;
}

.nutrition-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--light-text);
  line-height: 1;
}

.nutrition-label {
  font-size: 0.75rem;
  color: var(--light-text-secondary);
  margin-top: 0.25rem;
}

.nutrition-analysis h5 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 0.75rem;
}

.analysis-text {
  padding: 1rem;
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  color: var(--light-text-secondary);
  line-height: 1.5;
}

/* ===== FOOD DETAILS MODAL ===== */
.food-details-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.food-basic-info {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.food-image-placeholder {
  width: 4rem;
  height: 4rem;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.food-meta {
  flex: 1;
}

.food-meta h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 0.5rem;
}

.category-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--secondary-color);
  color: white;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  margin-right: 0.5rem;
}

.serving-info {
  color: var(--light-text-secondary);
  font-size: 0.875rem;
}

.nutrition-breakdown h5 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 1rem;
}

.nutrition-table {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nutrition-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
}

.nutrition-row span:first-child {
  font-weight: 500;
  color: var(--light-text);
}

.nutrition-row span:last-child {
  font-weight: 600;
  color: var(--primary-color);
}

.food-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.quantity-selector label {
  font-weight: 500;
  color: var(--light-text);
  min-width: 120px;
}

.quantity-selector input {
  flex: 1;
  max-width: 200px;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* ===== RESPONSIVE DESIGN ===== */
/* Large Desktop - 1400px to 1200px */
@media (max-width: 1400px) {
  .container {
    max-width: 1200px;
    padding: 0 2rem;
  }

  .food-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
  }

  .calculator-content {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
  }

  .nutrition-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
  }

  .appointments-container {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
  }

  .recommendations-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
  }

  .symptoms-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
  }

  .dashboard-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }

  .health-checks {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

/* Desktop - 1200px to 1024px */
@media (max-width: 1200px) {
  .container {
    max-width: 1024px;
    padding: 0 1.5rem;
  }

  .nav-container {
    padding: 0 1.5rem;
  }

  .food-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
  }

  .calculator-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .nutrition-cards {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }

  .appointments-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .recommendations-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
  }

  .symptoms-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .health-checks {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .food-search-section {
    padding: 1.5rem;
  }

  .nutrition-calculator {
    padding: 1.5rem;
  }

  .search-controls {
    gap: 1rem;
  }

  .filter-controls {
    gap: 0.75rem;
  }

  .alphabet-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .alphabet-buttons {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .alphabet-btn {
    padding: 0.4375rem 0.6875rem;
    font-size: 0.6875rem;
    min-width: 2.25rem;
  }
}

/* Tablet Landscape - 1024px to 900px */
@media (max-width: 1024px) {
  .container {
    max-width: 900px;
    padding: 0 1.25rem;
  }

  .nav-container {
    padding: 0 1.25rem;
  }

  .nav-menu {
    gap: 1.5rem;
  }

  .nav-link {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
  }

  .food-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.875rem;
  }

  .food-card {
    padding: 1.25rem;
  }

  .food-header {
    gap: 0.875rem;
  }

  .food-icon {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.125rem;
  }

  .food-name {
    font-size: 1rem;
  }

  .nutrition-preview {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
  }

  .nutrition-item {
    padding: 0.4375rem;
  }

  .nutrition-label {
    font-size: 0.6875rem;
  }

  .nutrition-value {
    font-size: 0.8125rem;
  }

  .calculator-content {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .nutrition-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
  }

  .nutrition-card {
    padding: 0.875rem;
  }

  .nutrition-icon {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.875rem;
  }

  .nutrition-value {
    font-size: 1.125rem;
  }

  .nutrition-label {
    font-size: 0.6875rem;
  }

  .appointments-container {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .recommendations-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.875rem;
  }

  .recommendation-card {
    padding: 1.25rem;
  }

  .symptoms-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.875rem;
  }

  .symptom-card {
    padding: 1.25rem;
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
  }

  .stat-card {
    padding: 1.25rem;
  }

  .stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.125rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .health-checks {
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }

  .health-check-card {
    padding: 1.25rem;
  }

  .food-search-section {
    padding: 1.25rem;
  }

  .nutrition-calculator {
    padding: 1.25rem;
  }

  .search-controls {
    gap: 0.875rem;
  }

  .search-input-group {
    flex-direction: column;
  }

  .filter-controls {
    flex-direction: row;
    gap: 0.625rem;
  }

  .filter-select {
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
    min-width: 140px;
  }

  .alphabet-btn {
    padding: 0.375rem 0.625rem;
    font-size: 0.625rem;
    min-width: 2.125rem;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.875rem;
  }

  .results-header h3 {
    font-size: 1.125rem;
  }

  #results-count {
    font-size: 0.8125rem;
  }

  .selected-foods-list {
    max-height: 250px;
    padding: 0.875rem;
  }

  .selected-food-item {
    padding: 0.625rem;
    margin-bottom: 0.625rem;
  }

  .selected-food-name {
    font-size: 0.875rem;
  }

  .selected-food-quantity {
    font-size: 0.75rem;
  }

  .remove-food-btn {
    padding: 0.375rem;
  }

  .analysis-text {
    padding: 0.875rem;
    font-size: 0.875rem;
  }
}

/* Tablet Portrait - 900px to 768px */
@media (max-width: 900px) {
  .container {
    max-width: 768px;
    padding: 0 1rem;
  }

  .nav-container {
    padding: 0 1rem;
  }

  .nav-menu {
    gap: 1rem;
  }

  .nav-link {
    font-size: 0.8125rem;
    padding: 0.4375rem 0.625rem;
  }

  .theme-toggle-btn {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.875rem;
  }

  .user-info {
    padding: 0.4375rem 0.75rem;
  }

  .user-name {
    font-size: 0.8125rem;
  }

  .food-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
  }

  .food-card {
    padding: 1rem;
  }

  .food-header {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .food-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }

  .food-name {
    font-size: 0.9375rem;
  }

  .food-category {
    font-size: 0.6875rem;
    padding: 0.1875rem 0.625rem;
  }

  .nutrition-preview {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .nutrition-item {
    padding: 0.375rem;
  }

  .nutrition-label {
    font-size: 0.625rem;
  }

  .nutrition-value {
    font-size: 0.75rem;
  }

  .food-actions {
    flex-direction: column;
    gap: 0.375rem;
  }

  .food-actions .btn {
    font-size: 0.75rem;
    padding: 0.375rem 0.625rem;
  }

  .calculator-content {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .nutrition-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .nutrition-card {
    padding: 0.75rem;
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .nutrition-icon {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
  }

  .nutrition-value {
    font-size: 1rem;
  }

  .nutrition-label {
    font-size: 0.625rem;
  }

  .appointments-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .appointment-form,
  .appointments-list {
    padding: 1rem;
  }

  .recommendations-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
  }

  .recommendation-card {
    padding: 1rem;
  }

  .recommendation-header {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .recommendation-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }

  .recommendation-title {
    font-size: 0.9375rem;
  }

  .symptoms-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
  }

  .symptom-card {
    padding: 1rem;
  }

  .symptom-header {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .symptom-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }

  .symptom-name {
    font-size: 0.9375rem;
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .stat-icon {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1rem;
  }

  .stat-value {
    font-size: 1.375rem;
  }

  .stat-label {
    font-size: 0.6875rem;
  }

  .health-checks {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .health-check-card {
    padding: 1rem;
  }

  .food-search-section {
    padding: 1rem;
  }

  .nutrition-calculator {
    padding: 1rem;
  }

  .search-controls {
    gap: 0.75rem;
  }

  .search-input-group .search-input {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }

  .filter-controls {
    flex-direction: column;
    gap: 0.5rem;
  }

  .filter-select {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    min-width: 100%;
  }

  .alphabet-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .alphabet-buttons {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.1875rem;
  }

  .alphabet-btn {
    padding: 0.3125rem 0.5rem;
    font-size: 0.5625rem;
    min-width: 2rem;
  }

  .nav-label {
    font-size: 0.8125rem;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .results-header h3 {
    font-size: 1rem;
  }

  #results-count {
    font-size: 0.75rem;
  }

  .selected-foods-list {
    max-height: 200px;
    padding: 0.75rem;
  }

  .selected-food-item {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .selected-food-name {
    font-size: 0.75rem;
  }

  .selected-food-quantity {
    font-size: 0.6875rem;
  }

  .remove-food-btn {
    padding: 0.3125rem;
  }

  .analysis-text {
    padding: 0.75rem;
    font-size: 0.75rem;
  }

  .modal-content {
    margin: 1rem;
    max-width: calc(100% - 2rem);
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-header h3 {
    font-size: 1.125rem;
  }

  .modal-body {
    padding: 1rem;
  }

  .food-basic-info {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .food-image-placeholder {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
  }

  .food-meta h4 {
    font-size: 1rem;
  }

  .category-badge {
    font-size: 0.6875rem;
    padding: 0.1875rem 0.625rem;
  }

  .serving-info {
    font-size: 0.75rem;
  }

  .nutrition-table {
    gap: 0.375rem;
  }

  .nutrition-row {
    padding: 0.5rem;
  }

  .quantity-selector {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
  }

  .quantity-selector label {
    min-width: auto;
    font-size: 0.8125rem;
  }

  .quantity-selector input {
    max-width: 100%;
  }

  .action-buttons {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }
}

/* Small Tablet - 768px to 760px */
@media (max-width: 768px) {
  .container {
    max-width: 760px;
    padding: 0 0.75rem;
  }

  .nav-container {
    padding: 0 0.75rem;
  }

  .nav-menu {
    gap: 0.75rem;
  }

  .nav-link {
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
  }

  .theme-toggle-btn {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
  }

  .user-info {
    padding: 0.375rem 0.625rem;
  }

  .user-name {
    font-size: 0.75rem;
  }

  .food-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.625rem;
  }

  .food-card {
    padding: 0.875rem;
  }

  .food-header {
    gap: 0.625rem;
  }

  .food-icon {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.875rem;
  }

  .food-name {
    font-size: 0.875rem;
  }

  .food-category {
    font-size: 0.625rem;
    padding: 0.125rem 0.5rem;
  }

  .nutrition-preview {
    grid-template-columns: 1fr;
    gap: 0.375rem;
  }

  .nutrition-item {
    padding: 0.3125rem;
  }

  .nutrition-label {
    font-size: 0.5625rem;
  }

  .nutrition-value {
    font-size: 0.6875rem;
  }

  .food-actions .btn {
    font-size: 0.6875rem;
    padding: 0.3125rem 0.5rem;
  }

  .calculator-content {
    gap: 0.875rem;
  }

  .nutrition-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
  }

  .nutrition-card {
    padding: 0.625rem;
  }

  .nutrition-icon {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.6875rem;
  }

  .nutrition-value {
    font-size: 0.9375rem;
  }

  .nutrition-label {
    font-size: 0.5625rem;
  }

  .appointments-container {
    gap: 0.875rem;
  }

  .appointment-form,
  .appointments-list {
    padding: 0.875rem;
  }

  .recommendations-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.625rem;
  }

  .recommendation-card {
    padding: 0.875rem;
  }

  .recommendation-icon {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.875rem;
  }

  .recommendation-title {
    font-size: 0.875rem;
  }

  .symptoms-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.625rem;
  }

  .symptom-card {
    padding: 0.875rem;
  }

  .symptom-icon {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.875rem;
  }

  .symptom-name {
    font-size: 0.875rem;
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
  }

  .stat-card {
    padding: 0.875rem;
  }

  .stat-icon {
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
  }

  .stat-value {
    font-size: 1.25rem;
  }

  .stat-label {
    font-size: 0.625rem;
  }

  .health-checks {
    gap: 0.625rem;
  }

  .health-check-card {
    padding: 0.875rem;
  }

  .food-search-section {
    padding: 0.875rem;
  }

  .nutrition-calculator {
    padding: 0.875rem;
  }

  .search-controls {
    gap: 0.625rem;
  }

  .search-input-group .search-input {
    padding: 0.5rem 0.875rem;
    font-size: 0.75rem;
  }

  .filter-select {
    padding: 0.4375rem 0.625rem;
    font-size: 0.6875rem;
  }

  .alphabet-btn {
    padding: 0.25rem 0.4375rem;
    font-size: 0.5rem;
    min-width: 1.875rem;
  }

  .nav-label {
    font-size: 0.75rem;
  }

  .results-header h3 {
    font-size: 0.9375rem;
  }

  #results-count {
    font-size: 0.6875rem;
  }

  .selected-foods-list {
    max-height: 180px;
    padding: 0.625rem;
  }

  .selected-food-item {
    padding: 0.375rem;
    margin-bottom: 0.375rem;
  }

  .selected-food-name {
    font-size: 0.6875rem;
  }

  .selected-food-quantity {
    font-size: 0.625rem;
  }

  .remove-food-btn {
    padding: 0.25rem;
  }

  .analysis-text {
    padding: 0.625rem;
    font-size: 0.6875rem;
  }

  .modal-content {
    margin: 0.75rem;
    max-width: calc(100% - 1.5rem);
  }

  .modal-header {
    padding: 0.875rem;
  }

  .modal-header h3 {
    font-size: 1rem;
  }

  .modal-body {
    padding: 0.875rem;
  }

  .food-image-placeholder {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.125rem;
  }

  .food-meta h4 {
    font-size: 0.9375rem;
  }

  .category-badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.5rem;
  }

  .serving-info {
    font-size: 0.6875rem;
  }

  .nutrition-row {
    padding: 0.375rem;
  }

  .quantity-selector label {
    font-size: 0.75rem;
  }

  .action-buttons {
    gap: 0.375rem;
  }
}

@media (max-width: 768px) {
  .search-controls {
    gap: 1rem;
  }

  .search-input-group {
    flex-direction: column;
  }

  .filter-controls {
    flex-direction: column;
  }

  .alphabet-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .alphabet-buttons {
    width: 100%;
    justify-content: center;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .food-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }

  .food-card {
    padding: 1rem;
  }

  .food-header {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .food-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }

  .food-name {
    font-size: 1rem;
  }

  .nutrition-preview {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .nutrition-cards {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .food-basic-info {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .food-actions {
    align-items: center;
  }

  .quantity-selector {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .quantity-selector label {
    min-width: auto;
  }

  .action-buttons {
    flex-direction: column;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .food-search-section {
    padding: 1rem;
  }

  .search-input-group .search-input {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .alphabet-btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.625rem;
    min-width: 2rem;
  }

  .food-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .food-card {
    padding: 0.75rem;
  }

  .food-header {
    gap: 0.5rem;
  }

  .food-icon {
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
  }

  .food-name {
    font-size: 0.875rem;
  }

  .nutrition-item {
    padding: 0.375rem;
  }

  .nutrition-label {
    font-size: 0.625rem;
  }

  .nutrition-value {
    font-size: 0.75rem;
  }

  .food-actions .btn {
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
  }

  .nutrition-calculator {
    padding: 1rem;
  }

  .nutrition-cards {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .nutrition-card {
    padding: 0.75rem;
  }

  .nutrition-icon {
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
  }

  .nutrition-value {
    font-size: 1rem;
  }

  .nutrition-label {
    font-size: 0.625rem;
  }

  .food-basic-info {
    gap: 0.75rem;
  }

  .food-image-placeholder {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
  }

  .food-meta h4 {
    font-size: 1rem;
  }

  .nutrition-row {
    padding: 0.5rem;
  }

  .quantity-selector input {
    max-width: 100%;
  }
}

@media (max-width: 320px) {
  .food-search-section {
    padding: 0.75rem;
  }

  .search-input-group .search-input {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }

  .alphabet-btn {
    padding: 0.25rem 0.375rem;
    font-size: 0.5rem;
    min-width: 1.75rem;
  }

  .food-card {
    padding: 0.5rem;
  }

  .food-header {
    gap: 0.375rem;
  }

  .food-icon {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
  }

  .food-name {
    font-size: 0.75rem;
  }

  .nutrition-item {
    padding: 0.25rem;
  }

  .nutrition-label {
    font-size: 0.5rem;
  }

  .nutrition-value {
    font-size: 0.625rem;
  }

  .food-actions .btn {
    font-size: 0.625rem;
    padding: 0.25rem 0.375rem;
  }

  .nutrition-calculator {
    padding: 0.75rem;
  }

  .nutrition-card {
    padding: 0.5rem;
  }

  .nutrition-icon {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
  }

  .nutrition-value {
    font-size: 0.875rem;
  }

  .nutrition-label {
    font-size: 0.5rem;
  }

  .food-basic-info {
    gap: 0.5rem;
  }

  .food-image-placeholder {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }

  .food-meta h4 {
    font-size: 0.875rem;
  }

  .nutrition-row {
    padding: 0.375rem;
  }
}

/* ===== APPOINTMENTS ===== */
.appointments-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.appointment-form {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.appointment-form h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 1.5rem;
}

.appointment-list {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
}

.appointment-list h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 1.5rem;
}

#scheduled-appointments {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

#scheduled-appointments:empty {
  display: block;
  text-align: center;
  padding: 2rem;
  color: var(--light-text-muted);
  font-style: italic;
}

/* Mobile Responsive - Admin Dashboard & Appointments */
@media (max-width: 768px) {
  .appointment-list {
    padding: 1.5rem;
    margin-top: 1.5rem;
  }
  
  #scheduled-appointments {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .admin-header-actions {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    align-items: stretch;
  }
  
  .admin-stats-overview {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
  }
  
  .admin-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .admin-card {
    padding: 1.5rem;
  }
  
  .admin-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .admin-header i {
    width: 3rem;
    height: 3rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
  }
  
  .admin-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--light-text);
  }
  
  .admin-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
  }
  
  .admin-stat {
    text-align: center;
  }
  
  .admin-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.25rem;
  }
  
  .admin-stat-label {
    font-size: 0.875rem;
    color: var(--light-text-secondary);
  }
  
  .appointments-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .appointment-form {
    padding: 1.5rem;
    order: 1;
  }
  
  .appointment-form h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
  }
  
  .appointment-list {
    padding: 1.5rem;
    order: 2;
  }
  
  .appointment-list h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
  }
  
  .appointment-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .appointment-card {
    padding: 1rem;
  }
  
  .appointment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }
  
  .appointment-patient {
    font-size: 0.9375rem;
  }
  
  .appointment-doctor {
    font-size: 0.75rem;
  }
  
  .appointment-time {
    padding: 0.1875rem 0.5rem;
    font-size: 0.75rem;
    align-self: flex-start;
  }
  
  .appointment-details {
    margin-bottom: 0.75rem;
  }
  
  .appointment-reason {
    font-size: 0.75rem;
    margin-bottom: 0.375rem;
  }
  
  .appointment-date {
    font-size: 0.75rem;
  }
  
  .appointment-actions {
    flex-direction: column;
    gap: 0.375rem;
  }
  
  .appointment-actions .btn {
    width: 100%;
    font-size: 0.75rem;
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .appointment-list {
    padding: 1rem;
    margin-top: 1rem;
  }
  
  #scheduled-appointments {
    gap: 0.75rem;
  }
  
  .appointment-list h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
  }
  
  .admin-header-actions {
    margin-bottom: 1rem;
  }
  
  .admin-stats-overview {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }
  
  .admin-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .admin-card {
    padding: 1rem;
  }
  
  .admin-header {
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  
  .admin-header i {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }
  
  .admin-header h3 {
    font-size: 1rem;
  }
  
  .admin-stats {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
  }
  
  .admin-stat-number {
    font-size: 1.25rem;
  }
  
  .admin-stat-label {
    font-size: 0.75rem;
  }
  
  .appointments-container {
    gap: 1rem;
  }
  
  .appointment-form {
    padding: 1rem;
  }
  
  .appointment-form h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .appointment-list {
    padding: 1rem;
  }
  
  .appointment-list h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .appointment-grid {
    gap: 0.75rem;
  }
  
  .appointment-card {
    padding: 0.75rem;
  }
  
  .appointment-patient {
    font-size: 0.875rem;
  }
  
  .appointment-doctor {
    font-size: 0.6875rem;
  }
  
  .appointment-time {
    padding: 0.125rem 0.375rem;
    font-size: 0.6875rem;
  }
  
  .appointment-reason {
    font-size: 0.6875rem;
  }
  
  .appointment-date {
    font-size: 0.6875rem;
  }
  
  .appointment-actions .btn {
    font-size: 0.6875rem;
    padding: 0.375rem;
  }
}

@media (max-width: 360px) {
  .appointment-list {
    padding: 0.75rem;
    margin-top: 0.75rem;
  }
  
  #scheduled-appointments {
    gap: 0.625rem;
  }
  
  .appointment-list h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .admin-header-actions {
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }
  
  .admin-stats-overview {
    gap: 0.625rem;
    margin-bottom: 1rem;
  }
  
  .admin-grid {
    gap: 0.75rem;
  }
  
  .admin-card {
    padding: 0.75rem;
  }
  
  .admin-header {
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }
  
  .admin-header i {
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
  }
  
  .admin-header h3 {
    font-size: 0.875rem;
  }
  
  .admin-stats {
    gap: 0.75rem;
  }
  
  .admin-stat-number {
    font-size: 1rem;
  }
  
  .admin-stat-label {
    font-size: 0.6875rem;
  }
  
  .appointments-container {
    gap: 0.75rem;
  }
  
  .appointment-form {
    padding: 0.75rem;
  }
  
  .appointment-form h3 {
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
  }
  
  .appointment-list {
    padding: 0.75rem;
  }
  
  .appointment-list h3 {
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
  }
  
  .appointment-grid {
    gap: 0.625rem;
  }
  
  .appointment-card {
    padding: 0.625rem;
  }
  
  .appointment-patient {
    font-size: 0.75rem;
  }
  
  .appointment-doctor {
    font-size: 0.625rem;
  }
  
  .appointment-time {
    padding: 0.125rem 0.25rem;
    font-size: 0.625rem;
  }
  
  .appointment-reason {
    font-size: 0.625rem;
  }
  
  .appointment-date {
    font-size: 0.625rem;
  }
  
  .appointment-actions .btn {
    font-size: 0.625rem;
    padding: 0.3125rem;
  }
}

/* ===== ADMIN SECTION ===== */
.admin-header-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: flex-end;
}

.admin-stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* Mobile Responsive - Dashboard Stats */
@media (max-width: 768px) {
  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .stat-card {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .stat-icon {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
  }
  
  .stat-details h3 {
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
  }
  
  .stat-number {
    font-size: 1.5rem;
    margin-bottom: 0.1875rem;
  }
  
  .stat-change {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .dashboard-stats {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .stat-card {
    padding: 0.75rem;
    gap: 0.5rem;
  }
  
  .stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }
  
  .stat-details h3 {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
  }
  
  .stat-number {
    font-size: 1.25rem;
    margin-bottom: 0.125rem;
  }
  
  .stat-change {
    font-size: 0.6875rem;
  }
}

@media (max-width: 360px) {
  .dashboard-stats {
    gap: 0.625rem;
  }
  
  .stat-card {
    padding: 0.625rem;
    gap: 0.375rem;
  }
  
  .stat-icon {
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
  }
  
  .stat-details h3 {
    font-size: 0.6875rem;
  }
  
  .stat-number {
    font-size: 1.125rem;
  }
  
  .stat-change {
    font-size: 0.625rem;
  }
}

.stat-card {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.stat-icon {
  width: 4rem;
  height: 4rem;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-details h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--light-text-secondary);
  margin-bottom: 0.5rem;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--light-text);
  margin-bottom: 0.25rem;
}

.stat-change {
  font-size: 0.875rem;
  font-weight: 500;
}

.stat-change.positive {
  color: var(--success-color);
}

.stat-change.negative {
  color: var(--danger-color);
}

.stat-change.neutral {
  color: var(--light-text-secondary);
}

.admin-section {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--light-border);
}

.section-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--light-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.filter-select {
  padding: 0.5rem 1rem;
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  background: var(--light-bg);
  color: var(--light-text);
  font-size: 0.875rem;
}

/* ===== PATIENT TABLE ===== */
.patient-table-container {
  overflow-x: auto;
}

.patient-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--light-bg);
  border-radius: var(--radius);
  overflow: hidden;
}

.patient-table th,
.patient-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--light-border);
}

.patient-table th {
  background: var(--light-surface);
  font-weight: 600;
  color: var(--light-text);
  font-size: 0.875rem;
}

.patient-table tbody tr {
  transition: var(--transition);
}

.patient-table tbody tr:hover {
  background: rgba(79, 70, 229, 0.05);
}

.patient-table td {
  font-size: 0.875rem;
  color: var(--light-text-secondary);
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-badge.active {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.status-badge.inactive {
  background: rgba(107, 114, 128, 0.1);
  color: var(--light-text-secondary);
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  padding: 0.25rem 0.5rem;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 0.75rem;
  transition: var(--transition);
}

.action-btn.edit {
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary-color);
}

.action-btn.delete {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.action-btn:hover {
  transform: translateY(-1px);
}

/* ===== APPOINTMENT GRID ===== */
.appointment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.appointment-card {
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
}

.appointment-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.appointment-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
}

.appointment-patient {
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 0.25rem;
}

.appointment-doctor {
  color: var(--light-text-secondary);
  font-size: 0.875rem;
}

.appointment-time {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.appointment-details {
  margin-bottom: 1rem;
}

.appointment-reason {
  color: var(--light-text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.appointment-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--light-text-secondary);
  font-size: 0.875rem;
}

.appointment-actions {
  display: flex;
  gap: 0.5rem;
}

.appointment-delete-btn {
  background: none;
  border: none;
  color: var(--danger-color);
  padding: 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.75rem;
}

.appointment-delete-btn:hover {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger-color);
}

.appointment-delete-btn:active {
  transform: scale(0.95);
}

/* Mobile Responsive - Appointment Grid */
@media (max-width: 768px) {
  .appointment-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .appointment-card {
    padding: 1.25rem;
  }
  
  .appointment-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
  
  .appointment-time {
    align-self: flex-start;
  }
  
  .appointment-patient {
    font-size: 1rem;
  }
  
  .appointment-doctor {
    font-size: 0.75rem;
  }
  
  .appointment-reason {
    font-size: 0.75rem;
    margin-bottom: 0.375rem;
  }
  
  .appointment-date {
    font-size: 0.75rem;
    gap: 0.375rem;
  }
  
  .appointment-actions {
    flex-wrap: wrap;
    gap: 0.375rem;
  }
  
  .appointment-delete-btn {
    padding: 0.375rem;
    font-size: 0.6875rem;
  }
}

@media (max-width: 480px) {
  .appointment-grid {
    gap: 0.75rem;
  }
  
  .appointment-card {
    padding: 1rem;
  }
  
  .appointment-header {
    gap: 0.5rem;
  }
  
  .appointment-patient {
    font-size: 0.9375rem;
  }
  
  .appointment-doctor {
    font-size: 0.6875rem;
  }
  
  .appointment-reason {
    font-size: 0.6875rem;
    margin-bottom: 0.25rem;
  }
  
  .appointment-date {
    font-size: 0.6875rem;
    gap: 0.25rem;
  }
  
  .appointment-time {
    padding: 0.1875rem 0.5rem;
    font-size: 0.625rem;
  }
  
  .appointment-actions {
    gap: 0.25rem;
  }
  
  .appointment-delete-btn {
    padding: 0.25rem;
    font-size: 0.625rem;
  }
}

@media (max-width: 360px) {
  .appointment-grid {
    gap: 0.625rem;
  }
  
  .appointment-card {
    padding: 0.75rem;
  }
  
  .appointment-header {
    gap: 0.375rem;
  }
  
  .appointment-patient {
    font-size: 0.875rem;
  }
  
  .appointment-doctor {
    font-size: 0.625rem;
  }
  
  .appointment-reason {
    font-size: 0.625rem;
    margin-bottom: 0.1875rem;
  }
  
  .appointment-date {
    font-size: 0.625rem;
    gap: 0.1875rem;
  }
  
  .appointment-time {
    padding: 0.125rem 0.375rem;
    font-size: 0.5625rem;
  }
  
  .appointment-actions {
    gap: 0.1875rem;
  }
  
  .appointment-delete-btn {
    padding: 0.1875rem;
    font-size: 0.5625rem;
  }
}

/* ===== AI EXERCISE SECTION ===== */
.exercise-section {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.exercise-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.exercise-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--light-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.exercise-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.exercise-search {
  padding: 0.5rem 1rem;
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  background: var(--light-bg);
  color: var(--light-text);
  font-size: 0.875rem;
  min-width: 200px;
}

.exercise-category-filter {
  padding: 0.5rem 1rem;
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  background: var(--light-bg);
  color: var(--light-text);
  font-size: 0.875rem;
  cursor: pointer;
}

.exercise-level-filter {
  padding: 0.5rem 1rem;
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  background: var(--light-bg);
  color: var(--light-text);
  font-size: 0.875rem;
  cursor: pointer;
}

.exercise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.exercise-card {
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.exercise-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.exercise-card.marked {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.exercise-visual {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.exercise-visual::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.exercise-icon {
  font-size: 3rem;
  color: white;
  z-index: 1;
  position: relative;
}

.exercise-content {
  padding: 1.25rem;
}

.exercise-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 0.5rem;
}

.exercise-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--primary-color);
  color: white;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.exercise-category.cardio { background: #e74c3c; }
.exercise-category.strength { background: #3498db; }
.exercise-category.flexibility { background: #2ecc71; }
.exercise-category.balance { background: #f39c12; }
.exercise-category.yoga { background: #9b59b6; }

.exercise-description {
  color: var(--light-text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.exercise-details {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--light-text-muted);
}

.exercise-detail {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.exercise-mark {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.875rem;
  opacity: 0;
  transform: scale(0);
  transition: var(--transition);
}

.exercise-card.marked .exercise-mark {
  opacity: 1;
  transform: scale(1);
}

/* ===== PATIENT PROFILE SECTION ===== */
.patient-profile-section {
  background: var(--light-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--light-border);
  box-shadow: var(--shadow-sm);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--light-border);
}

.profile-avatar {
  position: relative;
  flex-shrink: 0;
}

.avatar-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

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

.avatar-upload {
  position: absolute;
  bottom: 0;
  right: 0;
}

.avatar-upload-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.avatar-upload-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  color: var(--light-text);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.profile-age {
  color: var(--light-text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.profile-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success-color);
  animation: pulse 2s infinite;
}

.status-indicator.online {
  background: var(--success-color);
}

.status-indicator.offline {
  background: var(--text-muted);
  animation: none;
}

.status-text {
  color: var(--light-text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
}

.profile-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Profile Edit Form */
.profile-edit-form {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--light-border);
}

.profile-edit-form h4 {
  color: var(--light-text);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.profile-form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* Health Summary */
.health-summary {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--light-border);
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.health-summary h4 {
  color: var(--light-text);
  font-size: 1.125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.summary-close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--light-bg);
  border-radius: var(--radius);
  color: var(--light-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--light-border);
}

.summary-close-btn:hover {
  background: var(--danger-color);
  color: white;
  border-color: var(--danger-color);
  transform: scale(1.1);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.summary-item {
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--light-border);
  transition: var(--transition);
}

.summary-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.summary-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.summary-icon i {
  font-size: 1rem;
  color: white;
}

.summary-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.summary-label {
  color: var(--light-text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.summary-value {
  color: var(--light-text);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
}

/* Mobile Responsive - Patient Profile */
@media (max-width: 768px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .profile-actions {
    justify-content: center;
    width: 100%;
  }
  
  .profile-form-grid {
    grid-template-columns: 1fr;
  }
  
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .profile-form-actions {
    justify-content: stretch;
  }
  
  .profile-form-actions .btn {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .patient-profile-section {
    padding: 1rem;
  }
  
  .avatar-image {
    width: 60px;
    height: 60px;
  }
  
  .profile-name {
    font-size: 1.25rem;
  }
  
  .summary-grid {
    grid-template-columns: 1fr;
  }
  
  .summary-item {
    padding: 0.75rem;
  }
  
  .summary-icon {
    width: 32px;
    height: 32px;
  }
  
  .summary-icon i {
    font-size: 0.875rem;
  }
  
  .summary-value {
    font-size: 1rem;
  }
}

/* Pulse Animation */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
  }
}

/* ===== USER DATA FORM ===== */
.user-data-form {
  background: var(--light-surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--light-border);
  animation: slideDown 0.3s ease;
}

.user-data-form h4 {
  color: var(--light-text);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  color: var(--light-text);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 0.75rem;
  color: var(--light-text);
  font-size: 0.875rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.family-history-section {
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--light-border);
}

.family-history-section h5 {
  color: var(--light-text);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--light-text);
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
}

.checkbox-label:hover {
  color: var(--primary-color);
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsive - User Data Form */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .checkbox-group {
    grid-template-columns: 1fr;
  }
  
  .form-actions {
    justify-content: stretch;
  }
  
  .form-actions .btn {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .user-data-form {
    padding: 1rem;
  }
  
  .form-group input,
  .form-group select {
    padding: 0.625rem;
    font-size: 0.8125rem;
  }
}

/* ===== AI HEALTH ASSISTANT SECTION ===== */
.health-assistant-section {
  background: var(--light-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--light-border);
  box-shadow: var(--shadow-sm);
}

.assistant-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.assistant-header h3 {
  color: var(--light-text);
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.assistant-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* Chat Container */
.chat-container {
  background: var(--light-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 500px;
  max-height: 600px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: var(--light-bg);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

/* Messages */
.message {
  display: flex;
  gap: 0.75rem;
  max-width: 80%;
  animation: messageSlide 0.3s ease-out;
}

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

.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.assistant-message {
  align-self: flex-start;
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.user-message .message-avatar {
  background: var(--primary-color);
  color: white;
}

.assistant-message .message-avatar {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.message-content {
  flex: 1;
  min-width: 0;
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}

.message-sender {
  font-weight: 600;
  color: var(--light-text);
  font-size: 0.875rem;
}

.message-time {
  font-size: 0.75rem;
  color: var(--light-text-secondary);
  white-space: nowrap;
}

.message-text {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--light-text);
  line-height: 1.5;
  word-wrap: break-word;
}

.user-message .message-text {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.message-text ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.message-text li {
  margin-bottom: 0.25rem;
}

/* Chat Input Area - Simplified Layout */
.chat-input-area {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  position: relative;
  padding: 1rem;
  border-top: 1px solid var(--light-border);
  background: var(--light-surface);
}

.input-group {
  flex: 1;
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 0.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.input-group::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(74, 144, 226, 0.05), rgba(74, 144, 226, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.input-group:focus-within::before {
  opacity: 1;
}

.input-group:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
  transform: translateY(-1px);
}

.chat-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--light-text);
  font-size: 0.875rem;
  line-height: 1.4;
  resize: none;
  outline: none;
  min-height: 20px;
  max-height: 120px;
  font-family: inherit;
  position: relative;
  z-index: 1;
  padding: 0.25rem;
}

.chat-input::placeholder {
  color: var(--light-text-secondary);
  transition: opacity 0.3s ease;
}

.chat-input:focus::placeholder {
  opacity: 0.7;
}

.send-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.send-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.send-btn:hover::before {
  width: 100%;
  height: 100%;
}

.send-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.send-btn:active {
  transform: scale(0.95);
}

.input-options {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.quick-action-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--light-border);
  background: var(--light-bg);
  color: var(--light-text);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.quick-action-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--primary-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
  z-index: 0;
}

.quick-action-btn:hover::before {
  width: 100%;
  height: 100%;
}

.quick-action-btn:hover {
  color: white;
  transform: scale(1.05);
  box-shadow: var(--shadow-sm);
}

.quick-action-btn:active {
  transform: scale(0.95);
}

.quick-action-btn i {
  position: relative;
  z-index: 1;
  font-size: 0.875rem;
}

.option-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--light-border);
  background: var(--light-bg);
  color: var(--light-text);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.option-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--primary-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
  z-index: 0;
}

.option-btn:hover::before {
  width: 100%;
  height: 100%;
}

.option-btn:hover {
  color: white;
  transform: scale(1.05);
  box-shadow: var(--shadow-sm);
}

.option-btn:active {
  transform: scale(0.95);
}

.option-btn i {
  position: relative;
  z-index: 1;
  font-size: 0.875rem;
}

/* Mobile Responsive - Simplified Chat Input Area */
@media (max-width: 768px) {
  .chat-input-area {
    padding: 0.75rem;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    position: sticky;
    bottom: 0;
    z-index: 10;
  }
  
  .input-group {
    order: 2;
    padding: 0.375rem;
  }
  
  .chat-input {
    font-size: 0.8125rem;
    padding: 0.375rem;
    min-height: 18px;
    max-height: 100px;
    line-height: 1.3;
  }
  
  .send-btn {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
  }
  
  .input-options {
    order: 1;
    justify-content: center;
    gap: 0.375rem;
    flex-wrap: wrap;
  }
  
  .quick-action-btn {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }
  
  .option-btn {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .chat-input-area {
    padding: 0.5rem;
    gap: 0.5rem;
  }
  
  .input-group {
    order: 2;
    padding: 0.25rem;
  }
  
  .chat-input {
    font-size: 0.75rem;
    padding: 0.25rem;
    min-height: 16px;
    max-height: 80px;
    line-height: 1.2;
  }
  
  .send-btn {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  
  .input-options {
    order: 1;
    gap: 0.25rem;
  }
  
  .quick-action-btn {
    width: 28px;
    height: 28px;
    font-size: 0.6875rem;
  }
  
  .option-btn {
    width: 28px;
    height: 28px;
    font-size: 0.6875rem;
  }
}

@media (max-width: 360px) {
  .chat-input-area {
    padding: 0.375rem;
    gap: 0.375rem;
  }
  
  .input-group {
    order: 2;
    padding: 0.1875rem;
  }
  
  .chat-input {
    font-size: 0.6875rem;
    padding: 0.1875rem;
    min-height: 14px;
    max-height: 70px;
    line-height: 1.1;
  }
  
  .send-btn {
    width: 24px;
    height: 24px;
    font-size: 0.6875rem;
  }
  
  .input-options {
    order: 1;
    gap: 0.1875rem;
  }
  
  .quick-action-btn {
    width: 24px;
    height: 24px;
    font-size: 0.625rem;
  }
  
  .option-btn {
    width: 24px;
    height: 24px;
    font-size: 0.625rem;
  }
}

/* Landscape Mobile - Simplified Chat Input Area */
@media (max-width: 768px) and (orientation: landscape) {
  .chat-input-area {
    flex-direction: row;
    gap: 0.5rem;
    padding: 0.5rem;
  }
  
  .input-group {
    order: 1;
  }
  
  .input-options {
    order: 2;
    gap: 0.25rem;
  }
}

/* Touch Optimizations - Simplified Chat Input Area */
@media (hover: none) and (pointer: coarse) {
  .quick-action-btn {
    transform: none;
  }
  
  .quick-action-btn:active {
    transform: scale(0.95);
  }
  
  .send-btn {
    transform: none;
  }
  
  .send-btn:active {
    transform: scale(0.9);
  }
  
  .option-btn {
    transform: none;
  }
  
  .option-btn:active {
    transform: scale(0.9);
  }
  
  .input-group {
    transform: none;
  }
  
  .input-group:focus-within {
    transform: none;
  }
}

/* Small Screen Optimizations */
@media (max-width: 320px) {
  .chat-input {
    font-size: 0.625rem;
  }
  
  .send-btn {
    width: 20px;
    height: 20px;
    font-size: 0.625rem;
  }
  
  .quick-action-btn {
    width: 20px;
    height: 20px;
    font-size: 0.5625rem;
  }
  
  .option-btn {
    width: 20px;
    height: 20px;
    font-size: 0.5625rem;
  }
}

/* Sleep Analyzer Panel */
.sleep-analyzer-panel {
  background: var(--light-surface);
  border-radius: var(--radius);
  border: 1px solid var(--light-border);
  margin-bottom: 1.5rem;
  overflow: hidden;
  animation: slideDown 0.3s ease-out;
}

.sleep-analyzer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.sleep-analyzer-header h4 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.sleep-analyzer-content {
  padding: 1.5rem;
}

.sleep-input-section {
  margin-bottom: 2rem;
}

.sleep-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.sleep-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sleep-form-group label {
  font-weight: 500;
  color: var(--light-text);
  font-size: 0.875rem;
}

.sleep-form-group input,
.sleep-form-group select {
  padding: 0.5rem;
  border: 1px solid var(--light-border);
  border-radius: calc(var(--radius) * 0.75);
  font-size: 0.875rem;
  transition: var(--transition);
}

.sleep-form-group input:focus,
.sleep-form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.sleep-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.sleep-actions .btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.sleep-metrics-section {
  margin-bottom: 2rem;
}

.sleep-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.sleep-metric-card {
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.sleep-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: white;
  flex-shrink: 0;
}

.sleep-metric-card:nth-child(1) .metric-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.sleep-metric-card:nth-child(2) .metric-icon {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.sleep-metric-card:nth-child(3) .metric-icon {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.sleep-metric-card:nth-child(4) .metric-icon {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.metric-content h5 {
  margin: 0 0 0.25rem 0;
  font-size: 0.875rem;
  color: var(--light-text-secondary);
  font-weight: 500;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  display: block;
}

.sleep-recommendations-section {
  background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
  border: 1px solid #667eea30;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.sleep-recommendations-section h5 {
  margin: 0 0 1rem 0;
  color: var(--primary-color);
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.recommendations-list {
  display: grid;
  gap: 0.75rem;
}

.recommendation-item {
  background: white;
  border-left: 4px solid var(--primary-color);
  padding: 0.75rem 1rem;
  border-radius: calc(var(--radius) * 0.75);
  font-size: 0.875rem;
  color: var(--light-text);
  line-height: 1.5;
}

/* Dark Mode - Sleep Recommendations */
@media (prefers-color-scheme: dark) {
  .sleep-recommendations-section {
    background: linear-gradient(135deg, #1a1a2e15 0%, #16213e15 100%);
    border: 1px solid #667eea30;
  }
  
  .sleep-recommendations-section h5 {
    color: #7c3aed;
  }
  
  .sleep-recommendations-section .recommendation-item {
    background: #1a1a2e;
    border-left: 4px solid #7c3aed;
    color: #e8e8e8;
  }
}

/* Manual Dark Mode Toggle Support - Sleep */
body.dark-mode .sleep-recommendations-section {
  background: linear-gradient(135deg, #1a1a2e15 0%, #16213e15 100%);
  border: 1px solid #667eea30;
}

body.dark-mode .sleep-recommendations-section h5 {
  color: #7c3aed;
}

body.dark-mode .sleep-recommendations-section .recommendation-item {
  background: #1a1a2e;
  border-left: 4px solid #7c3aed;
  color: #e8e8e8;
}

.sleep-history-section h5 {
  margin: 0 0 1rem 0;
  color: var(--light-text);
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sleep-history-table {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--light-border);
}

.sleep-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.sleep-table th {
  background: var(--light-bg);
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  color: var(--light-text);
  border-bottom: 2px solid var(--light-border);
}

.sleep-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--light-border);
  color: var(--light-text-secondary);
}

.sleep-table tbody tr:hover {
  background: var(--light-surface);
}

.sleep-table .btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: calc(var(--radius) * 0.5);
}

.sleep-quality-badge {
  padding: 0.25rem 0.5rem;
  border-radius: calc(var(--radius) * 0.5);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

.sleep-quality-badge.excellent {
  background: #d4edda;
  color: #155724;
}

.sleep-quality-badge.good {
  background: #cce5ff;
  color: #004085;
}

.sleep-quality-badge.fair {
  background: #fff3cd;
  color: #856404;
}

.sleep-quality-badge.poor {
  background: #f8d7da;
  color: #721c24;
}

/* Mobile Responsive - Sleep Analyzer */
@media (max-width: 768px) {
  .sleep-analyzer-content {
    padding: 1rem;
  }
  
  .sleep-form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .sleep-actions {
    flex-direction: column;
  }
  
  .sleep-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .sleep-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .sleep-metric-card {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .metric-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .metric-value {
    font-size: 1.25rem;
  }
  
  .sleep-table {
    font-size: 0.75rem;
  }
  
  .sleep-table th,
  .sleep-table td {
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .sleep-metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .sleep-analyzer-header {
    padding: 0.75rem 1rem;
  }
  
  .sleep-analyzer-header h4 {
    font-size: 1rem;
  }
  
  .recommendations-list {
    gap: 0.5rem;
  }
  
  .recommendation-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pain Tracker Panel */
.pain-tracker-panel {
  background: var(--light-surface);
  border-radius: var(--radius);
  border: 1px solid var(--light-border);
  margin-bottom: 1.5rem;
  overflow: hidden;
  animation: slideDown 0.3s ease-out;
}

.pain-tracker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
}

.pain-tracker-header h4 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pain-tracker-content {
  padding: 1.5rem;
}

.pain-input-section {
  margin-bottom: 2rem;
}

.pain-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.pain-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pain-form-group.full-width {
  grid-column: 1 / -1;
}

.pain-form-group label {
  font-weight: 500;
  color: var(--light-text);
  font-size: 0.875rem;
}

.pain-form-group input,
.pain-form-group select {
  padding: 0.5rem;
  border: 1px solid var(--light-border);
  border-radius: calc(var(--radius) * 0.75);
  font-size: 0.875rem;
  transition: var(--transition);
}

.pain-form-group input:focus,
.pain-form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.pain-intensity-display {
  text-align: center;
  font-weight: 600;
  color: var(--primary-color);
  margin-top: 0.25rem;
}

.pain-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.pain-actions .btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.pain-metrics-section {
  margin-bottom: 2rem;
}

.pain-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.pain-metric-card {
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.pain-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pain-metric-card:nth-child(1) .metric-icon {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.pain-metric-card:nth-child(2) .metric-icon {
  background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
}

.pain-metric-card:nth-child(3) .metric-icon {
  background: linear-gradient(135deg, #48dbfb 0%, #0abde3 100%);
}

.pain-metric-card:nth-child(4) .metric-icon {
  background: linear-gradient(135deg, #ff9ff3 0%, #ee5a24 100%);
}

.pain-pattern-section {
  background: linear-gradient(135deg, #ff6b6b15 0%, #ee5a2415 100%);
  border: 1px solid #ff6b6b30;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.pain-pattern-section h5 {
  margin: 0 0 1rem 0;
  color: #ee5a24;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pattern-analysis-list {
  display: grid;
  gap: 0.75rem;
}

.pattern-item {
  background: white;
  border-left: 4px solid #ee5a24;
  padding: 0.75rem 1rem;
  border-radius: calc(var(--radius) * 0.75);
  font-size: 0.875rem;
  color: var(--light-text);
  line-height: 1.5;
}

/* Dark Mode - Pain Pattern Section */
@media (prefers-color-scheme: dark) {
  .pain-pattern-section {
    background: linear-gradient(135deg, #1a1a2e15 0%, #16213e15 100%);
    border: 1px solid #ff6b6b30;
  }
  
  .pain-pattern-section h5 {
    color: #ff6b6b;
  }
  
  .pattern-item {
    background: #1a1a2e;
    border-left: 4px solid #ff6b6b;
    color: #e8e8e8;
  }
}

/* Manual Dark Mode Toggle Support - Pain Pattern */
body.dark-mode .pain-pattern-section {
  background: linear-gradient(135deg, #1a1a2e15 0%, #16213e15 100%);
  border: 1px solid #ff6b6b30;
}

body.dark-mode .pain-pattern-section h5 {
  color: #ff6b6b;
}

body.dark-mode .pattern-item {
  background: #1a1a2e;
  border-left: 4px solid #ff6b6b;
  color: #e8e8e8;
}

.pain-recommendations-section {
  background: linear-gradient(135deg, #48dbfb15 0%, #0abde315 100%);
  border: 1px solid #48dbfb30;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.pain-recommendations-section h5 {
  margin: 0 0 1rem 0;
  color: #0abde3;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Dark Mode - Medical Recommendations */
@media (prefers-color-scheme: dark) {
  .pain-recommendations-section {
    background: linear-gradient(135deg, #1a1a2e15 0%, #16213e15 100%);
    border: 1px solid #0f346030;
  }
  
  .pain-recommendations-section h5 {
    color: #4fbdba;
  }
  
  .recommendation-item {
    background: #1a1a2e;
    border-left: 4px solid #4fbdba;
    color: #e8e8e8;
  }
}

/* Manual Dark Mode Toggle Support */
body.dark-mode .pain-recommendations-section {
  background: linear-gradient(135deg, #1a1a2e15 0%, #16213e15 100%);
  border: 1px solid #0f346030;
}

body.dark-mode .pain-recommendations-section h5 {
  color: #4fbdba;
}

body.dark-mode .recommendation-item {
  background: #1a1a2e;
  border-left: 4px solid #4fbdba;
  color: #e8e8e8;
}

.pain-history-section h5 {
  margin: 0 0 1rem 0;
  color: var(--light-text);
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pain-history-table {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--light-border);
}

.pain-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.pain-table th {
  background: var(--light-bg);
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  color: var(--light-text);
  border-bottom: 2px solid var(--light-border);
}

.pain-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--light-border);
  color: var(--light-text-secondary);
}

.pain-table tbody tr:hover {
  background: var(--light-surface);
}

.pain-table .btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: calc(var(--radius) * 0.5);
}

.pain-intensity-badge {
  padding: 0.25rem 0.5rem;
  border-radius: calc(var(--radius) * 0.5);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

.pain-intensity-badge.low {
  background: #d4edda;
  color: #155724;
}

.pain-intensity-badge.medium {
  background: #fff3cd;
  color: #856404;
}

.pain-intensity-badge.high {
  background: #f8d7da;
  color: #721c24;
}

.pain-intensity-badge.severe {
  background: #721c24;
  color: white;
}

/* Mobile Responsive - Pain Tracker */
@media (max-width: 768px) {
  .pain-tracker-content {
    padding: 1rem;
  }
  
  .pain-form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .pain-actions {
    flex-direction: column;
  }
  
  .pain-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .pain-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .pain-metric-card {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .metric-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .metric-value {
    font-size: 1.25rem;
  }
  
  .pain-table {
    font-size: 0.75rem;
  }
  
  .pain-table th,
  .pain-table td {
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .pain-metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .pain-tracker-header {
    padding: 0.75rem 1rem;
  }
  
  .pain-tracker-header h4 {
    font-size: 1rem;
  }
  
  .pattern-analysis-list {
    gap: 0.5rem;
  }
  
  .pattern-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.processing-content {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-md);
}

.processing-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.125rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.processing-text p {
  margin: 0;
  color: var(--light-text);
  font-size: 0.875rem;
  font-weight: 500;
}

.typing-indicator {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: var(--primary-color);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-10px); }
}

/* Health Insights Modal */
.health-insights-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.insights-modal-content {
  background: var(--light-surface);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.insights-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--light-border);
}

.insights-header h4 {
  color: var(--light-text);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--light-bg);
  border-radius: 50%;
  color: var(--light-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.25rem;
}

.close-btn:hover {
  background: var(--danger-color);
  color: white;
}

.insights-body {
  padding: 1.5rem;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.insight-card {
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.insight-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.insight-content h5 {
  color: var(--light-text);
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.insight-content p {
  color: var(--light-text-secondary);
  font-size: 0.75rem;
  margin: 0 0 0.5rem 0;
}

.insight-content .progress-bar {
  height: 4px;
  background: var(--light-border);
  border-radius: 2px;
  overflow: hidden;
}

.insight-content .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success-color), var(--primary-color));
  border-radius: 2px;
  transition: width 0.5s ease;
}

.insights-recommendations {
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 1rem;
}

.insights-recommendations h5 {
  color: var(--light-text);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.insights-recommendations ul {
  margin: 0;
  padding-left: 1.5rem;
}

.insights-recommendations li {
  color: var(--light-text);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

/* Mobile Responsive - AI Health Assistant - Enhanced */
@media (max-width: 768px) {
  .health-assistant-section {
    padding: 1rem;
  }
  
  .assistant-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .assistant-header h3 {
    font-size: 1.125rem;
    text-align: center;
  }
  
  .assistant-controls {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .assistant-controls .btn {
    flex: 1;
    min-width: 120px;
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
  }
  
  .chat-container {
    height: 400px;
    max-height: 500px;
    border-radius: var(--radius);
  }
  
  .chat-messages {
    padding: 0.75rem;
    gap: 0.75rem;
  }
  
  .message {
    max-width: 90%;
    gap: 0.5rem;
  }
  
  .message-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
  }
  
  .message-header {
    margin-bottom: 0.375rem;
    gap: 0.375rem;
  }
  
  .message-sender {
    font-size: 0.75rem;
  }
  
  .message-time {
    font-size: 0.6875rem;
  }
  
  .message-text {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.4;
  }
  
  .message-text ul {
    margin: 0.375rem 0;
    padding-left: 1.25rem;
  }
  
  .message-text li {
    margin-bottom: 0.1875rem;
    font-size: 0.75rem;
  }
  
  .chat-input-container {
    padding: 0.75rem;
  }
  
  .quick-actions {
    gap: 0.375rem;
    margin-bottom: 0.75rem;
    justify-content: center;
  }
  
  .quick-action-btn {
    font-size: 0.6875rem;
    padding: 0.375rem 0.5rem;
    gap: 0.1875rem;
    flex: 1;
    min-width: 0;
    justify-content: center;
    border-radius: var(--radius);
  }
  
  .quick-action-btn i {
    font-size: 0.75rem;
  }
  
  .chat-input-area {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .input-group {
    width: 100%;
    padding: 0.375rem;
  }
  
  .chat-input {
    font-size: 0.8125rem;
    padding: 0.375rem;
    min-height: 18px;
    max-height: 100px;
  }
  
  .send-btn {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
  }
  
  .input-options {
    justify-content: center;
    gap: 0.375rem;
  }
  
  .option-btn {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }
  
  .ai-processing {
    bottom: 100px;
    width: 90%;
    max-width: 300px;
  }
  
  .processing-content {
    padding: 0.75rem;
    gap: 0.5rem;
  }
  
  .processing-avatar {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  
  .processing-text p {
    font-size: 0.75rem;
  }
  
  .typing-indicator {
    gap: 0.1875rem;
    margin-bottom: 0.375rem;
  }
  
  .typing-indicator span {
    width: 4px;
    height: 4px;
  }
  
  .health-insights-modal {
    padding: 0.5rem;
  }
  
  .insights-modal-content {
    margin: 0.5rem;
    max-height: 90vh;
  }
  
  .insights-header {
    padding: 1rem;
  }
  
  .insights-header h4 {
    font-size: 1.125rem;
  }
  
  .close-btn {
    width: 28px;
    height: 28px;
    font-size: 1.125rem;
  }
  
  .insights-body {
    padding: 1rem;
  }
  
  .insights-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .insight-card {
    padding: 0.75rem;
    gap: 0.5rem;
  }
  
  .insight-icon {
    width: 40px;
    height: 40px;
    font-size: 1.125rem;
  }
  
  .insight-content h5 {
    font-size: 0.8125rem;
    margin-bottom: 0.375rem;
  }
  
  .insight-content p {
    font-size: 0.6875rem;
    margin-bottom: 0.375rem;
  }
  
  .insight-content .progress-bar {
    height: 3px;
  }
  
  .insights-recommendations {
    padding: 0.75rem;
  }
  
  .insights-recommendations h5 {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
  }
  
  .insights-recommendations li {
    font-size: 0.75rem;
    margin-bottom: 0.375rem;
    line-height: 1.3;
  }
}

@media (max-width: 480px) {
  .health-assistant-section {
    padding: 0.75rem;
  }
  
  .assistant-header h3 {
    font-size: 1rem;
  }
  
  .assistant-controls {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .assistant-controls .btn {
    width: 100%;
    min-width: auto;
  }
  
  .chat-container {
    height: 350px;
    max-height: 450px;
  }
  
  .chat-messages {
    padding: 0.5rem;
    gap: 0.5rem;
  }
  
  .message {
    max-width: 95%;
    gap: 0.375rem;
  }
  
  .message-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  
  .message-header {
    margin-bottom: 0.25rem;
    gap: 0.25rem;
  }
  
  .message-sender {
    font-size: 0.6875rem;
  }
  
  .message-time {
    font-size: 0.625rem;
  }
  
  .message-text {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.3;
  }
  
  .message-text ul {
    margin: 0.25rem 0;
    padding-left: 1rem;
  }
  
  .message-text li {
    margin-bottom: 0.125rem;
    font-size: 0.6875rem;
  }
  
  .chat-input-container {
    padding: 0.5rem;
  }
  
  .quick-actions {
    gap: 0.25rem;
    margin-bottom: 0.5rem;
  }
  
  .quick-action-btn {
    font-size: 0.625rem;
    padding: 0.25rem 0.375rem;
    gap: 0.125rem;
  }
  
  .quick-action-btn i {
    font-size: 0.6875rem;
  }
  
  .input-group {
    padding: 0.25rem;
  }
  
  .chat-input {
    font-size: 0.75rem;
    padding: 0.25rem;
    min-height: 16px;
    max-height: 80px;
  }
  
  .send-btn {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  
  .input-options {
    gap: 0.25rem;
  }
  
  .option-btn {
    width: 28px;
    height: 28px;
    font-size: 0.6875rem;
  }
  
  .ai-processing {
    bottom: 80px;
    width: 95%;
    max-width: 250px;
  }
  
  .processing-content {
    padding: 0.5rem;
    gap: 0.375rem;
  }
  
  .processing-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.875rem;
  }
  
  .processing-text p {
    font-size: 0.6875rem;
  }
  
  .typing-indicator {
    gap: 0.125rem;
    margin-bottom: 0.25rem;
  }
  
  .typing-indicator span {
    width: 3px;
    height: 3px;
  }
  
  .insights-modal-content {
    margin: 0.25rem;
    max-height: 95vh;
  }
  
  .insights-header {
    padding: 0.75rem;
  }
  
  .insights-header h4 {
    font-size: 1rem;
  }
  
  .close-btn {
    width: 24px;
    height: 24px;
    font-size: 1rem;
  }
  
  .insights-body {
    padding: 0.75rem;
  }
  
  .insight-card {
    padding: 0.5rem;
    gap: 0.375rem;
  }
  
  .insight-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  
  .insight-content h5 {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
  }
  
  .insight-content p {
    font-size: 0.625rem;
    margin-bottom: 0.25rem;
  }
  
  .insight-content .progress-bar {
    height: 2px;
  }
  
  .insights-recommendations {
    padding: 0.5rem;
  }
  
  .insights-recommendations h5 {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
  }
  
  .insights-recommendations li {
    font-size: 0.6875rem;
    margin-bottom: 0.25rem;
    line-height: 1.2;
  }
}

@media (max-width: 360px) {
  .health-assistant-section {
    padding: 0.5rem;
  }
  
  .assistant-header h3 {
    font-size: 0.875rem;
  }
  
  .chat-container {
    height: 300px;
    max-height: 400px;
  }
  
  .chat-messages {
    padding: 0.375rem;
    gap: 0.375rem;
  }
  
  .message {
    max-width: 98%;
    gap: 0.25rem;
  }
  
  .message-avatar {
    width: 24px;
    height: 24px;
    font-size: 0.6875rem;
  }
  
  .message-text {
    padding: 0.25rem 0.375rem;
    font-size: 0.6875rem;
  }
  
  .quick-actions {
    flex-wrap: wrap;
    gap: 0.1875rem;
  }
  
  .quick-action-btn {
    font-size: 0.5625rem;
    padding: 0.1875rem 0.25rem;
    flex: 1 1 calc(50% - 0.1875rem);
    min-width: 80px;
  }
  
  .quick-action-btn i {
    font-size: 0.625rem;
  }
  
  .chat-input-container {
    padding: 0.375rem;
  }
  
  .input-group {
    padding: 0.1875rem;
  }
  
  .chat-input {
    font-size: 0.6875rem;
    padding: 0.1875rem;
    min-height: 14px;
    max-height: 70px;
  }
  
  .send-btn {
    width: 24px;
    height: 24px;
    font-size: 0.6875rem;
  }
  
  .option-btn {
    width: 24px;
    height: 24px;
    font-size: 0.625rem;
  }
  
  .ai-processing {
    bottom: 70px;
    width: 98%;
    max-width: 200px;
  }
  
  .processing-content {
    padding: 0.375rem;
    gap: 0.25rem;
  }
  
  .processing-avatar {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }
  
  .processing-text p {
    font-size: 0.625rem;
  }
  
  .typing-indicator span {
    width: 2px;
    height: 2px;
  }
}

/* Landscape Mobile - AI Health Assistant */
@media (max-width: 768px) and (orientation: landscape) {
  .chat-container {
    height: 250px;
    max-height: 300px;
  }
  
  .chat-messages {
    padding: 0.5rem;
  }
  
  .chat-input-container {
    padding: 0.5rem;
  }
  
  .quick-actions {
    margin-bottom: 0.5rem;
  }
  
  .ai-processing {
    bottom: 60px;
  }
  
  .insights-modal-content {
    max-height: 85vh;
  }
}

/* Touch Optimizations - AI Health Assistant */
@media (hover: none) and (pointer: coarse) {
  .quick-action-btn {
    transform: none;
  }
  
  .quick-action-btn:active {
    transform: scale(0.95);
  }
  
  .send-btn {
    transform: none;
  }
  
  .send-btn:active {
    transform: scale(0.9);
  }
  
  .option-btn {
    transform: none;
  }
  
  .option-btn:active {
    transform: scale(0.9);
  }
  
  .message-text {
    transform: none;
  }
  
  .message-text:active {
    transform: scale(0.98);
  }
  
  .insight-card {
    transform: none;
  }
  
  .insight-card:active {
    transform: scale(0.98);
  }
}

/* Small Screen Optimizations */
@media (max-width: 320px) {
  .quick-action-btn {
    font-size: 0.5rem;
    padding: 0.125rem 0.1875rem;
  }
  
  .quick-action-btn i {
    font-size: 0.5625rem;
  }
  
  .assistant-controls .btn {
    font-size: 0.6875rem;
    padding: 0.375rem 0.5rem;
  }
  
  .message-text {
    font-size: 0.625rem;
  }
  
}

/* ===== GAMIFICATION SYSTEM STYLES ===== */
.gamification-section {
    background: var(--light-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--light-border);
    box-shadow: var(--shadow-sm);
}

.gamification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-border);
    flex-wrap: wrap;
    gap: 1rem;
}

.gamification-header h3 {
    color: var(--light-text);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gamification-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Streak System */
.streak-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    color: white;
}

.streak-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.streak-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.streak-counter {
    text-align: center;
}

.streak-number {
    font-size: 3rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.streak-label {
    font-size: 0.75rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.streak-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 1.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-day.completed {
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.calendar-day.today {
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid white;
    font-weight: 700;
}

.calendar-day:hover {
    transform: scale(1.1);
}

.streak-milestones {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    flex-wrap: wrap;
}

.milestone {
    text-align: center;
    padding: 0.75rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    min-width: 100px;
}

.milestone.achieved {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.milestone i {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    display: block;
}

.milestone span {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Points System */
.points-container {
    background: var(--light-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--light-border);
}

.points-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.points-header h4 {
    color: var(--light-text);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.points-total {
    text-align: center;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    min-width: 120px;
}

.points-number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.points-label {
    font-size: 0.75rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.points-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.points-category {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: var(--radius);
    border: 1px solid var(--light-border);
    transition: all 0.3s ease;
}

.points-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.125rem;
}

.category-info {
    flex: 1;
}

.category-name {
    display: block;
    font-weight: 500;
    color: var(--light-text);
    margin-bottom: 0.25rem;
}

.category-points {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* Badges System */
.badges-container {
    background: var(--light-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--light-border);
}

.badges-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.badges-header h4 {
    color: var(--light-text);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badges-count {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.badge-item {
    text-align: center;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: var(--radius);
    border: 2px solid var(--light-border);
    transition: all 0.3s ease;
    cursor: pointer;
}

.badge-item.earned {
    border-color: var(--success-color);
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(76, 175, 80, 0.05) 100%);
}

.badge-item.locked {
    opacity: 0.5;
    filter: grayscale(100%);
}

.badge-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.badge-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    color: white;
}

.badge-item.earned .badge-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.badge-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--light-text);
    margin-bottom: 0.25rem;
}

.badge-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Achievements System */
.achievements-container {
    background: var(--light-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--light-border);
}

.achievements-header h4 {
    color: var(--light-text);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: var(--radius);
    border: 1px solid var(--light-border);
}

.achievement-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1rem;
}

.achievement-info {
    flex: 1;
}

.achievement-title {
    font-weight: 500;
    color: var(--light-text);
    margin-bottom: 0.5rem;
}

.achievement-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--light-border);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Leaderboard System */
.leaderboard-container {
    background: var(--light-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--light-border);
}

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.leaderboard-header h4 {
    color: var(--light-text);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.leaderboard-select {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--light-border);
    border-radius: var(--radius);
    background: var(--light-bg);
    color: var(--light-text);
    font-size: 0.875rem;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: var(--radius);
    border: 1px solid var(--light-border);
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    transform: translateX(4px);
}

.leaderboard-rank {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.875rem;
}

.leaderboard-item:nth-child(1) .leaderboard-rank {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
}

.leaderboard-item:nth-child(2) .leaderboard-rank {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #333;
}

.leaderboard-item:nth-child(3) .leaderboard-rank {
    background: linear-gradient(135deg, #cd7f32, #e6a85c);
    color: white;
}

.leaderboard-item:nth-child(n+4) .leaderboard-rank {
    background: var(--light-border);
    color: var(--text-secondary);
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-name {
    font-weight: 500;
    color: var(--light-text);
    margin-bottom: 0.25rem;
}

.leaderboard-score {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 600;
}

.leaderboard-points {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Dark Mode Styles for Gamification */
.dark-mode .gamification-section,
.dark-mode .points-container,
.dark-mode .badges-container,
.dark-mode .achievements-container,
.dark-mode .leaderboard-container {
    background: var(--dark-surface);
    border-color: var(--dark-border);
}

.dark-mode .gamification-header h3,
.dark-mode .points-header h4,
.dark-mode .badges-header h4,
.dark-mode .achievements-header h4,
.dark-mode .leaderboard-header h4 {
    color: var(--dark-text);
}

.dark-mode .points-category,
.dark-mode .badge-item,
.dark-mode .achievement-item,
.dark-mode .leaderboard-item {
    background: var(--dark-bg);
    border-color: var(--dark-border);
}

.dark-mode .category-name,
.dark-mode .badge-name,
.dark-mode .achievement-title,
.dark-mode .leaderboard-name {
    color: var(--dark-text);
}

.dark-mode .category-points,
.dark-mode .progress-text,
.dark-mode .leaderboard-score {
    color: var(--primary-color);
}

.dark-mode .badge-description,
.dark-mode .leaderboard-points {
    color: var(--dark-text-secondary);
}

/* Responsive Design for Gamification */
@media (max-width: 768px) {
    .gamification-header,
    .streak-header,
    .points-header,
    .badges-header,
    .leaderboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .streak-milestones {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .points-breakdown {
        grid-template-columns: 1fr;
    }
    
    .badges-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .achievement-item,
    .leaderboard-item {
        flex-direction: column;
        text-align: center;
    }
}

/* ===== FAMILY PROFILE STYLES ===== */
.family-profile-section {
    background: var(--light-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--light-border);
    box-shadow: var(--shadow-sm);
}

.family-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-border);
    flex-wrap: wrap;
    gap: 1rem;
}

.family-header h3 {
    color: var(--light-text);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.family-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Family Members Grid */
.family-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.family-member-card {
    background: var(--light-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--light-border);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.family-member-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 2rem;
    font-weight: 600;
}

.member-info {
    text-align: center;
}

.member-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--light-text);
    margin-bottom: 0.25rem;
}

.member-relation {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.member-age {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.member-bmi {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 0.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    margin-bottom: 1rem;
}

.member-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.healthy {
    background: var(--success-color);
}

.status-indicator.warning {
    background: var(--warning-color);
}

.status-indicator.danger {
    background: var(--danger-color);
}

.member-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.25rem;
}

.member-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--light-surface);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.member-action-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Family Modals */
.family-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.family-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--light-surface);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.family-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--light-border);
}

.family-modal-header h4 {
    color: var(--light-text);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.family-modal-body {
    padding: 1.5rem;
}

.family-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid var(--light-border);
}

/* Family Form Styles */
.family-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.family-form-group {
    margin-bottom: 1rem;
}

.family-form-group label {
    display: block;
    color: var(--light-text);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.family-form-group input,
.family-form-group select,
.family-form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--light-border);
    border-radius: var(--radius);
    background: var(--light-bg);
    color: var(--light-text);
    font-family: inherit;
    font-size: 0.875rem;
    transition: var(--transition);
}

.family-form-group input:focus,
.family-form-group select:focus,
.family-form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.family-form-group label input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

/* Member Detail Tabs */
.member-detail-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--light-border);
}

.member-detail-tabs .tab-btn {
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.member-detail-tabs .tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.member-detail-tabs .tab-btn:hover {
    color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Health Records Section */
.health-records-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.health-records-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.health-record-item {
    background: var(--light-bg);
    border-radius: var(--radius);
    padding: 1rem;
    border: 1px solid var(--light-border);
}

.record-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.record-type {
    font-weight: 600;
    color: var(--light-text);
    margin-bottom: 0.25rem;
}

.record-details {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* BMI History Section */
.bmi-chart-container {
    background: var(--light-bg);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--light-border);
    height: 300px;
}

.bmi-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.bmi-stat {
    background: var(--light-bg);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--light-border);
}

.bmi-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.bmi-stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Parent Tracking Section */
.tracking-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: var(--radius);
    border: 1px solid var(--light-border);
}

.tracking-settings {
    margin-bottom: 1.5rem;
}

.tracking-settings h6 {
    color: var(--light-text);
    font-weight: 600;
    margin-bottom: 1rem;
}

.tracking-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.tracking-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--light-text);
    cursor: pointer;
}

.tracking-log {
    max-height: 300px;
    overflow-y: auto;
    background: var(--light-bg);
    border-radius: var(--radius);
    border: 1px solid var(--light-border);
}

.tracking-log-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--light-border);
}

.tracking-log-item:last-child {
    border-bottom: none;
}

.log-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.log-activity {
    font-size: 0.875rem;
    color: var(--light-text);
}

/* Family Overview */
.family-overview {
    background: var(--light-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--light-border);
    box-shadow: var(--shadow-sm);
}

.overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-border);
}

.overview-header h4 {
    color: var(--light-text);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.family-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.family-stat-card {
    background: var(--light-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--light-border);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.family-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-info h5 {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light-text);
}

.family-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.chart-container {
    background: var(--light-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--light-border);
}

.chart-container h5 {
    color: var(--light-text);
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

/* Dark Mode for Family Profile */
.dark-mode .family-profile-section,
.dark-mode .family-overview {
    background: var(--dark-surface);
    border-color: var(--dark-border);
}

.dark-mode .family-header h3,
.dark-mode .overview-header h4 {
    color: var(--dark-text);
}

.dark-mode .family-member-card,
.dark-mode .family-stat-card,
.dark-mode .chart-container {
    background: var(--dark-bg);
    border-color: var(--dark-border);
}

.dark-mode .member-name,
.dark-mode .stat-value {
    color: var(--dark-text);
}

.dark-mode .family-modal-content {
    background: var(--dark-surface);
    border-color: var(--dark-border);
}

.dark-mode .family-modal-header {
    border-color: var(--dark-border);
}

.dark-mode .family-modal-header h4 {
    color: var(--dark-text);
}

.dark-mode .family-form-group label {
    color: var(--dark-text);
}

.dark-mode .family-form-group input,
.dark-mode .family-form-group select,
.dark-mode .family-form-group textarea {
    background: var(--dark-bg);
    border-color: var(--dark-border);
    color: var(--dark-text);
}

/* Responsive Design */
@media (max-width: 768px) {
    .family-header,
    .overview-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .family-members-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .family-form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .family-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .family-charts {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tracking-options {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .member-detail-tabs {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .member-detail-tabs .tab-btn {
        flex: 1;
        min-width: 80px;
        text-align: center;
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
    
    .family-member-card {
        padding: 1rem;
    }
    
    .member-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .member-name {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .member-relation,
    .member-age {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .member-bmi {
        font-size: 0.8rem;
        padding: 0.4rem;
        margin-bottom: 0.75rem;
    }
    
    .member-status {
        font-size: 0.75rem;
    }
    
    .member-actions {
        top: 0.5rem;
        right: 0.5rem;
    }
    
    .member-action-btn {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .family-modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 1rem;
    }
    
    .family-modal-header {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .family-modal-header h4 {
        font-size: 1.1rem;
    }
    
    .family-modal-body {
        padding: 1rem;
    }
    
    .family-modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .family-modal-footer .btn {
        width: 100%;
    }
    
    .family-form-group {
        margin-bottom: 0.75rem;
    }
    
    .family-form-group label {
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
    }
    
    .family-form-group input,
    .family-form-group select,
    .family-form-group textarea {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    .profile-detail-grid {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding: 0.5rem;
        background: var(--light-bg);
        border-radius: var(--radius);
    }
    
    .detail-item label {
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--text-secondary);
    }
    
    .detail-item span {
        font-size: 0.875rem;
        color: var(--light-text);
    }
    
    .health-record-item {
        padding: 0.75rem;
    }
    
    .record-date {
        font-size: 0.75rem;
    }
    
    .record-type {
        font-size: 0.875rem;
    }
    
    .record-details {
        font-size: 0.8rem;
    }
    
    .bmi-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .bmi-stat {
        padding: 0.75rem;
    }
    
    .bmi-stat-value {
        font-size: 1.25rem;
    }
    
    .bmi-stat-label {
        font-size: 0.75rem;
    }
    
    .tracking-controls {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .tracking-settings h6 {
        font-size: 0.875rem;
    }
    
    .tracking-log {
        max-height: 200px;
    }
    
    .tracking-log-item {
        padding: 0.5rem;
    }
    
    .log-time {
        font-size: 0.7rem;
    }
    
    .log-activity {
        font-size: 0.8rem;
    }
    
    .family-stat-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .chart-container {
        padding: 1rem;
    }
    
    .chart-container h5 {
        font-size: 0.875rem;
    }
    
    /* Responsive charts for mobile */
    .chart-container canvas {
        max-width: 100%;
        height: auto !important;
    }
    
    .bmi-chart-container,
    .family-bmi-chart,
    .family-age-chart {
        width: 100%;
        height: 250px !important;
    }
    
    @media (max-width: 480px) {
        .bmi-chart-container,
        .family-bmi-chart,
        .family-age-chart {
            height: 200px !important;
        }
    }
}

@media (max-width: 480px) {
    .family-profile-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .family-header h3 {
        font-size: 1.1rem;
    }
    
    .family-controls {
        width: 100%;
        justify-content: center;
    }
    
    .family-controls .btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
    
    .family-members-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .family-member-card {
        padding: 0.75rem;
    }
    
    .member-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .member-name {
        font-size: 0.9rem;
    }
    
    .member-relation,
    .member-age {
        font-size: 0.75rem;
    }
    
    .member-bmi {
        font-size: 0.75rem;
        padding: 0.3rem;
    }
    
    .member-status {
        font-size: 0.7rem;
    }
    
    .member-action-btn {
        width: 24px;
        height: 24px;
        font-size: 0.625rem;
    }
    
    .family-modal-content {
        width: 98%;
        margin: 0.5rem;
        max-height: 98vh;
    }
    
    .family-modal-header {
        padding: 0.75rem;
    }
    
    .family-modal-header h4 {
        font-size: 1rem;
    }
    
    .family-modal-body {
        padding: 0.75rem;
    }
    
    .family-modal-footer {
        padding: 0.75rem;
    }
    
    .family-form-group input,
    .family-form-group select,
    .family-form-group textarea {
        padding: 0.4rem;
        font-size: 0.8rem;
    }
    
    .member-detail-tabs .tab-btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.5rem;
        min-width: 70px;
    }
    
    .bmi-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .family-stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .tracking-options label {
        font-size: 0.8rem;
    }
    
    .detail-item {
        padding: 0.4rem;
    }
    
    .detail-item label {
        font-size: 0.7rem;
    }
    
    .detail-item span {
        font-size: 0.8rem;
    }
}

/* ===== LAB REPORT ANALYSIS ===== */
.lab-report-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8ea;
}

.lab-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.lab-report-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 700;
}

.lab-report-controls {
    display: flex;
    gap: 10px;
}

.lab-report-interface {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.lab-scanner-area {
    position: relative;
}

.lab-camera-preview {
    position: relative;
    width: 100%;
    height: 300px;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lab-camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

#lab-scan-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.lab-upload-area {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lab-upload-area:hover {
    background: #f0f8ff;
}

.lab-upload-placeholder {
    text-align: center;
    color: #6c757d;
}

.lab-upload-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #28a745;
}

.lab-upload-placeholder h5 {
    margin: 10px 0 5px 0;
    color: #2c3e50;
    font-weight: 600;
}

.lab-upload-placeholder p {
    margin: 0;
    font-size: 0.9rem;
}

.lab-scanner-controls-bottom {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.lab-analysis-results {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.lab-analysis-results h5 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lab-tests-list {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.lab-test-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    transition: all 0.3s ease;
}

.lab-test-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.lab-test-name {
    font-weight: 600;
    color: #2c3e50;
}

.lab-test-value {
    font-size: 0.9rem;
    color: #6c757d;
}

.lab-test-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.lab-test-status.normal {
    background: #d4edda;
    color: #155724;
}

.lab-test-status.abnormal {
    background: #f8d7da;
    color: #721c24;
}

.lab-test-status.critical {
    background: #f5c6cb;
    color: #721c24;
}

.lab-summary {
    margin-bottom: 20px;
}

.lab-summary-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #dee2e6;
}

.lab-summary-card h6 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.health-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    font-weight: 500;
}

.health-status.excellent {
    background: #d4edda;
    color: #155724;
}

.health-status.good {
    background: #cce5ff;
    color: #004085;
}

.health-status.fair {
    background: #fff3cd;
    color: #856404;
}

.health-status.poor {
    background: #f8d7da;
    color: #721c24;
}

.lab-analysis-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.lab-processing-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 1000;
}

.lab-processing-indicator .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #28a745;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.lab-processing-indicator p {
    margin: 0;
    color: #6c757d;
    font-weight: 500;
}

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

.lab-history-content {
    background: white;
    border-radius: 15px;
    padding: 25px;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
    width: 90%;
}

.lab-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.lab-history-header h4 {
    margin: 0;
    color: #2c3e50;
    font-weight: 700;
}

.lab-history-list {
    display: grid;
    gap: 15px;
}

.lab-history-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.lab-history-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.lab-date {
    font-weight: 600;
    color: #28a745;
    margin-bottom: 10px;
}

.lab-tests-summary {
    display: grid;
    gap: 5px;
    margin-bottom: 10px;
}

.lab-test-summary {
    font-size: 0.9rem;
    color: #495057;
    padding: 5px 0;
    border-bottom: 1px solid #dee2e6;
}

.lab-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Responsive Design for Lab Report */
@media (max-width: 992px) {
    .lab-report-interface {
        grid-template-columns: 1fr;
    }
    
    .lab-camera-preview {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .lab-report-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .lab-report-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .lab-camera-preview {
        height: 200px;
    }
    
    .lab-analysis-actions {
        flex-direction: column;
    }
    
    .lab-history-content {
        width: 95%;
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .lab-report-section {
        padding: 15px;
    }
    
    .lab-report-controls {
        width: 100%;
    }
    
    .lab-report-controls button {
        flex: 1;
        font-size: 0.8rem;
    }
    
    .lab-camera-preview {
        height: 180px;
    }
    
    .lab-upload-placeholder i {
        font-size: 2rem;
    }
    
    .lab-upload-placeholder h5 {
        font-size: 1rem;
    }
    
    .lab-upload-placeholder p {
        font-size: 0.8rem;
    }
}

/* ===== OCR PRESCRIPTION SCANNER ===== */
.prescription-scanner-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8ea;
}

.scanner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.scanner-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 700;
}

.scanner-controls {
    display: flex;
    gap: 10px;
}

.scanner-interface {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.scanner-area {
    position: relative;
}

.camera-preview {
    position: relative;
    width: 100%;
    height: 300px;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
}

#camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

#scan-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.upload-area {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    background: #f0f8ff;
}

.upload-placeholder {
    text-align: center;
    color: #6c757d;
}

.upload-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #007bff;
}

.upload-placeholder h5 {
    margin: 10px 0 5px 0;
    color: #2c3e50;
    font-weight: 600;
}

.upload-placeholder p {
    margin: 0;
    font-size: 0.9rem;
}

.scanner-controls-bottom {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.extraction-results {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.extraction-results h5 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.medicines-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.medicine-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
}

.medicine-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.medicine-name {
    font-weight: 600;
    color: #2c3e50;
}

.medicine-dosage {
    font-size: 0.9rem;
    color: #6c757d;
}

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

.medicine-actions button {
    padding: 4px 8px;
    font-size: 0.8rem;
    border-radius: 4px;
}

.extraction-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.processing-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 1000;
}

.processing-indicator .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.processing-indicator p {
    margin: 0;
    color: #6c757d;
    font-weight: 500;
}

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

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

.prescription-history-content {
    background: white;
    border-radius: 15px;
    padding: 25px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    width: 90%;
}

.prescription-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.prescription-history-header h4 {
    margin: 0;
    color: #2c3e50;
    font-weight: 700;
}

.prescription-history-list {
    display: grid;
    gap: 15px;
}

.prescription-history-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.prescription-history-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.prescription-date {
    font-weight: 600;
    color: #007bff;
    margin-bottom: 10px;
}

.prescription-medicines {
    display: grid;
    gap: 5px;
}

.prescription-medicine {
    font-size: 0.9rem;
    color: #495057;
    padding: 5px 0;
    border-bottom: 1px solid #dee2e6;
}

.prescription-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .scanner-interface {
        grid-template-columns: 1fr;
    }
    
    .camera-preview {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .scanner-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .scanner-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .camera-preview {
        height: 200px;
    }
    
    .extraction-actions {
        flex-direction: column;
    }
    
    .prescription-history-content {
        width: 95%;
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .prescription-scanner-section {
        padding: 15px;
    }
    
    .scanner-controls {
        width: 100%;
    }
    
    .scanner-controls button {
        flex: 1;
        font-size: 0.8rem;
    }
    
    .camera-preview {
        height: 180px;
    }
    
    .upload-placeholder i {
        font-size: 2rem;
    }
    
    .upload-placeholder h5 {
        font-size: 1rem;
    }
    
    .upload-placeholder p {
        font-size: 0.8rem;
    }
}

/* ===== AI DIET PLAN GENERATOR STYLES ===== */
.diet-plan-section {
    background: var(--light-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--light-border);
    box-shadow: var(--shadow-sm);
}

.diet-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-border);
    flex-wrap: wrap;
    gap: 1rem;
}

.diet-plan-header h3 {
    color: var(--light-text);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.diet-plan-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Diet Generator Form */
.diet-generator-form {
    background: var(--light-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--light-border);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: var(--light-text);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 1px solid var(--light-border);
    border-radius: var(--radius);
    background: var(--light-surface);
    color: var(--light-text);
    font-family: inherit;
    font-size: 0.875rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Diet Plan Display */
.diet-plan-display {
    background: var(--light-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--light-border);
}

.diet-plan-summary {
    margin-bottom: 2rem;
}

.diet-plan-summary h4 {
    color: var(--light-text);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.plan-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    background: var(--light-surface);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--light-border);
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 700;
}

/* Weekly Meal Plan */
.weekly-meal-plan {
    margin-bottom: 2rem;
}

.weekly-meal-plan h5 {
    color: var(--light-text);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meal-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.day-meal-plan {
    background: var(--light-surface);
    border-radius: var(--radius);
    padding: 1rem;
    border: 1px solid var(--light-border);
}

.day-header {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    text-align: center;
    font-size: 0.875rem;
}

.meal-section {
    margin-bottom: 0.75rem;
}

.meal-type {
    font-weight: 600;
    color: var(--light-text);
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
}

.meal-items {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.meal-items ul {
    margin: 0;
    padding-left: 1rem;
}

.meal-items li {
    margin-bottom: 0.25rem;
}

/* Shopping List */
.shopping-list h5 {
    color: var(--light-text);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.shopping-list-content {
    background: var(--light-surface);
    border-radius: var(--radius);
    padding: 1rem;
    border: 1px solid var(--light-border);
}

.shopping-category {
    margin-bottom: 1rem;
}

.shopping-category h6 {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.shopping-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.shopping-item {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    background: var(--light-bg);
    border-radius: var(--radius);
    border: 1px solid var(--light-border);
}

/* Dark Mode for Diet Plan */
.dark-mode .diet-plan-section,
.dark-mode .diet-plan-display {
    background: var(--dark-surface);
    border-color: var(--dark-border);
}

.dark-mode .diet-plan-header h3,
.dark-mode .diet-plan-summary h4,
.dark-mode .weekly-meal-plan h5,
.dark-mode .shopping-list h5 {
    color: var(--dark-text);
}

.dark-mode .diet-generator-form,
.dark-mode .stat-item,
.dark-mode .day-meal-plan,
.dark-mode .shopping-list-content {
    background: var(--dark-bg);
    border-color: var(--dark-border);
}

.dark-mode .form-group label {
    color: var(--dark-text);
}

.dark-mode .form-group input,
.dark-mode .form-group select {
    background: var(--dark-surface);
    border-color: var(--dark-border);
    color: var(--dark-text);
}

.dark-mode .day-header,
.dark-mode .meal-type {
    color: var(--primary-color);
}

.dark-mode .shopping-category h6 {
    color: var(--primary-color);
}

.dark-mode .shopping-item {
    background: var(--dark-surface);
    border-color: var(--dark-border);
    color: var(--text-secondary);
}

/* Responsive Design for Diet Plan */
@media (max-width: 768px) {
    .diet-plan-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .plan-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .meal-plan-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .day-meal-plan {
        padding: 0.75rem;
    }
    
    .shopping-items {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    
    .diet-generator-form {
        padding: 1rem;
    }
    
    .diet-plan-display {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .diet-plan-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .diet-plan-header h3 {
        font-size: 1.1rem;
    }
    
    .diet-plan-controls {
        width: 100%;
        justify-content: center;
    }
    
    .diet-plan-controls .btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
    
    .plan-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
    
    .day-meal-plan {
        padding: 0.5rem;
    }
    
    .day-header {
        font-size: 0.8rem;
    }
    
    .meal-type {
        font-size: 0.75rem;
    }
    
    .meal-items {
        font-size: 0.7rem;
    }
    
    .shopping-item {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

/* ===== MEDITATION MUSIC SECTION ===== */

/* ===== CHECK-IN MODAL STYLES ===== */
.modal-overlay {
    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: 10000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--light-surface);
    border-radius: var(--radius-lg);
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

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

.modal-header h3 {
    color: var(--light-text);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--light-border);
    color: var(--light-text);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.check-in-activities {
    margin-bottom: 1.5rem;
}

.activity-item {
    margin-bottom: 1rem;
}

.activity-item label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: var(--radius);
    transition: var(--transition);
    border: 1px solid transparent;
}

.activity-item label:hover {
    background: var(--light-bg);
    border-color: var(--light-border);
}

.activity-item input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary-color);
}

.activity-item span {
    color: var(--light-text);
    font-weight: 500;
}

.check-in-notes {
    margin-bottom: 1.5rem;
}

.check-in-notes label {
    display: block;
    color: var(--light-text);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.check-in-notes textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--light-border);
    border-radius: var(--radius);
    background: var(--light-bg);
    color: var(--light-text);
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
    transition: var(--transition);
}

.check-in-notes textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid var(--light-border);
}

/* Check-in button styling */
.check-in-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.check-in-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* Enhanced calendar day styling */
.calendar-day {
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.calendar-day:hover {
    transform: scale(1.15);
    z-index: 10;
}

.calendar-day.completed::after {
    content: '✓';
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 700;
}

/* Dark mode for modal */
.dark-mode .modal-content {
    background: var(--dark-surface);
    border-color: var(--dark-border);
}

.dark-mode .modal-header {
    border-color: var(--dark-border);
}

.dark-mode .modal-header h3 {
    color: var(--dark-text);
}

.dark-mode .modal-body p {
    color: var(--dark-text-secondary);
}

.dark-mode .activity-item label {
    color: var(--dark-text);
}

.dark-mode .activity-item label:hover {
    background: var(--dark-bg);
    border-color: var(--dark-border);
}

.dark-mode .check-in-notes label {
    color: var(--dark-text);
}

.dark-mode .check-in-notes textarea {
    background: var(--dark-bg);
    border-color: var(--dark-border);
    color: var(--dark-text);
}

.dark-mode .modal-footer {
    border-color: var(--dark-border);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 1rem;
        max-height: 90vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    .modal-header h3 {
        font-size: 1.125rem;
    }
    
    .activity-item label {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}
.meditation-music-section {
  background: var(--light-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--light-border);
  box-shadow: var(--shadow-sm);
}

.music-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.music-header h3 {
  color: var(--light-text);
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.music-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.music-search-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  background: var(--light-bg);
  color: var(--light-text);
  font-size: 0.875rem;
  min-width: 200px;
  transition: var(--transition);
}

.music-search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.music-category-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  background: var(--light-bg);
  color: var(--light-text);
  font-size: 0.875rem;
  transition: var(--transition);
}

.music-category-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

/* Music Player */
.music-player {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  color: white;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.music-player::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.track-info h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: white;
}

.track-info p {
  font-size: 0.875rem;
  opacity: 0.8;
  margin: 0;
  color: white;
}

.player-close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.player-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Visualizer */
.player-visualizer {
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.visualizer-bars {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 60px;
  gap: 4px;
}

.bar {
  width: 4px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 2px;
  animation: dance 1s ease-in-out infinite;
  transform-origin: bottom;
}

.bar:nth-child(1) { animation-delay: 0s; height: 20%; }
.bar:nth-child(2) { animation-delay: 0.1s; height: 40%; }
.bar:nth-child(3) { animation-delay: 0.2s; height: 60%; }
.bar:nth-child(4) { animation-delay: 0.3s; height: 30%; }
.bar:nth-child(5) { animation-delay: 0.4s; height: 50%; }
.bar:nth-child(6) { animation-delay: 0.5s; height: 70%; }
.bar:nth-child(7) { animation-delay: 0.6s; height: 40%; }
.bar:nth-child(8) { animation-delay: 0.7s; height: 60%; }
.bar:nth-child(9) { animation-delay: 0.8s; height: 30%; }
.bar:nth-child(10) { animation-delay: 0.9s; height: 50%; }
.bar:nth-child(11) { animation-delay: 1s; height: 70%; }
.bar:nth-child(12) { animation-delay: 1.1s; height: 40%; }

@keyframes dance {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.5); }
}

/* Progress Bar */
.player-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.time-current,
.time-total {
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  min-width: 40px;
}

.player-progress .progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
}

.player-progress .progress-fill {
  height: 100%;
  background: white;
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s ease;
}

/* Player Controls */
.player-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.control-btn {
  width: 48px;
  height: 48px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.125rem;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.control-btn.play-pause {
  width: 64px;
  height: 64px;
  background: white;
  color: var(--primary-color);
  font-size: 1.5rem;
}

.control-btn.play-pause:hover {
  background: rgba(255, 255, 255, 0.9);
}

.volume-btn {
  position: relative;
}

.volume-slider {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 0.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 10;
}

.volume-control {
  width: 120px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--primary-color);
  border-radius: 2px;
  outline: none;
}

.volume-control::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  cursor: pointer;
}

/* Player Effects */
.player-effects {
  display: flex;
  justify-content: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.effect-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
}

.effect-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.effect-btn.active {
  background: white;
  color: var(--primary-color);
}

/* Music Grid */
.music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem;
}

.music-grid::-webkit-scrollbar {
  width: 6px;
}

.music-grid::-webkit-scrollbar-track {
  background: var(--light-bg);
  border-radius: 3px;
}

.music-grid::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

.music-track {
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--light-border);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.music-track::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transform: scaleX(0);
  transition: var(--transition);
}

.music-track:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.music-track:hover::before {
  transform: scaleX(1);
}

.music-track-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}

.music-track-icon i {
  font-size: 1.25rem;
  color: white;
}

.music-track-title {
  color: var(--light-text);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.music-track-artist {
  color: var(--light-text-secondary);
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.music-track-duration {
  color: var(--light-text-secondary);
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.music-track-category {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.category-nature { background: var(--success-color); color: white; }
.category-ambient { background: var(--info-color); color: white; }
.category-classical { background: var(--warning-color); color: white; }
.category-binaural { background: var(--danger-color); color: white; }
.category-chakra { background: var(--secondary-color); color: white; }
.category-sleep { background: var(--primary-color); color: white; }
.category-focus { background: var(--info-color); color: white; }
.category-relaxation { background: var(--success-color); color: white; }

/* Sleep Timer Modal */
.sleep-timer-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.timer-modal-content {
  background: var(--light-surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.timer-modal-content h4 {
  color: var(--light-text);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.timer-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.timer-option {
  padding: 0.75rem;
  border: 2px solid var(--light-border);
  border-radius: var(--radius);
  background: var(--light-bg);
  color: var(--light-text);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.timer-option:hover {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: white;
}

.timer-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* Mobile Responsive - Meditation Music */
@media (max-width: 768px) {
  .music-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .music-controls {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .music-search-input,
  .music-category-select {
    width: 100%;
    min-width: auto;
  }
  
  .music-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    max-height: 300px;
  }
  
  .music-player {
    padding: 1rem;
  }
  
  .player-header {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  
  .visualizer-bars {
    height: 40px;
  }
  
  .bar {
    width: 3px;
  }
  
  .control-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .control-btn.play-pause {
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
  }
  
  .timer-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .meditation-music-section {
    padding: 1rem;
  }
  
  .music-header h3 {
    font-size: 1.125rem;
  }
  
  .music-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .music-track {
    padding: 0.75rem;
  }
  
  .music-track-icon {
    width: 40px;
    height: 40px;
  }
  
  .music-track-icon i {
    font-size: 1rem;
  }
  
  .music-track-title {
    font-size: 0.8125rem;
  }
  
  .player-controls {
    gap: 0.75rem;
  }
  
  .control-btn {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
  }
  
  .control-btn.play-pause {
    width: 48px;
    height: 48px;
    font-size: 1.125rem;
  }
  
  .effect-btn {
    width: 36px;
    height: 36px;
    font-size: 0.75rem;
  }
}

/* ===== BRAIN GAMES SECTION ===== */
.brain-games-section {
  background: var(--light-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--light-border);
  box-shadow: var(--shadow-sm);
}

.games-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.games-header h3 {
  color: var(--light-text);
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.games-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.games-search-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  background: var(--light-bg);
  color: var(--light-text);
  font-size: 0.875rem;
  min-width: 200px;
  transition: var(--transition);
}

.games-search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.games-category-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  background: var(--light-bg);
  color: var(--light-text);
  font-size: 0.875rem;
  transition: var(--transition);
}

.games-category-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem;
}

.games-grid::-webkit-scrollbar {
  width: 6px;
}

.games-grid::-webkit-scrollbar-track {
  background: var(--light-bg);
  border-radius: 3px;
}

.games-grid::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

.game-card {
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--light-border);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transform: scaleX(0);
  transition: var(--transition);
}

.game-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.game-card:hover::before {
  transform: scaleX(1);
}

.game-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}

.game-icon i {
  font-size: 1.25rem;
  color: white;
}

.game-title {
  color: var(--light-text);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.game-category {
  color: var(--light-text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.game-difficulty {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.game-difficulty.easy {
  background: var(--success-color);
  color: white;
}

.game-difficulty.medium {
  background: var(--warning-color);
  color: white;
}

.game-difficulty.hard {
  background: var(--danger-color);
  color: white;
}

/* Level Progress UI */
.level-progress {
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--light-border);
  box-shadow: var(--shadow-sm);
}

.level-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.level-text {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1.125rem;
}

.target-text {
  color: var(--light-text-secondary);
  font-size: 0.875rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--light-border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success-color), var(--primary-color));
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* Level Up Notification */
.level-up-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: var(--light-surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s ease;
  border: 2px solid var(--primary-color);
  min-width: 300px;
  text-align: center;
}

.level-up-notification.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.level-up-content h4 {
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.level-up-content i {
  font-size: 3rem;
  color: var(--warning-color);
  margin-bottom: 1rem;
  animation: starPulse 1s infinite;
}

.level-rewards {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.reward {
  background: var(--light-bg);
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  color: var(--light-text);
  border: 1px solid var(--light-border);
}

/* Enhanced Game UI */
.current-score {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.25rem;
}

@keyframes scoreUpdate {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); color: var(--success-color); }
  100% { transform: scale(1); }
}

@keyframes starPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Enhanced Game Areas - Responsive Design */
.memory-game,
.puzzle-game,
.logic-game,
.math-game,
.word-game,
.reaction-game {
  text-align: center;
  padding: 1rem;
  max-width: 100%;
  overflow-x: hidden;
}

.memory-game h4,
.puzzle-game h4,
.logic-game h4,
.math-game h4,
.word-game h4,
.reaction-game h4 {
  color: var(--light-text);
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 600;
  margin-bottom: clamp(0.5rem, 2vw, 1rem);
  line-height: 1.3;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: clamp(0.25rem, 1vw, 0.5rem);
  max-width: min(300px, 90vw);
  margin: clamp(0.5rem, 2vw, 1rem) auto;
  width: 100%;
}

.memory-card {
  aspect-ratio: 1;
  background: var(--light-bg);
  border: 2px solid var(--light-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--light-text);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: clamp(0.75rem, 2vw, 1rem);
  min-height: 50px;
  min-width: 50px;
}

.memory-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.puzzle-area {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: clamp(0.375rem, 1.5vw, 0.5rem);
  justify-content: center;
  margin-bottom: clamp(0.75rem, 3vw, 1rem);
  max-width: 100%;
}

.puzzle-piece {
  background: var(--primary-color);
  color: white;
  padding: clamp(0.5rem, 2vw, 0.75rem);
  border-radius: var(--radius);
  cursor: grab;
  transition: all 0.3s ease;
  user-select: none;
  font-size: clamp(0.75rem, 2vw, 1rem);
  min-width: 60px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.puzzle-piece:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.puzzle-piece:active {
  cursor: grabbing;
}

.puzzle-target {
  background: var(--light-bg);
  border: 2px dashed var(--light-border);
  border-radius: var(--radius);
  padding: clamp(0.75rem, 3vw, 1rem);
  margin-top: clamp(0.75rem, 3vw, 1rem);
  max-width: 100%;
}

.puzzle-slots-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: clamp(0.25rem, 1vw, 0.25rem);
  margin-top: 0.5rem;
}

.puzzle-slot {
  background: var(--light-bg);
  border: 2px solid var(--light-border);
  border-radius: var(--radius);
  padding: clamp(0.375rem, 1.5vw, 0.5rem);
  margin: clamp(0.125rem, 0.5vw, 0.25rem);
  min-height: clamp(35px, 8vw, 40px);
  min-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: clamp(0.6875rem, 2vw, 0.75rem);
  text-align: center;
  word-break: break-word;
}

.sequence-display {
  font-size: clamp(1rem, 4vw, 1.5rem);
  font-weight: 600;
  color: var(--primary-color);
  margin: clamp(0.75rem, 3vw, 1rem) 0;
  font-family: 'Courier New', monospace;
  line-height: 1.4;
  word-break: break-all;
  padding: 0 1rem;
}

.logic-input-area,
.math-area,
.word-area {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 2vw, 0.75rem);
  justify-content: center;
  align-items: center;
  margin: clamp(0.75rem, 3vw, 1rem) 0;
  padding: 0 1rem;
}

.logic-input,
.math-input,
.word-input {
  padding: clamp(0.5rem, 2vw, 0.75rem);
  border: 2px solid var(--light-border);
  border-radius: var(--radius);
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  min-width: clamp(120px, 30vw, 150px);
  max-width: 200px;
  text-align: center;
  transition: var(--transition);
  flex: 1;
}

.logic-input:focus,
.math-input:focus,
.word-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.hint-area {
  margin-top: clamp(0.75rem, 3vw, 1rem);
  padding: 0 1rem;
}

.hint-text {
  background: var(--warning-color);
  color: white;
  padding: clamp(0.5rem, 2vw, 0.75rem);
  border-radius: var(--radius);
  margin-top: 0.5rem;
  font-size: clamp(0.75rem, 2vw, 0.875rem);
  line-height: 1.4;
  max-width: 100%;
  word-wrap: break-word;
}

.scrambled-word {
  font-size: clamp(1rem, 4vw, 1.5rem);
  font-weight: 600;
  color: var(--primary-color);
  letter-spacing: clamp(0.1rem, 1vw, 0.25rem);
  margin: clamp(0.75rem, 3vw, 1rem) 0;
  font-family: 'Courier New', monospace;
  line-height: 1.4;
  word-break: break-all;
  padding: 0 1rem;
}

.reaction-area {
  position: relative;
  min-height: clamp(150px, 30vh, 200px);
  background: var(--light-bg);
  border: 2px solid var(--light-border);
  border-radius: var(--radius);
  margin: clamp(0.75rem, 3vw, 1rem) 0;
  overflow: hidden;
  max-width: 100%;
}

.target-btn {
  position: absolute;
  background: var(--danger-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: clamp(35px, 8vw, 50px);
  height: clamp(35px, 8vw, 50px);
  font-size: clamp(1rem, 3vw, 1.5rem);
  cursor: pointer;
  transition: all 0.3s ease;
  animation: targetPulse 2s infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.puzzle-piece:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.puzzle-piece:active {
  cursor: grabbing;
}

.puzzle-target {
  background: var(--light-bg);
  border: 2px dashed var(--light-border);
  border-radius: var(--radius);
  padding: clamp(0.75rem, 3vw, 1rem);
  margin-top: clamp(0.75rem, 3vw, 1rem);
  max-width: 100%;
}

.puzzle-slots-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: clamp(0.25rem, 1vw, 0.25rem);
  margin-top: 0.5rem;
}

.puzzle-slot {
  background: var(--light-bg);
  border: 2px solid var(--light-border);
  border-radius: var(--radius);
  padding: clamp(0.375rem, 1.5vw, 0.5rem);
  margin: clamp(0.125rem, 0.5vw, 0.25rem);
  min-height: clamp(35px, 8vw, 40px);
  min-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: clamp(0.6875rem, 2vw, 0.75rem);
  text-align: center;
  word-break: break-word;
}

.sequence-display {
  font-size: clamp(1rem, 4vw, 1.5rem);
  font-weight: 600;
  color: var(--primary-color);
  margin: clamp(0.75rem, 3vw, 1rem) 0;
  font-family: 'Courier New', monospace;
  line-height: 1.4;
  word-break: break-all;
  padding: 0 1rem;
}

.logic-input-area,
.math-area,
.word-area {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 2vw, 0.75rem);
  justify-content: center;
  align-items: center;
  margin: clamp(0.75rem, 3vw, 1rem) 0;
  padding: 0 1rem;
}

.logic-input,
.math-input,
.word-input {
  padding: clamp(0.5rem, 2vw, 0.75rem);
  border: 2px solid var(--light-border);
  border-radius: var(--radius);
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  min-width: clamp(120px, 30vw, 150px);
  max-width: 200px;
  text-align: center;
  transition: var(--transition);
  flex: 1;
}

.logic-input:focus,
.math-input:focus,
.word-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.hint-area {
  margin-top: clamp(0.75rem, 3vw, 1rem);
  padding: 0 1rem;
}

.hint-text {
  background: var(--warning-color);
  color: white;
  padding: clamp(0.5rem, 2vw, 0.75rem);
  border-radius: var(--radius);
  margin-top: 0.5rem;
  font-size: clamp(0.75rem, 2vw, 0.875rem);
  line-height: 1.4;
  max-width: 100%;
  word-wrap: break-word;
}

.scrambled-word {
  font-size: clamp(1rem, 4vw, 1.5rem);
  font-weight: 600;
  color: var(--primary-color);
  letter-spacing: clamp(0.1rem, 1vw, 0.25rem);
  margin: clamp(0.75rem, 3vw, 1rem) 0;
  font-family: 'Courier New', monospace;
  line-height: 1.4;
  word-break: break-all;
  padding: 0 1rem;
}

.reaction-area {
  position: relative;
  min-height: clamp(150px, 30vh, 200px);
  background: var(--light-bg);
  border: 2px solid var(--light-border);
  border-radius: var(--radius);
  margin: clamp(0.75rem, 3vw, 1rem) 0;
  overflow: hidden;
  max-width: 100%;
}

.target-btn {
  position: absolute;
  background: var(--danger-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: clamp(35px, 8vw, 50px);
  height: clamp(35px, 8vw, 50px);
  font-size: clamp(1rem, 3vw, 1.5rem);
  cursor: pointer;
  transition: all 0.3s ease;
  animation: targetPulse 2s infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.target-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

/* Game Area Responsive Enhancements - Centered Content */
.game-area {
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: clamp(0.75rem, 3vw, 2rem);
  margin-bottom: clamp(0.75rem, 3vw, 1.5rem);
  min-height: clamp(200px, 40vh, 300px);
  border: 1px solid var(--light-border);
  overflow-x: auto;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.game-area::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.game-area::-webkit-scrollbar-track {
  background: var(--light-bg);
  border-radius: 3px;
}

.game-area::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

/* Enhanced Game Areas - Responsive Design - Centered */
.memory-game,
.puzzle-game,
.logic-game,
.math-game,
.word-game,
.reaction-game {
  text-align: center;
  padding: 1rem;
  max-width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.memory-game h4,
.puzzle-game h4,
.logic-game h4,
.math-game h4,
.word-game h4,
.reaction-game h4 {
  color: var(--light-text);
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 600;
  margin-bottom: clamp(0.5rem, 2vw, 1rem);
  line-height: 1.3;
  text-align: center;
  width: 100%;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: clamp(0.25rem, 1vw, 0.5rem);
  max-width: min(300px, 90vw);
  margin: clamp(0.5rem, 2vw, 1rem) auto;
  width: 100%;
  justify-content: center;
  align-items: center;
}

.memory-card {
  aspect-ratio: 1;
  background: var(--light-bg);
  border: 2px solid var(--light-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--light-text);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: clamp(0.75rem, 2vw, 1rem);
  min-height: 50px;
  min-width: 50px;
  text-align: center;
}

.memory-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.puzzle-area {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: clamp(0.375rem, 1.5vw, 0.5rem);
  justify-content: center;
  align-items: center;
  margin-bottom: clamp(0.75rem, 3vw, 1rem);
  max-width: 100%;
  width: 100%;
}

.puzzle-piece {
  background: var(--primary-color);
  color: white;
  padding: clamp(0.5rem, 2vw, 0.75rem);
  border-radius: var(--radius);
  cursor: grab;
  transition: all 0.3s ease;
  user-select: none;
  font-size: clamp(0.75rem, 2vw, 1rem);
  min-width: 60px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: center;
}

.puzzle-piece:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.puzzle-piece:active {
  cursor: grabbing;
}

.puzzle-target {
  background: var(--light-bg);
  border: 2px dashed var(--light-border);
  border-radius: var(--radius);
  padding: clamp(0.75rem, 3vw, 1rem);
  margin-top: clamp(0.75rem, 3vw, 1rem);
  max-width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.puzzle-slots-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: clamp(0.25rem, 1vw, 0.25rem);
  margin-top: 0.5rem;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.puzzle-slot {
  background: var(--light-bg);
  border: 2px solid var(--light-border);
  border-radius: var(--radius);
  padding: clamp(0.375rem, 1.5vw, 0.5rem);
  margin: clamp(0.125rem, 0.5vw, 0.25rem);
  min-height: clamp(35px, 8vw, 40px);
  min-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: clamp(0.6875rem, 2vw, 0.75rem);
  text-align: center;
  word-break: break-word;
}

.sequence-display {
  font-size: clamp(1rem, 4vw, 1.5rem);
  font-weight: 600;
  color: var(--primary-color);
  margin: clamp(0.75rem, 3vw, 1rem) 0;
  font-family: 'Courier New', monospace;
  line-height: 1.4;
  word-break: break-all;
  padding: 0 1rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.logic-input-area,
.math-area,
.word-area {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 2vw, 0.75rem);
  justify-content: center;
  align-items: center;
  margin: clamp(0.75rem, 3vw, 1rem) 0;
  padding: 0 1rem;
  width: 100%;
  text-align: center;
}

.logic-input,
.math-input,
.word-input {
  padding: clamp(0.5rem, 2vw, 0.75rem);
  border: 2px solid var(--light-border);
  border-radius: var(--radius);
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  min-width: clamp(120px, 30vw, 150px);
  max-width: 200px;
  text-align: center;
  transition: var(--transition);
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logic-input:focus,
.math-input:focus,
.word-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.hint-area {
  margin-top: clamp(0.75rem, 3vw, 1rem);
  padding: 0 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.hint-text {
  background: var(--warning-color);
  color: white;
  padding: clamp(0.5rem, 2vw, 0.75rem);
  border-radius: var(--radius);
  margin-top: 0.5rem;
  font-size: clamp(0.75rem, 2vw, 0.875rem);
  line-height: 1.4;
  max-width: 100%;
  word-wrap: break-word;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scrambled-word {
  font-size: clamp(1rem, 4vw, 1.5rem);
  font-weight: 600;
  color: var(--primary-color);
  letter-spacing: clamp(0.1rem, 1vw, 0.25rem);
  margin: clamp(0.75rem, 3vw, 1rem) 0;
  font-family: 'Courier New', monospace;
  line-height: 1.4;
  word-break: break-all;
  padding: 0 1rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.reaction-area {
  position: relative;
  min-height: clamp(150px, 30vh, 200px);
  background: var(--light-bg);
  border: 2px solid var(--light-border);
  border-radius: var(--radius);
  margin: clamp(0.75rem, 3vw, 1rem) 0;
  overflow: hidden;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.target-btn {
  position: absolute;
  background: var(--danger-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: clamp(35px, 8vw, 50px);
  height: clamp(35px, 8vw, 50px);
  font-size: clamp(1rem, 3vw, 1.5rem);
  cursor: pointer;
  transition: all 0.3s ease;
  animation: targetPulse 2s infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  text-align: center;
}

.target-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

/* Mobile Centered Game Areas */
@media (max-width: 768px) {
  .game-area {
    padding: clamp(0.5rem, 2vw, 1rem);
    align-items: center;
    justify-content: center;
  }
  
  .memory-grid {
    justify-content: center;
    align-items: center;
  }
  
  .puzzle-area {
    justify-content: center;
    align-items: center;
  }
  
  .puzzle-slots-container {
    justify-content: center;
    align-items: center;
  }
  
  .sequence-display,
  .scrambled-word {
    justify-content: center;
    align-items: center;
    padding: 0 0.5rem;
  }
  
  .logic-input-area,
  .math-area,
  .word-area {
    justify-content: center;
    align-items: center;
    padding: 0 0.5rem;
  }
  
  .hint-area {
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .game-area {
    padding: clamp(0.375rem, 1.5vw, 0.75rem);
    align-items: center;
    justify-content: center;
  }
  
  .memory-grid {
    justify-content: center;
    align-items: center;
  }
  
  .puzzle-area {
    justify-content: center;
    align-items: center;
  }
  
  .puzzle-slots-container {
    justify-content: center;
    align-items: center;
  }
  
  .sequence-display,
  .scrambled-word {
    justify-content: center;
    align-items: center;
    padding: 0 0.25rem;
  }
  
  .logic-input-area,
  .math-area,
  .word-area {
    justify-content: center;
    align-items: center;
  }
  
  .hint-area {
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 360px) {
  .game-area {
    padding: 0.5rem;
    align-items: center;
    justify-content: center;
  }
  
  .memory-grid {
    justify-content: center;
    align-items: center;
  }
  
  .puzzle-area {
    justify-content: center;
    align-items: center;
  }
  
  .puzzle-slots-container {
    justify-content: center;
    align-items: center;
  }
  
  .sequence-display,
  .scrambled-word {
    justify-content: center;
    align-items: center;
    padding: 0 0.25rem;
  }
  
  .logic-input-area,
  .math-area,
  .word-area {
    justify-content: center;
    align-items: center;
  }
  
  .hint-area {
    align-items: center;
    justify-content: center;
  }
}

/* Landscape Mobile - Centered Controls */
@media (max-width: 768px) and (orientation: landscape) {
  .game-controls {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: clamp(0.5rem, 2vw, 0.75rem);
    padding: 0.75rem 1rem;
  }
  
  .game-controls .btn {
    flex: 0 1 auto;
    min-width: clamp(90px, 18vw, 120px);
    max-width: 150px;
  }
}

/* Extra Small Screens */
@media (max-width: 320px) {
  .game-controls {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    width: 100%;
  }
  
  .game-controls .btn {
    flex: 1;
    width: 100%;
    max-width: none;
    min-width: auto;
    padding: 0.625rem 0.875rem;
    font-size: 0.75rem;
  }
}

/* Responsive Breakpoints for Game Areas */
@media (max-width: 768px) {
  .memory-grid {
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    max-width: min(250px, 85vw);
  }
  
  .puzzle-area {
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  }
  
  .puzzle-slots-container {
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  }
  
  .sequence-display,
  .scrambled-word {
    font-size: clamp(0.875rem, 3vw, 1.125rem);
    padding: 0 0.5rem;
  }
  
  .logic-input-area,
  .math-area,
  .word-area {
    padding: 0 0.5rem;
  }
  
  .logic-input,
  .math-input,
  .word-input {
    min-width: clamp(100px, 25vw, 120px);
  }
  
  .reaction-area {
    min-height: clamp(120px, 25vh, 180px);
  }
  
  .target-btn {
    width: clamp(30px, 7vw, 40px);
    height: clamp(30px, 7vw, 40px);
    font-size: clamp(0.875rem, 2.5vw, 1.25rem);
  }
}

@media (max-width: 480px) {
  .memory-grid {
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    max-width: min(200px, 80vw);
    gap: 0.25rem;
  }
  
  .memory-card {
    font-size: clamp(0.625rem, 2vw, 0.75rem);
    min-height: 40px;
    min-width: 40px;
  }
  
  .puzzle-area {
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    gap: 0.25rem;
  }
  
  .puzzle-piece {
    padding: clamp(0.375rem, 1.5vw, 0.5rem);
    font-size: clamp(0.625rem, 2vw, 0.75rem);
    min-width: 45px;
  }
  
  .puzzle-slots-container {
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
  }
  
  .puzzle-slot {
    padding: 0.25rem;
    font-size: clamp(0.5625rem, 1.5vw, 0.6875rem);
    min-height: 30px;
    min-width: 40px;
  }
  
  .sequence-display,
  .scrambled-word {
    font-size: clamp(0.75rem, 2.5vw, 1rem);
    letter-spacing: 0.05rem;
    padding: 0 0.25rem;
  }
  
  .logic-input,
  .math-input,
  .word-input {
    min-width: clamp(80px, 20vw, 100px);
    padding: 0.5rem;
  }
  
  .reaction-area {
    min-height: clamp(100px, 20vh, 150px);
  }
  
  .target-btn {
    width: clamp(25px, 6vw, 35px);
    height: clamp(25px, 6vw, 35px);
    font-size: clamp(0.75rem, 2vw, 1rem);
  }
}

@media (max-width: 360px) {
  .memory-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 160px;
  }
  
  .puzzle-area {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .puzzle-slots-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .game-controls {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .game-controls .btn {
    width: 100%;
    max-width: none;
  }
}

/* Landscape Optimizations */
@media (max-width: 768px) and (orientation: landscape) {
  .game-area {
    min-height: clamp(120px, 25vh, 180px);
    padding: clamp(0.5rem, 2vw, 1rem);
  }
  
  .memory-grid {
    max-width: 200px;
  }
  
  .reaction-area {
    min-height: clamp(80px, 20vh, 120px);
  }
  
  .level-progress {
    padding: 0.5rem;
  }
}

@keyframes targetPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Mobile Responsive - Enhanced Games */
@media (max-width: 768px) {
  .memory-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 250px;
  }
  
  .level-info {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  
  .level-rewards {
    flex-direction: column;
    align-items: center;
  }
  
  .logic-input-area,
  .math-area,
  .word-area {
    flex-direction: column;
  }
  
  .sequence-display,
  .scrambled-word {
    font-size: 1.25rem;
  }
  
  .target-btn {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .memory-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 200px;
  }
  
  .level-up-notification {
    min-width: 250px;
    padding: 1.5rem;
  }
  
  .puzzle-piece {
    padding: 0.5rem;
    font-size: 0.875rem;
  }
  
  .sequence-display,
  .scrambled-word {
    font-size: 1rem;
    letter-spacing: 0.1rem;
  }
}

/* Game Modal */
.game-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.game-modal-content {
  background: var(--light-surface);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.game-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--light-border);
}

.game-modal-header h3 {
  color: var(--light-text);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.game-modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--light-bg);
  border-radius: var(--radius);
  color: var(--light-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--light-border);
}

.game-modal-close:hover {
  background: var(--danger-color);
  color: white;
  border-color: var(--danger-color);
}

.game-modal-body {
  padding: 1.5rem;
}

.game-info {
  margin-bottom: 1.5rem;
}

.game-info p {
  color: var(--light-text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.game-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--light-text-secondary);
  font-size: 0.875rem;
}

.stat-item i {
  color: var(--primary-color);
}

.game-area {
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--light-border);
}

.game-controls {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Mobile Responsive - Brain Games */
@media (max-width: 768px) {
  .games-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .games-controls {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .games-search-input,
  .games-category-select {
    width: 100%;
    min-width: auto;
  }
  
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    max-height: 350px;
    gap: 0.75rem;
  }
  
  .game-card {
    padding: 0.75rem;
  }
  
  .game-icon {
    width: 40px;
    height: 40px;
  }
  
  .game-icon i {
    font-size: 1rem;
  }
  
  .game-title {
    font-size: 0.8125rem;
  }
  
  .game-modal-content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
    border-radius: var(--radius);
  }
  
  .game-modal-header {
    padding: 1rem;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  
  .game-modal-header h3 {
    font-size: 1.25rem;
  }
  
  .game-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
  }
  
  .game-modal-body {
    padding: 1rem;
  }
  
  .game-stats {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }
  
  .stat-item {
    justify-content: center;
    font-size: 0.8125rem;
  }
  
  .game-area {
    padding: 1rem;
    min-height: 250px;
  }
  
  .game-controls {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .game-controls .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Enhanced Game Areas - Mobile */
  .memory-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 250px;
    gap: 0.375rem;
  }
  
  .memory-card {
    font-size: 0.875rem;
  }
  
  .level-info {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  
  .level-rewards {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  .logic-input-area,
  .math-area,
  .word-area {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .logic-input,
  .math-input,
  .word-input {
    width: 100%;
    min-width: auto;
  }
  
  .sequence-display,
  .scrambled-word {
    font-size: 1.125rem;
    word-break: break-all;
  }
  
  .puzzle-area {
    gap: 0.375rem;
  }
  
  .puzzle-piece {
    padding: 0.5rem;
    font-size: 0.875rem;
  }
  
  .puzzle-target {
    padding: 0.75rem;
  }
  
  .puzzle-slot {
    padding: 0.375rem;
    font-size: 0.75rem;
    min-height: 35px;
  }
  
  .reaction-area {
    min-height: 180px;
  }
  
  .target-btn {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
  
  .level-up-notification {
    min-width: 280px;
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .level-up-content h4 {
    font-size: 1.25rem;
  }
  
  .level-up-content i {
    font-size: 2.5rem;
  }
  
  .reward {
    font-size: 0.6875rem;
    padding: 0.375rem 0.75rem;
  }
}

@media (max-width: 480px) {
  .brain-games-section {
    padding: 1rem;
  }
  
  .games-header h3 {
    font-size: 1.125rem;
  }
  
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    max-height: 300px;
  }
  
  .game-card {
    padding: 0.5rem;
  }
  
  .game-icon {
    width: 35px;
    height: 35px;
  }
  
  .game-icon i {
    font-size: 0.875rem;
  }
  
  .game-title {
    font-size: 0.75rem;
    line-height: 1.1;
  }
  
  .game-category {
    font-size: 0.6875rem;
  }
  
  .game-difficulty {
    font-size: 0.5625rem;
    padding: 0.1875rem 0.375rem;
  }
  
  .game-modal-content {
    margin: 0.5rem;
    max-height: calc(100vh - 1rem);
    border-radius: var(--radius);
  }
  
  .game-modal-header {
    padding: 0.75rem;
  }
  
  .game-modal-header h3 {
    font-size: 1.125rem;
  }
  
  .game-modal-close {
    width: 32px;
    height: 32px;
    top: 0.75rem;
    right: 0.75rem;
  }
  
  .game-modal-body {
    padding: 0.75rem;
  }
  
  .game-info p {
    font-size: 0.875rem;
  }
  
  .stat-item {
    font-size: 0.75rem;
  }
  
  .game-area {
    padding: 0.75rem;
    min-height: 200px;
  }
  
  .game-controls {
    gap: 0.375rem;
  }
  
  .game-controls .btn {
    padding: 0.5rem;
    font-size: 0.875rem;
  }
  
  /* Enhanced Game Areas - Small Mobile */
  .memory-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 200px;
    gap: 0.25rem;
  }
  
  .memory-card {
    font-size: 0.75rem;
    aspect-ratio: 1;
  }
  
  .level-progress {
    padding: 0.75rem;
  }
  
  .level-text {
    font-size: 1rem;
  }
  
  .target-text {
    font-size: 0.75rem;
  }
  
  .progress-bar {
    height: 6px;
  }
  
  .sequence-display,
  .scrambled-word {
    font-size: 1rem;
    letter-spacing: 0.05rem;
    line-height: 1.4;
  }
  
  .puzzle-area {
    gap: 0.25rem;
  }
  
  .puzzle-piece {
    padding: 0.375rem;
    font-size: 0.75rem;
  }
  
  .puzzle-target {
    padding: 0.5rem;
  }
  
  .puzzle-slot {
    padding: 0.25rem;
    font-size: 0.6875rem;
    min-height: 30px;
  }
  
  .reaction-area {
    min-height: 150px;
  }
  
  .target-btn {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
  
  .hint-text {
    font-size: 0.75rem;
    padding: 0.5rem;
  }
  
  .level-up-notification {
    min-width: 250px;
    padding: 1rem;
    margin: 0.5rem;
  }
  
  .level-up-content h4 {
    font-size: 1.125rem;
  }
  
  .level-up-content i {
    font-size: 2rem;
  }
  
  .reward {
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
  }
}

/* Touch Optimizations */
@media (hover: none) and (pointer: coarse) {
  .game-card {
    transform: none;
  }
  
  .game-card:active {
    transform: scale(0.95);
  }
  
  .memory-card {
    transform: none;
  }
  
  .memory-card:active {
    transform: scale(0.95);
  }
  
  .puzzle-piece {
    transform: none;
  }
  
  .puzzle-piece:active {
    transform: scale(0.95);
  }
  
  .target-btn {
    transform: none;
  }
  
  .target-btn:active {
    transform: scale(0.9);
  }
  
  .game-controls .btn {
    transform: none;
  }
  
  .game-controls .btn:active {
    transform: scale(0.95);
  }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .games-grid {
    max-height: 250px;
  }
  
  .game-modal-content {
    max-height: calc(100vh - 1rem);
  }
  
  .game-area {
    min-height: 150px;
  }
  
  .memory-grid {
    max-width: 200px;
  }
  
  .reaction-area {
    min-height: 120px;
  }
  
  .level-up-notification {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    max-width: 400px;
  }
  
  .level-up-notification.show {
    transform: translateX(-50%) scale(1);
  }
}

/* Small Screen Optimizations */
@media (max-width: 360px) {
  .games-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .game-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
  }
  
  .game-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }
  
  .game-content {
    flex: 1;
  }
  
  .game-title {
    font-size: 0.875rem;
  }
  
  .game-category {
    font-size: 0.75rem;
  }
  
  .game-difficulty {
    font-size: 0.625rem;
  }
}

/* ===== PREDICTIVE ANALYTICS ===== */
.analytics-section {
  background: var(--light-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--light-border);
}

.analytics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.analytics-header h3 {
  color: var(--light-text);
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.analytics-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.analytics-card {
  background: var(--light-surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--light-border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.analytics-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.analytics-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.analytics-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.analytics-icon i {
  font-size: 1.25rem;
  color: white;
}

.analytics-content h4 {
  color: var(--light-text);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.risk-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
}

.score-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
}

.score-label {
  font-size: 0.75rem;
  color: var(--light-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

.confidence-indicator {
  font-size: 0.75rem;
  color: var(--light-text-secondary);
  margin-top: 0.5rem;
  text-align: center;
}

.risk-indicator {
  width: 100%;
  height: 8px;
  background: var(--light-border);
  border-radius: 4px;
  overflow: hidden;
}

.risk-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--success-color), var(--warning-color), var(--danger-color));
  transition: width 1s ease;
  border-radius: 4px;
}

/* ML Accuracy Display */
.accuracy-metrics {
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 1rem;
  border: 1px solid var(--light-border);
}

.accuracy-metrics h6 {
  color: var(--light-text);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.accuracy-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--light-border);
}

.accuracy-item:last-child {
  border-bottom: none;
}

.model-name {
  color: var(--light-text-secondary);
  font-size: 0.8125rem;
}

.accuracy-score {
  color: var(--success-color);
  font-weight: 600;
  font-size: 0.8125rem;
}

/* ML Model Performance Indicators */
.ml-performance {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.performance-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.performance-badge.high-accuracy {
  background: var(--success-color);
  color: white;
}

.performance-badge.medium-accuracy {
  background: var(--warning-color);
  color: white;
}

.performance-badge.low-accuracy {
  background: var(--danger-color);
  color: white;
}

.prediction-results,
.preventive-actions {
  background: var(--light-surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid var(--light-border);
}

.prediction-results h4,
.preventive-actions h4 {
  color: var(--light-text);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.results-content {
  color: var(--light-text-secondary);
  line-height: 1.6;
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.action-card {
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--light-border);
  border-left: 4px solid var(--primary-color);
}

.action-card h5 {
  color: var(--light-text);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.action-card p {
  color: var(--light-text-secondary);
  font-size: 0.8125rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.action-card .priority {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.priority.high {
  background: var(--danger-color);
  color: white;
}

.priority.medium {
  background: var(--warning-color);
  color: white;
}

.priority.low {
  background: var(--success-color);
  color: white;
}

/* Risk Level Colors */
.risk-low .score-value {
  color: var(--success-color);
}

.risk-medium .score-value {
  color: var(--warning-color);
}

.risk-high .score-value {
  color: var(--danger-color);
}

.risk-critical .score-value {
  color: #d32f2f;
}

/* Mobile Responsive - Analytics */
@media (max-width: 768px) {
  .analytics-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .analytics-controls {
    width: 100%;
    justify-content: flex-start;
  }
  
  .analytics-grid {
    grid-template-columns: 1fr;
  }
  
  .score-value {
    font-size: 1.5rem;
  }
  
  .actions-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .analytics-section {
    padding: 1rem;
  }
  
  .analytics-card {
    padding: 1rem;
  }
  
  .analytics-icon {
    width: 40px;
    height: 40px;
  }
  
  .analytics-icon i {
    font-size: 1rem;
  }
  
  .score-value {
    font-size: 1.25rem;
  }
}
#exercise-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

#exercise-modal .modal-content {
  background: var(--light-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-height: 90vh;
  overflow-y: auto;
  margin: 20px;
  position: relative;
}

.exercise-modal-content {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.exercise-modal-visual {
  flex: 0 0 200px;
}

.exercise-visual-large {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.exercise-visual-large::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 3s infinite;
}

.exercise-visual-large i {
  font-size: 4rem;
  color: white;
  z-index: 1;
  position: relative;
}

.exercise-modal-info {
  flex: 1;
  min-width: 0;
}

.exercise-meta {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.exercise-difficulty {
  padding: 0.25rem 0.75rem;
  background: var(--secondary-color);
  color: white;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.exercise-duration {
  padding: 0.25rem 0.75rem;
  background: var(--success-color);
  color: white;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.exercise-instructions,
.exercise-tips,
.exercise-benefits,
.exercise-variations {
  margin-bottom: 1.5rem;
}

.exercise-instructions h5,
.exercise-tips h5,
.exercise-benefits h5,
.exercise-variations h5 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.exercise-instructions ol,
.exercise-tips ul,
.exercise-benefits ul,
.exercise-variations ul {
  margin: 0;
  padding-left: 1.5rem;
  color: var(--light-text-secondary);
  line-height: 1.6;
}

.exercise-instructions li,
.exercise-tips li,
.exercise-benefits li,
.exercise-variations li {
  margin-bottom: 0.5rem;
}

.exercise-instructions li:last-child,
.exercise-tips li:last-child,
.exercise-benefits li:last-child,
.exercise-variations li:last-child {
  margin-bottom: 0;
}

.exercise-timer-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--light-surface);
  border-radius: var(--radius);
  border: 1px solid var(--light-border);
}

.exercise-timer-section h5 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timer-display {
  text-align: center;
  margin-bottom: 1rem;
}

#timer-time {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  font-family: 'Courier New', monospace;
  background: var(--light-bg);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: 2px solid var(--primary-color);
  display: inline-block;
  min-width: 120px;
}

.timer-controls {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.timer-progress {
  margin-top: 0.5rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--light-border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 4px;
}

/* Exercise Modal Responsive Design */
@media (max-width: 1024px) {
  .exercise-modal-content {
    gap: 1.5rem;
  }
  
  .exercise-modal-visual {
    flex: 0 0 180px;
  }
  
  .exercise-visual-large {
    width: 180px;
    height: 180px;
  }
  
  .exercise-visual-large i {
    font-size: 3.5rem;
  }
}

@media (max-width: 768px) {
  .exercise-modal-content {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }
  
  .exercise-modal-visual {
    flex: none;
    align-self: center;
  }
  
  .exercise-visual-large {
    width: 150px;
    height: 150px;
  }
  
  .exercise-visual-large i {
    font-size: 3rem;
  }
  
  .exercise-meta {
    justify-content: center;
    gap: 0.5rem;
  }
  
  .exercise-modal-info h4 {
    text-align: center;
    font-size: 1.25rem;
  }
  
  .exercise-modal-info p {
    text-align: center;
    font-size: 0.9rem;
  }
  
  .exercise-instructions h5,
  .exercise-tips h5,
  .exercise-benefits h5,
  .exercise-variations h5 {
    font-size: 0.9375rem;
    text-align: center;
  }
  
  .exercise-instructions ol,
  .exercise-tips ul,
  .exercise-benefits ul,
  .exercise-variations ul {
    padding-left: 1.25rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .exercise-modal-content {
    gap: 1rem;
  }
  
  .exercise-visual-large {
    width: 120px;
    height: 120px;
  }
  
  .exercise-visual-large i {
    font-size: 2.5rem;
  }
  
  .exercise-meta {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  .exercise-modal-info h4 {
    font-size: 1.125rem;
  }
  
  .exercise-modal-info p {
    font-size: 0.875rem;
  }
  
  .exercise-instructions h5,
  .exercise-tips h5,
  .exercise-benefits h5,
  .exercise-variations h5 {
    font-size: 0.875rem;
  }
  
  .exercise-instructions ol,
  .exercise-tips ul,
  .exercise-benefits ul,
  .exercise-variations ul {
    padding-left: 1rem;
    font-size: 0.8125rem;
  }
  
  .exercise-instructions li,
  .exercise-tips li,
  .exercise-benefits li,
  .exercise-variations li {
    margin-bottom: 0.375rem;
  }
}

@media (max-width: 360px) {
  .exercise-visual-large {
    width: 100px;
    height: 100px;
  }
  
  .exercise-visual-large i {
    font-size: 2rem;
  }
  
  .exercise-modal-info h4 {
    font-size: 1rem;
  }
  
  .exercise-modal-info p {
    font-size: 0.8125rem;
  }
  
  .exercise-instructions h5,
  .exercise-tips h5,
  .exercise-benefits h5,
  .exercise-variations h5 {
    font-size: 0.8125rem;
  }
  
  .exercise-instructions ol,
  .exercise-tips ul,
  .exercise-benefits ul,
  .exercise-variations ul {
    padding-left: 0.875rem;
    font-size: 0.75rem;
  }
}

/* Mobile Responsive - Exercise Modal */
@media (max-width: 768px) {
  .exercise-modal-content {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .exercise-modal-visual {
    flex: none;
    align-self: center;
  }
  
  .exercise-visual-large {
    width: 150px;
    height: 150px;
  }
  
  .exercise-visual-large i {
    font-size: 3rem;
  }
  
  .exercise-meta {
    justify-content: center;
  }
  
  .exercise-modal-info h4 {
    text-align: center;
  }
  
  .exercise-modal-info p {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .exercise-visual-large {
    width: 120px;
    height: 120px;
  }
  
  .exercise-visual-large i {
    font-size: 2.5rem;
  }
  
  .exercise-meta {
    gap: 0.5rem;
  }
  
  .exercise-instructions h5,
  .exercise-tips h5,
  .exercise-benefits h5,
  .exercise-variations h5 {
    font-size: 0.9375rem;
  }
  
  .exercise-instructions ol,
  .exercise-tips ul,
  .exercise-benefits ul,
  .exercise-variations ul {
    padding-left: 1.25rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 360px) {
  .exercise-visual-large {
    width: 100px;
    height: 100px;
  }
  
  .exercise-visual-large i {
    font-size: 2rem;
  }
  
  .exercise-meta {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  .exercise-instructions h5,
  .exercise-tips h5,
  .exercise-benefits h5,
  .exercise-variations h5 {
    font-size: 0.875rem;
  }
  
  .exercise-instructions ol,
  .exercise-tips ul,
  .exercise-benefits ul,
  .exercise-variations ul {
    padding-left: 1rem;
    font-size: 0.8125rem;
  }
}
@media (max-width: 768px) {
  .exercise-section {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .exercise-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .exercise-controls {
    width: 100%;
    flex-direction: column;
  }
  
  .exercise-search,
  .exercise-category-filter {
    width: 100%;
    min-width: auto;
  }
  
  .exercise-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .exercise-visual {
    height: 150px;
  }
  
  .exercise-icon {
    font-size: 2.5rem;
  }
  
  .exercise-content {
    padding: 1rem;
  }
  
  .exercise-name {
    font-size: 1rem;
  }
  
  .exercise-description {
    font-size: 0.8125rem;
  }
}

@media (max-width: 480px) {
  .exercise-section {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .exercise-header h3 {
    font-size: 1.125rem;
  }
  
  .exercise-grid {
    gap: 0.75rem;
  }
  
  .exercise-visual {
    height: 120px;
  }
  
  .exercise-icon {
    font-size: 2rem;
  }
  
  .exercise-content {
    padding: 0.75rem;
  }
  
  .exercise-name {
    font-size: 0.9375rem;
  }
  
  .exercise-description {
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  .exercise-details {
    gap: 0.75rem;
    font-size: 0.6875rem;
  }
}

@media (max-width: 360px) {
  .exercise-section {
    padding: 0.75rem;
  }
  
  .exercise-header h3 {
    font-size: 1rem;
  }
  
  .exercise-grid {
    gap: 0.625rem;
  }
  
  .exercise-visual {
    height: 100px;
  }
  
  .exercise-icon {
    font-size: 1.75rem;
  }
  
  .exercise-content {
    padding: 0.625rem;
  }
  
  .exercise-name {
    font-size: 0.875rem;
  }
  
  .exercise-description {
    font-size: 0.6875rem;
  }
  
  .exercise-details {
    gap: 0.5rem;
    font-size: 0.625rem;
  }
}
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.analytics-card {
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.analytics-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.analytics-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 1rem;
}

.chart-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  background: var(--light-surface);
  border-radius: var(--radius);
  color: var(--light-text-secondary);
}

.chart-placeholder i {
  font-size: 3rem;
  color: var(--primary-color);
}

.chart-placeholder p {
  font-size: 0.875rem;
  margin: 0;
}

/* ===== QUICK ACTIONS ===== */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 1rem;
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  color: var(--light-text);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
}

.quick-action-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.quick-action-btn i {
  font-size: 2rem;
}

.quick-action-btn span {
  text-align: center;
}

/* ===== ADMIN MODALS ===== */
.report-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.report-option {
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.report-option h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 1rem;
}

.report-option button {
  display: block;
  width: 100%;
  margin-bottom: 0.5rem;
}

.settings-section {
  margin-bottom: 2rem;
}

.settings-section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--light-border);
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.setting-item label {
  font-weight: 500;
  color: var(--light-text-secondary);
  min-width: 150px;
}

.setting-item input {
  flex: 1;
  max-width: 300px;
}

.log-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: center;
}

.log-container {
  max-height: 400px;
  overflow-y: auto;
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 1rem;
}

.log-entry {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-bottom: 1px solid var(--light-border);
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
}

.log-entry:last-child {
  border-bottom: none;
}

.log-timestamp {
  color: var(--light-text-secondary);
  min-width: 140px;
}

.log-level {
  font-weight: 600;
  min-width: 60px;
}

.log-entry.log-info .log-level {
  color: var(--info-color);
}

.log-entry.log-warning .log-level {
  color: var(--warning-color);
}

.log-entry.log-error .log-level {
  color: var(--danger-color);
}

.log-user {
  color: var(--primary-color);
  font-weight: 500;
  min-width: 100px;
}

.log-message {
  color: var(--light-text);
  flex: 1;
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-2px);
}

/* ===== MODALS ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  animation: fadeIn 0.3s ease-out;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--light-bg);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
}

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

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--light-text);
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--light-text-secondary);
  padding: 0.25rem;
  transition: var(--transition);
}

.close-btn:hover {
  color: var(--light-text);
}

.modal-body {
  padding: 1.5rem;
}

/* Health Recommendations Modal */
.health-alert {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.health-alert p {
  color: var(--danger-color);
  font-weight: 500;
  margin: 0;
}

.recommendation-section {
  margin-bottom: 2rem;
}

.recommendation-section h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 1rem;
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.recommendation-grid .recommendation-card {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 1rem;
  transition: var(--transition);
}

.recommendation-grid .recommendation-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.recommendation-grid .recommendation-card h5 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 0.5rem;
}

.recommendation-grid .recommendation-card p {
  font-size: 0.875rem;
  color: var(--light-text-secondary);
  margin-bottom: 0.5rem;
}

.recommendation-grid .recommendation-card small {
  font-size: 0.75rem;
  color: var(--light-text-secondary);
  font-style: italic;
}

.health-disclaimer {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 1.5rem;
}

.health-disclaimer p {
  color: var(--warning-color);
  font-size: 0.875rem;
  margin: 0;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--light-border);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* Mobile Responsive - Health Recommendations Modal */
@media (max-width: 768px) {
  .health-alert {
    padding: 0.75rem;
    margin-bottom: 1rem;
  }
  
  .health-alert p {
    font-size: 0.875rem;
  }
  
  .recommendation-section {
    margin-bottom: 1.5rem;
  }
  
  .recommendation-section h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .recommendation-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .recommendation-grid .recommendation-card {
    padding: 0.75rem;
  }
  
  .recommendation-grid .recommendation-card h5 {
    font-size: 0.9375rem;
  }
  
  .recommendation-grid .recommendation-card p {
    font-size: 0.75rem;
  }
  
  .recommendation-grid .recommendation-card small {
    font-size: 0.6875rem;
  }
  
  .health-disclaimer {
    padding: 0.75rem;
    margin-top: 1rem;
  }
  
  .health-disclaimer p {
    font-size: 0.75rem;
  }
  
  .modal-footer {
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 480px) {
  .health-alert {
    padding: 0.5rem;
    margin-bottom: 0.75rem;
  }
  
  .health-alert p {
    font-size: 0.75rem;
  }
  
  .recommendation-section {
    margin-bottom: 1rem;
  }
  
  .recommendation-section h4 {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
  }
  
  .recommendation-grid {
    gap: 0.5rem;
  }
  
  .recommendation-grid .recommendation-card {
    padding: 0.5rem;
  }
  
  .recommendation-grid .recommendation-card h5 {
    font-size: 0.875rem;
  }
  
  .recommendation-grid .recommendation-card p {
    font-size: 0.6875rem;
  }
  
  .recommendation-grid .recommendation-card small {
    font-size: 0.625rem;
  }
  
  .health-disclaimer {
    padding: 0.5rem;
    margin-top: 0.75rem;
  }
  
  .health-disclaimer p {
    font-size: 0.6875rem;
  }
  
  .modal-footer {
    padding: 0.5rem 0.75rem;
  }
}

@media (max-width: 360px) {
  .health-alert {
    padding: 0.375rem;
    margin-bottom: 0.5rem;
  }
  
  .health-alert p {
    font-size: 0.6875rem;
  }
  
  .recommendation-section {
    margin-bottom: 0.75rem;
  }
  
  .recommendation-section h4 {
    font-size: 0.75rem;
    margin-bottom: 0.375rem;
  }
  
  .recommendation-grid {
    gap: 0.375rem;
  }
  
  .recommendation-grid .recommendation-card {
    padding: 0.375rem;
  }
  
  .recommendation-grid .recommendation-card h5 {
    font-size: 0.75rem;
  }
  
  .recommendation-grid .recommendation-card p {
    font-size: 0.625rem;
  }
  
  .recommendation-grid .recommendation-card small {
    font-size: 0.5625rem;
  }
  
  .health-disclaimer {
    padding: 0.375rem;
    margin-top: 0.5rem;
  }
  
  .health-disclaimer p {
    font-size: 0.625rem;
  }
  
  .modal-footer {
    padding: 0.375rem 0.5rem;
  }
}

/* ===== NOTIFICATIONS ===== */
.notification-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.notification {
  background: white;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  min-width: 300px;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: auto;
  animation: slideInRight 0.3s ease-out;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.notification::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-color);
}

.notification.success::before {
  background: var(--success-color);
}

.notification.error::before {
  background: var(--danger-color);
}

.notification.info::before {
  background: var(--info-color);
}

.notification.warning::before {
  background: var(--warning-color);
}

.notification i {
  font-size: 1.25rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.notification.success i {
  color: var(--success-color);
}

.notification.error i {
  color: var(--danger-color);
}

.notification.info i {
  color: var(--info-color);
}

.notification.warning i {
  color: var(--warning-color);
}

.notification span {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

.notification .notification-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  font-size: 0.75rem;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.notification .notification-close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
}

.notification.removing {
  animation: slideOutRight 0.3s ease-out forwards;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Progress bar for auto-dismiss */
.notification::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: currentColor;
  opacity: 0.3;
  animation: progress 5s linear forwards;
}

.notification.success::after {
  background: var(--success-color);
}

.notification.error::after {
  background: var(--danger-color);
}

.notification.info::after {
  background: var(--info-color);
}

.notification.warning::after {
  background: var(--warning-color);
}

@keyframes progress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* Dark Mode for Notifications */
.dark-mode .notification {
  background: var(--dark-surface);
  border-color: var(--dark-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.dark-mode .notification span {
  color: var(--dark-text);
}

.dark-mode .notification .notification-close {
  color: var(--dark-text-secondary);
}

.dark-mode .notification .notification-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Mobile Responsive for Notifications */
@media (max-width: 768px) {
  .notification-container {
    top: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
  }
  
  .notification {
    min-width: auto;
    max-width: none;
    padding: 0.875rem 1rem;
  }
  
  .notification i {
    font-size: 1.125rem;
  }
  
  .notification span {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .notification-container {
    top: 0.625rem;
    right: 0.625rem;
    left: 0.625rem;
  }
  
  .notification {
    padding: 0.75rem 0.875rem;
  }
  
  .notification i {
    font-size: 1rem;
  }
  
  .notification span {
    font-size: 0.75rem;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .container {
    max-width: 100%;
    padding: 0 2rem;
  }

  .nav-container {
    padding: 1rem 2rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .health-overview {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .appointments-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .admin-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .recommendations-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .symptom-results {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .modal-content {
    max-width: 600px;
  }
}

@media (max-width: 900px) {
  .health-overview {
    grid-template-columns: repeat(2, 1fr);
  }

  .recommendations-grid {
    grid-template-columns: 1fr;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .nav-menu {
    gap: 1.5rem;
  }

  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--light-surface);
    border-top: 1px solid var(--light-border);
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-container {
    position: relative;
    padding: 1rem;
  }

  .dashboard-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .dashboard-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .health-overview {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .appointments-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .admin-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .symptom-categories {
    justify-content: center;
  }

  .recommendations-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    margin: 1rem;
    max-width: 90%;
  }

  .login-card {
    margin: 1rem;
    padding: 2rem;
  }

  .container {
    padding: 0 1rem;
  }

  .nav-logo h1 {
    font-size: 1.25rem;
  }

  .dashboard-header h2 {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.5rem;
  }
}

/* Tablet Landscape Optimizations */
@media (max-width: 1024px) and (orientation: landscape) {
  .nav-container {
    padding: 0.75rem 2rem;
  }

  .health-overview {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }

  .dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
  }

  .recent-activities {
    grid-column: 1;
  }

  .health-recommendations {
    grid-column: 2;
  }

  .appointments-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .admin-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .recommendations-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* Tablet Portrait Optimizations */
@media (max-width: 768px) and (orientation: portrait) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .health-overview {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .admin-card {
    padding: 1.5rem;
  }

  .admin-stats {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

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

  .appointment-form {
    order: 1;
  }

  .appointment-list {
    order: 2;
  }

  .modal-content {
    max-height: 80vh;
  }
}

/* Medium Tablets (iPad Mini, etc.) */
@media (max-width: 820px) {
  .nav-menu {
    gap: 1rem;
  }

  .nav-link {
    font-size: 0.875rem;
    padding: 0.5rem;
  }

  .health-overview {
    grid-template-columns: repeat(2, 1fr);
  }

  .recommendations-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .login-card {
    max-width: 400px;
  }

  .modal-content {
    max-width: 500px;
  }
}

/* Large Tablets (iPad Pro, etc.) */
@media (min-width: 1025px) and (max-width: 1366px) {
  .container {
    max-width: 1100px;
    padding: 0 2rem;
  }

  .health-overview {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }

  .dashboard-grid {
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
  }

  .recommendations-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .admin-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .symptom-results {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .appointments-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .nav-menu {
    gap: 1.5rem;
  }

  .nav-link {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .nav-actions {
    gap: 0.25rem;
  }

  .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.7rem;
  }

  .login-card {
    padding: 1.5rem;
  }

  .health-card {
    padding: 0.75rem;
  }

  .modal-content {
    margin: 0.5rem;
  }

  .nav-logo h1 {
    font-size: 1.25rem;
  }

  .login-header h2 {
    font-size: 1.5rem;
  }

  .dashboard-header h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 320px) {
  .nav-container {
    padding: 0.75rem 0.5rem;
  }

  .nav-logo {
    gap: 0.5rem;
  }

  .nav-logo i {
    font-size: 1.5rem;
  }

  .nav-logo h1 {
    font-size: 1rem;
  }

  .theme-toggle-btn {
    padding: 0.375rem;
  }

  .mobile-menu-toggle span {
    width: 20px;
    height: 2px;
  }

  .container {
    padding: 0 0.5rem;
  }

  .login-card {
    padding: 1rem;
    margin: 0.5rem;
  }

  .login-header {
    margin-bottom: 1.5rem;
  }

  .login-header i {
    font-size: 2rem;
  }

  .login-header h2 {
    font-size: 1.25rem;
  }

  .tab-btn {
    padding: 0.5rem;
    font-size: 0.75rem;
  }

  .form-group {
    margin-bottom: 1rem;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 0.5rem;
    font-size: 0.875rem;
  }

  .password-input-container input {
    padding-right: 2.5rem;
  }

  .password-toggle-btn {
    right: 0.5rem;
    font-size: 0.75rem;
  }

  .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
  }

  .health-card {
    padding: 0.5rem;
  }

  .card-icon {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }

  .metric-value {
    font-size: 1.5rem;
  }

  .activity-item {
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .activity-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.875rem;
  }

  .activity-details h4 {
    font-size: 0.9375rem;
  }

  .activity-details p {
    font-size: 0.75rem;
  }

  .activity-time {
    font-size: 0.6875rem;
  }

  .activity-actions {
    gap: 0.375rem;
  }

  .activity-delete-btn {
    padding: 0.375rem;
    font-size: 0.75rem;
  }

  .recommendation-card {
    padding: 1rem;
    gap: 0.75rem;
  }

  .recommendation-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }

  .recommendation-content h4 {
    font-size: 1rem;
  }

  .modal-content {
    width: 95%;
    margin: 0.25rem;
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-body {
    padding: 1rem;
  }

  .search-input {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .category-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }

  .dashboard-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .dashboard-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .health-overview {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .appointments-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .admin-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .admin-card {
    padding: 1.5rem;
  }

  .admin-stats {
    gap: 1rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .notification-container {
    top: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
  }

  .notification {
    min-width: 250px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 240px) {
  .nav-logo {
    flex-direction: column;
    gap: 0.25rem;
  }

  .nav-logo h1 {
    font-size: 0.875rem;
  }

  .nav-logo i {
    font-size: 1.25rem;
  }

  .nav-actions {
    gap: 0.125rem;
  }

  .theme-toggle-btn {
    padding: 0.25rem;
  }

  .theme-toggle-btn i {
    font-size: 0.875rem;
  }

  .mobile-menu-toggle span {
    width: 15px;
    height: 2px;
  }

  .container {
    padding: 0 0.25rem;
  }

  .login-card {
    padding: 0.75rem;
    margin: 0.25rem;
  }

  .login-header i {
    font-size: 1.5rem;
  }

  .login-header h2 {
    font-size: 1.125rem;
  }

  .login-header p {
    font-size: 0.875rem;
  }

  .tab-btn {
    padding: 0.375rem;
    font-size: 0.7rem;
  }

  .form-group {
    margin-bottom: 0.75rem;
  }

  .form-group label {
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 0.375rem;
    font-size: 0.75rem;
  }

  .btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.65rem;
  }

  .health-card {
    padding: 0.375rem;
  }

  .card-icon {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.875rem;
  }

  .card-content h3 {
    font-size: 0.875rem;
  }

  .metric-value {
    font-size: 1.25rem;
  }

  .metric-value span {
    font-size: 0.75rem;
  }

  .metric-status {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
  }

  .activity-item {
    padding: 0.5rem;
    gap: 0.5rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .activity-icon {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
  }

  .activity-details h4 {
    font-size: 0.875rem;
  }

  .activity-details p {
    font-size: 0.75rem;
  }

  .activity-time {
    font-size: 0.625rem;
  }

  .activity-actions {
    gap: 0.25rem;
    align-self: flex-end;
  }

  .activity-delete-btn {
    padding: 0.25rem;
    font-size: 0.6875rem;
  }

  .activity-time {
    font-size: 0.625rem;
  }

  .recommendation-card {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .recommendation-icon {
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
  }

  .recommendation-content h4 {
    font-size: 0.875rem;
  }

  .recommendation-content p {
    font-size: 0.75rem;
  }

  .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.625rem;
  }

  .modal-content {
    width: 98%;
    margin: 0.125rem;
  }

  .modal-header {
    padding: 0.75rem;
  }

  .modal-header h3 {
    font-size: 1rem;
  }

  .close-btn {
    font-size: 1.25rem;
  }

  .modal-body {
    padding: 0.75rem;
  }

  .search-input {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }

  .category-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.625rem;
  }

  .symptom-categories {
    gap: 0.25rem;
  }

  .dashboard-header h2 {
    font-size: 1.25rem;
  }

  .recent-activities h3,
  .health-recommendations h3,
  .appointment-form h3,
  .appointment-list h3 {
    font-size: 1rem;
  }

  .admin-card {
    padding: 1rem;
  }

  .admin-header {
    gap: 0.75rem;
  }

  .admin-header i {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }

  .admin-header h3 {
    font-size: 1rem;
  }

  .admin-stats {
    gap: 0.75rem;
  }

  .stat-number {
    font-size: 1.25rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .notification-container {
    top: 0.625rem;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 350px;
  }

  .notification {
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 160px) {
  .nav-container {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-logo {
    order: 1;
  }

  .nav-menu {
    order: 3;
    width: 100%;
  }

  .nav-actions {
    order: 2;
    gap: 0.25rem;
  }

  .nav-link {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
  }

  .theme-toggle-btn {
    padding: 0.25rem;
  }

  .theme-toggle-btn i {
    font-size: 0.75rem;
  }

  .mobile-menu-toggle {
    display: none;
  }

  .container {
    padding: 0 0.125rem;
  }

  .login-card {
    padding: 0.5rem;
    margin: 0.125rem;
  }

  .login-header i {
    font-size: 1.25rem;
  }

  .login-header h2 {
    font-size: 1rem;
  }

  .login-header p {
    font-size: 0.75rem;
  }

  .login-tabs {
    margin-bottom: 1rem;
  }

  .tab-btn {
    padding: 0.25rem;
    font-size: 0.625rem;
  }

  .form-group {
    margin-bottom: 0.5rem;
  }

  .form-group label {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 0.25rem;
    font-size: 0.625rem;
  }

  .btn {
    padding: 0.25rem 0.375rem;
    font-size: 0.6rem;
  }

  .health-card {
    padding: 0.25rem;
  }

  .card-icon {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.75rem;
  }

  .card-content h3 {
    font-size: 0.75rem;
  }

  .metric-value {
    font-size: 1rem;
  }

  .metric-value span {
    font-size: 0.625rem;
  }

  .metric-status {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
  }

  .activity-item {
    padding: 0.375rem;
    gap: 0.375rem;
  }

  .activity-icon {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.625rem;
  }

  .activity-details h4 {
    font-size: 0.75rem;
  }

  .activity-details p {
    font-size: 0.625rem;
  }

  .activity-time {
    font-size: 0.5rem;
  }

  .activity-actions {
    gap: 0.1875rem;
    align-self: flex-end;
  }

  .activity-delete-btn {
    padding: 0.1875rem;
    font-size: 0.625rem;
  }

  .recommendation-card {
    padding: 0.5rem;
    gap: 0.375rem;
  }

  .recommendation-icon {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.75rem;
  }

  .recommendation-content h4 {
    font-size: 0.75rem;
  }

  .recommendation-content p {
    font-size: 0.625rem;
  }

  .btn-sm {
    padding: 0.125rem 0.375rem;
    font-size: 0.5rem;
  }

  .modal-content {
    width: 99%;
    margin: 0.0625rem;
  }

  .modal-header {
    padding: 0.5rem;
  }

  .modal-header h3 {
    font-size: 0.875rem;
  }

  .close-btn {
    font-size: 1rem;
  }

  .modal-body {
    padding: 0.5rem;
  }

  .search-input {
    padding: 0.375rem 0.5rem;
    font-size: 0.625rem;
  }

  .category-btn {
    padding: 0.125rem 0.375rem;
    font-size: 0.5rem;
  }

  .dashboard-header h2 {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1rem;
  }

  .admin-card {
    padding: 0.75rem;
  }

  .admin-header {
    gap: 0.5rem;
  }

  .admin-header i {
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
  }

  .admin-header h3 {
    font-size: 0.875rem;
  }

  .admin-stats {
    gap: 0.5rem;
  }

  .stat-number {
    font-size: 1rem;
  }

  .stat-label {
    font-size: 0.625rem;
  }

  .notification-container {
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 98%;
    max-width: 300px;
  }

  .notification {
    min-width: 150px;
    padding: 0.375rem 0.5rem;
    font-size: 0.625rem;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 100px) {
  html {
    font-size: 12px;
  }

  body {
    line-height: 1.4;
  }

  .nav-container {
    padding: 0.25rem;
    gap: 0.25rem;
  }

  .nav-logo {
    gap: 0.125rem;
  }

  .nav-logo i {
    font-size: 1rem;
  }

  .nav-logo h1 {
    font-size: 0.75rem;
  }

  .nav-menu {
    gap: 0.125rem;
  }

  .nav-link {
    padding: 0.25rem;
    font-size: 0.625rem;
  }

  .theme-toggle-btn {
    padding: 0.125rem;
  }

  .theme-toggle-btn i {
    font-size: 0.625rem;
  }

  .container {
    padding: 0 0.0625rem;
  }

  .main-content {
    padding: 0.5rem 0;
  }

  .login-card {
    padding: 0.25rem;
    margin: 0.0625rem;
  }

  .login-header i {
    font-size: 1rem;
  }

  .login-header h2 {
    font-size: 0.875rem;
  }

  .login-header p {
    font-size: 0.625rem;
  }

  .login-tabs {
    margin-bottom: 0.75rem;
  }

  .tab-btn {
    padding: 0.125rem;
    font-size: 0.5rem;
  }

  .form-group {
    margin-bottom: 0.375rem;
  }

  .form-group label {
    font-size: 0.625rem;
    margin-bottom: 0.125rem;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 0.125rem;
    font-size: 0.5rem;
  }

  .btn {
    padding: 0.125rem 0.25rem;
    font-size: 0.5rem;
  }

  .health-card {
    padding: 0.125rem;
  }

  .card-icon {
    width: 1rem;
    height: 1rem;
    font-size: 0.625rem;
  }

  .card-content h3 {
    font-size: 0.625rem;
  }

  .metric-value {
    font-size: 0.875rem;
  }

  .metric-value span {
    font-size: 0.5rem;
  }

  .metric-status {
    font-size: 0.5rem;
    padding: 0.0625rem 0.25rem;
  }

  .activity-item {
    padding: 0.25rem;
    gap: 0.25rem;
  }

  .activity-icon {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.5rem;
  }

  .activity-details h4 {
    font-size: 0.625rem;
  }

  .activity-details p {
    font-size: 0.5rem;
  }

  .activity-time {
    font-size: 0.375rem;
  }

  .recommendation-card {
    padding: 0.25rem;
    gap: 0.25rem;
  }

  .recommendation-icon {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.625rem;
  }

  .recommendation-content h4 {
    font-size: 0.625rem;
  }

  .recommendation-content p {
    font-size: 0.5rem;
  }

  .btn-sm {
    padding: 0.0625rem 0.25rem;
    font-size: 0.375rem;
  }

  .modal-content {
    width: 100%;
    margin: 0;
    border-radius: 0.25rem;
  }

  .modal-header {
    padding: 0.25rem;
  }

  .modal-header h3 {
    font-size: 0.75rem;
  }

  .close-btn {
    font-size: 0.875rem;
  }

  .modal-body {
    padding: 0.25rem;
  }

  .search-input {
    padding: 0.25rem 0.375rem;
    font-size: 0.5rem;
  }

  .category-btn {
    padding: 0.0625rem 0.25rem;
    font-size: 0.375rem;
  }

  .dashboard-header h2 {
    font-size: 0.875rem;
  }

  .section-title {
    font-size: 0.875rem;
  }

  .admin-card {
    padding: 0.5rem;
  }

  .admin-header {
    gap: 0.25rem;
  }

  .admin-header i {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.75rem;
  }

  .admin-header h3 {
    font-size: 0.75rem;
  }

  .admin-stats {
    gap: 0.25rem;
  }

  .stat-number {
    font-size: 0.875rem;
  }

  .stat-label {
    font-size: 0.5rem;
  }

  .notification-container {
    top: 0.375rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 250px;
  }

  .notification {
    min-width: 100px;
    padding: 0.25rem 0.375rem;
    font-size: 0.5rem;
    width: 100%;
    text-align: center;
  }

  .health-overview {
    gap: 0.5rem;
  }

  .recent-activities,
  .health-recommendations,
  .appointment-form,
  .appointment-list {
    padding: 1rem;
  }

  .recommendations-grid {
    gap: 1rem;
  }

  .symptom-results {
    gap: 0.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}
