@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&family=Special+Elite&display=swap');

:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #020617;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #f59e0b;
  --accent-hover: #fbbf24;
  --accent-muted: rgba(245, 158, 11, 0.2);
  --border: rgba(255, 255, 255, 0.1);
  --font-body: 'Courier Prime', 'Courier New', monospace;
  --font-display: 'Special Elite', cursive;
  --radius: 0.5rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; font-family: var(--font-body); background: var(--bg-primary); color: var(--text-primary); }

#preloader {
  position: fixed; inset: 0; z-index: 9999; background: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
#preloader .spinner {
  width: 48px; height: 48px;
  border: 3px solid rgba(245, 158, 11, 0.2); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
#preloader .preload-text {
  font-family: var(--font-display); color: var(--accent); font-size: 1rem;
  letter-spacing: 0.1em; text-transform: uppercase; animation: pulse 1.5s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100%{opacity:0.5} 50%{opacity:1} }

#app-root { display: none; height: 100vh; width: 100vw; overflow: hidden; flex-direction: column; }
#app-root.ready { display: flex; }

/* Splash */
#splash-overlay {
  position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center; padding: 2rem;
  backdrop-filter: blur(24px); animation: fadeIn 0.5s ease;
}
#splash-overlay.hidden { display: none; }
.splash-panel { padding: 1.5rem 1.5rem; min-height: auto;
  background: var(--bg-secondary); border: 2px solid rgba(245,158,11,0.5);
  border-radius: 1.5rem; padding: 2.5rem 2rem; max-width: 42rem; max-height: 85vh;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5); display: flex; flex-direction: column;
  align-items: center; gap: 1rem; overflow-y: auto; position: relative;
}
.splash-panel::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
}
.splash-title { font-size: 2rem; font-family: var(--font-display); font-size: 1.75rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; }
.splash-subtitle { font-size: 1.1rem; font-family: var(--font-display); font-size: 1rem; color: var(--text-muted); letter-spacing: 0.05em; text-align: center; }
.splash-items { list-style: none; width: 100%; text-align: left; }
.splash-items li { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.85rem; color: #fff; line-height: 1.5; }
.splash-items li::before { content: '•'; color: var(--accent); font-weight: bold; flex-shrink: 0; }
.enter-btn {
  background: var(--accent-muted); border: 1px solid var(--accent); color: var(--accent);
  font-family: var(--font-display); font-weight: bold; font-size: 1rem; padding: 0.75rem 2.5rem;
  border-radius: 0.75rem; cursor: pointer; text-transform: uppercase; letter-spacing: 0.1em;
  transition: all 0.3s ease;
}
.enter-btn:hover { background: var(--accent); color: var(--bg-primary); box-shadow: 0 0 30px rgba(245,158,11,0.4); }

/* Header */
#header {
  flex-shrink: 0; height: 6rem; background: rgba(30,41,59,0.9); border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 0 1.5rem 0.75rem; z-index: 60; box-shadow: 0 4px 20px rgba(0,0,0,0.3); position: relative;
}
.header-brand {
  font-family: var(--font-display); font-size: 1.75rem; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.1em; cursor: pointer; transition: color 0.2s;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.header-brand:hover { color: var(--accent-hover); }

#nav-desktop { display: none; align-items: center; gap: 1.5rem; margin-bottom: 0.1rem; }
#nav-desktop .view-nav-btn {
  background: none; border: 1px solid transparent; color: var(--text-muted);
  font-family: var(--font-display); font-size: 0.85rem; font-weight: bold;
  text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer;
  padding: 0.4rem 0.75rem; border-radius: var(--radius); transition: all 0.2s;
}
#nav-desktop .view-nav-btn:hover { color: white; background: rgba(255,255,255,0.05); }
#nav-desktop .view-nav-btn.active-home { color: var(--accent); }
#nav-desktop .view-nav-btn.active-claim { color: #fca5a5; background: rgba(220,38,38,0.15); border-color: rgba(220,38,38,0.5); }
#nav-desktop .view-nav-btn.active-script { color: #fcd34d; background: rgba(245,158,11,0.15); border-color: rgba(245,158,11,0.5); }

