/*
==============================================
iOS 26 Liquid Glass Design System
==============================================
A complete UI redesign inspired by Apple's iOS 26 Liquid Glass
==============================================
*/

/* ============================================
   0. CSS @PROPERTY DEFINITIONS FOR LIQUID GLASS
   ============================================ */
@property --glass-angle {
  syntax: '<angle>';
  initial-value: 130deg;
  inherits: false;
}

@property --glass-shadow-offset {
  syntax: '<length>';
  initial-value: -15px;
  inherits: false;
}

/* ============================================
   1. CSS VARIABLES & THEMING
   ============================================ */
:root {
  /* Beautiful Glass Core Colors - Enhanced transparency and depth */
  --liquid-glass-light: rgba(255, 255, 255, 0.65);
  --liquid-glass-medium: rgba(255, 255, 255, 0.75);
  --liquid-glass-strong: rgba(255, 255, 255, 0.85);
  --liquid-glass-border: rgba(255, 255, 255, 0.5);
  --liquid-glass-border-strong: rgba(255, 255, 255, 0.7);
  --liquid-glass-highlight: rgba(255, 255, 255, 0.9);
  
  /* Background - Beautiful gradient with depth */
  --bg-base: #f0f2f5;
  --bg-gradient: linear-gradient(135deg, 
    #667eea 0%, 
    #764ba2 25%,
    #f093fb 50%,
    #4facfe 75%,
    #00f2fe 100%);
  
  /* Animated gradient blobs - More vibrant */
  --blob-1: rgba(102, 126, 234, 0.2);
  --blob-2: rgba(118, 75, 162, 0.2);
  --blob-3: rgba(240, 147, 251, 0.2);
  --blob-4: rgba(79, 172, 254, 0.2);
  
  /* Text */
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-tertiary: #8a8a8a;
  
  /* Accent - Vibrant but readable */
  --accent: #667eea;
  --accent-light: rgba(102, 126, 234, 0.2);
  --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  
  /* Semantic Colors */
  --success: #34C759;
  --success-light: rgba(52, 199, 89, 0.15);
  --warning: #FF9500;
  --warning-light: rgba(255, 149, 0, 0.15);
  --danger: #FF3B30;
  --danger-light: rgba(255, 59, 48, 0.15);
  
  /* Shadows - Enhanced depth */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 30px 70px rgba(0, 0, 0, 0.2), 0 12px 24px rgba(0, 0, 0, 0.15);
  
  /* Inner glow - Stronger for more depth */
  --inner-glow: inset 0 1px 2px rgba(255, 255, 255, 0.8), inset 0 -1px 2px rgba(0, 0, 0, 0.05);
  --inner-glow-strong: inset 0 2px 4px rgba(255, 255, 255, 0.95), inset 0 -2px 4px rgba(0, 0, 0, 0.08);
  
  /* Sizing */
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 36px;
  --radius-full: 9999px;
  
  --tab-bar-height: 80px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Dark Mode - Deep and rich */
:root[data-theme="dark"] {
  --liquid-glass-light: rgba(30, 30, 35, 0.75);
  --liquid-glass-medium: rgba(40, 40, 45, 0.85);
  --liquid-glass-strong: rgba(50, 50, 55, 0.95);
  --liquid-glass-border: rgba(255, 255, 255, 0.12);
  --liquid-glass-border-strong: rgba(255, 255, 255, 0.2);
  --liquid-glass-highlight: rgba(255, 255, 255, 0.15);
  
  --bg-base: #000000;
  --bg-gradient: linear-gradient(135deg, 
    #1a1a2e 0%, 
    #16213e 25%,
    #0f3460 50%,
    #533483 75%,
    #1a1a2e 100%);
  
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.75);
  --text-tertiary: rgba(255, 255, 255, 0.5);
  
  --accent: #8b9aff;
  --accent-light: rgba(139, 154, 255, 0.2);
  --accent-gradient: linear-gradient(135deg, #8b9aff 0%, #a78bfa 100%);
  
  --success: #30D158;
  --success-light: rgba(48, 209, 88, 0.2);
  --warning: #FF9F0A;
  --warning-light: rgba(255, 159, 10, 0.2);
  --danger: #FF453A;
  --danger-light: rgba(255, 69, 58, 0.2);
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5), 0 8px 16px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 30px 70px rgba(0, 0, 0, 0.6), 0 12px 24px rgba(0, 0, 0, 0.5);
  
  --inner-glow: inset 0 1px 2px rgba(255, 255, 255, 0.12), inset 0 -1px 2px rgba(0, 0, 0, 0.2);
  --inner-glow-strong: inset 0 2px 4px rgba(255, 255, 255, 0.18), inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

/* ============================================
   1.5. LIQUID GLASS LAYER SYSTEM
   ============================================ */
/* 
  The Liquid Glass system uses 4 layers:
  - glass-filter: backdrop-filter blur + saturation
  - glass-overlay: background color/gradient
  - glass-specular: highlight reflections
  - glass-content or direct content: actual content (z-index: 3)
*/

/* Base layer styles - position absolute to fill container */
.glass-filter,
.glass-overlay,
.glass-specular {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

/* Filter layer - blur and saturation effects */
.glass-filter {
  z-index: 0;
  backdrop-filter: blur(40px) saturate(180%) brightness(1.1);
  -webkit-backdrop-filter: blur(40px) saturate(180%) brightness(1.1);
}

/* Overlay layer - background color */
.glass-overlay {
  z-index: 1;
  background: var(--liquid-glass-light);
  border: 1px solid var(--glass-border);
}

/* Specular layer - reflections and highlights */
.glass-specular {
  z-index: 2;
  box-shadow: none;
}

/* Top shine gradient - removed */
.glass-specular::before {
  display: none;
}

/* Content wrapper layer */
.glass-content {
  position: relative;
  z-index: 3;
}

/* Dark mode glass layers */
:root[data-theme="dark"] .glass-overlay {
  background: var(--liquid-glass-dark);
  border-color: var(--glass-border);
}

:root[data-theme="dark"] .glass-specular {
  box-shadow: none;
}

:root[data-theme="dark"] .glass-specular::before {
  display: none;
}

/* ============================================
   2. BASE STYLES & ANIMATED BACKGROUND
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-gradient);
  background-attachment: fixed;
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-bottom: calc(var(--tab-bar-height) + 2rem + var(--safe-bottom));
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating ambient light orbs */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 30%, var(--blob-1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, var(--blob-2) 0%, transparent 50%),
    radial-gradient(circle at 60% 40%, var(--blob-3) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, var(--blob-4) 0%, transparent 50%);
  animation: floatBlobs 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

@keyframes floatBlobs {
  0%, 100% { 
    transform: translate(0, 0) rotate(0deg);
  }
  33% { 
    transform: translate(30px, -30px) rotate(120deg);
  }
  66% { 
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

/* ============================================
   3. LIQUID GLASS CORE COMPONENT (Beautiful Style)
   ============================================ */
.liquid-glass {
  position: relative;
  background: var(--liquid-glass-light);
  backdrop-filter: blur(30px) saturate(180%) brightness(1.05);
  -webkit-backdrop-filter: blur(30px) saturate(180%) brightness(1.05);
  border: 1.5px solid var(--liquid-glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--inner-glow), var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Subtle shimmer effect on hover */
.liquid-glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
  pointer-events: none;
}

.liquid-glass:hover::before {
  left: 100%;
}

.liquid-glass:hover {
  transform: translateY(-2px);
  box-shadow: var(--inner-glow-strong), var(--shadow-lg);
  border-color: var(--liquid-glass-border-strong);
}

/* Strong variant - slightly more opaque */
.liquid-glass-strong {
  background: var(--liquid-glass-strong);
  backdrop-filter: blur(40px) saturate(200%) brightness(1.08);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.08);
  border: 2px solid var(--liquid-glass-border-strong);
  box-shadow: var(--inner-glow-strong), var(--shadow-xl);
}

/* Dark mode liquid glass */
:root[data-theme="dark"] .liquid-glass {
  background: var(--liquid-glass-light);
  border-color: var(--liquid-glass-border);
  box-shadow: var(--inner-glow), var(--shadow-md);
}

:root[data-theme="dark"] .liquid-glass-strong {
  background: var(--liquid-glass-strong);
  border-color: var(--liquid-glass-border-strong);
  box-shadow: var(--inner-glow-strong), var(--shadow-xl);
}

/* ============================================
   4. TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  text-align: center;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 20px rgba(102, 126, 234, 0.3);
}

:root[data-theme="dark"] h1 {
  background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

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

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

a:hover {
  opacity: 0.8;
}

/* ============================================
   5. CONTAINER & LAYOUT
   ============================================ */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.25rem;
  padding-top: max(1.5rem, env(safe-area-inset-top));
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
    padding-top: max(1rem, env(safe-area-inset-top));
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0.75rem;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.25rem;
  }
}

/* ============================================
   6. TAB BAR - Floating Liquid Glass Pill
   ============================================ */
.tab-bar {
  position: fixed;
  bottom: calc(1rem + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 380px;
  height: var(--tab-bar-height);
  z-index: 1000;
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 20px 60px rgba(102, 126, 234, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-bar:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.15),
    0 6px 20px rgba(0, 0, 0, 0.1),
    0 24px 70px rgba(102, 126, 234, 0.25);
}

/* Glass Filter Layer - Backdrop blur and saturation */
.tab-bar > .glass-filter {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  backdrop-filter: blur(40px) saturate(180%) brightness(1.15);
  -webkit-backdrop-filter: blur(40px) saturate(180%) brightness(1.15);
}

/* Glass Overlay Layer - Background color */
.tab-bar > .glass-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: var(--liquid-glass-medium);
  border: 2px solid var(--liquid-glass-border-strong);
  box-shadow: var(--inner-glow-strong);
}

/* Glass Specular Layer - Subtle highlight */
.tab-bar > .glass-specular {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.4) 0%,
    transparent 50%
  );
  pointer-events: none;
}

@media (max-width: 480px) {
  .tab-bar {
    max-width: calc(100% - 1rem);
    height: 70px;
  }
}/* Tab Bar Content Layer - Contains tab items */
.tab-bar-content {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  width: 100%;
  padding: 0 6px;
  
  /* Custom properties for slide animation */
  --slide-left: 6px;
  --slide-width: 25%;
}

/* Sliding active indicator background */
.tab-bar-content::before {
  content: '';
  position: absolute;
  bottom: 8px;
  left: var(--slide-left);
  width: var(--slide-width);
  height: 4px;
  background: var(--accent-gradient);
  border-radius: 2px;
  transition: left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.5), 
              0 0 12px rgba(102, 126, 234, 0.3);
  z-index: 4;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  padding: 0.5rem 0.25rem;
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border-radius: 0;
  margin: 0;
}

