
:root{
  --bg1:#1a0f2e;
  --bg2:#2b0f3f;
  --card:rgba(255,255,255,.08);
  --card2:rgba(255,255,255,.10);
  --text:#f2f2f2;
  --muted:rgba(255,255,255,.65);
  --border:rgba(255,255,255,.14);
  --primary:#3b82f6;
  --danger:#ef4444;
  --shadow:0 20px 60px rgba(0,0,0,.35);
  --radius:18px;
}

*{box-sizing:border-box}
html,body{height:100%}

/* === Auth Screen === */
.auth-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: 
    radial-gradient(60% 60% at 50% 30%, rgba(255,0,180,.20), transparent 60%),
    radial-gradient(55% 55% at 20% 20%, rgba(0,180,255,.15), transparent 65%),
    radial-gradient(70% 70% at 70% 75%, rgba(140,0,255,.18), transparent 60%),
    linear-gradient(135deg, #1a0f2e, #2b0f3f);
  z-index: 10000;
  padding: 20px;
}

.auth-screen.hidden {
  display: none;
}

.auth-card {
  width: min(420px, 100%);
  background: rgba(20,20,30,0.95);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 28px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 30px 100px rgba(0,0,0,0.5);
  backdrop-filter: blur(20px);
}

.auth-logo {
  font-size: 64px;
  margin-bottom: 16px;
}

.auth-title {
  font-size: 36px;
  font-weight: 900;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle {
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  margin: 0 0 20px;
}

.auth-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  margin: 0 0 28px;
  line-height: 1.5;
}

.auth-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 12px;
  border: none;
}

.auth-btn.primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  box-shadow: 0 8px 24px rgba(59,130,246,0.35);
}

.auth-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(59,130,246,0.45);
}

.auth-btn.secondary {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.12);
}

.auth-btn.secondary:hover {
  background: rgba(255,255,255,0.10);
}

.auth-footer {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin: 16px 0 0;
}

