/* ============================================================
   REIKI TIMER PRO — style.css v2.0
   Palette: #404040 | #f4d19b | #FAFAFA
   Font: Arial
   Icons: iOS 17 Outline (SVG, stroke-based)
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Dark Mode (default) */
  --bg-primary:    #141414;
  --bg-secondary:  #1e1e1e;
  --bg-card:       rgba(64, 64, 64, 0.30);
  --bg-card-hover: rgba(64, 64, 64, 0.50);
  --border:        rgba(244, 209, 155, 0.12);
  --border-glow:   rgba(244, 209, 155, 0.35);

  /* Accent — warm sandy gold */
  --accent:        #f4d19b;
  --accent-dark:   #d4a96a;
  --accent-glow:   rgba(244, 209, 155, 0.22);

  /* Text */
  --text-primary:   #fafafa;
  --text-secondary: #b0a090;
  --text-muted:     #686058;

  /* Functional */
  --success:        #79b895;
  --danger:         #d07070;

  /* Button text (inverts with theme) */
  --btn-accent-text: #2a2a2a;

  /* Radii & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-card: 0 2px 20px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 32px rgba(244, 209, 155, 0.15);

  /* Timing */
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Light Mode override --- */
@media (prefers-color-scheme: light) {
  :root {
    --bg-primary:    #fafafa;
    --bg-secondary:  #f0ede6;
    --bg-card:       rgba(255, 255, 255, 0.72);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --border:        rgba(64, 64, 64, 0.10);
    --border-glow:   rgba(64, 64, 64, 0.22);
    --accent:        #404040;
    --accent-dark:   #2a2a2a;
    --accent-glow:   rgba(64, 64, 64, 0.12);
    --text-primary:  #404040;
    --text-secondary:#707070;
    --text-muted:    #a0a0a0;
    --shadow-card:   0 2px 20px rgba(64, 64, 64, 0.10);
    --shadow-glow:   0 0 32px rgba(64, 64, 64, 0.08);
    --btn-accent-text: #fafafa;
  }
}

[data-theme="light"] {
  --bg-primary:    #fafafa;
  --bg-secondary:  #f0ede6;
  --bg-card:       rgba(255, 255, 255, 0.72);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --border:        rgba(64, 64, 64, 0.10);
  --border-glow:   rgba(64, 64, 64, 0.22);
  --accent:        #404040;
  --accent-dark:   #2a2a2a;
  --accent-glow:   rgba(64, 64, 64, 0.12);
  --text-primary:  #404040;
  --text-secondary:#707070;
  --text-muted:    #a0a0a0;
  --shadow-card:   0 2px 20px rgba(64, 64, 64, 0.10);
  --shadow-glow:   0 0 32px rgba(64, 64, 64, 0.08);
  --btn-accent-text: #fafafa;
}

[data-theme="dark"] {
  --bg-primary:    #141414;
  --bg-secondary:  #1e1e1e;
  --bg-card:       rgba(64, 64, 64, 0.30);
  --bg-card-hover: rgba(64, 64, 64, 0.50);
  --border:        rgba(244, 209, 155, 0.12);
  --border-glow:   rgba(244, 209, 155, 0.35);
  --accent:        #f4d19b;
  --accent-dark:   #d4a96a;
  --accent-glow:   rgba(244, 209, 155, 0.22);
  --text-primary:  #fafafa;
  --text-secondary:#b0a090;
  --text-muted:    #686058;
  --shadow-card:   0 2px 20px rgba(0, 0, 0, 0.45);
  --shadow-glow:   0 0 32px rgba(244, 209, 155, 0.15);
  --btn-accent-text: #2a2a2a;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.5;
  transition: background var(--transition-slow), color var(--transition-slow);
}

/* Sfondo sottile */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 15% 15%, rgba(244, 209, 155, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 35% at 85% 85%, rgba(64, 64, 64, 0.15) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; opacity: 0.5; }

/* --- SVG Icon sizing --- */
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.icon-sm  { width: 16px; height: 16px; }
.icon-md  { width: 22px; height: 22px; }
.icon-lg  { width: 26px; height: 26px; }
.icon-tab { width: 22px; height: 22px; }

/* --- Layout principale --- */
.app-wrapper {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px 100px;
}