.tab-item svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.tab-item.active {
  color: var(--accent);
}

.tab-item.active svg {
  transform: scale(1.2);
  filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.5));
}

/* Remove the old active indicator */
.tab-item.active::before {
  display: none;
}

@keyframes pulseGlow {
  0%, 100% { 
    opacity: 0.1;
    transform: scale(1);
  }
  50% { 
    opacity: 0.15;
    transform: scale(1.05);
  }
}

.tab-item:active {
  transform: scale(0.95);
}

@media (max-width: 480px) {
  .tab-item {
    font-size: 10px;
    gap: 4px;
  }
  
  .tab-item svg {
    width: 22px;
    height: 22px;
  }
}

/* Dark mode tab bar */
:root[data-theme="dark"] .tab-bar {
  box-shadow: var(--shadow-lg);
}

:root[data-theme="dark"] .tab-bar > .glass-overlay {
  background: var(--liquid-glass-light);
  border-color: var(--liquid-glass-border);
}

:root[data-theme="dark"] .tab-bar > .glass-specular {
  display: none;
}

:root[data-theme="dark"] .tab-bar > .glass-specular::before {
  display: none;
}

/* ============================================
   7. TAB CONTENT
   ============================================ */
.tab-content {
  display: none;
  animation: liquidFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-content.active {
  display: block;
}

@keyframes liquidFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* ============================================
   8. DATE INFO & WEEKDAY SELECTOR
   ============================================ */
.date-info {
  text-align: center;
  margin-bottom: 1.5rem;
}

.date-info-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
}

.day-badge {
  display: inline-block;
  background: var(--accent-gradient);
  color: white;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.current-time {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Weekday Selector */
.weekday-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem auto;
  max-width: 500px;
  padding: 0 0.5rem;
}

.nav-arrow {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 300;
  cursor: pointer;
  color: var(--text-secondary);
  background: transparent;
  backdrop-filter: blur(3px) saturate(150%);
  -webkit-backdrop-filter: blur(3px) saturate(150%);
  border: none;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 0 3px 1px rgba(255, 255, 255, 0.75),
    inset 0 0 3px 5px rgba(255, 255, 255, 0.2),
    inset -8px -8px 15px 0px rgba(255, 255, 255, 0.25),
    inset 0 12px 10px 6px rgba(0, 0, 0, 0.04);
}

/* Gradient border */
.nav-arrow::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(var(--glass-angle), 
    rgba(0, 0, 0, 0.08), 
    rgba(255, 255, 255, 0.6) 20% 80%, 
    rgba(0, 0, 0, 0.08));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) border-box;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) border-box;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.nav-arrow:active {
  transform: rotateX(12deg) scale(0.88);
  --glass-angle: 40deg;
}

:root[data-theme="dark"] .nav-arrow {
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 0 3px 1px rgba(255, 255, 255, 0.2),
    inset 0 0 3px 5px rgba(255, 255, 255, 0.08),
    inset -8px -8px 15px 0px rgba(255, 255, 255, 0.1),
    inset 0 12px 10px 6px rgba(0, 0, 0, 0.12);
}

:root[data-theme="dark"] .nav-arrow::after {
  background: linear-gradient(var(--glass-angle), 
    rgba(0, 0, 0, 0.2), 
    rgba(255, 255, 255, 0.35) 25% 75%, 
    rgba(0, 0, 0, 0.2));
}

.weekday-chips {
  flex: 1;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.25rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.weekday-chips::-webkit-scrollbar {
  display: none;
}

.weekday-chip {
  position: relative;
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  backdrop-filter: blur(3px) saturate(150%);
  -webkit-backdrop-filter: blur(3px) saturate(150%);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.04),
    inset 0 0 3px 1px rgba(255, 255, 255, 0.65),
    inset 0 0 3px 4px rgba(255, 255, 255, 0.15),
    inset -6px -6px 12px 0px rgba(255, 255, 255, 0.2),
    inset 0 10px 8px 5px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

/* Gradient border for weekday chip */
.weekday-chip::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.2px;
  background: linear-gradient(var(--glass-angle), 
    rgba(0, 0, 0, 0.06), 
    rgba(255, 255, 255, 0.55) 20% 80%, 
    rgba(0, 0, 0, 0.06));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) border-box;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) border-box;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Top highlight for weekday chip */
.weekday-chip::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 15%;
  right: 15%;
  height: 45%;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.5) 0%, 
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%);
  pointer-events: none;
  border-radius: var(--radius-full);
  opacity: 0.8;
}

.weekday-chip:active {
  transform: rotateX(10deg) scale(0.92);
  --glass-angle: 40deg;
}

