/* ================================================
   SHRED UP - Professional Music Practice SaaS
   Phase 1: STRICT BENTO ALIGNMENT - Reference Layout
   ================================================ */

/* Conthrax Font */
@font-face {
  font-family: 'Conthrax';
  src: url('/static/fonts/Conthrax-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Dark Professional Color Palette */
  --color-bg-primary: #0a0a0a;
  --color-bg-secondary: #141414; /* ✅ RETOUR: #1a1a1a → #141414 (original) */
  --color-bg-tertiary: #1e1e1e;
  --color-bg-elevated: #252525;
  
  --color-text-primary: #e8e8e8;
  --color-text-secondary: #a0a0a0;
  --color-text-tertiary: #6a6a6a;
  
  --color-accent-red: #ef4444;
  --color-accent-red-hover: #dc2626;
  
  --color-border: #2a2a2a;
  --color-border-subtle: #1a1a1a;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================================================
   STRICT BENTO GRID - 4 Columns Layout
   Col 1: LEFT SIDEBAR
   Col 2: PRACTICE (Focus + Exercises)
   Col 3: METRONOME/TUNER (stacked vertically)
   Col 4: SESSION SUMMARY/NOTEPAD (stacked vertically)
   ================================================ */

/* ================================================
   ROOT - Responsive layout
   ================================================ */

body {
  overflow-x: hidden; /* No horizontal scroll needed */
  overflow-y: auto;
  width: 100vw;
}

/* ================================================
   APP CONTAINER - Responsive Grid Layout
   ================================================ */

.app-container {
  width: 100%; /* Responsive width */
  min-width: 1600px; /* Minimum: 300+500+400+400 = 1600px + gaps */
  height: 100vh;
  margin: 0 auto;
  display: grid;
  /* Zone 1 (300px) | Zone 2 (min 500px, flexible) | Zone 3 (400px fixed) | Zone 4 (400px fixed) */
  grid-template-columns: 300px minmax(500px, 1fr) 400px 400px;
  grid-template-rows: 60px 140px 1fr;
  gap: 8px;
  background-color: var(--color-bg-primary);
  padding: 8px;
}

/* ================================================
   TOP BANNER - Full Width Row 1
   ================================================ */

.zone-banner {
  grid-column: 1 / -1;
  grid-row: 1;
  background-color: var(--color-bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.brand-logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--color-text-primary);
  text-transform: uppercase;
}

/* ================================================
   LEFT SIDEBAR - Column 1, Rows 2-3
   Distinct Stacked Blocks
   ================================================ */

.zone-left {
  grid-column: 1;
  grid-row: 2 / 4;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 8px;
}

.left-block {
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: var(--spacing-lg);
  overflow-y: auto;
}

.block-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-tertiary);
  margin-bottom: var(--spacing-md);
}

/* Profile Block */
.profile-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
}

.profile-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-bg-elevated), var(--color-bg-tertiary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--color-text-secondary);
  border: 2px solid var(--color-border);
}

.profile-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.profile-level {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
}

/* Menu Block */
.menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.menu-item {
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: var(--color-bg-tertiary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  text-align: center;
}

.menu-item:hover {
  background-color: var(--color-bg-elevated);
  color: var(--color-text-primary);
}

/* Progression Graph Block */
.graph-placeholder {
  width: 100%;
  height: 100%;
  min-height: 120px;
  background-color: var(--color-bg-tertiary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  font-style: italic;
}

/* ================================================
   FOCUS POINTS - Distinct Block Above Exercise List
   Column 2, Row 2
   ================================================ */

.zone-focus {
  grid-column: 2;
  grid-row: 2;
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: var(--spacing-lg);
  overflow: hidden;
}

.focus-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-sm);
}

.focus-description {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  background: transparent;
  border: none;
  width: 100%;
  resize: vertical;
  font-family: inherit;
  padding: 0;
  min-height: 60px;
}

.focus-description:focus {
  outline: 1px solid var(--color-border);
  background-color: rgba(255, 255, 255, 0.02);
  padding: var(--spacing-xs);
  border-radius: var(--radius-sm);
}