/* Auth Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.auth-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease;
}

.auth-input::placeholder {
  color: rgba(255,255,255,0.4);
}

.auth-input:focus {
  border-color: rgba(59,130,246,0.6);
}

.auth-error {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
  font-size: 13px;
  text-align: left;
}

.auth-error.hidden {
  display: none;
}

.auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

.auth-link {
  background: none;
  border: none;
  color: #60a5fa;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.auth-link:hover {
  text-decoration: underline;
}

.forgot-link {
  display: block;
  margin-top: 12px;
  color: rgba(255,255,255,0.5);
}

.forgot-link:hover {
  color: #60a5fa;
}

.reset-success {
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3);
  color: #86efac;
  font-size: 13px;
  margin-top: 12px;
}

.reset-success.hidden {
  display: none;
}


.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* === User Menu === */
.user-menu {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.user-btn:hover {
  background: rgba(0,0,0,0.35);
}

.user-avatar {
  font-size: 18px;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  min-width: 200px;
  background: rgba(20,20,30,0.98);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  overflow: hidden;
  z-index: 100;
}

.user-dropdown.hidden {
  display: none;
}

.user-dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.user-dropdown-email {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

.user-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.user-dropdown-item:hover {
  background: rgba(255,255,255,0.06);
}

/* App container */
.app-container.hidden {
  display: none;
}
body{
  margin:0;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  overflow-x:hidden;
}

.aurora-bg{
  position:fixed; inset:0;
  background:
    radial-gradient(60% 60% at 50% 30%, rgba(255,0,180,.25), transparent 60%),
    radial-gradient(55% 55% at 20% 20%, rgba(0,180,255,.20), transparent 65%),
    radial-gradient(70% 70% at 70% 75%, rgba(140,0,255,.22), transparent 60%),
    linear-gradient(135deg, var(--bg1), var(--bg2));
  filter: saturate(1.2);
  z-index:-2;
}
.aurora-bg::after{
  content:"";
  position:absolute; inset:-40px;
  background-image:radial-gradient(rgba(255,255,255,.16) 1px, transparent 1px);
  background-size:32px 32px;
  opacity:.18;
  transform:rotate(8deg);
}

.top-bar{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 22px;
}
.brand{display:flex; flex-direction:column; gap:2px}
.brand-title{font-size:26px; font-weight:800; letter-spacing:.3px}
.brand-sub{font-size:12px; color:var(--muted)}
.top-actions{display:flex; gap:10px}
.ghost-btn{
  border:1px solid var(--border);
  background:rgba(0,0,0,.20);
  color:var(--text);
  padding:10px 14px;
  border-radius:999px;
  cursor:pointer;
}
.ghost-btn:hover{background:rgba(0,0,0,.28)}

.layout{
  display:grid;
  grid-template-columns: 330px minmax(460px,1fr) 330px;
  gap:18px;
  padding:0 18px 24px;
  align-items:start;
}

.panel{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:16px;
  box-shadow:var(--shadow);
  backdrop-filter: blur(12px);
}
.center{
  padding:10px 6px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
}
.trophy{font-size:38px; opacity:.95}

h2{margin:0 0 12px 0; font-size:18px; font-weight:800}
.mt{margin-top:14px}

.card{
  background:rgba(0,0,0,.18);
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px;
}

/* Insights rows */
.ins-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14px;
}
.ins-row:last-child {
  border-bottom: none;
}
.ins-row span:first-child {
  color: rgba(255,255,255,0.7);
}
.ins-row span:last-child {
  font-weight: 600;
  color: #fff;
}

.row{display:flex; align-items:center}
.gap{gap:10px}
.end{justify-content:flex-end}
.center-text{text-align:center}
.space-between{justify-content:space-between}
.center{justify-content:flex-start}
.muted{color:var(--muted)}
.tiny{font-size:12px}
.mt8{margin-top:8px}
.mt12{margin-top:12px}

.input{
  width:100%;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  border-radius:12px;
  padding:10px 12px;
  color:var(--text);
  outline:none;
}
.input::placeholder{color:rgba(255,255,255,.45)}
.label{font-size:12px; color:var(--muted); display:block; margin-top:6px}

.btn{
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
}
.btn:hover{background:rgba(255,255,255,.10)}
.btn.primary{background:rgba(59,130,246,.95); border-color:rgba(59,130,246,.95)}
.btn.primary:hover{filter:brightness(1.05)}
.btn.secondary{background:rgba(255,255,255,.06)}
.btn.danger{background:rgba(239,68,68,.92); border-color:rgba(239,68,68,.92)}
.btn.tiny{padding:8px 10px; border-radius:10px; font-size:12px}

.subhead{margin:14px 0 8px; font-weight:800; font-size:13px; color:rgba(255,255,255,.85)}
.list{display:flex; flex-direction:column; gap:10px}
.empty{margin-top:10px; color:rgba(255,255,255,.55); font-size:12px}

.block{
  display:flex; align-items:center; justify-content:space-between;
  border:1px solid var(--border);
  background:rgba(0,0,0,.18);
  border-radius:14px;
  padding:10px;
}
.block-left{display:flex; flex-direction:column; gap:2px; min-width:0}
.block-title{font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.block-meta{font-size:12px; color:var(--muted)}
.block-actions{display:flex; gap:8px; align-items:center}

.pill{
  padding:8px 10px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  cursor:pointer;
  font-size:12px;
  font-weight:800;
}
.pill.primary{background:rgba(59,130,246,.20); border-color:rgba(59,130,246,.40)}
.pill.danger{background:rgba(239,68,68,.20); border-color:rgba(239,68,68,.40)}

/* === Elegant Timer Card === */
.timer-card{
  width: min(480px, 92%);
  background: linear-gradient(145deg, rgba(30,30,45,0.95), rgba(20,20,35,0.98));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 32px;
  padding: 28px 24px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
  text-align: center;
}

.timer-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.timer-label {
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
}

.timer-badge {
  font-size: 18px;
}

/* Circular Progress Ring */
.timer-ring-container {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto 24px;
}

.timer-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 8;
}

.timer-ring-progress {
  fill: none;
  stroke: url(#timerGradient);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 565.48;
  stroke-dashoffset: 565.48;
  transition: stroke-dashoffset 0.3s ease;
}

.timer-display-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.timer-big {
  font-size: 56px;
  font-weight: 900;
  letter-spacing: -2px;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.timer-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

/* Timer Controls */
.timer-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.timer-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 16px;
  border: none;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.timer-btn .timer-btn-icon {
  font-size: 14px;
}

.timer-btn.primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  box-shadow: 0 8px 24px rgba(59,130,246,0.35);
}

.timer-btn.primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(59,130,246,0.45);
}

.timer-btn.secondary {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.1);
}