.weekday-chip.active {
  color: white;
  background: var(--accent-gradient);
  box-shadow: 
    0 6px 24px rgba(102, 126, 234, 0.45),
    0 3px 12px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.6),
    inset 0 -2px 4px rgba(0, 0, 0, 0.15);
  transform: scale(1.08);
}

.weekday-chip.active::after {
  background: linear-gradient(var(--glass-angle), 
    rgba(0, 0, 0, 0.1), 
    rgba(255, 255, 255, 0.7) 25% 75%, 
    rgba(0, 0, 0, 0.1));
}

.weekday-chip.active::before {
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.65) 0%, 
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%);
  opacity: 1;
}

:root[data-theme="dark"] .weekday-chip {
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.25),
    inset 0 0 3px 1px rgba(255, 255, 255, 0.18),
    inset 0 0 3px 4px rgba(255, 255, 255, 0.06),
    inset -6px -6px 12px 0px rgba(255, 255, 255, 0.08),
    inset 0 10px 8px 5px rgba(0, 0, 0, 0.1);
}

:root[data-theme="dark"] .weekday-chip::after {
  background: linear-gradient(var(--glass-angle), 
    rgba(0, 0, 0, 0.2), 
    rgba(255, 255, 255, 0.3) 25% 75%, 
    rgba(0, 0, 0, 0.2));
}

:root[data-theme="dark"] .weekday-chip::before {
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.15) 0%, 
    transparent 100%);
  opacity: 0.5;
}

/* ============================================
   9. SCHEDULE TABLE - Liquid Glass Card
   ============================================ */
.table-container {
  position: relative;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.65) 0%, 
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0.55) 100%);
  backdrop-filter: blur(40px) saturate(180%) brightness(1.08);
  -webkit-backdrop-filter: blur(40px) saturate(180%) brightness(1.08);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-xl);
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.04),
    0 24px 60px rgba(102, 126, 234, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 0.95),
    inset 0 -2px 4px rgba(255, 255, 255, 0.5);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.table-container:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 14px 50px rgba(0, 0, 0, 0.1),
    0 6px 20px rgba(0, 0, 0, 0.06),
    0 28px 70px rgba(102, 126, 234, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 1),
    inset 0 -2px 4px rgba(255, 255, 255, 0.6);
}

/* Top specular highlight */
.table-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 40%;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.9) 0%, 
    rgba(255, 255, 255, 0.4) 50%,
    transparent 100%);
  pointer-events: none;
  z-index: 2;
  border-radius: var(--radius-xl) var(--radius-xl) 50% 50%;
}

/* Bottom edge reflection */
.table-container::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.4) 30%,
    rgba(255, 255, 255, 0.4) 70%,
    transparent 100%);
  pointer-events: none;
}

/* Dark mode table container */
:root[data-theme="dark"] .table-container {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.04) 50%,
    rgba(255, 255, 255, 0.08) 100%);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 8px 40px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.1),
    inset 0 -1px 2px rgba(255, 255, 255, 0.03);
}

:root[data-theme="dark"] .table-container::before {
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.12) 0%, 
    rgba(255, 255, 255, 0.03) 40%,
    transparent 100%);
}

table {
  width: 100%;
  border-collapse: collapse;
  position: relative;
  z-index: 3;
}

thead th {
  padding: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

:root[data-theme="dark"] thead th {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

tbody tr {
  transition: background 0.2s ease;
}

tbody tr:not(:last-child) td,
tbody tr:not(:last-child) th {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

:root[data-theme="dark"] tbody tr:not(:last-child) td,
:root[data-theme="dark"] tbody tr:not(:last-child) th {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

tbody th, tbody td {
  padding: 1rem;
  text-align: center;
}

tbody th {
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
}

.subject-link, .subject-name {
  font-weight: 600;
  color: var(--text-primary);
}

.subject-link {
  color: var(--accent);
  display: inline-block;
  padding: 0.3rem 0.6rem;
  margin: -0.3rem -0.6rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

.subject-link:hover {
  background: var(--accent-light);
  opacity: 1;
}

.room {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.qr-warning {
  font-size: 0.8rem;
  color: var(--warning);
  font-weight: 500;
}

tr.current-period {
  background: var(--accent-light);
}

tr.current-period .subject-link,
tr.current-period .subject-name {
  font-weight: 700;
}

/* No classes state */
.no-classes-container {
  text-align: center;
  padding: 3rem 1.5rem;
}

.no-classes-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.no-classes-subtitle {
  color: var(--text-secondary);
  margin: 0;
}

/* Summer vacation */
.summer-vacation-container {
  text-align: center;
  padding: 3rem;
}

.summer-vacation-title {
  font-size: 1.5rem;
  background: linear-gradient(135deg, #FF9500, #FF3B30, #FF2D55);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   10. HOMEWORK CARDS - Liquid Glass Style
   ============================================ */
.homework-list {
  display: grid;
  gap: 1rem;
}

.homework-item {
  position: relative;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.65) 0%, 
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0.55) 100%);
  backdrop-filter: blur(40px) saturate(180%) brightness(1.08);
  -webkit-backdrop-filter: blur(40px) saturate(180%) brightness(1.08);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.04),
    0 16px 48px rgba(102, 126, 234, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 0.9),
    inset 0 -2px 4px rgba(255, 255, 255, 0.4);
  padding: 1.5rem;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Top specular highlight */
.homework-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 50%;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.85) 0%, 
    rgba(255, 255, 255, 0.35) 50%,
    transparent 100%);
  pointer-events: none;
  z-index: 1;
  border-radius: var(--radius-lg) var(--radius-lg) 50% 50%;
}

/* Side edge highlights */
.homework-item::after {
  content: "";
  position: absolute;
  top: 10%;
  bottom: 10%;
  left: 0;
  width: 1px;
  background: linear-gradient(180deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.5) 30%,
    rgba(255, 255, 255, 0.5) 70%,
    transparent 100%);
  pointer-events: none;
}

.homework-item:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.12),
    0 6px 24px rgba(0, 0, 0, 0.06),
    0 20px 60px rgba(102, 126, 234, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 1),
    inset 0 -2px 4px rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.75);
}

.homework-item:active {
  transform: translateY(-2px) scale(0.99);
}

/* Dark mode homework item */
:root[data-theme="dark"] .homework-item {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.04) 50%,
    rgba(255, 255, 255, 0.08) 100%);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.35),
    0 1px 4px rgba(0, 0, 0, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.08),
    inset 0 -1px 2px rgba(255, 255, 255, 0.02);
}

:root[data-theme="dark"] .homework-item::before {
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.12) 0%, 
    rgba(255, 255, 255, 0.03) 40%,
    transparent 100%);
}

:root[data-theme="dark"] .homework-item::after {
  background: linear-gradient(180deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.08) 30%,
    rgba(255, 255, 255, 0.08) 70%,
    transparent 100%);
}

.homework-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.homework-main {
  flex: 1;
  min-width: 0;
}

.homework-subject {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.homework-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  word-break: break-word;
}