/* ================================================
   PRACTICE ZONE (EXERCISE LIST) - Main Workspace
   Column 2, Row 3
   ================================================ */

.zone-practice {
  grid-column: 2;
  grid-row: 3;
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: var(--spacing-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Exercise Table Header */
.exercise-header {
  display: grid;
  grid-template-columns: 50px 1fr 90px auto 90px 50px 30px;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: var(--color-bg-tertiary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  margin-bottom: var(--spacing-sm);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-cell {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-tertiary);
  text-align: center;
  line-height: 1.3;
  position: relative;
}

.header-cell:first-child,
.header-cell:nth-child(2) {
  text-align: left;
}

/* Tempo header with +/- buttons */
.header-tempo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
}

.tempo-subdivide-btn,
.tempo-reduce-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #141414;  /* ✅ CHANGÉ: #ef4444 → #141414 */
  border: 2px solid #353535;  /* ✅ CHANGÉ: #dc2626 → #353535 */
  color: #353535;  /* ✅ CHANGÉ: white → #353535 */
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  transition: all 0.2s;
  flex-shrink: 0;
  z-index: 10;
}

.tempo-subdivide-btn:hover,
.tempo-reduce-btn:hover {
  background-color: #141414;
  border-color: #ef4444;  /* ✅ Bordure rouge au hover */
  color: #ef4444;  /* ✅ Texte rouge au hover */
  transform: scale(1.1);
}

.tempo-subdivide-btn.max-subdivisions,
.tempo-reduce-btn.min-subdivisions {
  opacity: 0.3;
  cursor: not-allowed;
}

.tempo-subdivide-btn.max-subdivisions:hover,
.tempo-reduce-btn.min-subdivisions:hover {
  background-color: var(--color-bg-elevated);
  border-color: var(--color-border);
  color: var(--color-text-primary);
}

/* Exercise List Container */
.exercise-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

/* Exercise Row */
.exercise-row {
  display: grid;
  grid-template-columns: 85px 1fr 110px auto 90px 90px 30px;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: var(--color-bg-tertiary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  transition: all 0.2s;
  min-height: 44px;
}

.exercise-row:hover {
  background-color: var(--color-bg-elevated);
  border-color: var(--color-text-tertiary);
}

/* Drag & Drop States */
.exercise-row[draggable="true"] {
  cursor: move;
}

.exercise-row.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.exercise-row.drag-over {
  border-color: #3b82f6;
  border-width: 2px;
  background-color: rgba(59, 130, 246, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}

/* REC + Reference Upload Container */
.rec-reference-container {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  min-width: 80px;
}

/* REC Button - Per Exercise Recording */
.rec-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #141414;  /* ✅ CHANGÉ: var(--color-accent-red) → #141414 */
  border: 2px solid #353535;  /* ✅ AJOUTÉ: bordure #353535 */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  position: relative;
  flex-shrink: 0;
}

.rec-button::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #353535;  /* ✅ CHANGÉ: white → #353535 */
  transition: all 0.2s;
}

.rec-button:hover {
  background-color: #141414;
  border-color: #ef4444;  /* ✅ Bordure rouge au hover */
  transform: scale(1.05);
}

.rec-button.recording {
  animation: pulse 1.5s infinite;
  background-color: #141414;  /* ✅ Fond reste #141414 en mode ON */
  border-color: #ef4444;  /* ✅ Bordure rouge en mode ON */
}

.rec-button.recording::before {
  border-radius: 2px;
  width: 10px;
  height: 10px;
  background-color: #ef4444;  /* ✅ CHANGÉ: garde rouge en mode ON */
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Upload Reference Button (paperclip icon) */
.upload-reference-btn {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background-color: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  padding: 0;
  color: #000;
}

.upload-reference-btn:hover {
  color: #666;
  transform: scale(1.15);
}

.upload-reference-btn .upload-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

/* Reference Indicator (green checkmark) */
.reference-indicator {
  font-size: 14px;
  line-height: 1;
  position: absolute;
  right: -2px;
  top: -2px;
  background-color: #0a0a0a;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #22c55e;
  color: #22c55e;
}

/* Exercise Name Input - Editable by user */
.exercise-name-input {
  width: 100%;
  font-size: 0.85rem;
  color: var(--color-text-primary);
  font-weight: 500;
  text-align: left;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: var(--spacing-xs);
  transition: all 0.2s;
  outline: none;
}

.exercise-name-input:hover {
  background-color: var(--color-bg-elevated);
  border-color: var(--color-border);
}

.exercise-name-input:focus {
  background-color: var(--color-bg-elevated);
  border-color: var(--color-accent-red);
}

.exercise-param {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  text-align: center;
  padding: 2px 4px;
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-sm);
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tempo Columns Container - Holds multiple 90px columns */
.tempo-columns-container {
  display: flex;
  gap: 4px;
  align-items: center;
}

.tempo-column {
  width: 110px;
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-sm);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
}

.tempo-input {
  width: 100%;
  background-color: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 4px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-primary);
  outline: none;
  transition: all 0.2s;
}