/* --- Header --- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(140deg, #f4d19b, #c89a50);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(244, 209, 155, 0.3);
  animation: pulse-logo 4s ease-in-out infinite;
  color: #2a2a2a;
}

@keyframes pulse-logo {
  0%, 100% { box-shadow: 0 4px 16px rgba(244, 209, 155, 0.3); }
  50%       { box-shadow: 0 4px 26px rgba(244, 209, 155, 0.5); }
}

.logo-text h1 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}

.logo-text p {
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
}

/* Theme toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  backdrop-filter: blur(10px);
}
.theme-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(15deg);
}

/* --- Bottom Nav & Sidebar --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  justify-content: space-around;
  gap: 6px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  backdrop-filter: blur(20px);
  z-index: 100;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.sidebar-overlay.active { opacity: 1; pointer-events: all; }

.sidebar {
  position: fixed;
  top: 0;
  left: -100%;
  width: 280px;
  height: 100%;
  background: var(--bg-primary);
  border-right: 1px solid var(--border);
  z-index: 201;
  transition: left var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0,0,0,0.5);
}
.sidebar.open { left: 0; }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-header h2 { font-size: 1.1rem; color: var(--text-primary); }

.sidebar-links {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px;
  gap: 10px;
}
.sidebar-link {
  padding: 14px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition);
}
.sidebar-link:hover, .sidebar-link.active {
  background: var(--bg-card);
  border-color: var(--border-glow);
  color: var(--accent);
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: all var(--transition);
}
.nav-tab.active {
  background: var(--accent);
  color: var(--btn-accent-text);
  box-shadow: 0 2px 12px var(--accent-glow);
}
.nav-tab:not(.active):hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* --- Sections --- */
.section { display: none; }
.section.active { display: block; animation: fade-in-up 0.35s ease; }

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

/* --- Card --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--border-glow); }

.card-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  opacity: 0.9;
}

/* --- Timer Display --- */
.timer-display {
  text-align: center;
  padding: 24px 0 16px;
}

.timer-ring {
  position: relative;
  width: 172px;
  height: 172px;
  margin: 0 auto 18px;
}

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

.timer-ring .ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 3.5;
}

.timer-ring .ring-progress {
  fill: none;
  stroke: url(#ringGradient);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 502;
  stroke-dashoffset: 502;
  transition: stroke-dashoffset 1s linear;
}

.timer-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timer-time {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 2.7rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.timer-label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Bell countdown */
.bell-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 6px;
}
.bell-countdown .bell-icon { display: flex; align-items: center; }
.bell-countdown .bell-icon svg { animation: none; }
.bell-countdown.ringing .bell-icon svg { animation: bell-swing 0.3s ease-in-out 3; }

@keyframes bell-swing {
  0%, 100% { transform: rotate(0deg); }
  25%  { transform: rotate(-14deg); }
  75%  { transform: rotate(14deg); }
}

/* --- Volume sliders --- */
.volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.volume-row .vol-icon { display: flex; align-items: center; color: var(--text-muted); flex-shrink: 0; }
.volume-row input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: linear-gradient(to right, var(--accent) var(--val, 70%), var(--border) var(--val, 70%));
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.volume-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent);
  cursor: pointer;
  transition: transform var(--transition);
}
.volume-row input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
.volume-row .vol-val {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.72rem;
  color: var(--text-muted);
  min-width: 32px;
  text-align: right;
}

/* --- Audio URL input --- */
.audio-source-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.audio-source-row input[type="text"] {
  flex: 1;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.8rem;
  outline: none;
  transition: border-color var(--transition);
}
.audio-source-row input[type="text"]::placeholder { color: var(--text-muted); }
.audio-source-row input[type="text"]:focus { border-color: var(--accent); }
.audio-source-row button {
  padding: 10px 14px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--btn-accent-text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.audio-source-row button:hover { background: var(--accent-dark); }

/* File input */
.file-input-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 12px;
}
.file-input-label:hover { border-color: var(--accent); color: var(--accent); }
.file-input-label input { display: none; }
.file-name-display { font-family: Arial, Helvetica, sans-serif; font-size: 0.7rem; color: var(--success); margin-top: 3px; }

/* --- Bell controls --- */
.bell-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.bell-controls label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.8rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.interval-selector { display: flex; gap: 5px; }
.interval-btn {
  width: 40px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}
.interval-btn.active,
.interval-btn:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--btn-accent-text);
}

.custom-interval-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.custom-interval-row input[type="number"] {
  width: 62px;
  padding: 7px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.85rem;
  text-align: center;
  outline: none;
  transition: border-color var(--transition);
}
.custom-interval-row input[type="number"]:focus { border-color: var(--accent); }
.custom-interval-row span {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* --- Main Buttons --- */
.controls-group {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  border: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
}

.btn-primary {
  flex: 2;
  background: #f4d19b;
  color: #2a2a2a;
  box-shadow: 0 3px 16px rgba(244, 209, 155, 0.4);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(244, 209, 155, 0.5); filter: brightness(1.05); }
.btn-primary:active { transform: translateY(0); }

.btn-primary.running {
  background: var(--success);
  color: #fff;
  box-shadow: 0 3px 14px rgba(121, 184, 149, 0.3);
}

.btn-secondary {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-gold {
  flex: 1;
  background: linear-gradient(135deg, #f4d19b, #d4a96a);
  color: #2a2a2a;
  box-shadow: 0 3px 14px rgba(244, 209, 155, 0.3);
}
.btn-gold:hover { transform: translateY(-1px); filter: brightness(1.05); }

.btn-sm { padding: 8px 14px; font-size: 0.76rem; border-radius: var(--radius-sm); }

/* --- Session Status --- */
.session-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: rgba(244, 209, 155, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 12px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.73rem;
}
.status-indicator { display: flex; align-items: center; gap: 7px; color: var(--text-secondary); }
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all var(--transition);
  flex-shrink: 0;
}
.status-dot.active {
  background: var(--success);
  box-shadow: 0 0 8px rgba(121, 184, 149, 0.5);
  animation: pulse-dot 1.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.35); }
}
.sessions-count { color: var(--accent); font-weight: 700; }

