/* ── Fonts ──────────────────────────────────────────────────── */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  src: url('./fonts/IBMPlexSans-Regular.ttf');
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0d0f14;
  --surface:     #161a24;
  --surface2:    #1e2433;
  --surface3:    #252d40;
  --border:      #2a3045;
  --accent:      #4f8ef7;
  --accent-glow: rgba(79, 142, 247, 0.25);
  --text:        #e4e8f4;
  --text-muted:  #7a8299;
  --success:     #3ecf8e;
  --error:       #f16464;
  --font:        'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius:      10px;
  --transition:  0.2s ease;
}

html { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  margin: 0;
  width: 100%;
}

a { color: var(--accent); }
a:hover { text-decoration: underline; }

/* ── Header ─────────────────────────────────────────────────── */
/* ── Header ─────────────────────────────────────────────────── */
header {
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  background: linear-gradient(135deg, #0f1420 0%, var(--surface) 60%, #1a1f30 100%);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 20px rgba(0,0,0,0.4), 0 1px 0 rgba(79,142,247,0.15);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.camera-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(79, 142, 247, 0.4);
}

.site-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, #e4e8f4 0%, #4f8ef7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Main Navigation ────────────────────────────────────────── */
.main-nav {
  display: flex;
  gap: 0.35rem;
  flex: 1;
}

.nav-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.nav-tab:hover { color: var(--text); background: var(--surface2); box-shadow: 0 0 8px rgba(79,142,247,0.15); }

.nav-tab.active {
  color: var(--accent);
  background: var(--surface2);
  border-color: var(--border);
  box-shadow: 0 0 10px rgba(79,142,247,0.2);
}

.nav-icon { font-size: 1rem; }

.last-updated {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin-left: auto;
}

/* ── App Sections ───────────────────────────────────────────── */
.app-section { display: none; flex: 1; }
.app-section.active { display: block; }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1rem 2rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }


/* ════════════════════════════════════════════════════════════ */
/*  TIMELAPSE SECTION                                           */
/* ════════════════════════════════════════════════════════════ */

.timelapse-main {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ── Timelapse Tabs ─────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: color var(--transition), background var(--transition);
  position: relative;
  bottom: -1px;
  border: 1px solid transparent;
  border-bottom: none;
}

.tab:hover { color: var(--text); background: var(--surface2); }

.tab.active {
  color: var(--accent);
  background: var(--surface);
  border-color: var(--border);
  border-bottom-color: var(--surface);
}

/* ── Panels ─────────────────────────────────────────────────── */
.panel { display: none; animation: fadeIn 0.25s ease; }
.panel.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Video Container ────────────────────────────────────────── */
.video-container {
  position: relative;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  aspect-ratio: 16/9;
}

video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* ── Overlay ────────────────────────────────────────────────── */
.video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 15, 20, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.video-overlay.hidden { opacity: 0; pointer-events: none; }

.overlay-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.overlay-content p { color: var(--text-muted); font-size: 0.9rem; }

/* ── Spinner ────────────────────────────────────────────────── */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Frame Controls ─────────────────────────────────────────── */
.frame-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem 0.4rem;
  flex-wrap: wrap;
}

.frame-btn {
  position: relative;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  min-width: 2.8rem;
  text-align: center;
  transition: background var(--transition), transform 0.1s;
  user-select: none;
}

.frame-btn:hover  { background: var(--surface3); }
.frame-btn:active { transform: scale(0.92); }

/* Tooltip */
.frame-btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1e2e;
  color: var(--text);
  font-size: 0.75rem;
  white-space: nowrap;
  padding: 0.3rem 0.6rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
}

.frame-btn[data-tip]:hover::after { opacity: 1; }

.frame-btn-play {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  padding: 0.6rem 1.6rem;
  font-size: 1.2rem;
}

.frame-btn-play:hover { filter: brightness(1.15); background: var(--accent); }

/* Frame step buttons (◀ back, ▶ forward) — identical size */
.frame-btn-step {
  min-width: 3rem;
  font-size: 1.1rem;
}