.timer-btn.secondary:hover:not(:disabled) {
  background: rgba(255,255,255,0.10);
}

.timer-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Distracted Button */
.distracted-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid rgba(239,68,68,0.3);
  background: rgba(239,68,68,0.1);
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.distracted-btn:hover:not(:disabled) {
  background: rgba(239,68,68,0.2);
  border-color: rgba(239,68,68,0.5);
}

.distracted-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Status Card */
.status-card {
  width: min(480px, 92%);
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 18px 24px;
  margin-top: 16px;
}

.status-icon {
  font-size: 32px;
}

.status-content {
  text-align: left;
}

.status-title {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 2px;
}

.status-sub {
  color: rgba(255,255,255,0.6);
  font-size: 13px;
}

.status-card{
  width:min(620px, 92%);
  background:rgba(255,255,255,.06);
  border:1px solid var(--border);
  border-radius:22px;
  padding:18px;
  text-align:center;
}
.status-title{font-weight:900; font-size:28px}
.status-sub{color:var(--muted); margin-top:6px}

/* === Elegant Now Card === */
.now-card {
  background: linear-gradient(135deg, rgba(59,130,246,0.15) 0%, rgba(139,92,246,0.10) 100%);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 16px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.now-card.active {
  background: linear-gradient(135deg, rgba(59,130,246,0.25) 0%, rgba(139,92,246,0.15) 100%);
  border-color: rgba(59,130,246,0.4);
}

.now-card.running {
  animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
  0%, 100% { border-color: rgba(59,130,246,0.4); }
  50% { border-color: rgba(59,130,246,0.7); }
}

.now-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.now-icon {
  font-size: 20px;
}

.now-state {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.7);
}

.now-state.running {
  color: rgba(59,130,246,1);
}