.homework-due {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

.homework-due.urgent {
  color: var(--danger);
  font-weight: 600;
}

.homework-due.warning {
  color: var(--warning);
  font-weight: 500;
}

.homework-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.homework-description {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.homework-files {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.file-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  background: var(--liquid-glass-light);
  border: 1px solid var(--liquid-glass-border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-badge:hover {
  background: var(--liquid-glass-medium);
}

/* ============================================
   11. BUTTONS - Liquid Glass Style
   ============================================ */

/* Glass Button Wrapper - Contains all button layers */
.glass-button-wrapper {
  position: relative;
  display: inline-flex;
  border-radius: var(--radius-full);
  user-select: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-button-wrapper:active {
  transform: rotateX(15deg) scale(0.92);
}

.glass-button-wrapper:active .button-text {
  --glass-shadow-offset: 15px;
}

.glass-button-wrapper:active .glass-button {
  --glass-angle: 30deg;
}

/* Glass Button - The gradient border layer */
.glass-button {
  width: 100%;
  height: 100%;
  padding: 2px;
  border: none;
  border-radius: inherit;
  background: linear-gradient(var(--glass-angle), 
    rgba(0, 0, 0, 0.3), 
    rgba(255, 255, 255, 0.6) 20% 80%, 
    rgba(0, 0, 0, 0.3));
  box-sizing: border-box;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) padding-box;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) padding-box;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: --glass-angle 0.5s ease;
  cursor: pointer;
}

/* Button Text Layer - Main visible content */
.button-text {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: transparent;
  display: grid;
  place-items: center;
  font-weight: 600;
  color: var(--text-primary);
  z-index: -1;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 0 4px 2px rgba(255, 255, 255, 0.9),
    inset 0 0 4px 8px rgba(255, 255, 255, 0.25),
    inset var(--glass-shadow-offset) var(--glass-shadow-offset) 20px 0px rgba(255, 255, 255, 0.3),
    inset 0 20px 15px 10px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  transition: --glass-shadow-offset 0.2s ease;
}

/* Glass Effect Layer - Backdrop blur */
.glass-effect {
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: inherit;
  background: transparent;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Standard Button Base - Simplified for existing buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Liquid Glass base styling */
  background: linear-gradient(var(--glass-angle), 
    rgba(0, 0, 0, 0.1), 
    rgba(255, 255, 255, 0.5) 20% 80%, 
    rgba(0, 0, 0, 0.1));
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.12),
    inset 0 0 4px 2px rgba(255, 255, 255, 0.8),
    inset 0 0 4px 8px rgba(255, 255, 255, 0.2),
    inset -10px -10px 20px 0px rgba(255, 255, 255, 0.25),
    inset 0 15px 12px 8px rgba(0, 0, 0, 0.06);
}

/* Button inner glow shine */
.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 45%;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.6) 0%, 
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%);
  pointer-events: none;
  border-radius: var(--radius-full);
  opacity: 0.8;
}

/* Gradient border effect */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(var(--glass-angle), 
    rgba(0, 0, 0, 0.15), 
    rgba(255, 255, 255, 0.7) 25% 75%, 
    rgba(0, 0, 0, 0.15));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) border-box;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) border-box;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: --glass-angle 0.4s ease;
}

.btn:active {
  transform: rotateX(12deg) scale(0.94);
  --glass-angle: 40deg;
}

.btn:active::before {
  opacity: 0.5;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Primary - Blue gradient with liquid glass */
.btn-primary {
  color: white;
  background: 
    linear-gradient(135deg, rgba(0, 122, 255, 0.85) 0%, rgba(88, 86, 214, 0.85) 100%),
    linear-gradient(var(--glass-angle), 
      rgba(0, 0, 0, 0.2), 
      rgba(255, 255, 255, 0.4) 20% 80%, 
      rgba(0, 0, 0, 0.2));
  box-shadow: 
    0 4px 20px rgba(0, 122, 255, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 0 4px 2px rgba(255, 255, 255, 0.5),
    inset 0 0 4px 8px rgba(255, 255, 255, 0.15),
    inset -8px -8px 18px 0px rgba(255, 255, 255, 0.2),
    inset 0 12px 10px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary::before {
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.5) 0%, 
    rgba(255, 255, 255, 0.1) 40%,
    transparent 100%);
  opacity: 0.9;
}

.btn-primary::after {
  background: linear-gradient(var(--glass-angle), 
    rgba(0, 0, 0, 0.2), 
    rgba(255, 255, 255, 0.6) 25% 75%, 
    rgba(0, 0, 0, 0.2));
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 
    0 6px 28px rgba(0, 122, 255, 0.45),
    0 3px 12px rgba(0, 0, 0, 0.15),
    inset 0 0 4px 2px rgba(255, 255, 255, 0.6),
    inset 0 0 4px 8px rgba(255, 255, 255, 0.2),
    inset -8px -8px 18px 0px rgba(255, 255, 255, 0.25),
    inset 0 12px 10px 6px rgba(0, 0, 0, 0.12);
}

/* Secondary - Pure liquid glass button */
.btn-secondary {
  color: var(--text-primary);
  background: transparent;
  backdrop-filter: blur(3px) saturate(150%);
  -webkit-backdrop-filter: blur(3px) saturate(150%);
  box-shadow: 
    0 2px 10px rgba(0, 0, 0, 0.08),
    inset 0 0 4px 2px rgba(255, 255, 255, 0.85),
    inset 0 0 4px 8px rgba(255, 255, 255, 0.22),
    inset -12px -12px 20px 0px rgba(255, 255, 255, 0.28),
    inset 0 18px 14px 10px rgba(0, 0, 0, 0.05);
}

.btn-secondary::after {
  background: linear-gradient(var(--glass-angle), 
    rgba(0, 0, 0, 0.08), 
    rgba(255, 255, 255, 0.6) 20% 80%, 
    rgba(0, 0, 0, 0.08));
}

.btn-secondary:hover:not(:disabled) {
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.1),
    inset 0 0 4px 2px rgba(255, 255, 255, 0.9),
    inset 0 0 4px 8px rgba(255, 255, 255, 0.28),
    inset -12px -12px 20px 0px rgba(255, 255, 255, 0.32),
    inset 0 18px 14px 10px rgba(0, 0, 0, 0.06);
}

/* Dark mode buttons */
:root[data-theme="dark"] .btn {
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.4),
    inset 0 0 4px 2px rgba(255, 255, 255, 0.2),
    inset 0 0 4px 8px rgba(255, 255, 255, 0.08),
    inset -10px -10px 20px 0px rgba(255, 255, 255, 0.1),
    inset 0 15px 12px 8px rgba(0, 0, 0, 0.15);
}

:root[data-theme="dark"] .btn::after {
  background: linear-gradient(var(--glass-angle), 
    rgba(0, 0, 0, 0.3), 
    rgba(255, 255, 255, 0.35) 25% 75%, 
    rgba(0, 0, 0, 0.3));
}

:root[data-theme="dark"] .btn-secondary {
  box-shadow: 
    0 2px 10px rgba(0, 0, 0, 0.5),
    inset 0 0 4px 2px rgba(255, 255, 255, 0.18),
    inset 0 0 4px 8px rgba(255, 255, 255, 0.08),
    inset -12px -12px 20px 0px rgba(255, 255, 255, 0.1),
    inset 0 18px 14px 10px rgba(0, 0, 0, 0.12);
}

:root[data-theme="dark"] .btn-secondary:hover:not(:disabled) {
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.6),
    inset 0 0 4px 2px rgba(255, 255, 255, 0.22),
    inset 0 0 4px 8px rgba(255, 255, 255, 0.1),
    inset -12px -12px 20px 0px rgba(255, 255, 255, 0.12),
    inset 0 18px 14px 10px rgba(0, 0, 0, 0.15);
}

:root[data-theme="dark"] .button-text {
  color: var(--text-primary);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.4),
    inset 0 0 4px 2px rgba(255, 255, 255, 0.25),
    inset 0 0 4px 8px rgba(255, 255, 255, 0.1),
    inset var(--glass-shadow-offset) var(--glass-shadow-offset) 20px 0px rgba(255, 255, 255, 0.12),
    inset 0 20px 15px 10px rgba(0, 0, 0, 0.2);
}