/* --- Notepad --- */
.notepad-textarea {
  width: 100%;
  min-height: 290px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  color: var(--text-primary);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.88rem;
  line-height: 1.65;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  margin-bottom: 10px;
}
.notepad-textarea::placeholder { color: var(--text-muted); }
.notepad-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.notes-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.notes-meta { font-family: Arial, Helvetica, sans-serif; font-size: 0.68rem; color: var(--text-muted); }
.notes-meta strong { color: var(--success); }
.save-indicator { font-family: Arial, Helvetica, sans-serif; font-size: 0.68rem; color: var(--success); opacity: 0; transition: opacity 0.4s; }
.save-indicator.visible { opacity: 1; }

/* --- Materials Library --- */
.materials-list { display: flex; flex-direction: column; gap: 10px; }

.material-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
}
.material-item:hover {
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
  transform: translateX(3px);
}

.material-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}
.material-icon.pdf  { background: rgba(208, 112, 112, 0.15); color: #d07070; }
.material-icon.img  { background: rgba(121, 184, 149, 0.15); color: var(--success); }
.material-icon.doc  { background: rgba(100, 140, 200, 0.15); color: #7090d0; }
.material-icon.audio { background: rgba(244, 209, 155, 0.15); color: var(--accent); }

.material-info { flex: 1; min-width: 0; }
.material-info h3 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.material-info p {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.material-download { color: var(--accent); flex-shrink: 0; transition: transform var(--transition); display: flex; align-items: center; }
.material-item:hover .material-download { transform: translateY(2px); }

/* Placeholder notice */
.placeholder-notice {
  padding: 13px 14px;
  background: rgba(244, 209, 155, 0.07);
  border: 1px solid rgba(244, 209, 155, 0.25);
  border-radius: var(--radius-sm);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.76rem;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
  gap: 9px;
  align-items: flex-start;
  line-height: 1.5;
}
.placeholder-notice .notice-icon { flex-shrink: 0; margin-top: 1px; }

/* --- Sessions list --- */
#savedSessionsList {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 10px 22px;
  color: var(--text-primary);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-glow);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- Bell Ripple --- */
@keyframes ripple {
  0%   { transform: translate(-50%,-50%) scale(0.8); opacity: 0.8; }
  100% { transform: translate(-50%,-50%) scale(2.8); opacity: 0; }
}
.bell-ripple {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 209, 155, 0.28), transparent 70%);
  pointer-events: none;
  z-index: 999;
  animation: ripple 1.1s ease-out forwards;
}

/* --- Responsive --- */
@media (max-width: 380px) {
  .timer-time { font-size: 2.3rem; }
  .nav-tab { font-size: 0.56rem; padding: 8px 3px; }
  .btn { padding: 12px 14px; font-size: 0.82rem; }
}

/* Tablet & Desktop Optimization */
@media (min-width: 768px) {
  :root {
    --sidebar-width: 260px;
  }

  .app-wrapper {
    max-width: 900px;
    margin-left: var(--sidebar-width);
    padding: 0 40px 40px;
  }

  /* Sidebar persistente */
  .sidebar {
    left: 0 !important;
    width: var(--sidebar-width);
    border-right: 1px solid var(--border);
    box-shadow: none;
  }

  .sidebar-overlay, 
  #closeSidebar {
    display: none !important;
  }

  /* Nascondi navigazione mobile */
  .bottom-nav, 
  #menuBtn {
    display: none !important;
  }

  /* Header più pulito */
  .app-header {
    padding: 30px 0;
    margin-bottom: 30px;
  }

  /* Timer più grande */
  .timer-ring {
    width: 280px;
    height: 280px;
  }
  .timer-time {
    font-size: 3.5rem;
  }

  /* Griglie per liste */
  #materialsList, #songsList {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .app-wrapper {
    max-width: 1100px;
  }

  #materialsList, #songsList {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
  
  .notepad-textarea {
    min-height: 450px;
    font-size: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

