/* ================================================================
   TRANCE — Landing Page Styles
   Matte black + Spline 3D fullscreen background
   ================================================================ */

/* ─── Reset & Base ──────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Generic hidden utility class */
.hidden {
  display: none !important;
}

:root {
  /* Matte black palette */
  --bg:           #0a0a0a;
  --bg-elevated:  #111111;
  --surface:      #161616;
  --border:       rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  /* Text */
  --text-primary:   rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-muted:     rgba(255, 255, 255, 0.30);

  /* Accent */
  --accent:       #a78bfa;
  --accent-soft:  rgba(167, 139, 250, 0.12);
  --accent-glow:  rgba(167, 139, 250, 0.25);

  /* Typography */
  --font-display: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --nav-height: 72px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* ─── Loading Overlay ───────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.6s;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loader-ring svg {
  width: 40px;
  height: 40px;
  animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.loader-ring circle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 90, 150;
  stroke-dashoffset: -35;
}

.loader-text {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ─── 3D Canvas (fullscreen background) ─────────────────────── */
#canvas3d {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
  contain: layout style paint;
}

#canvas3d.loaded {
  opacity: 1;
}

/* ─── Navigation (centered liquid glass pill) ───────────────── */
#navbar {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 10px 10px 10px 20px;
  border-radius: 100px;
  pointer-events: none;
  
  /* Liquid glass layers */
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.12) 0%,
      rgba(255, 255, 255, 0.04) 40%,
      rgba(255, 255, 255, 0.08) 60%,
      rgba(255, 255, 255, 0.03) 100%
    );
  
  /* Prismatic border */
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);
  
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);

  /* Entry animation */
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Inner light refraction highlight */
#navbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  border-radius: 100px;
}

/* Animated shimmer */
#navbar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 100px;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.06) 45%,
    rgba(255, 255, 255, 0.03) 55%,
    transparent 60%
  );
  background-size: 200% 100%;
  animation: glass-shimmer 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glass-shimmer {
  0%, 100% { background-position: 200% center; }
  50%      { background-position: -200% center; }
}

#navbar.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text-primary);
  pointer-events: auto;
  transition: opacity 0.2s;
}

.nav-logo:hover {
  opacity: 0.8;
}

.logo-mark {
  font-size: 1.15rem;
  color: var(--accent);
  filter: drop-shadow(0 0 6px var(--accent-glow));
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 14px;
  flex-shrink: 0;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 400;
  padding: 7px 18px;
  border-radius: 100px;
  pointer-events: auto;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

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

/* User Profile Navbar Badge */
.nav-user-badge {
  display: flex;
  align-items: center;
  pointer-events: auto;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 6px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--surface);
}

.user-avatar::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--surface) 100%);
}

.user-name-text {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
}

.nav-logout-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
}

.nav-logout-btn:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.15);
}

/* ─── Side Panels (liquid glass) ────────────────────────────── */
.side-panel {
  position: fixed;
  top: 92px;
  bottom: 24px;
  width: 320px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  padding: 24px;
  pointer-events: none;
  
  /* Liquid glass styling matching navbar */
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.10) 0%,
    rgba(255, 255, 255, 0.03) 40%,
    rgba(255, 255, 255, 0.07) 60%,
    rgba(255, 255, 255, 0.02) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    0 2px 6px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);
  
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);

  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Top refraction edge */
.side-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.20),
    transparent
  );
  border-radius: 24px;
}

/* Left panel position & collapse */
.side-panel-left {
  left: 24px;
  transform: translateX(calc(-100% - 40px));
}

.side-panel-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.side-panel-left.visible.collapsed {
  transform: translateX(calc(-100% - 24px));
}

/* Right panel position & collapse */
.side-panel-right {
  right: 24px;
  transform: translateX(calc(100% + 40px));
}

.side-panel-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.side-panel-right.visible.collapsed {
  transform: translateX(calc(100% + 24px));
}

/* Toggle Buttons */
.panel-toggle-btn {
  position: absolute;
  top: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  outline: none;
  pointer-events: auto;
  
  /* Liquid glass matching panel */
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  
  transition: color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.side-panel-left .panel-toggle-btn {
  right: -18px;
}

.side-panel-right .panel-toggle-btn {
  left: -18px;
}

.panel-toggle-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.20);
  transform: scale(1.08);
  box-shadow: 0 4px 20px rgba(167, 139, 250, 0.25);
}