.frame-btn-speed { font-size: 1rem; }

.frame-btn-speed.active {
  background: var(--surface3);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Stats Bar ──────────────────────────────────────────────── */
.stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 0.75rem 1.25rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  min-height: 60px;
  position: relative;
  overflow: visible;
}

/* Inner div holds the dynamic stat items */
#stats-active {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
}

.frame-btn-dl {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 1.3rem;
  padding: 0.5rem 0.7rem;
  min-width: unset;
}

.stat { display: flex; flex-direction: column; gap: 0.2rem; }

.stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.stat-value { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.stat-value.ready { color: var(--success); }
.stat-value.pending { color: var(--text-muted); font-weight: 400; }


/* ════════════════════════════════════════════════════════════ */
/*  Q&A SECTION                                                 */
/* ════════════════════════════════════════════════════════════ */

#section-qa {
  --cabin-dark:    #0b0804;
  --cabin-surface: #1a1007;
  --cabin-surface2:#251708;
  --cabin-border:  #3d2c14;
  --cabin-amber:   #e8841a;
  --cabin-amber-glow: rgba(232, 132, 26, 0.22);
  --cabin-text:    #f0e4d0;
  --cabin-muted:   #8a7260;
  background: url('cabin_night.jpg') center 55% / cover no-repeat fixed;
  min-height: calc(100vh - 72px);
  position: relative;
}

/* Dark gradient overlay so the card stays readable */
#section-qa::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(11, 8, 4, 0.55) 0%,
    rgba(11, 8, 4, 0.70) 100%
  );
  pointer-events: none;
  z-index: 0;
}

#outmost {
  width: 100%;
  position: relative;
  z-index: 1;
}

/* ── Q&A form widget ────────────────────────────────────────── */
.mainWidgetCommon { margin-left: auto; margin-right: auto; }
.myWidget { padding: 20px; }

#mainWidget {
  width: 620px;
  max-width: 100%;
  background: var(--cabin-surface);
  border: 1px solid var(--cabin-border);
  border-radius: var(--radius);
  margin: 2rem auto;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 30px rgba(232, 132, 26, 0.08);
}

#mainResultWidget { width: 100%; }

/* ── Q&A typography helpers ─────────────────────────────────── */
.larger    { font-size: 1.45em; }
.bitLarger { font-size: 1.15em; }
.smaller   { font-size: 0.85em; }
.tiny      { font-size: 0.65em; }
.largeTopMargin  { margin-top: 20px; }
.mediumTopMargin { margin-top: 12px; }
.smallTopMargin  { margin-top: 5px; }
.hugeBottomMargin{ margin-bottom: 100px; }
.hidden { display: none; }

/* ── Q&A title ──────────────────────────────────────────────── */
.myTitle {
  font-size: 1.8em;
  font-weight: 600;
  color: var(--cabin-text);
}

.mySpecialTitle {
  font-size: 1.5em;
  font-weight: 600;
  color: var(--cabin-text);
  margin-left: 15px;
  margin-right: 15px;
}

.mySubTitle {
  margin-top: 5px;
  display: block;
  color: var(--text-muted);
}

.qa-link { color: var(--accent); }

