@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Color system */
  --bg-primary: #0b0f17;
  --bg-secondary: #131b2e;
  --card-bg: rgba(20, 27, 47, 0.65);
  --card-border: rgba(255, 255, 255, 0.06);
  --card-hover-border: rgba(255, 255, 255, 0.12);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-physics-start: #06b6d4;
  --accent-physics-end: #3b82f6;
  --accent-chem-start: #10b981;
  --accent-chem-end: #059669;
  --accent-maths-start: #ec4899;
  --accent-maths-end: #8b5cf6;
  
  --success: #10b981;
  --danger: #ef4444;
  --progress-bg: rgba(255, 255, 255, 0.05);
  
  /* Layout details */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --glow-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.12) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(6, 182, 212, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  padding: 2.5rem 1.5rem;
  line-height: 1.6;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
}

/* Header & Typography */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.date-badge {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  backdrop-filter: blur(12px);
  box-shadow: var(--glow-shadow);
}

/* Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2.2fr 1.3fr;
  gap: 1.75rem;
  margin-bottom: 1.75rem;
}

#subjects-dashboard {
  grid-template-columns: 1.2fr 1fr;
}

/* Glassmorphic Card base */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--glow-shadow);
  transition: var(--transition-smooth);
}

.card:hover {
  border-color: var(--card-hover-border);
}

/* Progress Section */
.goal-card {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 2.5fr;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
}

.goal-info h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.goal-info p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.goal-status {
  font-weight: 700;
  color: var(--text-primary);
}

.goal-progress-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.progress-percent {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.progress-bar-track {
  width: 100%;
  height: 16px;
  background: var(--progress-bg);
  border-radius: 50px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6366f1, #3b82f6, #06b6d4);
  border-radius: 50px;
  transition: width 0.8s cubic-bezier(0.1, 0.8, 0.3, 1);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
  position: relative;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shine 2.5s infinite linear;
}

@keyframes shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-bar-fill.target-reached {
  background: linear-gradient(90deg, #10b981, #34d399, #059669);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.6);
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 15px rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 0 30px rgba(16, 185, 129, 0.8); }
}

/* Charts Card styling */
.chart-card {
  display: flex;
  flex-direction: column;
}

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

.chart-title-group h2 {
  font-size: 1.35rem;
  font-weight: 700;
}

.chart-title-group p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* View switcher styling */
.tabs-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

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

.tab-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.chart-container {
  position: relative;
  flex-grow: 1;
  min-height: 320px;
}

/* Add Log Form styling */
.form-card h2 {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.form-group {
  margin-bottom: 1.25rem;
}

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

/* Subject Radio Selectors */
.subject-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.subject-radio {
  position: relative;
}

.subject-radio input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.subject-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
  text-align: center;
}

.subject-label .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-bottom: 0.35rem;
}

/* Subject dots colors */
.physics-dot { background: linear-gradient(135deg, var(--accent-physics-start), var(--accent-physics-end)); }
.chem-dot { background: linear-gradient(135deg, var(--accent-chem-start), var(--accent-chem-end)); }
.maths-dot { background: linear-gradient(135deg, var(--accent-maths-start), var(--accent-maths-end)); }

/* Subject Selected Styles */
.subject-radio input[value="physics"]:checked + .subject-label {
  border-color: var(--accent-physics-start);
  background: rgba(6, 182, 212, 0.08);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
  color: var(--accent-physics-start);
}

.subject-radio input[value="chemistry"]:checked + .subject-label {
  border-color: var(--accent-chem-start);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
  color: var(--accent-chem-start);
}

.subject-radio input[value="maths"]:checked + .subject-label {
  border-color: var(--accent-maths-start);
  background: rgba(236, 72, 153, 0.08);
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.2);
  color: var(--accent-maths-start);
}