.now-block-name {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.now-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.now-meta-label {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.now-meta-value {
  font-size: 16px;
  font-weight: 700;
}

.now-progress {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.now-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(59,130,246,0.9), rgba(139,92,246,0.9));
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Old style kept for compatibility */
.now-title{font-weight:900; font-size:16px}

.progress{
  width:100%;
  height:10px;
  background:rgba(255,255,255,.08);
  border-radius:999px;
  overflow:hidden;
  margin:10px 0;
}
.progress-fill{
  height:100%;
  width:0%;
  background:rgba(59,130,246,.9);
  border-radius:999px;
}

.task-list{display:flex; flex-direction:column; gap:10px; margin-top:10px}
.task{
  display:flex; align-items:center; justify-content:space-between;
  border:1px solid var(--border);
  background:rgba(0,0,0,.16);
  border-radius:14px;
  padding:10px;
}
.task-left{display:flex; align-items:center; gap:10px; min-width:0}
.checkbox{
  width:18px; height:18px; border-radius:6px;
  border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  background:rgba(255,255,255,.04);
  flex:0 0 auto;
}
.checkbox.checked{background:rgba(59,130,246,.9); border-color:rgba(59,130,246,.9)}
.checkbox.checked::after{content:"✓"; font-weight:900; font-size:12px}
.task-name{
  font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.task-meta{font-size:12px; color:var(--muted)}
.task-actions{display:flex; align-items:center; gap:8px}

.backdrop{
  position:fixed; inset:0;
  background:rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  z-index:50;
}
.modal{
  position:fixed;
  top:50%; left:50%;
  transform:translate(-50%,-50%);
  width:min(520px, 92%);
  background:rgba(20,20,28,.96);
  border:1px solid rgba(255,255,255,.18);
  border-radius:20px;
  padding:16px;
  z-index:60;
  box-shadow:0 30px 90px rgba(0,0,0,.5);
}
.choice{
  width:100%;
  text-align:left;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:var(--text);
  cursor:pointer;
  margin-top:10px;
  font-weight:800;
}
.choice:hover{background:rgba(255,255,255,.10)}
.hidden{display:none}

/* === TABLET (max 1080px) === */
@media (max-width: 1080px){
  .layout{
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 0 14px 24px;
  }
  .center{ order: -1; } /* Timer at top on tablet/mobile */
  .panel{ padding: 14px; }
}

/* === MOBILE (max 640px) === */
@media (max-width: 640px){
  /* Top bar */
  .top-bar{
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px;
  }
  .brand-title{ font-size: 22px; }
  .brand-sub{ font-size: 11px; }
  .top-actions{
    width: 100%;
    justify-content: flex-end;
    gap: 8px;
  }
  .ghost-btn{
    padding: 8px 10px;
    font-size: 13px;
  }
  .sound-toggle{
    padding: 8px 10px;
    font-size: 13px;
  }

  /* Layout */
  .layout{
    gap: 12px;
    padding: 0 10px 20px;
  }
  .panel{
    padding: 12px;
    border-radius: 14px;
  }
  
  /* Timer card */
  .timer-card{
    width: 100%;
    padding: 16px;
    border-radius: 18px;
  }
  .timer-big{
    font-size: 52px;
  }
  .timer-title{
    font-size: 11px;
  }
  
  /* Timer buttons - stack on very small screens */
  .timer-card .row.center.gap{
    flex-wrap: wrap;
    gap: 8px;
  }
  .timer-card .btn{
    padding: 12px 14px;
    font-size: 14px;
    flex: 1 1 auto;
    min-width: 70px;
  }
  
  /* Shortcut hint - hide on mobile (no keyboard) */
  .shortcut-hint{
    display: none;
  }
  
  /* Status card */
  .status-card{
    width: 100%;
    padding: 14px;
    border-radius: 16px;
  }
  .status-title{ font-size: 22px; }
  .status-sub{ font-size: 13px; }
  
  /* Cards */
  .card{
    padding: 10px;
    border-radius: 12px;
  }
  
  /* Headings */
  h2{ font-size: 16px; margin-bottom: 10px; }
  .subhead{ font-size: 12px; }
  
  /* Buttons */
  .btn{
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 10px;
  }
  .btn.tiny{
    padding: 8px 10px;
    font-size: 11px;
  }
  .pill{
    padding: 8px 10px;
    font-size: 11px;
  }
  
  /* Blocks */
  .block{
    padding: 10px;
    border-radius: 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .block-left{
    flex: 1 1 100%;
  }
  .block-actions{
    flex: 1 1 100%;
    justify-content: flex-start;
  }
  .block-title{ font-size: 14px; }
  .block-meta{ font-size: 11px; }
  
  /* Tasks */
  .task{
    padding: 10px;
    border-radius: 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .task-left{
    flex: 1 1 60%;
  }
  .task-actions{
    flex: 1 1 auto;
    justify-content: flex-end;
  }
  .task-name{ font-size: 14px; }
  .task-meta{ font-size: 11px; }
  
  /* Insights */
  .ins-row{
    font-size: 13px;
    padding: 6px 0;
  }
  
  /* Auth screen mobile */
  .auth-card {
    padding: 32px 24px;
    border-radius: 24px;
  }
  .auth-logo {
    font-size: 48px;
  }
  .auth-title {
    font-size: 28px;
  }
  .auth-subtitle {
    font-size: 14px;
  }
  .auth-btn {
    padding: 14px 20px;
    font-size: 15px;
  }
  
  /* User menu mobile */
  .user-name {
    display: none;
  }
  .user-btn {
    padding: 8px 10px;
  }
  
  /* Now card mobile */
  .now-card {
    padding: 12px;
  }
  .now-block-name {
    font-size: 15px;
  }
  .now-meta {
    gap: 12px;
  }
  .now-meta-value {
    font-size: 14px;
  }
  
  /* Timer card mobile */
  .timer-card {
    padding: 20px 16px;
    border-radius: 24px;
  }
  .timer-ring-container {
    width: 180px;
    height: 180px;
    margin-bottom: 20px;
  }
  .timer-big {
    font-size: 44px;
  }
  .timer-controls {
    gap: 8px;
  }
  .timer-btn {
    padding: 12px 16px;
    font-size: 14px;
  }
  .distracted-btn {
    padding: 8px 16px;
    font-size: 12px;
  }
  .status-card {
    padding: 14px 18px;
    gap: 12px;
  }
  .status-icon {
    font-size: 28px;
  }
  .status-title {
    font-size: 16px;
  }
  .status-sub {
    font-size: 12px;
  }
  
  /* Emoji rating mobile */
  .emoji-rating-row {
    gap: 4px;
  }
  .emoji-rating {
    font-size: 24px;
    padding: 8px 10px;
  }
  
  /* Improve grid mobile */
  .improve-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .improve-chip {
    padding: 8px 10px;
    font-size: 12px;
  }
  
  /* Progress bar */
  .progress{
    height: 8px;
    margin: 8px 0;
  }
  
  /* Modals - full width on mobile */
  .modal{
    width: calc(100% - 24px);
    max-height: 90vh;
    overflow-y: auto;
    padding: 14px;
    border-radius: 16px;
  }
  .modal h3{ font-size: 18px; }
  
  /* Modal card (app feedback) */
  .modal-card{
    width: calc(100% - 24px);
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
  }
  .modal-head{ padding: 14px; }
  .modal-body{ padding: 0 14px 14px; }
  .modal-actions{ padding: 12px 14px; }
  
  /* Shortcuts modal */
  .shortcut-row{
    padding: 8px 10px;
  }
  .shortcut-row kbd{
    padding: 4px 8px;
    font-size: 12px;
    min-width: 50px;
  }
  .shortcut-row span{
    font-size: 13px;
  }
  
  /* Completion banner */
  .completion-banner{
    width: calc(100% - 32px);
    padding: 24px;
    border-radius: 18px;
  }
  .completion-banner .emoji{ font-size: 48px; }
  .completion-banner .title{ font-size: 22px; }
  .completion-banner .subtitle{ font-size: 14px; }
  
  /* Choice buttons in distract modal */
  .choice{
    padding: 12px;
    font-size: 14px;
  }
  
  /* Coach feedback */
  .coach-msg{ font-size: 13px; }
  .coach-tips{ font-size: 12px; }
  
  /* Now section */
  .now-title{ font-size: 14px; }
  
  /* Trophy */
  .trophy{ font-size: 30px; }
}

/* === VERY SMALL SCREENS (max 380px) === */
@media (max-width: 380px){
  .timer-big{ font-size: 44px; }
  .timer-card .btn{
    padding: 10px 8px;
    font-size: 12px;
  }
  .top-actions{
    gap: 6px;
  }
  .ghost-btn, .sound-toggle{
    padding: 6px 8px;
    font-size: 12px;
  }
  .block-actions .pill,
  .task-actions .pill{
    padding: 6px 8px;
    font-size: 10px;
  }
}


/* --- App Feedback Modal --- */
.ghost-btn{
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.25);
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  font-weight: 600;
  transition: transform .08s ease, background .2s ease;
}
.ghost-btn:hover{ background: rgba(0,0,0,0.35); transform: translateY(-1px); }
.ghost-btn:active{ transform: translateY(0px); }

.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: grid;
  place-items: center;
  z-index: 9999;
  padding: 18px;
}
.modal-backdrop.hidden{ display: none; }
.modal-card{
  width: min(560px, 96vw);
  border-radius: 18px;
  background: rgba(20,20,28,0.92);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  backdrop-filter: blur(10px);
  color: rgba(255,255,255,0.92);
}
.modal-head{
  display:flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px 10px 16px;
}
.modal-title{
  font-size: 18px;
  font-weight: 800;
}
.modal-subtitle{
  font-size: 13px;
  opacity: .75;
  margin-top: 2px;
}
.icon-btn{
  border: 0;
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.9);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
}
.icon-btn:hover{ background: rgba(255,255,255,0.16); }

.modal-body{ padding: 0 16px 14px 16px; }
.field-label{
  display:block;
  margin: 12px 0 6px;
  font-weight: 700;
  font-size: 13px;
  opacity: .9;
}
.rating-row{ display:flex; gap:8px; flex-wrap: wrap; }
.pill{
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  cursor:pointer;
  font-weight:700;
}
.pill.selected{ background: rgba(59,130,246,0.35); border-color: rgba(59,130,246,0.55); }

.chip-row{ display:flex; gap:8px; flex-wrap: wrap; }
.chip{
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
  cursor:pointer;
  font-weight:650;
  font-size: 12px;
}
.chip.selected{ background: rgba(236,72,153,0.28); border-color: rgba(236,72,153,0.45); }

.feedback-textarea{
  width: 100%;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  padding: 10px 12px;
  outline: none;
}
.feedback-textarea:focus{ border-color: rgba(59,130,246,0.6); }

.checkbox-row{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top: 10px;
  font-size: 12px;
  opacity: .9;
}

.modal-actions{
  display:flex;
  justify-content: flex-end;
  gap:10px;
  padding: 12px 16px 16px;
}

/* App Feedback Modal */
.app-feedback-modal{
  position:fixed; inset:0;
  display:none;
  align-items:center; justify-content:center;
  background:rgba(0,0,0,.55);
  z-index:9999;
}
.app-feedback-modal.show{display:flex;}
.app-feedback-card{
  width:min(520px,92vw);
  background:rgba(20,20,30,.95);
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  padding:16px;
  box-shadow:0 25px 60px rgba(0,0,0,.55);
}
.app-feedback-header{display:flex; align-items:center; justify-content:space-between; margin-bottom:10px;}
.app-feedback-title{font-weight:700; font-size:18px; color:#fff;}
.app-feedback-close{
  border:none; background:rgba(255,255,255,.08);
  color:#fff; border-radius:10px; padding:8px 10px; cursor:pointer;
}
#appFeedbackText{
  width:100%; height:140px; resize:none;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:#fff; padding:12px;
}
.app-feedback-actions{display:flex; align-items:center; justify-content:space-between; margin-top:10px; gap:10px;}
.app-feedback-status{font-size:13px; color:rgba(255,255,255,.75);}
.app-feedback-send{
  border:none;
  background:rgba(90,150,255,.95);
  color:#fff; border-radius:12px; padding:10px 14px; cursor:pointer;
}

/* Screen reader only - hide visually but keep accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Rating pills as labels for radio buttons */
.rating-row .rating-pill {
  cursor: pointer;
  transition: all 0.15s ease;
}
input[type="radio"]:checked + .rating-pill {
  background: rgba(59,130,246,0.35);
  border-color: rgba(59,130,246,0.55);
  transform: scale(1.05);
}
input[type="radio"]:focus + .rating-pill {
  box-shadow: 0 0 0 2px rgba(59,130,246,0.4);
}

/* Chips as labels for checkboxes */
.chip-row .chip {
  cursor: pointer;
  transition: all 0.15s ease;
}
input[type="checkbox"]:checked + .chip {
  background: rgba(236,72,153,0.28);
  border-color: rgba(236,72,153,0.45);
}
input[type="checkbox"]:focus + .chip {
  box-shadow: 0 0 0 2px rgba(236,72,153,0.3);
}

/* Secondary button */
.secondary-btn {
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}
.secondary-btn:hover {
  background: rgba(255,255,255,0.10);
}

/* Primary button */
.primary-btn {
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  background: rgba(59,130,246,0.95);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}
.primary-btn:hover {
  filter: brightness(1.05);
}
.primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Feedback success state */
.feedback-success {
  padding: 40px 20px;
  text-align: center;
}
.feedback-success .success-emoji {
  font-size: 56px;
  margin-bottom: 12px;
}
.feedback-success .success-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}
.feedback-success .success-subtitle {
  color: var(--muted);
  font-size: 15px;
}

/* === Emoji Rating === */
.emoji-rating-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.emoji-rating {
  font-size: 32px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: rgba(255,255,255,0.05);
  cursor: pointer;
  transition: all 0.2s ease;
  filter: grayscale(0.5);
  opacity: 0.7;
}

.emoji-rating:hover {
  background: rgba(255,255,255,0.10);
  transform: scale(1.1);
  filter: grayscale(0);
  opacity: 1;
}

input[type="radio"]:checked + .emoji-rating {
  background: rgba(59,130,246,0.2);
  border-color: rgba(59,130,246,0.5);
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.15);
}