/* ── Q&A field cards ────────────────────────────────────────── */
.myfield {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.myfieldHeader {
  background: var(--surface3);
  color: var(--text-muted);
  padding: 10px 40px 10px 20px;
  font-style: italic;
  font-size: 1.1em;
  border-bottom: 1px solid var(--border);
}

.fieldPad {
  padding: 20px 40px;
  background: var(--surface2);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}

/* ── Q&A number inputs ──────────────────────────────────────── */
.myNumber {
  width: 160px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 6px 10px;
  font: inherit;
  font-size: 0.95em;
}

.myNumber:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

/* ── Error messages ─────────────────────────────────────────── */
.errorMsg { color: var(--error); font-size: 0.9em; }

/* ── Q&A question cards ─────────────────────────────────────── */
.question {
  width: 260px;
  min-width: 260px;
  height: 160px;
  display: inline-block;
  margin: 5px;
  padding: 10px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 1px 5px 8px rgba(0,0,0,0.4);
  color: #222;
}

.questionInaktiv {
  width: 260px;
  min-width: 260px;
  height: 160px;
  display: inline-block;
  margin: 5px 5px 10px;
  padding: 10px;
  border-radius: 20px;
  overflow: hidden;
  background-color: #EBF09C;
  box-shadow: 1px 5px 8px rgba(0,0,0,0.4);
}

.question:hover {
  box-shadow: 5px 10px 12px rgba(0,0,0,0.5);
  cursor: pointer;
}

.questionSelected {
  background-color: rgba(255,255,255,0.55) !important;
  border-radius: 20px;
}

.outerContainer {
  display: table;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.innerContainer {
  display: table-cell;
  vertical-align: middle;
  width: 100%;
  word-wrap: break-word;
  max-width: 200px;
  margin: 0 auto;
  text-align: center;
}

.questionContainer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 10px;
}

/* ── Q&A upvote/status icons ────────────────────────────────── */
.upvoteNumber    { position: absolute; top: 0; left: 20px; }
.upvotedContainter { position: absolute; top: 0; left: 200px; }
.answeredContainer { position: absolute; top: 0; left: 220px; }
.submittedContainer{ position: absolute; top: 0; left: 180px; }

/* ── Color swatch buttons ───────────────────────────────────── */
.colorButtons { width: 30px; height: 30px; }

.ui-button .ui-icon.colorButton0Icon {
  width:16px; height:16px;
  background-image: linear-gradient(#EBF09C, #EBF09C);
  border-radius: 4px; border: solid #404040 1px;
}
.ui-button .ui-icon.colorButton1Icon {
  width:16px; height:16px;
  background-image: linear-gradient(#99F0A1, #99F0A1);
  border-radius: 4px; border: solid #404040 1px;
}
.ui-button .ui-icon.colorButton2Icon {
  width:16px; height:16px;
  background-image: linear-gradient(#A1F0EC, #A1F0EC);
  border-radius: 4px; border: solid #404040 1px;
}
.ui-button .ui-icon.colorButton3Icon {
  width:16px; height:16px;
  background-image: linear-gradient(#869BD9, #869BD9);
  border-radius: 4px; border: solid #404040 1px;
}
.ui-button .ui-icon.colorButton4Icon {
  width:16px; height:16px;
  background-image: linear-gradient(#D6A5FA, #D6A5FA);
  border-radius: 4px; border: solid #404040 1px;
}

/* ── Q&A student/admin toolbar ──────────────────────────────── */
#studentTools {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  background: var(--surface3);
  padding: 10px;
  border-bottom: 1px solid var(--border);
}

#eventNoHeader {
  display: block;
  background: var(--surface3);
  color: var(--text);
  padding: 10px 0;
  width: 100%;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

#insideAdminTools {
  padding: 0 10px 10px;
  background: var(--surface2);
}

#menu { margin: 10px 0; }

.menublock {
  display: inline-block;
  margin: 5px 0 0 10px;
  text-align: left;
}

.menuTitleElement {
  margin-bottom: 3px;
  color: var(--text-muted);
  font-size: 0.78em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#feedbackLecturerContent {
  padding: 0 10px 10px;
  background: var(--bg);
}

#feedbackLecturerError {
  padding: 4px 10px;
  background: var(--bg);
}

#newQuestionText {
  display: block;
  margin: 0 auto;
  width: 90%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 6px 10px;
  font: inherit;
}

#newQuestionText:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

#newQuestionLengthDiv {
  display: block;
  margin: 4px auto;
  width: 100px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85em;
}

#controlgroup4Container { display: block; text-align: center; }
#adminTools { text-align: center; }

#aboutContent { line-height: 1.4; }

/* ── jQuery-UI dark theme overrides ─────────────────────────── */
/* Override ui-darkness defaults to match our palette */

.ui-widget {
  font-family: var(--font) !important;
  font-size: 1em !important;
}

.ui-widget-content {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.ui-widget-header {
  background: var(--surface3) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.ui-state-default,
.ui-widget-content .ui-state-default {
  background: var(--surface3) !important;
  border-color: var(--border) !important;
  color: var(--text-muted) !important;
}

.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus {
  background: var(--surface2) !important;
  border-color: var(--accent) !important;
  color: var(--text) !important;
}

.ui-state-active,
.ui-widget-content .ui-state-active {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}

/* Dialog */
.ui-dialog {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6) !important;
}

.ui-dialog-titlebar {
  background: var(--surface3) !important;
  border-bottom: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0 !important;
}

.ui-dialog-content {
  background: var(--surface) !important;
  color: var(--text) !important;
}

.ui-dialog-buttonpane {
  background: var(--surface2) !important;
  border-top: 1px solid var(--border) !important;
}

/* Tabs inside dialog */
.ui-tabs {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

.ui-tabs-nav {
  background: var(--surface2) !important;
  border-bottom: 1px solid var(--border) !important;
}

.ui-tabs-tab { border-color: var(--border) !important; }
.ui-tabs-panel { background: var(--surface) !important; color: var(--text) !important; }

/* Selectmenu */
.ui-selectmenu-button {
  background: var(--surface3) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.ui-selectmenu-menu .ui-menu {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
}

.ui-menu-item-wrapper { color: var(--text) !important; }
.ui-menu-item-wrapper:hover,
.ui-state-active .ui-menu-item-wrapper {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: transparent !important;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 680px) {
  .timelapse-main { padding: 1rem; }
  .tabs { gap: 0.25rem; }
  .tab { padding: 0.5rem 0.85rem; font-size: 0.82rem; }
  header { padding: 0 1rem; }
  .stats { gap: 0.75rem 1.5rem; }
  .site-title { display: none; }
  .last-updated { display: none; }
  #mainWidget { margin: 1rem; }
  .fieldPad { padding: 15px 20px; }
}


/* ════════════════════════════════════════════════════════════ */
/*  CABIN / TIMELAPSE THEME                                     */
/* ════════════════════════════════════════════════════════════ */

/* Warm palette variables scoped to the timelapse section */
#section-timelapse {
  --cabin-dark:    #0b0804;
  --cabin-surface: #1a1007;
  --cabin-surface2:#251708;
  --cabin-border:  #3d2c14;
  --cabin-amber:   #e8841a;
  --cabin-amber-glow: rgba(232, 132, 26, 0.22);
  --cabin-text:    #f0e4d0;
  --cabin-muted:   #8a7260;
  background: var(--cabin-dark);
}

/* ── Cabin Hero Banner ───────────────────────────────────────── */
.cabin-hero {
  position: relative;
  height: 300px;
  background: url('cabin_night.jpg') center 55% / cover no-repeat;
  overflow: hidden;
}

/* Gradient overlay: transparent top → opaque dark bottom */
.cabin-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(11, 8, 4, 0.25) 0%,
    rgba(11, 8, 4, 0.10) 35%,
    rgba(11, 8, 4, 0.72) 78%,
    rgba(11, 8, 4, 1.00) 100%
  );
}

.cabin-hero-content {
  position: absolute;
  bottom: 2rem;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 1;
  padding: 0 1rem;
}

.cabin-title {
  font-size: 2rem;
  font-weight: 700;
  color: #f5e6d0;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.9), 0 0 60px rgba(200, 100, 20, 0.4);
  letter-spacing: 0.02em;
  margin: 0;
}

.cabin-subtitle {
  color: #c4a882;
  font-size: 0.92rem;
  margin-top: 0.45rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
}

/* ── Timelapse section: warm overrides ──────────────────────── */
#section-timelapse .timelapse-main {
  background: var(--cabin-dark);
}