#mobile-menu-btn { display: flex; background: none; border: none; color: var(--accent); cursor: pointer; margin-bottom: 0.1rem; }
#mobile-menu {
  position: fixed; top: 0; right: 0; width: 16rem; height: 100%; background: var(--bg-secondary);
  border-left: 1px solid var(--border); padding: 1.5rem; z-index: 200;
  transform: translateX(100%); transition: transform 0.3s ease;
  display: flex; flex-direction: column; gap: 1.5rem;
}
#mobile-menu.open { transform: translateX(0); }
#mobile-menu-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 199; display: none; }
#mobile-menu-overlay.open { display: block; }
#mobile-menu .close-btn { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--text-muted); font-size: 1.75rem; cursor: pointer; }
.mobile-nav-btn {
  background: none; border: none; color: #fff; font-family: var(--font-display);
  font-size: 1.35rem; font-weight: bold; cursor: pointer; text-align: left; padding: 0.5rem 0; transition: color 0.2s;
}
.mobile-nav-btn:hover { color: white; }
.mobile-nav-btn.active { color: var(--accent); }

/* Main */
#main { flex: 1; position: relative; overflow: hidden; display: flex; flex-direction: column; }

/* Timeline */
#timeline-view { width: 100%; height: 100%; position: relative; display: flex; flex-direction: column; overflow: hidden; }
#scene-display { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 4rem; position: relative; overflow-y: auto; }

#narration-area { width: 100%; margin-left: 5rem; margin-left: 5rem; max-width: 48rem; margin-bottom: 1rem; }
#narration-label { font-size: 1.35rem; display: none; text-transform: uppercase; letter-spacing: 0.2em; color: var(--text-muted); margin-bottom: 0.5rem; }
#narration-text { font-size: 1.75rem; font-family: var(--font-display); font-size: 1.75rem; font-weight: bold; line-height: 1.6; color: #fff; }
#narration-text .word { display: inline-block; transition: color 0.1s; }
#narration-text .word.active { color: white; }