/* Edit button - Small glass pill */
.btn-edit {
  padding: 0.5rem 0.85rem;
  font-size: 0.8rem;
  color: var(--accent);
  background: rgba(0, 122, 255, 0.08);
  border-radius: var(--radius-full);
  box-shadow: 
    0 1px 6px rgba(0, 122, 255, 0.15),
    inset 0 0 3px 1px rgba(255, 255, 255, 0.6),
    inset 0 0 3px 5px rgba(255, 255, 255, 0.12),
    inset -6px -6px 12px 0px rgba(255, 255, 255, 0.18),
    inset 0 10px 8px 4px rgba(0, 0, 0, 0.04);
}

.btn-edit:hover:not(:disabled) {
  background: rgba(0, 122, 255, 0.15);
  box-shadow: 
    0 2px 10px rgba(0, 122, 255, 0.25),
    inset 0 0 3px 1px rgba(255, 255, 255, 0.7),
    inset 0 0 3px 5px rgba(255, 255, 255, 0.15),
    inset -6px -6px 12px 0px rgba(255, 255, 255, 0.2),
    inset 0 10px 8px 4px rgba(0, 0, 0, 0.05);
}

/* Delete button - Small glass pill with danger color */
.btn-delete {
  padding: 0.5rem 0.85rem;
  font-size: 0.8rem;
  color: var(--danger);
  background: rgba(255, 59, 48, 0.08);
  border-radius: var(--radius-full);
  box-shadow: 
    0 1px 6px rgba(255, 59, 48, 0.15),
    inset 0 0 3px 1px rgba(255, 255, 255, 0.6),
    inset 0 0 3px 5px rgba(255, 255, 255, 0.12),
    inset -6px -6px 12px 0px rgba(255, 255, 255, 0.18),
    inset 0 10px 8px 4px rgba(0, 0, 0, 0.04);
}

.btn-delete:hover:not(:disabled) {
  background: rgba(255, 59, 48, 0.18);
  box-shadow: 
    0 2px 10px rgba(255, 59, 48, 0.25),
    inset 0 0 3px 1px rgba(255, 255, 255, 0.7),
    inset 0 0 3px 5px rgba(255, 255, 255, 0.15),
    inset -6px -6px 12px 0px rgba(255, 255, 255, 0.2),
    inset 0 10px 8px 4px rgba(0, 0, 0, 0.05);
}

/* ============================================
   12. FORMS - Liquid Glass Inputs
   ============================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  color: var(--text-primary);
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.25) 0%, 
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.18) 100%);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.5),
    inset 0 -1px 2px rgba(255, 255, 255, 0.2);
}

.form-control:focus {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.35) 0%, 
    rgba(255, 255, 255, 0.18) 50%,
    rgba(255, 255, 255, 0.28) 100%);
  border-color: var(--accent);
  box-shadow: 
    0 0 0 3px var(--accent-light),
    inset 0 1px 2px rgba(255, 255, 255, 0.6),
    inset 0 -1px 2px rgba(255, 255, 255, 0.25);
}

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

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Dark mode form controls */
:root[data-theme="dark"] .form-control {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.08) 0%, 
    rgba(255, 255, 255, 0.03) 50%,
    rgba(255, 255, 255, 0.06) 100%);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.08),
    inset 0 -1px 2px rgba(255, 255, 255, 0.02);
}

:root[data-theme="dark"] .form-control:focus {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.12) 0%, 
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0.1) 100%);
}

/* ============================================
   13. MODALS - Liquid Glass Popups
   ============================================ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2); /* Lighter backdrop */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: modalBgFade 0.3s ease;
}

.modal.active {
  display: flex;
}

@keyframes modalBgFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Glass layers for modal - using layer system */
.modal-content > .glass-filter {
  backdrop-filter: blur(50px) saturate(180%);
  -webkit-backdrop-filter: blur(50px) saturate(180%);
}

.modal-content > .glass-overlay {
  background: var(--liquid-glass-strong);
  border: 1px solid var(--liquid-glass-border-strong);
  box-shadow: var(--inner-glow-strong);
}

.modal-content > .glass-specular {
  display: none;
}

.modal-content > .glass-specular::before {
  display: none;
}

/* Modal content wrapper */
.modal-content > .glass-content {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: 90vh;
}

/* Dark mode modal with glass layers */
:root[data-theme="dark"] .modal-content {
  box-shadow: var(--shadow-xl);
}

:root[data-theme="dark"] .modal-content > .glass-overlay {
  background: var(--liquid-glass-strong);
  border-color: var(--liquid-glass-border-strong);
}

:root[data-theme="dark"] .modal-content > .glass-specular {
  display: none;
}

:root[data-theme="dark"] .modal-content > .glass-specular::before {
  display: none;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal h3 {
  margin: 0 0 1rem 0;
  text-align: center;
  position: relative;
  z-index: 1;
}

.modal-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  position: relative;
  z-index: 1;
}

.modal-buttons .btn {
  flex: 1;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-secondary);
  background: var(--liquid-glass-light);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: var(--liquid-glass-medium);
  color: var(--text-primary);
}

/* ============================================
   14. PROMPTS - Auth & Install Screens
   ============================================ */
.install-prompt,
.password-prompt {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg-base);
}

.install-prompt::before,
.password-prompt::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg-gradient);
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
}

.install-prompt::after,
.password-prompt::after {
  content: "";
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 50% 40% at 20% 20%, var(--blob-1), transparent),
    radial-gradient(ellipse 45% 35% at 80% 30%, var(--blob-2), transparent),
    radial-gradient(ellipse 40% 45% at 70% 80%, var(--blob-3), transparent);
  filter: blur(60px);
  animation: blobFloat 25s ease-in-out infinite;
}

.prompt-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  text-align: center;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.75) 0%, 
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0.65) 100%);
  backdrop-filter: blur(40px) saturate(180%) brightness(1.1);
  -webkit-backdrop-filter: blur(40px) saturate(180%) brightness(1.1);
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  box-shadow: 
    0 20px 70px rgba(0, 0, 0, 0.12),
    0 8px 30px rgba(0, 0, 0, 0.08),
    0 40px 100px rgba(102, 126, 234, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 1),
    inset 0 -2px 4px rgba(255, 255, 255, 0.6);
  padding: 2.5rem 2rem;
  overflow: hidden;
  animation: promptFloat 3s ease-in-out infinite;
}

@keyframes promptFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Top specular highlight */
.prompt-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 50%;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(255, 255, 255, 0.5) 40%,
    transparent 100%);
  pointer-events: none;
  border-radius: var(--radius-xl) var(--radius-xl) 50% 50%;
  z-index: 1;
}

/* Side edge highlights */
.prompt-content::after {
  content: "";
  position: absolute;
  top: 8%;
  bottom: 8%;
  right: 0;
  width: 1px;
  background: linear-gradient(180deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.5) 20%,
    rgba(255, 255, 255, 0.5) 80%,
    transparent 100%);
  pointer-events: none;
}

/* Dark mode prompt */
:root[data-theme="dark"] .prompt-content {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.15) 0%, 
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.12) 100%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 16px 64px rgba(0, 0, 0, 0.5),
    0 4px 16px rgba(0, 0, 0, 0.4),
    inset 0 1px 2px rgba(255, 255, 255, 0.15),
    inset 0 -1px 2px rgba(255, 255, 255, 0.05);
}

:root[data-theme="dark"] .prompt-content::before {
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.2) 0%, 
    rgba(255, 255, 255, 0.05) 35%,
    transparent 100%);
}

.prompt-icon {
  font-size: 4rem;
  margin: 0 0 1rem 0;
  position: relative;
  z-index: 2;
}

.prompt-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  position: relative;
  z-index: 2;
}

.prompt-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 1.5rem 0;
  position: relative;
  z-index: 2;
}

.prompt-content.prompt-wide {
  max-width: 420px;
}

.prompt-description.align-left {
  text-align: left;
  margin-bottom: 1rem;
}