input[type="radio"]:focus + .emoji-rating {
  box-shadow: 0 0 0 2px rgba(59,130,246,0.4);
}

/* === Improve Chips Grid === */
.improve-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.improve-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.improve-chip:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.2);
}

input[type="checkbox"]:checked + .improve-chip {
  background: rgba(236,72,153,0.2);
  border-color: rgba(236,72,153,0.4);
  color: #fff;
}

input[type="checkbox"]:focus + .improve-chip {
  box-shadow: 0 0 0 2px rgba(236,72,153,0.3);
}

/* === Celebration Animation === */
@keyframes celebrate-pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59,130,246,0.7); }
  50% { transform: scale(1.02); box-shadow: 0 0 40px 10px rgba(59,130,246,0.3); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}

@keyframes confetti-fall {
  0% { transform: translateY(-100%) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.timer-card.celebrating {
  animation: celebrate-pulse 0.6s ease-in-out 3;
  border-color: rgba(59,130,246,0.6);
}

.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -20px;
  animation: confetti-fall 3s ease-out forwards;
}

.confetti:nth-child(odd) { border-radius: 50%; }
.confetti:nth-child(even) { border-radius: 2px; }

/* Completion banner */
.completion-banner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: rgba(20,20,28,0.95);
  border: 2px solid rgba(59,130,246,0.6);
  border-radius: 24px;
  padding: 32px 48px;
  text-align: center;
  z-index: 9998;
  box-shadow: 0 30px 90px rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.completion-banner.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.completion-banner .emoji {
  font-size: 64px;
  margin-bottom: 12px;
}

.completion-banner .title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.completion-banner .subtitle {
  color: var(--muted);
  font-size: 16px;
}

/* Sound toggle in top bar */
.sound-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.20);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
}
.sound-toggle:hover { background: rgba(0,0,0,0.28); }
.sound-toggle.muted { opacity: 0.5; }