/* ── Disk usage bar ─────────────────────────────────────────── */
.disk-usage {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.6rem 0;
  margin-bottom: 1rem;
}

.disk-usage.hidden { display: none; }

.disk-usage-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--cabin-muted);
}

.disk-warning {
  color: #f16464;
  font-weight: 600;
  animation: pulse-warning 1.5s ease-in-out infinite;
}

.disk-warning.hidden { display: none; }

@keyframes pulse-warning {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

.disk-track {
  height: 6px;
  background: var(--cabin-surface2);
  border-radius: 3px;
  overflow: hidden;
}

.disk-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--cabin-amber);
  transition: width 0.6s ease, background 0.4s ease;
}

.disk-fill.critical { background: #f16464; }

/* Camera selector */
.camera-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.camera-tab {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.camera-tab:hover { color: var(--text); background: var(--surface2); }

.camera-tab.active {
  color: var(--accent);
  background: var(--surface2);
  border-color: var(--accent);
}

#section-timelapse .camera-tab {
  border-color: var(--cabin-border);
  color: var(--cabin-muted);
}

#section-timelapse .camera-tab:hover {
  color: var(--cabin-text);
  background: var(--cabin-surface);
}

#section-timelapse .camera-tab.active {
  color: var(--cabin-amber);
  background: var(--cabin-surface);
  border-color: var(--cabin-amber);
}