/* Icon visibility */
.toggle-icon-open {
  display: none;
}

.side-panel.collapsed .toggle-icon-close {
  display: none;
}

.side-panel.collapsed .toggle-icon-open {
  display: block;
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  pointer-events: auto;
}

/* ─── Navbar Focus Analysis Bar ─────────────────────────────── */
.nav-analysis-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 16px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}

.nav-analysis-bar:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(167, 139, 250, 0.3);
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.2);
  transform: scale(1.02);
}

.analysis-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-primary);
}

.stat-icon {
  font-size: 0.85rem;
  opacity: 0.85;
}

.stat-value {
  font-family: var(--font-body);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.stat-divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.12);
}

/* ─── Focus Analysis Modal ──────────────────────────────────── */
.analysis-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 1;
  transition: opacity 0.3s ease;
}

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

.analysis-modal-glass {
  width: 500px;
  max-width: 90vw;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.04) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  padding: 32px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
}

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

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

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

.modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.metric-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.metric-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.metric-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.metric-sub {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* ─── Left Panel Task List UI ───────────────────────────────── */
.task-panel-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  pointer-events: auto;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-title-group h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(167, 139, 250, 0.2);
}

/* ─── Audio Panel (Right Side) ─────────────────────────────── */
.audio-panel-content {
  padding: 12px 16px 20px;
  gap: 20px;
  overflow-y: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.audio-panel-content::-webkit-scrollbar {
  display: none;
}

.audio-viz-container {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  height: 60px;
  margin-bottom: 8px;
  margin-top: 4px;
}

#audio-viz-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.audio-play-btn {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(167, 139, 250, 0.3);
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.15) 0%, rgba(167, 139, 250, 0.05) 100%);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s ease;
  margin-bottom: 4px;
}

.audio-play-btn:hover {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.25) 0%, rgba(167, 139, 250, 0.1) 100%);
  border-color: rgba(167, 139, 250, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(167, 139, 250, 0.2);
}

.audio-play-btn.playing {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.3) 0%, rgba(139, 92, 246, 0.2) 100%);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.3);
}

.audio-notice {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  padding: 6px 10px;
  background: rgba(167, 139, 250, 0.06);
  border-radius: 8px;
  border: 1px solid rgba(167, 139, 250, 0.1);
}

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

.audio-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audio-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 6px;
}

.audio-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.audio-value {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.audio-toggle-group {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.audio-toggle {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.audio-toggle.active {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(167, 139, 250, 0.2);
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.preset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-secondary);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  line-height: 1.2;
}

.preset-btn span {
  font-size: 0.65rem;
  line-height: 1.3;
}

.preset-btn small {
  font-size: 0.6rem;
  color: var(--text-muted);
}

.preset-btn:hover {
  background: rgba(167, 139, 250, 0.08);
  border-color: rgba(167, 139, 250, 0.2);
}

.preset-btn.active {
  background: var(--accent-soft);
  border-color: rgba(167, 139, 250, 0.3);
  color: var(--accent);
}

/* Audio Slider */
.audio-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  cursor: pointer;
}

.audio-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.4);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.audio-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.audio-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.4);
  cursor: pointer;
}

.audio-category {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
}

.ambient-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ambient-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-secondary);
  font-size: 0.65rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.ambient-btn:hover {
  background: rgba(167, 139, 250, 0.08);
  border-color: rgba(167, 139, 250, 0.2);
}

.ambient-btn.active {
  background: var(--accent-soft);
  border-color: rgba(167, 139, 250, 0.3);
  color: var(--accent);
}