/* === Keyboard Shortcuts Modal === */
.shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
}

.shortcut-row kbd {
  background: rgba(59,130,246,0.25);
  border: 1px solid rgba(59,130,246,0.4);
  border-radius: 6px;
  padding: 6px 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  min-width: 60px;
  text-align: center;
}

.shortcut-row span {
  color: var(--muted);
  font-size: 14px;
}

/* Shortcut hint tooltip on timer */
.shortcut-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.shortcut-hint kbd {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: inherit;
  font-size: 11px;
}

/* === Settings Modal === */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
}

.setting-row label {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
}

.setting-input {
  display: flex;
  align-items: center;
  gap: 8px;
}

.setting-input input[type="number"] {
  width: 70px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.3);
  color: #fff;
  font-size: 14px;
  text-align: center;
}

.setting-input span {
  color: var(--muted);
  font-size: 13px;
  min-width: 30px;
}

.setting-toggle input[type="checkbox"] {
  width: 44px;
  height: 24px;
  appearance: none;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}

.setting-toggle input[type="checkbox"]::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease;
}

.setting-toggle input[type="checkbox"]:checked {
  background: #3b82f6;
}

.setting-toggle input[type="checkbox"]:checked::before {
  transform: translateX(20px);
}

/* === Break Mode Styles === */
.now-card.break {
  border-color: rgba(34,197,94,0.4);
  background: linear-gradient(135deg, rgba(34,197,94,0.15) 0%, rgba(34,197,94,0.05) 100%);
}

