:root {
  /* Color Palette - Dark Premium Theme */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-glass: rgba(30, 41, 59, 0.7);
  --bg-glass-border: rgba(255, 255, 255, 0.1);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  
  --accent-primary: #6366f1; /* Indigo */
  --accent-secondary: #8b5cf6; /* Violet */
  --accent-hover: #4f46e5;
  
  /* Focus Timer Colors */
  --color-work: #ef4444; /* Soft Red for focus */
  --color-break: #10b981; /* Emerald for break */
  
  /* Typography */
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Layout & Spacing */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.4);
  
  /* Transitions */
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Background Animated Gradient Mesh (Optional extra polish) */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 40%);
  z-index: -1;
  pointer-events: none;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-primary);
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navigation */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--bg-glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--bg-glass-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Main Content area */
.main-content {
  flex: 1;
  padding: 4rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* Glassmorphism Card Utilities */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

/* Hero Section */
.hero {
  text-align: center;
  max-width: 800px;
  margin-bottom: 4rem;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Pomodoro Tool Section */
.pomodoro-container {
  width: 100%;
  max-width: 500px;
  text-align: center;
}

.timer-modes {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.mode-btn.active {
  color: var(--text-primary);
  background: var(--bg-secondary);
  box-shadow: var(--shadow-sm);
}

.timer-display {
  font-size: 6rem;
  font-weight: 800;
  line-height: 1;
  margin: 2rem 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: -2px;
}

.timer-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid var(--bg-glass-border);
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: auto;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .navbar {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1rem 0.5rem 1rem;
    height: auto;
  }
  
  .nav-links {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  
  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a, .nav-links .btn {
    flex-shrink: 0;
    white-space: nowrap;
  }
  
  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .timer-display {
    font-size: 4.5rem;
  }
  
  .timer-modes {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
  
  .main-content {
    padding: 2rem 1rem;
  }
  
  .dashboard-header {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .timer-controls {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-large {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .timer-display {
    font-size: 3.5rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .glass-card {
    padding: 1.5rem 1rem;
  }
}

/* Expanding FAB Menu */
.fab-container {
  position: fixed;
  bottom: 15px;
  right: 15px;
  display: flex;
  flex-direction: column-reverse; /* Stack bottom to top */
  align-items: flex-end;
  gap: 12px;
  z-index: 1000;
}

.fab {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  font-size: 24px;
  border: none;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), background var(--transition-fast);
  position: relative;
}

.fab:hover {
  transform: scale(1.1);
}

.sos-fab {
  background: linear-gradient(135deg, var(--color-work), var(--accent-secondary));
}

.sub-fab {
  width: 40px;
  height: 40px;
  font-size: 18px;
  opacity: 0;
  transform: translateY(20px) scale(0.5);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fab-container.expanded .sub-fab {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

#main-fab {
  transition: transform 0.3s ease;
}

.fab-container.expanded #main-fab {
  transform: rotate(45deg);
}

/* Brain Dump Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity var(--transition-fast);
}

/* Navbar Hide on Scroll */
.navbar {
  transition: transform 0.3s ease-in-out;
  position: sticky;
  top: 0;
  z-index: 500;
}

.navbar-hidden {
  transform: translateY(-100%);
}

/* Forms and Auth Styles (Restored from refactor) */
.auth-container {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}
.form-control {
    width: 100%;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--bg-glass-border);
    background: rgba(0,0,0,0.2);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.3s;
    font-family: inherit;
}
.form-control:focus {
    border-color: var(--accent-primary);
}
.btn-full {
    width: 100%;
    margin-top: 1rem;
}
.auth-link {
    display: block;
    margin-top: 1.5rem;
    color: var(--accent-primary);
    text-decoration: none;
}
.auth-link:hover {
    text-decoration: underline;
}
.error {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--color-work);
    color: #fca5a5;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-sm);
}
.message {
    background: rgba(34, 197, 94, 0.1);
    border-left: 4px solid var(--color-break);
    color: #86efac;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-sm);
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  width: 90%;
  max-width: 500px;
  transform: translateY(0);
  transition: transform var(--transition-fast);
}

.modal-overlay.hidden .modal-content {
  transform: translateY(20px);
}

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

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--color-work);
}

.modal-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

#dump-text {
  width: 100%;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-glass-border);
  background: rgba(0,0,0,0.2);
  color: var(--text-primary);
  font-family: var(--font-main);
  resize: vertical;
  margin-bottom: 1.5rem;
  outline: none;
}

#dump-text:focus {
  border-color: var(--accent-primary);
}

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

.feedback-msg {
  color: var(--color-break);
  font-weight: 600;
  animation: fadeIn 0.3s;
}

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