.prompt-hidden,
.screen-hidden {
  display: none;
}

.onboarding-steps {
  text-align: left;
  margin: 1rem 0;
  padding: 1rem;
  background: var(--liquid-glass-light);
  border: 1px solid var(--liquid-glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  z-index: 1;
}

.onboarding-step.pending {
  opacity: 0.5;
}

.onboarding-status {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  text-align: left;
}

.onboarding-error {
  display: none;
  background: var(--danger-light);
  border: 1px solid rgba(255, 59, 48, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--danger);
  position: relative;
  z-index: 1;
}

.onboarding-error.visible {
  display: block;
}

.onboarding-action-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
}

/* スキップボタンスタイル */
.onboarding-skip-btn {
  background: rgba(255, 255, 255, 0.2) !important;
  color: var(--text-secondary) !important;
  font-size: 0.95rem;
  min-width: 80px;
}

.onboarding-skip-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.3) !important;
  color: var(--text) !important;
}

.onboarding-debug-area {
  margin-top: 1rem;
  padding: 0.65rem;
  background: var(--liquid-glass-light);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', 'SFMono-Regular', monospace;
  max-height: 150px;
  overflow-y: auto;
  display: none;
  position: relative;
  z-index: 1;
}

.onboarding-debug-area.visible {
  display: block;
}

.onboarding-debug-toggle {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  opacity: 0.6;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.onboarding-debug-toggle:hover {
  opacity: 1;
}

/* Auth input - Enhanced Liquid Glass */
.neu-input {
  width: 100%;
  padding: 1.15rem 1.5rem;
  font-size: 1.1rem;
  text-align: center;
  letter-spacing: 0.2em;
  font-weight: 500;
  color: var(--text-primary);
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.5) 0%, 
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0.4) 100%);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  outline: none;
  margin-bottom: 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.06),
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(255, 255, 255, 0.3);
}

.neu-input::placeholder {
  color: var(--text-tertiary);
  opacity: 0.8;
}

.neu-input:focus {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.6) 0%, 
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0.5) 100%);
  border-color: var(--accent);
  box-shadow: 
    0 0 0 4px var(--accent-light),
    0 6px 24px rgba(102, 126, 234, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.9),
    inset 0 -2px 4px rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

/* Dark mode neu-input */
:root[data-theme="dark"] .neu-input {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.04) 50%,
    rgba(255, 255, 255, 0.08) 100%);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.1),
    inset 0 -1px 2px rgba(255, 255, 255, 0.03);
}

:root[data-theme="dark"] .neu-input:focus {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.15) 0%, 
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0.12) 100%);
}

/* Main action button - Enhanced */
.neu-button {
  width: 100%;
  padding: 1.15rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  background: var(--accent-gradient);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  cursor: pointer;
  box-shadow: 
    0 8px 32px rgba(102, 126, 234, 0.4),
    0 4px 16px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    inset 0 -2px 4px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.neu-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.5) 0%, 
    rgba(255, 255, 255, 0.2) 40%,
    transparent 100%);
  pointer-events: none;
  border-radius: inherit;
}

.neu-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.neu-button:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 12px 40px rgba(102, 126, 234, 0.5),
    0 6px 20px rgba(0, 0, 0, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 0.6),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
}

.neu-button:hover:not(:disabled)::after {
  opacity: 1;
}

.neu-button:active:not(:disabled) {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 
    0 6px 24px rgba(102, 126, 234, 0.4),
    0 3px 12px rgba(0, 0, 0, 0.12),
    inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.neu-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.error-message {
  display: none;
  margin-top: 1rem;
  padding: 0.75rem;
  font-size: 0.9rem;
  color: var(--danger);
  background: var(--danger-light);
  border-radius: var(--radius-sm);
  position: relative;
  z-index: 1;
}

/* ============================================
   15. SETTINGS - Liquid Glass Cards
   ============================================ */
#settingsTab {
  background: transparent;
}

#settingsTab .container {
  max-width: 640px;
  padding-bottom: calc(var(--tab-bar-height) + 3rem + var(--safe-bottom));
}

#settingsTab h1 {
  text-align: left;
  margin-bottom: 1.5rem;
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.settings-group-title {
  margin: 0 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.settings-group-card {
  position: relative;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.4) 0%, 
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.3) 100%);
  backdrop-filter: blur(50px) saturate(200%) brightness(1.02);
  -webkit-backdrop-filter: blur(50px) saturate(200%) brightness(1.02);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.05),
    0 1px 4px rgba(0, 0, 0, 0.03),
    0 12px 32px rgba(100, 150, 200, 0.1),
    inset 0 1px 3px rgba(255, 255, 255, 0.8),
    inset 0 -1px 3px rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

/* Top specular highlight for settings card */
.settings-group-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 30%;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.7) 0%, 
    rgba(255, 255, 255, 0.2) 40%,
    transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* Dark mode settings card */
:root[data-theme="dark"] .settings-group-card {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.04) 50%,
    rgba(255, 255, 255, 0.08) 100%);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.35),
    0 1px 4px rgba(0, 0, 0, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.08),
    inset 0 -1px 2px rgba(255, 255, 255, 0.02);
}

:root[data-theme="dark"] .settings-group-card::before {
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.02) 40%,
    transparent 100%);
}

.settings-list-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
  z-index: 2;
}

:root[data-theme="dark"] .settings-list-item {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

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

.settings-list-item:active {
  background: rgba(255, 255, 255, 0.15);
}

:root[data-theme="dark"] .settings-list-item:active {
  background: rgba(255, 255, 255, 0.05);
}

.settings-item-title {
  flex: 1;
  text-align: left;
}

.settings-list-item .chevron {
  color: var(--text-tertiary);
  font-size: 1.2rem;
}

/* Settings Panel - Enhanced Liquid Glass */
.settings-panel {
  display: none;
  position: relative;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.4) 0%, 
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.3) 100%);
  backdrop-filter: blur(50px) saturate(200%) brightness(1.02);
  -webkit-backdrop-filter: blur(50px) saturate(200%) brightness(1.02);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.05),
    0 1px 4px rgba(0, 0, 0, 0.03),
    0 12px 32px rgba(100, 150, 200, 0.1),
    inset 0 1px 3px rgba(255, 255, 255, 0.8),
    inset 0 -1px 3px rgba(255, 255, 255, 0.3);
  padding: 1.5rem;
  animation: liquidFadeIn 0.35s ease;
  overflow: hidden;
}

/* Top highlight for settings panel */
.settings-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 30%;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.7) 0%, 
    rgba(255, 255, 255, 0.2) 40%,
    transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* Dark mode settings panel */
:root[data-theme="dark"] .settings-panel {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.04) 50%,
    rgba(255, 255, 255, 0.08) 100%);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.35),
    0 1px 4px rgba(0, 0, 0, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.08),
    inset 0 -1px 2px rgba(255, 255, 255, 0.02);
}

:root[data-theme="dark"] .settings-panel::before {
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.02) 40%,
    transparent 100%);
}

.settings-panel-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

.settings-panel-header h3 {
  flex: 1;
  margin: 0;
}

.btn-back {
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.3) 0%, 
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.22) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.5),
    inset 0 -1px 2px rgba(255, 255, 255, 0.2);
}

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

:root[data-theme="dark"] .btn-back {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.04) 50%,
    rgba(255, 255, 255, 0.08) 100%);
  border-color: rgba(255, 255, 255, 0.12);
}

.settings-status-text {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  z-index: 2;
}

.settings-status-detail {
  margin: 0.25rem 0 0 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 2;
}

/* Segmented Control - Liquid Glass */
.segmented {
  display: inline-flex;
  padding: 5px;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.25) 0%, 
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.18) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-full);
  gap: 4px;
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.5),
    inset 0 -1px 2px rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 2;
}