.now-state.break {
  color: #22c55e;
}

.timer-ring-progress.break {
  stroke: #22c55e !important;
}

/* === Journaling Feature === */
.journal-textarea {
  width: 100%;
  min-height: 70px;
  resize: vertical;
  font-family: inherit;
}

.distract-reasons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.distract-reasons .choice {
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
}

.journal-note-section {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Reflection Modal */
.reflection-section {
  margin-bottom: 8px;
}

.productivity-rating {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.rating-btn {
  flex: 1;
  padding: 12px 8px;
  font-size: 24px;
  background: rgba(255,255,255,0.05);
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rating-btn:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.05);
}

.rating-btn.selected {
  border-color: #3b82f6;
  background: rgba(59,130,246,0.2);
}

.focus-helpers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.helper-chip {
  padding: 8px 12px;
  font-size: 13px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--muted);
}

.helper-chip:hover {
  background: rgba(255,255,255,0.1);
}

.helper-chip.selected {
  background: rgba(34,197,94,0.2);
  border-color: rgba(34,197,94,0.5);
  color: #86efac;
}

/* Journal Modal */
.journal-modal {
  max-width: 560px;
  max-height: 80vh;
}

.journal-tabs {
  display: flex;
  gap: 4px;
  background: rgba(0,0,0,0.2);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.journal-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.journal-tab:hover {
  background: rgba(255,255,255,0.05);
}

.journal-tab.active {
  background: rgba(59,130,246,0.2);
  color: #60a5fa;
}

.journal-content {
  max-height: 400px;
  overflow-y: auto;
}

.journal-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 14px;
}