.tempo-input:focus {
  border-color: var(--color-accent-red);
  background-color: var(--color-bg-elevated);
}

.tempo-input::placeholder {
  color: var(--color-text-tertiary);
}

/* Tempo Goal Input - Editable */
.tempo-goal-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
}

.tempo-goal-input {
  width: 100%;
  max-width: 60px;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 4px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-primary);
  outline: none;
  transition: all 0.2s;
}

.tempo-goal-input:hover {
  border-color: var(--color-border);
  background-color: rgba(255, 255, 255, 0.02);
}

.tempo-goal-input:focus {
  border-color: var(--color-accent-red);
  background-color: var(--color-bg-elevated);
}

/* Temps Passé Select - Dropdown with presets */
.temps-passe-select {
  width: 100%;
  max-width: 100%;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 4px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-primary);
  outline: none;
  transition: all 0.2s;
  cursor: pointer;
}

.temps-passe-select:hover {
  border-color: var(--color-border);
  background-color: rgba(255, 255, 255, 0.02);
}

.temps-passe-select:focus {
  border-color: var(--color-accent-red);
  background-color: var(--color-bg-elevated);
}

.temps-passe-select option {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
}

/* 1 subdivision (default) */
.tempo-column[data-subdivisions="1"] {
  grid-template-columns: 1fr;
}

/* 2 subdivisions (after 1st click) */
.tempo-column[data-subdivisions="2"] {
  grid-template-columns: 1fr 1fr;
}

/* 3 subdivisions (after 2nd click) */
.tempo-column[data-subdivisions="3"] {
  grid-template-columns: 1fr 1fr 1fr;
}

.tempo-slot {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-secondary);
  text-align: center;
  padding: 2px;
  background-color: transparent; /* CRITICAL: Empty slots stay black */
  border: 1px solid var(--color-border); /* ✨ BORDURE POUR VOIR LES SUBDIVISIONS */
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  transition: all 0.2s;
}

.tempo-slot:not(:empty) {
  color: var(--color-text-primary);
  font-weight: 600;
  background-color: var(--color-bg-elevated); /* Only filled slots have background */
  border-color: var(--color-accent-red); /* ✨ BORDURE ROUGE QUAND REMPLI */
}

.exercise-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
}

.exercise-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--color-accent-red);
}