:root[data-theme="dark"] .segmented {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.08) 0%, 
    rgba(255, 255, 255, 0.03) 50%,
    rgba(255, 255, 255, 0.06) 100%);
  border-color: rgba(255, 255, 255, 0.12);
}

.segment-btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.segment-btn.active {
  color: white;
  background: linear-gradient(135deg, #007AFF 0%, #0055DD 50%, #5856D6 100%);
  box-shadow: 
    0 4px 12px rgba(0, 122, 255, 0.35),
    inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.segment-btn.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 50%;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.35) 0%, 
    transparent 100%);
  pointer-events: none;
  border-radius: var(--radius-full);
}

/* ============================================
   16. OWNER DASHBOARD
   ============================================ */
body.owner-page {
  padding-bottom: 0;
}

body.owner-page .tab-bar,
body.owner-page .floating-add-btn {
  display: none !important;
}

.owner-shell {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 3.5rem) clamp(1rem, 4vw, 3rem) calc(2.5rem + var(--safe-bottom));
}

.owner-hero {
  text-align: center;
  margin-bottom: 2.25rem;
  position: relative;
  z-index: 1;
}

.owner-hero-eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
  display: inline-block;
}

.owner-hero-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin-bottom: 0.5rem;
}

.owner-hero-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0 auto;
  max-width: 560px;
}

.summer-vacation-notice {
  margin-top: 1.5rem;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, #ffd54f 0%, #ff8f00 50%, #ff6f00 100%);
  color: #4a2a00;
  font-weight: 600;
  box-shadow: 0 20px 40px rgba(255, 143, 0, 0.25);
}

:root[data-theme="dark"] .summer-vacation-notice {
  color: #fffefa;
  box-shadow: 0 20px 40px rgba(255, 143, 0, 0.35);
}

.owner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.owner-card {
  position: relative;
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 2vw, 2rem);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.owner-card.liquid-glass {
  border-radius: var(--radius-xl);
}

.owner-card--wide {
  grid-column: span 2;
}

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

.owner-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

.owner-card-title {
  margin: 0;
  font-size: 1.25rem;
}

.owner-card-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.owner-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-code-display {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.35rem;
  text-align: center;
  padding: 1rem 1.25rem;
  margin: 1rem auto;
  border-radius: var(--radius-lg);
  background: var(--accent-light);
  color: var(--accent);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6), 0 20px 40px rgba(0, 122, 255, 0.15);
}

.owner-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.owner-meta {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

:root[data-theme="dark"] .owner-meta {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.owner-meta-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.owner-meta-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.owner-toolbar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.25rem 0;
}

.owner-toolbar button {
  flex: 1 1 150px;
}

.owner-divider {
  height: 1px;
  width: 100%;
  background: rgba(255, 255, 255, 0.25);
  margin: 1.25rem 0;
}

:root[data-theme="dark"] .owner-divider {
  background: rgba(255, 255, 255, 0.07);
}

.owner-note {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
}

.owner-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

:root[data-theme="dark"] .owner-badge {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.result {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  display: none;
  font-weight: 500;
  background: var(--liquid-glass-light);
  border: 1px solid var(--liquid-glass-border);
  color: var(--text-primary);
}

.result.success {
  display: block;
  background: var(--success-light);
  border-color: rgba(52, 199, 89, 0.35);
  color: var(--success);
}

.result.error {
  display: block;
  background: var(--danger-light);
  border-color: rgba(255, 59, 48, 0.3);
  color: var(--danger);
}

/* ============================================
   17. NOTIFICATIONS & POPUPS
   ============================================ */
#popup,
.notification-popup {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 4000;
  padding: 1rem 1.5rem;
  background: var(--liquid-glass-strong);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  border: 1px solid var(--liquid-glass-border-strong);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg), var(--inner-glow);
  font-weight: 500;
  color: var(--text-primary);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}

#popup.show,
.notification-popup.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ============================================
  18. RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  :root {
    --radius-lg: 20px;
    --radius-xl: 28px;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  .container {
    padding: 0.75rem;
  }
  
  .tab-bar {
    max-width: 300px;
    height: 64px;
  }
  
  .weekday-selector {
    gap: 0.35rem;
  }
  
  .nav-arrow {
    width: 38px;
    height: 38px;
  }
  
  .weekday-chip {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
  
  thead th {
    padding: 0.75rem 0.5rem;
    font-size: 0.7rem;
  }
  
  tbody th, tbody td {
    padding: 0.875rem 0.5rem;
    font-size: 0.9rem;
  }
  
  .homework-item {
    padding: 1rem;
  }
  
  .modal-content {
    padding: 1.25rem;
    border-radius: var(--radius-lg);
  }
  
  .prompt-content {
    padding: 1.5rem 1.25rem;
    max-width: 340px;
  }
  
  .settings-form .form-row {
    grid-template-columns: 1fr;
  }

  .owner-grid {
    grid-template-columns: 1fr;
  }

  .owner-card--wide {
    grid-column: span 1;
  }

  .owner-toolbar {
    flex-direction: column;
  }
}

@media (max-width: 380px) {
  .tab-bar {
    width: calc(100% - 1.5rem);
    max-width: 280px;
  }
  
  .prompt-content {
    padding: 1.25rem 1rem;
  }
  
  .neu-button {
    font-size: 1rem;
    padding: 0.875rem;
  }
}

/* Large screens */
@media (min-width: 1024px) {
  .container {
    padding: 2rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .tab-bar {
    max-width: 380px;
    height: 72px;
  }
  
  .homework-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   18. ACCESSIBILITY & UTILITIES
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visible for keyboard navigation */
.neu-focus-visible:focus-visible,
.btn:focus-visible,
.form-control:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Header icons */
.header-icon {
  display: inline-block;
  margin-right: 0.25rem;
}

/* Text utilities */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-secondary); }
.text-center { text-align: center; }

/* Edit room button */
.edit-room-btn {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.edit-room-btn:active {
  transform: scale(0.95);
}

/* Custom class items */
.custom-classes-list {
  display: grid;
  gap: 0.5rem;
}

.custom-class-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--liquid-glass-light);
  border: 1px solid var(--liquid-glass-border);
  border-radius: var(--radius-md);
}

.custom-class-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.custom-class-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.custom-class-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Onboarding specific styles */
.onboarding-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.step-icon {
  font-size: 1.1rem;
}

/* File preview */
.file-preview-container {
  margin-top: 1rem;
}

/* Homework title clickable */
#homeworkTitle {
  cursor: pointer;
  user-select: none;
  padding: 0.5rem;
  margin: -0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

#homeworkTitle:hover {
  background: var(--accent-light);
}

#homeworkTitle:active {
  transform: scale(0.98);
}

/* Settings error banner */
#settingsErrorBanner {
  display: none;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: var(--danger-light);
  border: 1px solid rgba(255, 59, 48, 0.3);
  color: var(--danger);
  font-weight: 600;
  margin-bottom: 1rem;
}

#settingsErrorBanner.visible {
  display: block;
}

/* ============================================
   19. FLOATING ACTION BUTTON - Liquid Glass
   ============================================ */
.floating-add-btn {
  display: none;
  position: fixed;
  right: 1.5rem;
  bottom: calc(var(--tab-bar-height) + 2rem + var(--safe-bottom));
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 1.75rem;
  font-weight: 300;
  color: white;
  background: 
    linear-gradient(135deg, rgba(0, 122, 255, 0.9) 0%, rgba(88, 86, 214, 0.9) 100%),
    linear-gradient(var(--glass-angle), 
      rgba(0, 0, 0, 0.2), 
      rgba(255, 255, 255, 0.5) 20% 80%, 
      rgba(0, 0, 0, 0.2));
  border: none;
  cursor: pointer;
  box-shadow: 
    0 6px 24px rgba(0, 122, 255, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.12),
    inset 0 0 4px 2px rgba(255, 255, 255, 0.5),
    inset 0 0 4px 6px rgba(255, 255, 255, 0.15),
    inset -6px -6px 15px 0px rgba(255, 255, 255, 0.2),
    inset 0 10px 10px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 500;
  overflow: hidden;
}