/* Inputs styling */
.input-field {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(20, 27, 47, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.input-field:focus {
  outline: none;
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Quick Hours Add */
.quick-hours {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.quick-btn {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.quick-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--card-hover-border);
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 0.95rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #4f46e5, #3b82f6);
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

.submit-btn:active {
  transform: translateY(0);
}

/* Secondary Panels: Analytics & History */
.stats-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Log list / History section */
.history-section {
  grid-column: span 2;
}

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

.history-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
}

.clear-data-btn {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--danger);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.clear-data-btn:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: var(--danger);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

/* Custom Scrollbar for history list */
.history-list::-webkit-scrollbar {
  width: 6px;
}

.history-list::-webkit-scrollbar-track {
  background: transparent;
}

.history-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: var(--transition-smooth);
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateX(4px);
}

.history-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-grow: 1;
}

.history-subject-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-physics {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-physics-start);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.badge-chemistry {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-chem-start);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-maths {
  background: rgba(236, 72, 153, 0.12);
  color: var(--accent-maths-start);
  border: 1px solid rgba(236, 72, 153, 0.2);
}

.history-details {
  display: flex;
  flex-direction: column;
}

.history-notes {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.history-notes-empty {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  font-style: italic;
}

.history-time-info {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  gap: 0.75rem;
}

.history-hours {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-right: 1.5rem;
  color: var(--text-primary);
}

.delete-log-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 6px;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-log-btn:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

/* Empty placeholder */
.no-data-placeholder {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Responsive queries */
@media (max-width: 1024px) {
  .dashboard-grid,
  #subjects-dashboard {
    grid-template-columns: 1fr;
  }
  
  .goal-card {
    grid-column: span 1;
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .history-section {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  body {
    padding: 1.5rem 1rem;
  }
  
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .stats-cards-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .tabs-switcher {
    width: 100%;
    justify-content: space-between;
  }
  
  .tab-btn {
    flex-grow: 1;
    text-align: center;
    padding: 0.5rem 0.5rem;
  }

  /* Navigation tab responsive wraps */
  .nav-tabs {
    max-width: 100%;
    gap: 2px;
  }

  .nav-tab {
    padding: 0.65rem 0.4rem;
    font-size: 0.825rem;
    gap: 0.25rem;
  }

  .nav-tab svg {
    display: none; /* Hide svg icons on very small screens to fit text labels comfortably */
  }

  /* Subject list wrapping responsive fixes */
  .subject-selector {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.5rem;
  }

  /* Visual timeline elements responsive alignment fixes */
  .timeline-container {
    padding-left: 1.5rem;
    margin-left: 0.25rem;
  }

  .timeline-item {
    padding: 1rem;
  }

  .timeline-item::before {
    left: calc(-1.5rem - 6px);
  }

  /* Comprehensive card & alignment overrides for mobile phones */
  .card {
    padding: 1.25rem;
    border-radius: var(--radius-md);
  }

  .goal-card {
    padding: 1.25rem;
    gap: 1.25rem;
  }

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

  .history-header {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .history-item {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.85rem;
  }

  .history-meta {
    width: 100%;
  }

  .history-hours {
    margin-right: 0;
    font-size: 1rem;
  }

  .history-actions {
    margin-left: auto;
  }

  .quick-hours {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .subject-checkboxes {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
}

/* Edit action styling */
.inline-action-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 4px;
}

.inline-action-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.edit-log-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 6px;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.edit-log-btn:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.history-actions {
  display: flex;
  gap: 0.25rem;
}

/* Edit Mode visual cue for the form card */
.form-card.edit-mode-active {
  border-color: #3b82f6;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.25);
  background: rgba(20, 27, 47, 0.85);
}

/* Navigation Tabs for Hours vs Questions Solved vs Planner vs Subjects vs To-Do */
.nav-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  max-width: 750px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.nav-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.7rem 1.2rem;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  background: linear-gradient(135deg, #4f46e5, #3b82f6);
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Tip / recommendation banner */
.tip-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  color: #93c5fd;
  font-size: 0.9rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fade-in-glow 1s ease-out;
}

.tip-banner svg {
  color: #60a5fa;
  flex-shrink: 0;
}

.tip-text {
  font-weight: 500;
  line-height: 1.4;
}

@keyframes fade-in-glow {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Timer Mode Form Layout */
.form-mode-selector {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  margin-bottom: 1.5rem;
}

.mode-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.mode-tab:hover {
  color: var(--text-primary);
}

.mode-tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0;
}

.timer-display {
  font-family: 'Outfit', sans-serif;
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
  margin-bottom: 1.5rem;
}

.timer-controls {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

.timer-btn {
  flex: 1;
}

/* Modal overlay and content */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 15, 23, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fade-in 0.25s ease-out;
}

.modal-content {
  width: 100%;
  max-width: 480px;
  background: rgba(20, 27, 47, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: slide-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-summary {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  text-align: center;
}

.modal-summary strong {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-family: 'Outfit', sans-serif;
}

.subject-checkboxes {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
}

.checkbox-label input {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #3b82f6;
}

.split-hour-input-row span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Fullscreen Focus Mode Overlay */
.focus-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #05070c;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 2.5rem;
  z-index: 2000;
  color: white;
  box-sizing: border-box;
}

.focus-overlay:fullscreen {
  width: 100vw;
  height: 100vh;
  padding: 2.5rem;
  background-color: #05070c;
}

.focus-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
}

.focus-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.focus-timer {
  font-family: 'Outfit', sans-serif;
  font-size: 6.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #ffffff;
  text-shadow: 0 0 35px rgba(255, 255, 255, 0.15);
  margin-bottom: 2.5rem;
  line-height: 1;
}

.focus-controls {
  display: flex;
  gap: 1.25rem;
  width: 320px;
}

.focus-btn {
  padding: 1.1rem;
  font-size: 1rem;
  border-radius: 14px;
}

.stop-focus-btn {
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
}

.ad-placement {
  width: 100%;
  max-width: 728px;
  display: flex;
  justify-content: center;
}

.ad-placeholder-box {
  width: 728px;
  height: 90px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.ad-placeholder-box:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.2);
}

.ad-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

@media (max-width: 768px) {
  .focus-timer {
    font-size: 4.5rem;
  }
  .focus-controls {
    width: 100%;
  }
  .ad-placeholder-box {
    width: 100%;
    max-width: 320px;
    height: 100px;
  }
  .ad-placement.top-ad {
    margin-bottom: 1rem;
  }
}

.focus-quote {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 400;
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  margin-top: 0.5rem;
  margin-bottom: 2.5rem;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .focus-quote {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
  }
}

/* Color Swatches active selection */
.color-swatch-wrapper input[type="radio"]:checked + label {
  border-color: #ffffff !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
  transform: scale(1.15);
}

/* Study Planner Timetable Styles */
.planner-header-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

select.input-field {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* Styled option overlay for dropdown lists */
select option {
  background-color: #101625;
  color: #f8fafc;
  font-weight: 500;
  padding: 10px;
}

/* Timeline vertical line layout */
.timeline-container {
  position: relative;
  margin-top: 2rem;
  padding-left: 2.25rem;
  border-left: 2px dashed rgba(255, 255, 255, 0.08);
  margin-left: 0.75rem;
}

/* Individual timeline item block */
.timeline-item {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-smooth);
}

.timeline-item:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateX(6px);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Dot on the vertical line */
.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-2.25rem - 7px); /* centers the 10px dot on the 2px dashed border */
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-color, #3b82f6);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 8px var(--accent-color, #3b82f6);
  z-index: 2;
  transition: var(--transition-smooth);
}

.timeline-item:hover::before {
  transform: translateY(-50%) scale(1.25);
  box-shadow: 0 0 12px var(--accent-color, #3b82f6);
}

/* Activity specific class color sets */
.timeline-item.activity-studying {
  --accent-color: #3b82f6;
  border-left: 4px solid #3b82f6;
}

.timeline-item.activity-break {
  --accent-color: #10b981;
  border-left: 4px solid #10b981;
}

.timeline-item.activity-playing {
  --accent-color: #ec4899;
  border-left: 4px solid #ec4899;
}

.timeline-item.activity-other {
  --accent-color: #f59e0b;
  border-left: 4px solid #f59e0b;
}

/* Badges for active status */
.timeline-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.timeline-badge.badge-studying {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.timeline-badge.badge-break {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.timeline-badge.badge-playing {
  background: rgba(236, 72, 153, 0.12);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.2);
}

.timeline-badge.badge-other {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex-grow: 1;
  margin-left: 1rem;
  margin-right: 1.5rem;
}

.timeline-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.timeline-time-span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

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

/* Tip / recommendation banner custom colors for planner */
.planner-tip-banner {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
}
.planner-tip-banner svg {
  color: #818cf8;
}

@media (max-width: 1024px) {
  .timeline-container {
    padding-left: 1.75rem;
  }
  .timeline-item::before {
    left: calc(-1.75rem - 7px);
  }
}

/* To-Do List Styles */
.todo-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

/* Custom Scrollbar for todo list */
.todo-list-container::-webkit-scrollbar {
  width: 6px;
}
.todo-list-container::-webkit-scrollbar-track {
  background: transparent;
}
.todo-list-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}
.todo-list-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: var(--transition-smooth);
  gap: 1rem;
}

.todo-item:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateX(4px);
  border-color: rgba(255, 255, 255, 0.08);
}

.todo-item.completed {
  opacity: 0.55;
  background: rgba(255, 255, 255, 0.005);
  border-color: rgba(255, 255, 255, 0.01);
}

.todo-item-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-grow: 1;
}

/* Custom Checkbox Design */
.todo-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  position: relative;
  flex-shrink: 0;
}

