/* ==========================================================================
   GYM CHALKBOARD & INTERACTIVE BOXING TIMER - STYLE SYSTEM
   Optimized for 65-inch TV Displays (LG WebOS, Google TV 1080p/4K)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties / Theme Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Chalkboard Color Palette */
  --bg-slate: #1a1d1e;
  --chalk-white: #f3f6f9;
  --chalk-yellow: #ffdf5d;
  --chalk-cyan: #52c5ff;
  --chalk-red: #ff6b6b;
  --chalk-green: #51cf66;
  --chalk-gray: #8899a6;

  /* Typography */
  --font-heading: 'Fredericka the Great', 'Permanent Marker', cursive, sans-serif;
  --font-chalk: 'Permanent Marker', 'Architects Daughter', cursive, sans-serif;
  --font-handwriting: 'Caveat', cursive, sans-serif;
  --font-timer: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  /* TV Viewport Spacing */
  --tv-padding: 1.2rem;

  /* Chalk Shadow Effects */
  --chalk-shadow-white: 0 0 3px rgba(255, 255, 255, 0.7), 2px 2px 4px rgba(0, 0, 0, 0.9);
  --chalk-shadow-yellow: 0 0 4px rgba(255, 223, 93, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.9);
  --chalk-shadow-cyan: 0 0 4px rgba(82, 197, 255, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.9);
  --chalk-shadow-red: 0 0 4px rgba(255, 107, 107, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.9);
  --chalk-shadow-green: 0 0 4px rgba(81, 207, 102, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.9);
}

/* --------------------------------------------------------------------------
   2. Reset & GPU Hardware Acceleration Layout Setup
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #0b0d0e;
  font-family: var(--font-chalk);
  color: var(--chalk-white);
  -webkit-font-smoothing: antialiased;
}

/* Force GPU Composite Layers for Instant TV Response */
.chalkboard-inner,
.screensaver-slide,
.timer-digits,
.chalk-btn,
.mini-timer-pill {
  transform: translateZ(0);
  will-change: transform, opacity;
}

/* Vector SVG Icon Alignment */
.svg-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  stroke: currentColor;
}

/* Outer Container & Full-Bleed Slate Setup (No Brown Wooden Border) */
.tv-wrapper {
  width: 100vw;
  height: 100vh;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.wooden-frame {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.chalkboard-inner {
  width: 100%;
  height: 100%;
  background-color: var(--bg-slate);
  background-image: url('chalkboard-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  padding: var(--tv-padding);
  position: relative;
  transition: transform 0.4s ease;
}

/* OLED Burn-In Prevention Pixel Shift Class */
.pixel-shifted-1 { transform: translate(2px, 1px) translateZ(0); }
.pixel-shifted-2 { transform: translate(-2px, -1px) translateZ(0); }
.pixel-shifted-3 { transform: translate(1px, -2px) translateZ(0); }
.pixel-shifted-4 { transform: translate(-1px, 2px) translateZ(0); }

/* Inline Chalk Colors */
.red-chalk {
  color: var(--chalk-red) !important;
  text-shadow: var(--chalk-shadow-red) !important;
}

.yellow-chalk {
  color: var(--chalk-yellow) !important;
  text-shadow: var(--chalk-shadow-yellow) !important;
}

.cyan-chalk {
  color: var(--chalk-cyan) !important;
  text-shadow: var(--chalk-shadow-cyan) !important;
}

.green-chalk {
  color: var(--chalk-green) !important;
  text-shadow: var(--chalk-shadow-green) !important;
}

/* --------------------------------------------------------------------------
   3. Header Bar & Generous Button Spacing for 65" Smart TVs
   -------------------------------------------------------------------------- */
.chalk-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.8rem;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.25);
  margin-bottom: 1rem;
}

.chalk-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  letter-spacing: 2px;
  color: var(--chalk-white);
  text-shadow: var(--chalk-shadow-white);
  line-height: 1.1;
}

.chalk-subtitle {
  font-family: var(--font-chalk);
  font-size: 1.1rem;
  color: var(--chalk-yellow);
  text-shadow: var(--chalk-shadow-yellow);
  margin-top: 4px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

/* Mini Timer Header Pill */
.mini-timer-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  height: 46px;
  min-height: 46px;
  background: rgba(0, 0, 0, 0.6);
  border: 1.5px solid var(--chalk-yellow);
  border-radius: 8px;
  padding: 0 1.2rem;
  font-family: var(--font-timer);
  font-weight: bold;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease;
  white-space: nowrap;
}

.mini-timer-pill:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.03) translateZ(0);
}