/* Gradient border for FAB */
.floating-add-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 45%;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.55) 0%, 
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%);
  pointer-events: none;
  border-radius: 50%;
  opacity: 0.9;
}

/* Gradient border ring */
.floating-add-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(var(--glass-angle), 
    rgba(0, 0, 0, 0.15), 
    rgba(255, 255, 255, 0.65) 25% 75%, 
    rgba(0, 0, 0, 0.15));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) border-box;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) border-box;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.floating-add-btn:active {
  transform: rotateX(12deg) scale(0.88);
  --glass-angle: 40deg;
}

.floating-add-btn:active::before {
  opacity: 0.5;
}

#homeworkTab.active ~ .floating-add-btn,
.floating-add-btn.visible {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   20. CAFETERIA SECTION
   ============================================ */
.cafeteria-content {
  display: grid;
  gap: 1.5rem;
}

.cafeteria-section {
  position: relative;
  background: var(--liquid-glass-medium);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--liquid-glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md), var(--inner-glow);
  overflow: hidden;
  padding: 1rem;
}

.cafeteria-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 40%;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.4) 0%, 
    transparent 100%);
  pointer-events: none;
}

.cafeteria-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  text-align: center;
  position: relative;
  z-index: 1;
}

.cafeteria-image-container {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--liquid-glass-light);
  min-height: 200px;
}

.cafeteria-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* ============================================
   21. FILE UPLOAD STYLES - Liquid Glass
   ============================================ */
.file-upload-container {
  margin-bottom: 0.5rem;
}

.file-select-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  background: transparent;
  backdrop-filter: blur(3px) saturate(150%);
  -webkit-backdrop-filter: blur(3px) saturate(150%);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 0 3px 1px rgba(255, 255, 255, 0.7),
    inset 0 0 3px 5px rgba(255, 255, 255, 0.18),
    inset -8px -8px 15px 0px rgba(255, 255, 255, 0.22),
    inset 0 12px 10px 6px rgba(0, 0, 0, 0.04);
}

/* Dashed border overlay */
.file-select-btn::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  border: 1.5px dashed var(--liquid-glass-border-strong);
  pointer-events: none;
  opacity: 0.7;
}

/* Gradient border ring */
.file-select-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(var(--glass-angle), 
    rgba(0, 0, 0, 0.08), 
    rgba(255, 255, 255, 0.55) 20% 80%, 
    rgba(0, 0, 0, 0.08));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) border-box;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) border-box;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.file-select-btn:hover {
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.08),
    inset 0 0 3px 1px rgba(255, 255, 255, 0.8),
    inset 0 0 3px 5px rgba(255, 255, 255, 0.22),
    inset -8px -8px 15px 0px rgba(255, 255, 255, 0.28),
    inset 0 12px 10px 6px rgba(0, 0, 0, 0.05);
}

.file-select-btn:hover::before {
  border-color: var(--accent);
  opacity: 1;
}

.file-select-btn:active {
  transform: rotateX(10deg) scale(0.96);
  --glass-angle: 45deg;
}

.file-upload-hidden {
  display: none;
}

.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* ============================================
   22. SUBJECT SUGGESTIONS
   ============================================ */
.subject-search-container {
  position: relative;
}

.subject-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: var(--liquid-glass-strong);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--liquid-glass-border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 100;
  display: none;
}

.subject-suggestions.active {
  display: block;
}

.subject-suggestion-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.subject-suggestion-item:hover,
.subject-suggestion-item:focus {
  background: var(--liquid-glass-light);
}

/* ============================================
   23. EMPTY & SPECIAL STATES
   ============================================ */
.empty-notice {
  color: var(--text-tertiary);
  font-style: italic;
}

.empty-homework {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-secondary);
}

.empty-homework-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-homework-text {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 0 0.5rem 0;
}

.empty-homework-sub {
  font-size: 0.9rem;
  margin: 0;
  color: var(--text-tertiary);
}

/* ============================================
   24. DARK MODE SPECIFIC ADJUSTMENTS
   ============================================ */
:root[data-theme="dark"] .cafeteria-image-container {
  background: rgba(255, 255, 255, 0.05);
}

:root[data-theme="dark"] .file-select-btn {
  border-color: var(--liquid-glass-border);
}

:root[data-theme="dark"] .prompt-content::before,
:root[data-theme="dark"] .modal-content::before,
:root[data-theme="dark"] .table-container::before,
:root[data-theme="dark"] .homework-item::before,
:root[data-theme="dark"] .cafeteria-section::before {
  opacity: 0.3;
}

/* ============================================
   25. ANIMATIONS
   ============================================ */
.fade-in {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Pulse animation for loading states */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Shimmer effect for loading */
.shimmer {
  background: linear-gradient(
    90deg,
    var(--liquid-glass-light) 25%,
    var(--liquid-glass-medium) 50%,
    var(--liquid-glass-light) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

/* ============================================
   26. FORM LAYOUT UTILITIES
   ============================================ */
.settings-form .form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.settings-form .form-group {
  margin-bottom: 1rem;
}

.settings-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--liquid-glass-border);
}

.settings-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  font-weight: 600;
}

/* ============================================
   27. MISC & OVERRIDES
   ============================================ */
/* Modal description */
.modal-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

/* Prevent text selection on UI elements */
.tab-item,
.weekday-chip,
.btn,
.segment-btn,
.nav-arrow {
  user-select: none;
  -webkit-user-select: none;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Print styles */
@media print {
  body::before,
  body::after,
  .tab-bar,
  .floating-add-btn {
    display: none !important;
  }
  
  .tab-content {
    display: block !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --liquid-glass-border: rgba(0, 0, 0, 0.5);
    --liquid-glass-border-strong: rgba(0, 0, 0, 0.8);
  }
  
  :root[data-theme="dark"] {
    --liquid-glass-border: rgba(255, 255, 255, 0.5);
    --liquid-glass-border-strong: rgba(255, 255, 255, 0.8);
  }
}

/* ============================================
   28. POPUP MESSAGE TOAST
   ============================================ */
.popup-message {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 5000;
  padding: 1rem 1.5rem;
  background: var(--liquid-glass-strong);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  border: 1px solid var(--liquid-glass-border-strong);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg), var(--inner-glow);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-primary);
  max-width: calc(100% - 2rem);
  text-align: center;
  animation: popupSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
             popupFadeOut 0.3s ease 2.7s forwards;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes popupFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ============================================
   29. ATTENDANCE POPUP
   ============================================ */
.attendance-popup {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease;
}

.attendance-popup-content {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--liquid-glass-strong);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  border: 1px solid var(--liquid-glass-border-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl), var(--inner-glow-strong);
  overflow: hidden;
  animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.attendance-popup-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 50%;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.5) 0%, 
    transparent 100%);
  pointer-events: none;
}

.attendance-popup-subject {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.attendance-popup-time {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0 0 1.5rem 0;
  position: relative;
  z-index: 1;
}

.attendance-popup .btn {
  width: 100%;
  position: relative;
  z-index: 1;
}

.attendance-popup .btn + .btn {
  margin-top: 0.75rem;
}

.attendance-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--text-secondary);
  background: var(--liquid-glass-light);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  transition: all 0.2s ease;
}

.attendance-popup-close:hover {
  background: var(--liquid-glass-medium);
  color: var(--text-primary);
}