.todo-checkbox:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.todo-checkbox.checked {
  background: linear-gradient(135deg, #4f46e5, #3b82f6);
  border-color: transparent;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.todo-checkbox.checked::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  top: 3px;
  left: 6px;
}

.todo-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.todo-item-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  position: relative;
  display: inline-block;
  transition: color 0.3s ease;
}

/* Strike-through Line Animation */
.todo-item-text.completed-text {
  color: var(--text-muted);
}

.todo-item-text.completed-text::after {
  content: '';
  position: absolute;
  left: 0;
  top: 55%;
  width: 100%;
  height: 2px;
  background: var(--text-muted);
  transform: scaleX(0);
  transform-origin: left;
  animation: strike-through 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes strike-through {
  to {
    transform: scaleX(1);
  }
}

.todo-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Priority Badges */
.priority-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.priority-high {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.priority-medium {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.priority-low {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.todo-subject-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
}

.todo-actions {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

/* User Settings Profile Styles */
.header-logo-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.user-greeting-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: var(--transition-smooth);
}

.user-greeting-badge:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--card-hover-border);
}

.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.avatar-circle.gender-female {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.4);
}

.avatar-circle.gender-male {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.avatar-circle.gender-other {
  background: linear-gradient(135deg, #10b981, #f59e0b);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.greeting-text-column {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.greeting-hello {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.greeting-target {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Custom Interactive Gender Buttons */
.gender-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 0.8rem;
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.gender-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--card-hover-border);
}

.gender-radio-wrapper input[value="male"]:checked + .male-btn {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.25);
  color: #60a5fa;
}