.sub-section {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.timer-grid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.timer-btn {
  flex: 1;
  min-width: 48px;
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.timer-btn:hover {
  background: rgba(167, 139, 250, 0.08);
  border-color: rgba(167, 139, 250, 0.2);
}

.timer-btn.active {
  background: var(--accent-soft);
  border-color: rgba(167, 139, 250, 0.3);
  color: var(--accent);
}

.timer-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px solid rgba(167, 139, 250, 0.15);
}

.timer-countdown {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.timer-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.session-stats {
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.stat-row + .stat-row {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.stat-val {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.panel-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.add-task-form {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.glass-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  pointer-events: auto;
}

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

.glass-input:focus {
  border-color: rgba(167, 139, 250, 0.5);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 16px var(--accent-glow);
}

.glass-add-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 400;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s, color 0.2s;
}

.glass-add-btn:hover {
  background: var(--accent);
  color: #0a0a0a;
  transform: scale(1.05);
}

.tasks-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.empty-state {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 16px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 14px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  transition: border-color 0.25s, background 0.25s, transform 0.2s, box-shadow 0.25s;
}

.task-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
}

.task-item.timer-active {
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(167, 139, 250, 0.09);
  box-shadow: 0 4px 20px rgba(167, 139, 250, 0.18);
}

.task-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  pointer-events: auto;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.2s;
}

.task-checkbox:hover {
  border-color: var(--accent);
  color: rgba(167, 139, 250, 0.6);
}

.task-checkbox.checked {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0a;
}

.task-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.task-title {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.task-timer-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.timer-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

.timer-dot.active {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-dot 1.5s infinite;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.task-timer-btn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: all 0.2s;
}

.task-timer-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.task-timer-btn.running {
  background: var(--accent);
  color: #0a0a0a;
  border-color: var(--accent);
}

.task-delete-btn {
  width: 22px;
  height: 22px;
  border: none;
  pointer-events: auto;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.task-delete-btn:hover {
  color: #f87171;
}

/* Completed Section Accordion */
.completed-section {
  margin-top: 4px;
}

.section-label-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  pointer-events: auto;
}

.section-label-toggle:hover {
  color: var(--text-secondary);
}

#completed-arrow {
  transition: transform 0.25s ease;
}

#completed-arrow.rotated {
  transform: rotate(180deg);
}

.completed-list {
  max-height: 180px;
}

.completed-list.hidden {
  display: none;
}

.completed-item {
  opacity: 0.65;
  background: rgba(255, 255, 255, 0.02);
}

.task-time-logged {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ─── Hero Content Overlay ──────────────────────────────────── */
#hero {
  position: fixed;
  z-index: 10;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 48px 72px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  pointer-events: none;

  /* Entry animation */
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.1s,
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

#hero.visible {
  opacity: 1;
  transform: translateY(0);
}

#hero > * {
  pointer-events: auto;
}

/* Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 10px;
  border-radius: 100px;
  background: var(--accent-soft);
  border: 1px solid rgba(167, 139, 250, 0.15);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
  backdrop-filter: blur(8px);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.8); }
}

/* Title */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.hero-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #c4b5fd 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Subtitle */
.hero-subtitle {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 440px;
}

/* Action Buttons */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #818cf8);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.25s;
  box-shadow: 0 2px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 32px rgba(167, 139, 250, 0.35);
}

.btn-primary svg {
  transition: transform 0.2s;
}

.btn-primary:hover svg {
  transform: translateX(3px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 24px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

/* ─── Bottom Gradient Fade ──────────────────────────────────── */
.bottom-fade {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 340px;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(
    0deg,
    rgba(10, 10, 10, 0.92) 0%,
    rgba(10, 10, 10, 0.65) 35%,
    rgba(10, 10, 10, 0.20) 65%,
    transparent 100%
  );
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  #navbar {
    top: 16px;
    padding: 8px 8px 8px 16px;
  }

  #hero {
    padding: 0 24px 48px;
    gap: 16px;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-subtitle br {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
    justify-content: center;
  }
}

/* ─── Focus Analytics Page Styles ───────────────────────────── */
body.analysis-page-body {
  overflow-y: auto;
  height: auto;
  min-height: 100vh;
  background: #0a0a0a;
}

#navbar.analysis-nav,
.analysis-nav,
.analysis-nav * {
  pointer-events: auto !important;
}

.analysis-nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 100px;
}

.period-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.period-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.period-btn.active {
  background: var(--text-primary);
  color: #0a0a0a;
  box-shadow: 0 2px 14px rgba(255, 255, 255, 0.2);
}