.journal-entry {
  padding: 14px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  margin-bottom: 10px;
  border-left: 3px solid #3b82f6;
}

.journal-entry.distraction {
  border-left-color: #ef4444;
}

.journal-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.journal-entry-title {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}

.journal-entry-date {
  font-size: 12px;
  color: var(--muted);
}

.journal-entry-body {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
}

.journal-entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.journal-tag {
  padding: 4px 10px;
  background: rgba(59,130,246,0.15);
  border-radius: 12px;
  font-size: 11px;
  color: #93c5fd;
}

.journal-tag.helper {
  background: rgba(34,197,94,0.15);
  color: #86efac;
}

.journal-tag.rating {
  background: rgba(251,191,36,0.15);
  color: #fcd34d;
}

/* Pattern Stats */
.pattern-section {
  margin-bottom: 20px;
}

.pattern-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #fff;
}

.pattern-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.pattern-label {
  min-width: 120px;
  font-size: 13px;
  color: var(--muted);
}

.pattern-fill-bg {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.pattern-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.pattern-fill.distraction {
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.pattern-count {
  min-width: 30px;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .distract-reasons {
    grid-template-columns: 1fr;
  }
  
  .productivity-rating {
    gap: 4px;
  }
  
  .rating-btn {
    padding: 10px 6px;
    font-size: 20px;
  }
  
  .focus-helpers {
    gap: 6px;
  }
  
  .helper-chip {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* === Demo Mode === */
.auth-btn.demo {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  border: none;
  color: #fff;
}

.auth-btn.demo:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0;
  color: rgba(255,255,255,0.3);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}

.demo-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, #8b5cf6 0%, #6366f1 100%);
  color: #fff;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 14px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.demo-banner.hidden {
  display: none;
}

.demo-clear-btn {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.demo-clear-btn:hover {
  background: rgba(255,255,255,0.3);
}

/* Adjust app when demo banner is visible */
.app-container.demo-mode {
  padding-top: 50px;
}

.demo-help-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.demo-help-btn:hover {
  background: rgba(255,255,255,0.25);
}

/* Demo Welcome Modal */
.demo-modal {
  width: min(480px, 92%);
  max-height: 75vh;
  padding: 0;
  overflow-y: auto;
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255,255,255,0.3);
}

.demo-welcome-header {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  padding: 16px 20px;
  text-align: center;
}

.demo-welcome-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 8px;
}

.demo-welcome-header h2 {
  margin: 0;
  font-size: 20px;
  color: #fff;
}

.demo-welcome-sub {
  margin: 4px 0 0;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
}

.demo-steps {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.demo-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.demo-step-num {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.demo-step-content {
  flex: 1;
}

.demo-step-content strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: #fff;
}

.demo-step-content p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.demo-step-content .highlight {
  background: rgba(139,92,246,0.2);
  color: #a78bfa;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.demo-tips {
  background: rgba(255,255,255,0.04);
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

.demo-tips h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #fff;
}

.demo-tips ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.demo-tips li {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.demo-tips kbd {
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
}

.demo-modal-footer {
  padding: 16px 24px 24px;
  text-align: center;
}

.demo-modal-footer .btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
}

/* Mobile adjustments for demo modal */
@media (max-width: 640px) {
  .demo-modal {
    max-width: calc(100% - 20px);
    max-height: 80vh;
    margin: 10px;
  }
  
  .demo-welcome-header {
    padding: 16px;
  }
  
  .demo-welcome-icon {
    font-size: 32px;
    margin-bottom: 8px;
  }
  
  .demo-welcome-header h2 {
    font-size: 18px;
  }
  
  .demo-welcome-sub {
    font-size: 13px;
  }
  
  .demo-steps {
    padding: 14px;
    gap: 12px;
  }
  
  .demo-step-num {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }
  
  .demo-step-content strong {
    font-size: 13px;
  }
  
  .demo-step-content p {
    font-size: 12px;
  }
  
  .demo-tips {
    padding: 12px 14px;
  }
  
  .demo-tips ul {
    flex-direction: column;
    gap: 8px;
  }
  
  .demo-modal-footer {
    padding: 14px;
  }
  
  .demo-modal-footer .btn {
    padding: 12px;
    font-size: 14px;
  }
}