.gender-radio-wrapper input[value="female"]:checked + .female-btn {
  border-color: #ec4899;
  background: rgba(236, 72, 153, 0.1);
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.25);
  color: #f472b6;
}

.gender-radio-wrapper input[value="other"]:checked + .other-btn {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
  color: #34d399;
}

/* Settings Preview Card Avatar Animations */
.preview-avatar-glow {
  transition: var(--transition-smooth);
}

.preview-avatar-glow.gender-female {
  background: linear-gradient(135deg, #ec4899, #f43f5e) !important;
  box-shadow: 0 0 25px rgba(236, 72, 153, 0.5) !important;
}

.preview-avatar-glow.gender-male {
  background: linear-gradient(135deg, #3b82f6, #06b6d4) !important;
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.5) !important;
}

.preview-avatar-glow.gender-other {
  background: linear-gradient(135deg, #10b981, #f59e0b) !important;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.5) !important;
}

.settings-preview-card:hover .preview-avatar-glow {
  transform: scale(1.08) rotate(3deg);
}

/* Floating Exam Countdown Widget */
.floating-countdown {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0.75rem 1.2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(245, 158, 11, 0.15);
  animation: float-slide-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 340px;
  cursor: default;
}

.floating-countdown:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 28px rgba(245, 158, 11, 0.25);
}

.countdown-icon {
  font-size: 1.6rem;
  background: rgba(245, 158, 11, 0.12);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(245, 158, 11, 0.2);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
  flex-shrink: 0;
}

.countdown-details {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.countdown-days {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.01em;
}

.countdown-subtitle {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

@keyframes float-slide-in {
  from {
    transform: translateY(24px) scale(0.94);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Adjustments for mobile viewports */
@media (max-width: 768px) {
  .floating-countdown {
    bottom: 1.25rem;
    right: 1.25rem;
    top: auto;
    left: auto;
    padding: 0.55rem 0.9rem;
    gap: 0.55rem;
    max-width: 240px;
  }
  
  .countdown-icon {
    width: 30px;
    height: 30px;
    font-size: 1.1rem;
  }
  
  .countdown-days {
    font-size: 0.88rem;
  }
  
  .countdown-subtitle {
    font-size: 0.7rem;
    max-width: 140px;
  }
}


/* =============================================
   HEADER RIGHT GROUP & LOGIN BUTTON
   ============================================= */
.header-right-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.login-header-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 10px;
  color: #a5b4fc;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.login-header-btn:hover {
  background: rgba(99, 102, 241, 0.28);
  border-color: rgba(99, 102, 241, 0.55);
  color: #c7d2fe;
  transform: translateY(-1px);
}

/* =============================================
   SYNC STATUS PILL
   ============================================= */
.sync-status-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 0.3rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  transition: background 0.4s ease;
  flex-shrink: 0;
}
.sync-dot.synced  { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.6); }
.sync-dot.syncing { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,0.6); animation: pulse-sync 1s ease-in-out infinite; }
.sync-dot.offline { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.5); }
.sync-dot.error   { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.5); }