.header-right .chalk-btn-header {
  height: 46px;
  min-height: 46px;
  padding: 0 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  line-height: 1;
  white-space: nowrap;
  font-size: 1.05rem;
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   4. Buttons & Interactive Chalk Elements
   -------------------------------------------------------------------------- */
.chalk-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: var(--chalk-white);
  font-family: var(--font-chalk);
  font-size: 1.05rem;
  padding: 0.65rem 1.3rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  transition: transform 0.15s ease-in-out, background 0.15s ease-in-out;
  text-shadow: var(--chalk-shadow-white);
  white-space: nowrap;
  margin: 0 0.15rem;
}

.chalk-btn:hover, .chalk-btn:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: var(--chalk-white);
  transform: translateY(-2px) translateZ(0);
  outline: none;
}

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

.chalk-btn-sm {
  font-size: 0.95rem;
  padding: 0.45rem 1rem;
}

.chalk-btn-lg {
  font-size: 1.3rem;
  padding: 0.85rem 1.75rem;
}

.chalk-btn-hero {
  font-size: 1.7rem;
  padding: 1.05rem 3rem;
  border-width: 3px;
  font-weight: bold;
}

.green-chalk-btn {
  background: rgba(81, 207, 102, 0.2);
  border-color: var(--chalk-green);
  color: var(--chalk-green);
  text-shadow: var(--chalk-shadow-green);
}

.green-chalk-btn:hover, .green-chalk-btn:focus {
  background: rgba(81, 207, 102, 0.35);
}

.chalk-btn-danger {
  background: rgba(255, 107, 107, 0.2);
  border-color: var(--chalk-red);
  color: var(--chalk-red);
  text-shadow: var(--chalk-shadow-red);
}

.chalk-btn-danger:hover, .chalk-btn-danger:focus {
  background: rgba(255, 107, 107, 0.35);
}

.chalk-btn-secondary {
  border-color: var(--chalk-gray);
  color: var(--chalk-gray);
}

/* --------------------------------------------------------------------------
   5. Grid Layout: Default (Full Chalkboard) vs Timer Expanded (Half Screen)
   -------------------------------------------------------------------------- */
.chalkboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  flex: 1;
  min-height: 0;
  transition: all 0.3s ease;
}

.chalkboard-inner.timer-expanded .chalkboard-grid {
  grid-template-columns: 1fr 1.15fr;
}

.chalk-box {
  background: rgba(10, 12, 14, 0.5);
  border: 2px dashed rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s ease;
}

.chalk-heading {
  font-size: 1.6rem;
  font-family: var(--font-heading);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.heading-svg {
  color: var(--chalk-yellow);
}

.chalk-label {
  font-size: 1rem;
  color: var(--chalk-white);
  text-shadow: var(--chalk-shadow-white);
}

/* --------------------------------------------------------------------------
   6. Left Panel: Workout of the Day (WOD)
   -------------------------------------------------------------------------- */
.wod-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.wod-actions {
  display: flex;
  gap: 0.8rem;
}

.preset-selector-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  overflow-x: auto;
}

.preset-pill {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--chalk-white);
  font-family: var(--font-chalk);
  font-size: 0.95rem;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.preset-pill:hover, .preset-pill:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--chalk-yellow);
  outline: none;
}

.preset-pill.active {
  background: rgba(255, 223, 93, 0.25);
  border-color: var(--chalk-yellow);
  color: var(--chalk-yellow);
  font-weight: bold;
}

.exercise-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.exercise-scroll-area::-webkit-scrollbar {
  width: 8px;
}
.exercise-scroll-area::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.exercise-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.exercise-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.exercise-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.85rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.exercise-item:hover, .exercise-item:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--chalk-cyan);
  outline: none;
}

.exercise-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex: 1;
}

.exercise-details {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.exercise-name {
  font-size: 1.35rem;
  font-family: var(--font-chalk);
  color: var(--chalk-white);
  text-shadow: var(--chalk-shadow-white);
  line-height: 1.2;
}

.exercise-target {
  font-family: var(--font-handwriting);
  font-size: 1.3rem;
  color: var(--chalk-cyan);
  text-shadow: var(--chalk-shadow-cyan);
}

.exercise-actions {
  display: flex;
  gap: 0.6rem;
  opacity: 0.8;
}

.exercise-item:hover .exercise-actions {
  opacity: 1;
}

.action-icon-btn {
  background: none;
  border: none;
  color: var(--chalk-white);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
}

.action-icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--chalk-yellow);
}

.exercise-item.cat-yellow .exercise-name { color: var(--chalk-yellow); }
.exercise-item.cat-cyan .exercise-name { color: var(--chalk-cyan); }
.exercise-item.cat-red .exercise-name { color: var(--chalk-red); }