/* Floating Liquid Glass Tooltip for Heatmap & Cards */
.glass-tooltip {
  position: fixed;
  z-index: 1000;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(18, 18, 18, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  font-size: 0.78rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.glass-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.tooltip-date {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 2px;
}

.tooltip-val {
  color: var(--text-secondary);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Container Layout */
.analysis-container {
  max-width: 1240px;
  margin: 104px auto 60px;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.analysis-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--accent-soft);
  border: 1px solid rgba(167, 139, 250, 0.2);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.header-title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.header-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 300;
}

/* Metric Glass Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.metric-glass-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.10) 0%,
    rgba(255, 255, 255, 0.03) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.metric-glass-card:hover {
  transform: translateY(-3px);
  border-color: rgba(167, 139, 250, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(167, 139, 250, 0.15);
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--accent);
  flex-shrink: 0;
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.card-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.card-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.card-trend {
  font-size: 0.72rem;
  font-weight: 500;
}

.card-trend.positive { color: #34d399; }
.card-trend.neutral { color: var(--text-secondary); }

/* Charts Layout */
.charts-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 20px;
}

.chart-glass-card {
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.10) 0%,
    rgba(255, 255, 255, 0.03) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.chart-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.chart-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.active-dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.target-dot { background: rgba(255, 255, 255, 0.3); }

.chart-wrapper {
  height: 320px;
  width: 100%;
  position: relative;
}

.chart-empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  pointer-events: none;
  opacity: 0.8;
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 4px;
}

.empty-text {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.empty-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Heatmap empty state overlay */
#heatmap-empty-state {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 0.95) 0%,
    rgba(10, 10, 10, 0.8) 60%,
    transparent 100%
  );
  pointer-events: none;
  opacity: 0.9;
}

.doughnut-wrapper {
  height: 280px;
}