@keyframes pulse-sync {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* =============================================
   LOGIN MODAL OVERLAY
   ============================================= */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(7, 10, 20, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fade-in 0.35s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.login-card {
  background: rgba(16, 22, 40, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  padding: 2.75rem 2.25rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
  animation: card-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@keyframes card-slide-up {
  from { transform: translateY(30px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.login-logo-section {
  text-align: center;
}

.login-app-icon {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 0 16px rgba(99,102,241,0.5));
}

.login-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #a5b4fc, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.login-perks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  width: 100%;
}

.login-perk {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.07);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.perk-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* Google Sign-in Button */
.google-login-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: #ffffff;
  color: #1f2937;
  border: none;
  border-radius: 14px;
  padding: 0.9rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.google-login-btn:hover {
  background: #f1f5f9;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  transform: translateY(-2px);
}
.google-login-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.login-or-divider {
  width: 100%;
  text-align: center;
  position: relative;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.login-or-divider::before,
.login-or-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: rgba(255,255,255,0.07);
}
.login-or-divider::before { left: 0; }
.login-or-divider::after  { right: 0; }

.guest-continue-btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 0.8rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.guest-continue-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
  color: var(--text-primary);
}
.guest-notice {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
}

.login-legal {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

/* =============================================
   SETTINGS — ACCOUNT ROW & GUEST ROW
   ============================================= */
.account-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(16, 185, 129, 0.07);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  margin-bottom: 1.5rem;
}

.account-photo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(16, 185, 129, 0.3);
  flex-shrink: 0;
}

.account-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.account-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-email {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.signout-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  color: #fca5a5;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
.signout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fecaca;
}

/* Guest row */
.guest-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
}

.guest-row-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  width: 42px;
  text-align: center;
}

.guest-row-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.guest-row-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.guest-row-sub {
  font-size: 0.73rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.google-signin-mini-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: none;
  border-radius: 8px;
  color: #1f2937;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.google-signin-mini-btn:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* =============================================
   SETTINGS — FORM 2-COLUMN ROW
   ============================================= */
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 560px) {
  .form-row-2col {
    grid-template-columns: 1fr;
  }
}

/* Header avatar — photo support */
.avatar-circle img.avatar-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