/* Tabs */
#section-timelapse .tabs {
  border-bottom-color: var(--cabin-border);
}

#section-timelapse .tab {
  color: var(--cabin-muted);
}

#section-timelapse .tab:hover {
  color: var(--cabin-text);
  background: var(--cabin-surface);
}

#section-timelapse .tab.active {
  color: var(--cabin-amber);
  background: var(--cabin-dark);
  border-color: var(--cabin-border);
  border-bottom-color: var(--cabin-dark);
}

/* Video container */
#section-timelapse .video-container {
  border-color: var(--cabin-border);
  box-shadow: 0 8px 48px rgba(0,0,0,0.8), 0 0 40px rgba(200, 100, 20, 0.08);
}

#section-timelapse .video-overlay {
  background: rgba(11, 8, 4, 0.88);
}

/* Spinner */
#section-timelapse .spinner {
  border-color: var(--cabin-border);
  border-top-color: var(--cabin-amber);
}

/* Stats bar */
#section-timelapse .stats {
  background: var(--cabin-surface);
  border-color: var(--cabin-border);
}

#section-timelapse .stat-label {
  color: var(--cabin-muted);
}

#section-timelapse .stat-value {
  color: var(--cabin-text);
}

#section-timelapse .stat-value.ready  { color: var(--cabin-amber); }
#section-timelapse .stat-value.pending { color: var(--cabin-muted); font-weight: 400; }

/* ── Memorable Moments Gallery ──────────────────────────────── */
.memorable-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
  max-height: 320px;
  overflow-y: auto;
}

.memorable-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.memorable-card:hover {
  border-color: var(--accent);
  background: var(--surface2);
}

.memorable-card.active {
  border-color: var(--accent);
  background: var(--surface2);
  box-shadow: inset 3px 0 0 var(--accent);
}

.memorable-card-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.memorable-card-caption {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.memorable-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.memorable-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.memorable-empty .memorable-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

/* Cabin theme overrides for memorable gallery */
#section-timelapse .memorable-card {
  background: var(--cabin-surface);
  border-color: var(--cabin-border);
}

#section-timelapse .memorable-card:hover {
  border-color: var(--cabin-amber);
  background: var(--cabin-surface2);
}

#section-timelapse .memorable-card.active {
  border-color: var(--cabin-amber);
  background: var(--cabin-surface2);
  box-shadow: inset 3px 0 0 var(--cabin-amber);
}

#section-timelapse .memorable-card-caption {
  color: var(--cabin-text);
}

#section-timelapse .memorable-card-meta {
  color: var(--cabin-muted);
}

/* ── Cabin responsive ───────────────────────────────────────── */
@media (max-width: 680px) {
  .cabin-hero { height: 220px; }
  .cabin-title { font-size: 1.5rem; }
}