/* --------------------------------------------------------------------------
   7. Right Panel: Timer Engine
   -------------------------------------------------------------------------- */
.timer-panel {
  display: none;
}

.chalkboard-inner.timer-expanded .timer-panel {
  display: flex;
}

.chalkboard-inner.timer-expanded .mini-timer-pill {
  display: none;
}

.timer-state-banner {
  text-align: center;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  letter-spacing: 3px;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9);
  transition: all 0.3s ease;
  margin-bottom: 0.8rem;
}

.state-ready {
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid var(--chalk-white);
  color: var(--chalk-white);
}

.state-prepare {
  background: rgba(255, 223, 93, 0.25);
  border: 2px solid var(--chalk-yellow);
  color: var(--chalk-yellow);
  animation: pulse-border 1s infinite alternate;
}

.state-work {
  background: rgba(81, 207, 102, 0.3);
  border: 2px solid var(--chalk-green);
  color: var(--chalk-green);
}

.state-rest {
  background: rgba(255, 107, 107, 0.3);
  border: 2px solid var(--chalk-red);
  color: var(--chalk-red);
  animation: pulse-rest 1.5s infinite alternate;
}

.state-paused {
  background: rgba(255, 159, 28, 0.25);
  border: 2px solid #ff9f1c;
  color: #ff9f1c;
}

.state-complete {
  background: rgba(82, 197, 255, 0.3);
  border: 2px solid var(--chalk-cyan);
  color: var(--chalk-cyan);
}

@keyframes pulse-border {
  from { border-color: rgba(255, 223, 93, 0.5); }
  to { border-color: rgba(255, 223, 93, 1); }
}
@keyframes pulse-rest {
  from { opacity: 0.85; }
  to { opacity: 1; }
}

.timer-display-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 1rem 0.5rem;
  margin-bottom: 0.8rem;
  transition: all 0.3s ease;
}

.timer-digits {
  font-family: var(--font-timer);
  font-size: 6.5rem;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -2px;
  color: var(--chalk-white);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.7), 4px 4px 10px rgba(0, 0, 0, 0.9);
  transition: color 0.3s ease;
}

.state-work .timer-digits {
  color: #69db7c;
  text-shadow: 0 0 20px rgba(81, 207, 102, 0.8), 4px 4px 10px rgba(0, 0, 0, 0.9);
}
.state-rest .timer-digits {
  color: #ff8787;
  text-shadow: 0 0 20px rgba(255, 107, 107, 0.8), 4px 4px 10px rgba(0, 0, 0, 0.9);
}
.state-prepare .timer-digits {
  color: var(--chalk-yellow);
}

.timer-sub-info {
  display: flex;
  gap: 2rem;
  margin-top: 0.6rem;
  font-family: var(--font-chalk);
  font-size: 1.05rem;
  color: var(--chalk-gray);
}

.timer-sub-info strong {
  color: var(--chalk-white);
}

.round-counter-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
}

.round-title-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.round-big-text {
  font-size: 2.2rem;
  font-family: var(--font-heading);
}

/* Round Circle Dots with Generous Spacing so they NEVER touch */
.round-dots-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  max-width: 95%;
  padding: 0.3rem 0;
}

.round-dot {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-family: var(--font-timer);
  font-weight: bold;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s ease;
  margin: 2px;
}

.round-dot.done {
  background: var(--chalk-green);
  border-color: var(--chalk-green);
  color: #000;
}

.round-dot.active {
  background: var(--chalk-yellow);
  border-color: var(--chalk-yellow);
  color: #000;
  transform: scale(1.25);
}

/* Primary Control Buttons with 1.6rem gap so PREV, START, RESET, NEXT never touch */
.timer-main-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.6rem;
  margin-bottom: 1rem;
}

.timer-presets-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  overflow-x: auto;
}

.timer-preset-btns {
  display: flex;
  gap: 0.6rem;
}

.timer-preset-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--chalk-white);
  font-family: var(--font-chalk);
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.timer-preset-btn:hover, .timer-preset-btn:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--chalk-cyan);
  outline: none;
}

.timer-preset-btn.active {
  background: rgba(82, 197, 255, 0.25);
  border-color: var(--chalk-cyan);
  color: var(--chalk-cyan);
  font-weight: bold;
}

.timer-config-panel {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.config-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.config-label {
  font-size: 0.8rem;
  color: var(--chalk-gray);
  margin-bottom: 0.25rem;
}

.stepper-box, .stepper-time-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  overflow: hidden;
}

.btn-step {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--chalk-white);
  width: 28px;
  height: 30px;
  font-family: var(--font-chalk);
  font-size: 1.1rem;
  cursor: pointer;
}

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