/* Heatmap Section */
.heatmap-section {
  width: 100%;
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.heat-box {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.heat-box.lvl-0 { background: rgba(255, 255, 255, 0.04); }
.heat-box.lvl-1 { background: rgba(167, 139, 250, 0.25); }
.heat-box.lvl-2 { background: rgba(167, 139, 250, 0.50); }
.heat-box.lvl-3 { background: rgba(167, 139, 250, 0.75); }
.heat-box.lvl-4 { background: #a78bfa; box-shadow: 0 0 6px var(--accent-glow); }

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(53, 1fr);
  gap: 5px;
  padding-top: 12px;
  position: relative;
}

.heatmap-section .chart-glass-card {
  position: relative;
}

.heat-square {
  aspect-ratio: 1;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.heat-square:hover {
  transform: scale(1.3);
  z-index: 10;
}

.heat-square.lvl-1 { background: rgba(167, 139, 250, 0.25); }
.heat-square.lvl-2 { background: rgba(167, 139, 250, 0.50); }
.heat-square.lvl-3 { background: rgba(167, 139, 250, 0.75); }
.heat-square.lvl-4 { background: #a78bfa; box-shadow: 0 0 8px var(--accent-glow); }

@media (max-width: 1024px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .analysis-container { padding: 0 16px; margin-top: 90px; }
  .heatmap-grid { grid-template-columns: repeat(26, 1fr); }
}

/* ─── Custom Liquid Glass Login Page ────────────────────────── */
body.login-page-body {
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
}

#login-canvas3d {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}

#login-canvas3d.loaded {
  opacity: 0.85;
}

.login-ambient-glow {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(167, 139, 250, 0.14) 0%,
    rgba(10, 10, 10, 0.85) 60%,
    #0a0a0a 100%
  );
}

.login-card-container {
  position: relative;
  z-index: 10;
  padding: 20px;
}

.login-glass-card.split-login-card {
  width: 900px;
  max-width: 92vw;
  min-height: 520px;
  padding: 16px;
  border-radius: 40px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
  align-items: stretch;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.10) 0%,
    rgba(255, 255, 255, 0.03) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(32px) saturate(1.4);
  -webkit-backdrop-filter: blur(32px) saturate(1.4);
}

/* Left Side: Dark Rounded 3D Frame Pop-out */
.login-card-left {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 460px;
  border-radius: 32px;
  background: radial-gradient(
    circle at 50% 60%,
    rgba(167, 139, 250, 0.18) 0%,
    rgba(18, 18, 22, 0.95) 60%,
    #0c0c0e 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.8),
    0 8px 32px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#login-frame-canvas3d {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  opacity: 0;
  transform: translate(50px, 30px) scale(1.12);
  transform-origin: center center;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
  contain: layout style paint;
}

#login-frame-canvas3d.loaded {
  opacity: 1;
}

/* 3D Frame Loader Spinner */
.login-3d-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-3d-loader.fade-out {
  opacity: 0;
}

.loader-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.spinner-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(167, 139, 250, 0.15);
  border-top-color: var(--accent);
  animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.spinner-text {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Hide Spline watermark/logo */
.spline-logo,
[class*="watermark"],
[class*="branding"],
[class*="powered-by"],
.spline-loading,
.spline-spinner,
.spline-loader,
[class*="spline-loading"],
[class*="spline-spinner"],
[class*="spline-loader"] {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Hide the global page loader on login page */
body.login-page-body #loader {
  display: none !important;
}

/* Frame placeholder badge (legacy - kept for compatibility) */
.frame-placeholder-badge {
  position: relative;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 100px;
  background: rgba(10, 10, 10, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.frame-placeholder-badge.fade-out {
  opacity: 0;
}

/* Right Side: Auth Controls */
.login-card-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 28px;
  text-align: center;
  gap: 20px;
}

@media (max-width: 840px) {
  .login-glass-card.split-login-card {
    grid-template-columns: 1fr;
    width: 440px;
    height: auto;
  }
  .login-card-left {
    min-height: 240px;
  }
}

.login-logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-title {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.15;
}

.login-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.6;
}

.login-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 8px;
}

.google-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 24px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.google-login-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(167, 139, 250, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(167, 139, 250, 0.25);
}

.guest-login-link {
  font-size: 0.84rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.guest-login-link:hover {
  color: var(--text-primary);
}

.firebase-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  line-height: 1.4;
}

.firebase-notice code {
  color: var(--accent);
}

/* ─── Custom Liquid Glass Cursor ────────────────────────────────
   Small glass halo + accent dot. Native cursor hidden only on
   precise-pointer (mouse/trackpad) devices.
   ================================================================ */

/* Hide the native cursor everywhere on desktop */
@media (pointer: fine) {
  body,
  body * {
    cursor: none !important;
  }
}

.cursor-halo,
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  will-change: transform;
  opacity: 0;
  transition:
    opacity 0.3s ease,
    width 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.22s ease,
    box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Glass halo — trails the pointer with ease */
.cursor-halo {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.05) 45%,
    rgba(255, 255, 255, 0.02) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 1px rgba(255, 255, 255, 0.06),
    0 2px 14px rgba(0, 0, 0, 0.45),
    0 0 12px var(--accent-glow);
  backdrop-filter: blur(6px) saturate(1.4);
  -webkit-backdrop-filter: blur(6px) saturate(1.4);
}

/* Precision dot — black-grey glow, eases to white-grey on hover */
.cursor-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #26262c;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.07),
    0 0 10px rgba(190, 190, 200, 0.35);
}

.cursor-halo.is-visible,
.cursor-dot.is-visible {
  opacity: 1;
}

/* Hovering an interactive element — halo swells, dot tucks in */
.cursor-halo.is-interactive {
  width: 44px;
  height: 44px;
  border-color: rgba(167, 139, 250, 0.5);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 4px 24px rgba(0, 0, 0, 0.5),
    0 0 22px var(--accent-glow);
}

.cursor-dot.is-interactive {
  width: 4px;
  height: 4px;
  background-color: #f0f0f4;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.22),
    0 0 14px rgba(255, 255, 255, 0.65);
}

/* Pressing — halo tucks in with the click */
.cursor-halo.is-pressed:not(.is-interactive) {
  width: 20px;
  height: 20px;
}

/* Idle — fade out after the pointer stops moving */
.cursor-halo.is-idle,
.cursor-dot.is-idle {
  opacity: 0;
}