/* SUB RYTH Select Dropdown */
.sub-ryth-select {
  width: 100%;
  padding: 4px 6px;
  background-color: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.sub-ryth-select:hover {
  border-color: var(--color-text-tertiary);
  background-color: var(--color-bg-secondary);
}

.sub-ryth-select:focus {
  outline: none;
  border-color: var(--color-accent-red);
}

.sub-ryth-select option {
  background-color: var(--color-bg-elevated);
  color: var(--color-text-primary);
}

/* ================================================
   METRONOME + SESSION SUMMARY COLUMN - Column 3, Rows 2-4
   ================================================ */

.zone-metronome-tuner {
  grid-column: 3;
  grid-row: 2 / 4;
  display: grid;
  grid-template-rows: 740px auto;
  gap: 8px;
  width: 400px;
  max-width: 400px;
}

/* ================================================
   METRONOME ZONE - Portrait Vertical (Top)
   ================================================ */

.zone-metronome {
  height: 740px;
  width: 400px;
  max-width: 400px;
  background-color: #141414;
  border-radius: var(--radius-md);  /* ✅ CHANGÉ: 0 → var(--radius-md) pour harmoniser avec les autres modules */
  border: 1px solid var(--color-border);
  display: block;
  padding: 0;
  margin: 0;
  overflow: hidden;
  position: relative;
}

.metronome-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

/* ✅ IFRAME METRONOME INTEGRATION */
.metronome-iframe {
  width: 400px;
  height: 800px;
  max-width: 400px;
  border: none;
  display: block;
  border-radius: var(--radius-md);  /* ✅ CHANGÉ: 0 → var(--radius-md) pour harmoniser */
  margin: 0;
  padding: 0;
  position: absolute;
  top: 0;
  left: 0;
  
  /* 🔒 PROTECTION: Empêcher l'iframe de voler le focus des raccourcis clavier */
  pointer-events: auto; /* Permet les clics mais pas le focus */
}

/* 🔒 Overlay transparent pour capturer les événements avant l'iframe */
.zone-metronome::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.metronome-header {
  text-align: center;
}

.metronome-beats {
  display: flex;
  gap: var(--spacing-xs);
  justify-content: center;
  margin-bottom: var(--spacing-sm);
}

.beat-indicator {
  width: 38px;
  height: 38px;
  background-color: var(--color-bg-tertiary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  transition: all 0.2s;
}

.beat-indicator.active {
  background-color: var(--color-accent-red);
  border-color: var(--color-accent-red);
}

.beat-label {
  font-size: 0.65rem;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: var(--spacing-xs);
}

.metronome-display {
  text-align: center;
  margin: var(--spacing-lg) 0;
  flex: 0 0 auto;
}

.bpm-value {
  font-size: 3.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-text-primary);
  line-height: 1;
}

.bpm-label {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-top: var(--spacing-xs);
}

.metronome-controls {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  margin: var(--spacing-md) 0;
}

.control-button {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background-color: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--color-text-primary);
  transition: all 0.2s;
}

.control-button:hover {
  background-color: var(--color-bg-elevated);
}

.control-button.primary {
  background-color: var(--color-accent-red);
  border-color: var(--color-accent-red);
}

.control-button.primary:hover {
  background-color: var(--color-accent-red-hover);
}

.bpm-slider-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 140px;
}

.slider-input {
  -webkit-appearance: slider-vertical;
  writing-mode: bt-lr;
  width: 6px;
  height: 100%;
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 32px;
  height: 50px;
  background: var(--color-text-primary);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.metronome-timer {
  text-align: center;
  margin-top: auto;
}

.timer-value {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--color-text-primary);
}

/* ================================================
   SESSION SUMMARY ZONE - Bottom (sous métronome)
   ================================================ */

.zone-session-summary-bottom {
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: var(--spacing-md);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

/* ================================================
   TUNER ZONE - Moved to Right Column
   ================================================ */

.tuner-block {
  height: 592px;
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 0;
  overflow: hidden;
}

.tuner-iframe-right {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #141414;
}

/* Old tuner zone - hide */
.zone-tuner {
  display: none;
}

.tuner-iframe {
  display: none;
}

.tuner-container {
  width: 100%;
  text-align: center;
}

.tuner-display {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-sm);
}

.tuner-indicator {
  height: 6px;
  background-color: var(--color-bg-tertiary);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  max-width: 220px;
  margin: 0 auto;
}

.tuner-needle {
  position: absolute;
  width: 3px;
  height: 100%;
  background-color: var(--color-accent-red);
  left: 50%;
  transform: translateX(-50%);
}

.tuner-frequency {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  margin-top: var(--spacing-sm);
}