.stepper-box input, .stepper-time-box input {
  background: transparent;
  border: none;
  color: var(--chalk-yellow);
  font-family: var(--font-timer);
  font-size: 1.1rem;
  font-weight: bold;
  width: 38px;
  text-align: center;
  -moz-appearance: textfield;
}

/* --------------------------------------------------------------------------
   8. OLED Burn-In Steen Gym 16:9 Fullscreen Chalk Artwork Screensaver
   -------------------------------------------------------------------------- */
.screensaver-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000;
  z-index: 9999;
  display: none;
  cursor: pointer;
  overflow: hidden;
}

.screensaver-overlay.active {
  display: block;
}

.screensaver-slides-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.screensaver-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s linear;
}

.screensaver-slide.active {
  opacity: 1;
}

/* Translucent Corner Clock Badge */
.screensaver-badge {
  position: absolute;
  bottom: 2.5rem;
  right: 2.5rem;
  background: rgba(0, 0, 0, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 1rem 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}

.screensaver-clock {
  font-family: var(--font-timer);
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--chalk-white);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  line-height: 1;
}

.screensaver-date {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--chalk-yellow);
  text-shadow: var(--chalk-shadow-yellow);
  margin-top: 0.3rem;
}

.screensaver-hint {
  font-family: var(--font-timer);
  font-size: 0.85rem;
  color: var(--chalk-gray);
  margin-top: 0.5rem;
  letter-spacing: 1px;
}

/* --------------------------------------------------------------------------
   9. Chalkboard Dialog / Modals
   -------------------------------------------------------------------------- */
.chalk-modal {
  background: transparent;
  border: none;
  padding: 0;
  margin: auto;
  max-width: 500px;
  width: 90%;
}

.chalk-modal::backdrop {
  background: rgba(0, 0, 0, 0.75);
}

.modal-content {
  background: var(--bg-slate);
  background-image: url('chalkboard-bg.jpg');
  background-size: cover;
  border: 3px dashed rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  padding: 1.8rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1rem;
}

.chalk-input {
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  color: var(--chalk-white);
  font-family: var(--font-chalk);
  font-size: 1.1rem;
  padding: 0.6rem 0.8rem;
}

.chalk-input:focus {
  border-color: var(--chalk-yellow);
  outline: none;
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* --------------------------------------------------------------------------
   10. Responsive Tweaks for 65" TV vs Smaller Screens
   -------------------------------------------------------------------------- */
@media (min-width: 1800px) {
  html { font-size: 18px; }
  .timer-digits { font-size: 7.5rem; }
}

@media (max-width: 1024px) {
  .chalkboard-grid {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  body { overflow: auto; }
}

/* ==========================================================================
   SPOTIFY GUEST WIDGET
   ========================================================================== */
.spotify-widget {
  position: absolute;
  top: 6rem;
  right: 2rem;
  width: 320px;
  height: 90px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  font-family: 'Caveat', cursive;
  color: #fff;
  z-index: 50;
  backdrop-filter: blur(4px);
  transform: translateZ(0);
}

.spotify-state {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
}

.spotify-state.active {
  display: flex;
}

/* Disconnected State */
.qr-container {
  width: 70px;
  height: 70px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255,255,255,0.1);
  border-radius: 8px;
  flex-shrink: 0;
}

.qr-mock {
  opacity: 0.8;
}

.spotify-prompt {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.spotify-url {
  font-size: 1.1rem;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.5px;
  opacity: 0.9;
  word-break: break-all;
  line-height: 1.1;
  margin: 2px 0;
}

.spotify-hint {
  font-size: 1.2rem;
  opacity: 0.7;
}

/* Connected State */
.spotify-album-art {
  width: 105px;
  height: 105px;
  max-width: 105px;
  max-height: 105px;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 15px;
  flex-shrink: 0;
  filter: grayscale(40%) contrast(1.2); /* Chalkboard-ify the album art slightly */
  border: 1px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: transform 0.2s;
}

.spotify-album-art:active {
  transform: scale(0.95);
}

.spotify-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  overflow: hidden;
}

.spotify-track {
  font-size: 1.5rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.1;
  color: #fff;
  text-shadow: 1px 1px 0px rgba(0,0,0,0.8);
}

.spotify-artist {
  font-size: 1.2rem;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.spotify-controls {
  display: flex;
  gap: 15px;
  align-items: center;
}

.chalk-btn-icon {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 2px;
  opacity: 0.7;
  transition: all 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chalk-btn-icon:hover, .chalk-btn-icon:active {
  opacity: 1;
  transform: scale(1.1);
  color: #ffeb3b; /* Yellow chalk hover */
}