#character-bubble {
  display: none; position: fixed; z-index: 100; left: 50%; top: 50%;
  transform: translate(-50%, -50%); width: 90vw; max-width: 56rem; max-height: 60vh;
  align-items: center; gap: 1rem; padding: 0 1rem; pointer-events: none;
}
#character-bubble.visible { display: flex; }
#character-bubble .avatar {
  flex-shrink: 0; width: 5rem; height: 5rem; border-radius: 50%;
  border: 4px solid var(--accent); background: var(--bg-primary);
  display: flex; align-items: center; justify-content: center; font-size: 2.5rem;
  box-shadow: 0 0 20px rgba(245,158,11,0.4);
}
.bubble-card {
  background: black; border: 1px solid #3f3f46; border-radius: 1rem; padding: 1.25rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8); width: 100%; min-width: 18rem; max-width: 32rem;
  pointer-events: auto; position: relative;
}
.bubble-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; padding-bottom: 0.75rem; border-bottom: 1px solid #27272a; }
.bubble-identity { display: flex; align-items: center; gap: 0.75rem; }
.bubble-flag { width: 2rem; height: 2rem; border-radius: 50%; background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; overflow: hidden; }
.bubble-name { display: flex; flex-direction: column; }
.bubble-name .name { font-weight: bold; font-size: 1.35rem; color: white; line-height: 1.2; }
.bubble-name .handle { font-size: 0.8rem; color: #71717a; }
.bubble-close { background: none; border: none; color: #a1a1aa; font-size: 1.2rem; cursor: pointer; padding: 0.25rem; border-radius: 50%; transition: all 0.2s; }
.bubble-close:hover { background: #27272a; color: white; }
.bubble-text { font-family: var(--font-display); font-size: 1rem; line-height: 1.6; color: #fff; }
.bubble-meta { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid #27272a; }
.bubble-meta .location { font-size: 1rem; color: #52525b; }
.bubble-meta .year-badge { font-size: 0.75rem; font-weight: bold; color: var(--accent); }

.nav-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 50;
  width: 5rem; height: 5rem; border-radius: 50%; background: rgba(30,41,59,0.9);
  border: 2px solid var(--border); color: white; display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 4px 20px rgba(0,0,0,0.3); transition: all 0.15s;
}
.nav-arrow:hover { background: var(--bg-secondary); border-color: var(--accent); }
.nav-arrow:active { transform: translateY(-50%) scale(0.95); }
.nav-arrow.left { left: 1rem; }
.nav-arrow.right { right: 1rem; }
.nav-arrow svg { width: 2rem; height: 2rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Timeline Controls */
#timeline-controls {
  flex-shrink: 0; width: 100%; background: var(--bg-tertiary);
  border-top: 1px solid var(--border); display: flex; flex-direction: column;
  position: relative; z-index: 50; box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  transition: height 0.3s;
}
#timeline-controls.minimized { height: 2rem; }
#timeline-controls:not(.minimized) { height: 7rem; }

#scrubber-area { position: absolute; top: -1rem; left: 0; right: 0; height: 2rem; cursor: pointer; z-index: 20; }
#scrubber-bar { width: 100%; height: 1px; background: rgba(255,255,255,0.1); position: relative; overflow: visible; }
.scrubber-tick { position: absolute; top: 0; height: 4px; width: 1px; background: rgba(255,255,255,0.3); }
#scrubber-progress { position: absolute; top: 0; left: 0; height: 4px; background: #ef4444; box-shadow: 0 0 10px rgba(239,68,68,0.75), 0 0 20px rgba(239,68,68,0.35); transition: width 0.1s linear; }
#scrubber-handle {
  position: absolute; right: -0.375rem; top: 50%; transform: translateY(-50%);
  width: 0.75rem; height: 0.75rem; border-radius: 50%; background: white;
  box-shadow: 0 0 10px rgba(239,68,68,0.85); opacity: 1;
}
.scrubber-tooltip {
  position: absolute; bottom: 100%; transform: translateX(-50%);
  background: var(--bg-secondary); border: 1px solid var(--accent); color: var(--accent);
  font-size: 1rem; padding: 0.25rem 0.5rem; border-radius: 0.25rem;
  white-space: nowrap; margin-bottom: 0.5rem; display: none; pointer-events: none; z-index: 30;
}
#scrubber-area:hover .scrubber-tooltip { display: block; }

#controls-bar {
  height: 100%; display: flex; align-items: center; justify-content: center;
  padding: 0 8rem; gap: 1rem;
}
@media (max-width: 767px) { #controls-bar { padding: 0 1.5rem; gap: 1rem; } }

.ctrl-btn {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  padding: 0.5rem; border-radius: 50%; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.ctrl-btn:hover { color: white; background: var(--bg-secondary); }
.ctrl-btn svg { width: 1.5rem; height: 1.5rem; }

@media (max-width: 767px) {
  button,
  input[type="range"],
  .enter-btn,
  .gallery-trigger,
  .tl-btn,
  .view-toolbar-btn,
  .source-link,
  .view-select,
  #slide-counter {
    min-height: 44px;
  }
  #mobile-menu-btn,
  #mobile-menu .close-btn,
  .bubble-close,
  .ctrl-btn {
    min-width: 44px;
    min-height: 44px;
  }
  .mobile-nav-btn,
  #nav-desktop .view-nav-btn {
    min-height: 44px;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
  .gallery-icon { min-width: 44px; min-height: 44px; }
}

.play-btn {
  width: 4rem; height: 4rem; border-radius: 50%; background: var(--accent); color: black;
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px rgba(245,158,11,0.4); transition: all 0.2s; z-index: 10; flex-shrink: 0;
}
.play-btn:hover { background: var(--accent-hover); transform: scale(1.05); }
.play-btn.playing { background: var(--accent); }
.play-btn svg { width: 2rem; height: 2rem; fill: currentColor; }

.voice-slider-container { position: relative; display: flex; align-items: center; justify-content: center; height: 100%; }
.voice-slider-label {
  position: absolute; top: -0.75rem; font-size: 0.65rem; font-weight: bold;
  text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.1em; white-space: nowrap;
}
.voice-slider-label.mobile-label { display: none; }
@media (max-width: 767px) {
  .voice-slider-label.desktop-label { display: none; }
  .voice-slider-label.mobile-label { display: block; }
}
.voice-slider-container input[type="range"] { -webkit-appearance: slider-horizontal; width: 6rem; height: 0.5rem; accent-color: var(--accent); cursor: pointer; }

#slide-counter {
  position: absolute; top: 1.5rem; right: 1.5rem; z-index: 60;
  font-family: var(--font-display); font-size: 1.25rem; font-weight: bold;
  color: var(--accent); cursor: pointer; text-shadow: 0 2px 4px rgba(0,0,0,0.8); transition: color 0.2s;
}
#slide-counter:hover { color: var(--accent-hover); }

#gallery-btn { left: 1rem; right: auto; left: 1rem; right: auto; top: 1rem;
  position: absolute; right: 5rem; top: 1.25rem; z-index: 60;
  display: none; cursor: pointer;
}
@media (min-width: 1024px) { #gallery-btn { left: 1rem; right: auto; left: 1rem; right: auto; top: 1rem; display: block; } }

.gallery-trigger {
  position: relative; display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.75rem; background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-muted); transition: all 0.2s;
}
.gallery-trigger:hover { color: var(--accent); border-color: rgba(245,158,11,0.5); }
.gallery-icons {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 0.25rem;
  background: rgba(0,0,0,0.6); border-radius: var(--radius); opacity: 1;
  padding: 0 0.5rem;
}
.gallery-icon {
  width: 2rem; height: 2rem; display: flex; align-items: center; justify-content: center;
  color: var(--text-primary); background: rgba(255,255,255,0.08); border-radius: 0.375rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.tl-btn {
  background: none; border: 1px solid var(--border); color: var(--text-muted); cursor: pointer;
  padding: 0.4rem; border-radius: var(--radius); transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.tl-btn:hover { color: var(--accent); border-color: var(--accent); }
.tl-btn svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Modals */
#archive-modal, #source-modal, #timeline-picker {
  position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,0.9);
  display: none; align-items: center; justify-content: center; padding: 1rem; backdrop-filter: blur(8px);
}
#archive-modal.open, #source-modal.open, #timeline-picker.open { display: flex; }

.archive-panel, .source-panel {
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 1.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5); overflow: hidden;
}
.archive-panel { max-width: 95vw; width: 95%; width: 100%; max-width: 40rem; max-height: 80vh; display: flex; flex-direction: column; }
.source-panel { max-width: 28rem; width: 100%; text-align: center; padding: 2rem; position: relative; }

.archive-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.archive-title { font-family: var(--font-display); font-size: 1.75rem; font-weight: bold; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; }
.archive-body { flex: 1; overflow-y: auto; padding: 1rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 768px) { .archive-body { grid-template-columns: repeat(4, 1fr); } }

.archive-item {
  background: rgba(30,41,59,0.5); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; text-align: center; cursor: pointer; transition: all 0.2s;
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
}
.archive-item:hover { border-color: rgba(245,158,11,0.5); background: rgba(30,41,59,0.8); transform: scale(1.03); }
.archive-thumb { width: 4rem; height: 4rem; border-radius: var(--radius); background: var(--bg-primary); display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.archive-filename { font-size: 1rem; color: var(--text-muted); word-break: break-all; line-height: 1.3; }
.archive-category-title { text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--font-display); font-size: 0.8rem; color: var(--accent); }
.archive-year-badge { font-size: 1rem; font-family: monospace; color: var(--text-muted); }

.archive-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem; color: var(--text-muted); }
.archive-empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }

.source-icon { font-size: 4rem; margin-bottom: 1rem; }
.source-title { font-family: var(--font-display); font-size: 1.3rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.source-type { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--text-muted); margin-bottom: 1.5rem; }
.source-link {
  display: inline-block; background: var(--accent); color: black; font-family: var(--font-display);
  font-weight: bold; padding: 0.6rem 2rem; border-radius: 0.5rem; text-decoration: none;
  text-transform: uppercase; letter-spacing: 0.1em; transition: all 0.2s;
}
.source-link:hover { background: var(--accent-hover); }

/* View Pages (Claim / Script) */
.view-page { display: none; width: 100%; height: 100%; overflow-y: auto; background: var(--bg-primary); font-family: var(--font-body); }
.view-page.active { display: block; }

.view-toolbar {
  position: sticky; top: 0; z-index: 50; display: flex; justify-content: space-between;
  align-items: center; padding: 0.75rem 1.5rem; background: var(--bg-secondary);
  border-bottom: 1px solid var(--border); gap: 1.5rem; flex-wrap: wrap;
}
.view-toolbar-left { display: flex; align-items: center; gap: 1.5rem; }
.view-brand { font-family: var(--font-display); font-weight: bold; color: var(--accent); font-size: 1.35rem; }
.view-select { background: var(--bg-primary); color: var(--text-primary); border: 1px solid var(--border); border-radius: 0.25rem; padding: 0.25rem 0.5rem; font-family: var(--font-body); font-size: 0.8rem; }
.view-toolbar-right { display: flex; gap: 1rem; }
.view-toolbar-btn {
  background: none; border: 1px solid var(--border); color: var(--text-muted);
  font-family: var(--font-display); font-weight: bold; font-size: 0.8rem;
  padding: 0.4rem 1rem; border-radius: var(--radius); cursor: pointer; transition: all 0.2s;
  text-decoration: none; display: inline-flex; align-items: center;
}
.view-toolbar-btn:hover { color: white; background: var(--bg-primary); }
.view-toolbar-btn.primary { background: var(--accent); color: black; border-color: var(--accent); }
.view-toolbar-btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.puck-content { padding: 2rem; max-width: 48rem; margin: 0 auto; }
.puck-block { margin-bottom: 1.5rem; }
.claim-text {
  white-space: pre-wrap; line-height: 1.7; font-size: 0.85rem; color: #fff;
  background: rgba(2,6,23,0.5); padding: 1.5rem; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.05);
}
.splash-content-title { font-family: var(--font-display); font-size: 1.75rem; color: var(--accent); text-align: center; text-transform: uppercase; margin-bottom: 0.5rem; }
.splash-content-sub { font-family: var(--font-display); font-size: 1rem; color: var(--text-muted); text-align: center; margin-bottom: 1.5rem; }
.splash-list { list-style: none; }
.splash-list li { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.5rem 0; font-size: 0.85rem; color: #fff; }
.splash-list li::before { content: '•'; color: var(--accent); flex-shrink: 0; }

.script-title { font-family: var(--font-display); color: var(--accent); text-align: center; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 2rem; }
.script-scene { margin-bottom: 2rem; }
.script-scene-header { font-weight: bold; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; margin-bottom: 0.75rem; }
.script-narration { border-left: 2px solid rgba(245,158,11,0.3); padding-left: 1rem; margin-bottom: 1rem; font-style: italic; color: #fff; }
.script-dialogue { padding-left: 1rem; margin-bottom: 0.5rem; }
.script-character { font-weight: bold; color: var(--accent); margin-bottom: 0.25rem; }
.script-text { color: #fff; line-height: 1.5; }

/* Footer */
#footer {
  flex-shrink: 0; height: 3.5rem; background: rgba(15,23,42,0.95); border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 1rem;
  font-size: 1.35rem; color: var(--text-muted); font-family: var(--font-body); z-index: 50;
}
#footer a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
#footer a:hover { color: var(--accent); }
.footer-left { display: flex; align-items: center; gap: 0.75rem; }
.footer-right { display: flex; align-items: center; gap: 0.75rem; }
.social-link {
  min-width: 44px; width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: white; font-size: 1.25rem; font-weight: bold; line-height: 1;
  text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  transition: transform 0.2s, filter 0.2s, box-shadow 0.2s;
}
.social-link:hover { color: white; transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 6px 18px rgba(0,0,0,0.45); }
.social-link:nth-child(1) { background: #1877f2; }
.social-link:nth-child(2) { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af, #515bd4); }
.social-link:nth-child(3) { background: #000; border: 1px solid rgba(255,255,255,0.2); }
.cofund-btn, .btc-btn {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 999px; padding: 0.55rem 1rem; color: white;
  font-weight: bold; text-decoration: none; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  transition: transform 0.2s, filter 0.2s, box-shadow 0.2s;
}
.cofund-btn { background: #00a862; }
.cofund-btn:hover { background: #00c875; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,168,98,0.35); }
.btc-btn { background: linear-gradient(135deg, #f7931a, #ffd166); color: #111827; }
.btc-btn:hover { background: linear-gradient(135deg, #ffb000, #ffe08a); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(247,147,26,0.35); }
#version-display { font-family: monospace; color: var(--text-muted); }
#update-notice { display: none; color: var(--accent); margin-left: 0.5rem; }
#update-notice.visible { display: inline; }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fade-in { animation: fadeIn 0.3s ease; }

#footer.minimized { height: 2rem; overflow: hidden; }
#footer:not(.minimized) { height: auto; }

#footer .social-link,
#stripe-buy-button,
#btc-donate-btn {
  height: 32px !important;
  min-height: 32px !important;
}
#footer button,
#footer .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#footer .social-link,
#footer button,
#footer .social-link svg {
  height: 28px !important;
  min-height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
}
#footer-right>* {
  margin: 0 0.15rem !important;
}