/* ================================================
   RIGHT COLUMN (Zone 4) - Date/Time + Tuner + Notepad
   ================================================ */

/* Right Column - Column 4, Rows 2-4 */
.zone-right-top {
  grid-column: 4;
  grid-row: 2 / 4;
  display: grid;
  grid-template-rows: 140px 592px 1fr 90px;
  gap: 8px;
}

/* Date/Time Block - 140px (same as FOCUS) */
.datetime-container {
  height: 140px;
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Session Summary Block - Hide old position */
.session-summary-block {
  display: none;
}

/* Notepad Block - Flexible height, fills available space */
.notepad-block {
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: var(--spacing-md);
  overflow-y: auto;
}

.datetime-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  width: 100%;
}

.datetime-time {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-text-primary);
  letter-spacing: 0.05em;
}

.datetime-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
}

.datetime-day {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.datetime-session {
  font-size: 0.85rem;
  color: var(--color-text-tertiary);
  font-weight: 500;
}

.datetime-session span {
  color: var(--color-accent-red);
  font-weight: 700;
}

.right-block {
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: var(--spacing-md);
  overflow-y: auto;
}

/* Session Summary Block */
.summary-placeholder {
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  font-style: italic;
  text-align: center;
  padding: var(--spacing-md);
  line-height: 1.5;
}

/* Notepad Block */
.notepad-textarea {
  width: 100%;
  height: calc(100% - 30px);
  background-color: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  resize: none;
  outline: none;
}

.notepad-textarea::placeholder {
  color: var(--color-text-tertiary);
}

/* ================================================
   SESSION SAVE BLOCK - Neumorphic Button
   ================================================ */

.session-save-block {
  height: 90px;
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 2px var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: 0px;
  overflow: hidden;
}

.session-save-block .block-title {
  margin-bottom: 2px;
}

.session-save-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Neumorphic Save Button - Inspired by Metronome Play/Stop */
.save-session-btn-neumorph {
  width: 100%;
  max-width: 250px;
  height: 48px;
  background: linear-gradient(145deg, #181817 0%, #1d1d1c 100%);
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  color: rgba(80, 80, 80, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: none;
  box-shadow: 1.9px 1.9px 5.7px rgba(0, 0, 0, 0.56);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.save-session-btn-neumorph:hover {
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
}

.save-session-btn-neumorph:active {
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.56);
}

.save-session-btn-neumorph .save-icon {
  width: 24px;
  height: 24px;
  transition: none;
}

.save-session-btn-neumorph .save-text {
  transition: none;
}

/* Active/Saved state - White glow like Play button */
.save-session-btn-neumorph.saved {
  box-shadow: 1px 1px 0.2px rgba(0, 0, 0, 0.56);
}

.save-session-btn-neumorph.saved .save-icon,
.save-session-btn-neumorph.saved .save-text {
  color: #ffffff;
  filter: 
    drop-shadow(0 0 1px rgba(255, 255, 255, 0.4))
    drop-shadow(0 0 3px rgba(220, 235, 250, 0.15))
    drop-shadow(0 0 6px rgba(200, 225, 245, 0.08));
}

/* Disabled state */
.save-session-btn-neumorph:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ================================================
   SCROLLBAR STYLING
   ================================================ */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-bg-elevated);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-tertiary);
}

/* ================================================
   RESPONSIVE - Tablet Adaptation
   ================================================ */

@media (max-width: 1400px) {
  .app-container {
    grid-template-columns: 180px 1fr 260px 260px;
  }
}

@media (max-width: 1200px) {
  .app-container {
    grid-template-columns: 160px 1fr 240px 240px;
  }
}

/* ================================================
   MEDIA QUERIES
   ================================================ */

@media (max-width: 1024px) {
  .app-container {
    grid-template-columns: 140px 1fr 220px 220px;
    grid-template-rows: 50px 120px 1fr;
    gap: 6px;
    padding: 6px;
  }
  
  .brand-logo {
    font-size: 1.1rem;
  }
  
  .bpm-value {
    font-size: 3rem;
  }
  
  .profile-avatar {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
}
