/* ═══════════════════════════════════════════════════════════════
   mikaskonst — flow-driven design system
   --flow: 0.0 (crystalline, dark, sharp) → 1.0 (organic, soft, airy)
   ═══════════════════════════════════════════════════════════════ */

:root {
  --flow: 0.5;

  /* ── Derived values ──────────────────────────────────────── */
  --flow-inv: calc(1 - var(--flow));

  /* Background: #000 → #0a0a0a (stays dark, slight lift at high flow) */
  --bg: color-mix(in oklab, #000000 calc(var(--flow-inv) * 100%), #0d0d0d);

  /* Primary text */
  --fg: color-mix(in oklab, #cccccc calc(var(--flow-inv) * 100%), #ffffff);

  /* Accent red ↔ soft pink */
  --accent-1: color-mix(in oklab, #cc0000 calc(var(--flow-inv) * 100%), #ffb3c1);

  /* Accent blue ↔ soft blue */
  --accent-2: color-mix(in oklab, #0033cc calc(var(--flow-inv) * 100%), #b3c6ff);

  /* Accent teal ↔ soft teal */
  --accent-3: color-mix(in oklab, #00b4bc calc(var(--flow-inv) * 100%), #b3f0f0);

  /* Muted text */
  --muted: color-mix(in oklab, #555555 calc(var(--flow-inv) * 100%), #999999);

  /* Surface (cards, player) */
  --surface: color-mix(in oklab, #0a0a0a calc(var(--flow-inv) * 100%), #161616);

  /* Border */
  --border: color-mix(in oklab, #1a1a1a calc(var(--flow-inv) * 100%), #2a2a2a);

  /* ── Spacing ─────────────────────────────────────────────── */
  --space-xs: calc(0.25rem + var(--flow) * 0.25rem);
  --space-sm: calc(0.5rem + var(--flow) * 0.5rem);
  --space-md: calc(1rem + var(--flow) * 1rem);
  --space-lg: calc(1.5rem + var(--flow) * 1.5rem);
  --space-xl: calc(2rem + var(--flow) * 2rem);

  /* ── Radius ──────────────────────────────────────────────── */
  --radius-sm: calc(var(--flow) * 12px);
  --radius-md: calc(var(--flow) * 24px);
  --radius-lg: calc(var(--flow) * 40px);

  /* ── Typography ──────────────────────────────────────────── */
  --letter-spacing: calc(-0.02em + var(--flow) * 0.04em);
  --line-height: calc(1.3 + var(--flow) * 0.3);
  --font-weight-body: calc(400 - var(--flow-inv) * 100);

  /* ── Glow / shadow ───────────────────────────────────────── */
  --glow-spread: calc(var(--flow) * 40px);
  --glow-opacity: calc(0.15 + var(--flow) * 0.15);

  /* ── Transitions ─────────────────────────────────────────── */
  --transition-flow: 2s ease;
}

/* ═══════════════════════════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════════════════════════ */

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

html {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Recursive', monospace;
  font-variation-settings:
    'MONO' var(--flow-inv),
    'CASL' var(--flow);
  font-size: 16px;
  line-height: var(--line-height);
  letter-spacing: var(--letter-spacing);
  transition:
    background var(--transition-flow),
    color var(--transition-flow),
    font-variation-settings var(--transition-flow);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 100vw;
  overflow-x: clip;
}

img, video, svg {
  max-width: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  transition: padding var(--transition-flow), border-color var(--transition-flow);
}

.site-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color var(--transition-flow);
}

/* ── Language Switcher ─────────────────────────────────────── */

.lang-switcher {
  display: flex;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.3rem 0.6rem;
  font: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease, border-radius var(--transition-flow);
}

.lang-btn:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.lang-btn:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.lang-btn.active {
  background: var(--surface);
  color: var(--fg);
  border-color: var(--accent-3);
}

.lang-btn:hover:not(.active) {
  color: var(--fg);
  border-color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT — single page sections
   ═══════════════════════════════════════════════════════════════ */

main {
  flex: 1;
  padding-bottom: 80px; /* room for player */
}

.section {
  padding: var(--space-xl) var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
  transition: padding var(--transition-flow);
}

.section + .section:not(.empty-block) {
  border-top: 1px solid var(--border);
}

.empty-block + .section {
  border-top: none;
}

/* ── Hero grid: text left, paintings right (desktop) ───────── */

.hero-grid-section {
  padding-left: var(--space-md);
  padding-right: var(--space-md);
  max-width: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  max-width: 1400px;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(280px, 380px) 1fr;
    align-items: start;
  }

  .hero-text {
    order: 1;
    position: sticky;
    top: var(--space-lg);
    min-width: 0;
  }

  .hero-paintings {
    order: 2;
    min-width: 0;
  }
}

.hero-paintings, .hero-text {
  min-width: 0;
}

/* Mobile: paintings first, text second */
@media (max-width: 899px) {
  .hero-text {
    order: 2;
  }

  .hero-paintings {
    order: 1;
  }
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.text-block {
  /* individual text block spacing */
}

/* ── Text sections ─────────────────────────────────────────── */

.section-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  transition: color var(--transition-flow);
}

.section-text {
  font-size: 1rem;
  color: var(--fg);
  max-width: 680px;
  white-space: pre-line;
  transition: color var(--transition-flow);
}

.section-text a {
  color: var(--accent-3);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.section-text a:hover {
  border-bottom-color: var(--accent-3);
}

/* ── Guestbook ────────────────────────────────────────────── */

.guestbook-section {
  max-width: 680px;
  margin: 0 auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.guestbook-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.guestbook-form-row {
  display: flex;
  gap: var(--space-sm);
}

@media (max-width: 500px) {
  .guestbook-form-row {
    flex-direction: column;
  }
}

.gb-input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.9rem;
  flex: 1;
  transition: border-color 0.2s ease, border-radius var(--transition-flow);
}

.gb-input:focus {
  outline: none;
  border-color: var(--accent-3);
}

.gb-input::placeholder {
  color: var(--muted);
}

.gb-textarea {
  resize: vertical;
  min-height: 80px;
}

.gb-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

.gb-captcha-label {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.gb-captcha-input {
  width: 4em;
  text-align: center;
}

.gb-submit {
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, border-radius var(--transition-flow);
}

.gb-submit:hover {
  border-color: var(--accent-3);
  color: var(--fg);
}

.guestbook-entries {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.guestbook-entry {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-radius var(--transition-flow), background var(--transition-flow);
}

.gb-avatar-wrap {
  flex-shrink: 0;
}

.gb-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg);
}

.gb-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--muted);
}

.gb-body {
  min-width: 0;
  flex: 1;
}

.gb-meta {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: 0.25rem;
}

.gb-nickname {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fg);
  transition: color var(--transition-flow);
}

a.gb-nickname {
  color: var(--accent-3);
  text-decoration: none;
}

a.gb-nickname:hover {
  text-decoration: underline;
}

.gb-time {
  font-size: 0.7rem;
  color: var(--muted);
}

.gb-message {
  font-size: 0.9rem;
  color: var(--fg);
  word-break: break-word;
  transition: color var(--transition-flow);
}

.gb-empty {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: var(--space-xl);
}

.gb-error {
  color: #f66;
  font-size: 0.85rem;
  margin-bottom: var(--space-sm);
}

/* ── Empty placeholder blocks ──────────────────────────────── */

.empty-block {
  min-height: 120px;
}

/* ── Loading / hints ───────────────────────────────────────── */

.loading, .empty-state, .match-hint {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: var(--space-xl);
  transition: color var(--transition-flow);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════
   PAINTINGS GRID
   ═══════════════════════════════════════════════════════════════ */

.painting-grid {
  columns: 1;
  column-gap: var(--space-md);
  max-width: 100%;
  min-width: 0;
}

@media (min-width: 700px) {
  .painting-grid { columns: 2; }
}

@media (min-width: 1400px) {
  .painting-grid { columns: 3; }
}

.painting-card {
  position: relative;
  cursor: pointer;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  display: inline-flex;
  flex-direction: column;
  width: 100%;
  break-inside: avoid;
  margin-bottom: var(--space-md);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-radius var(--transition-flow),
    border-color var(--transition-flow),
    background var(--transition-flow);
}

.painting-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 0 var(--glow-spread) rgba(0, 180, 188, var(--glow-opacity)),
    0 8px 32px rgba(0, 0, 0, 0.6);
  border-color: var(--accent-3);
}

.painting-image-wrap {
  overflow: hidden;
  background: #000;
}

.painting-image-wrap img {
  width: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease, filter 0.6s ease;
  filter: brightness(0.85);
}

.painting-card:hover .painting-image-wrap img {
  transform: scale(1.03);
  filter: brightness(1);
}

.painting-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  transition: padding var(--transition-flow);
}

.painting-title {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.painting-card:hover .painting-title {
  color: var(--fg);
}

/* Grid share button */
.card-share-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.card-share-btn:hover {
  border-color: var(--accent-3);
  color: var(--accent-3);
}

.card-footer-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.card-diamond-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.6rem;
  min-height: 32px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.card-diamond-btn:hover {
  color: #7df;
}

.card-diamond-btn:active {
  transform: scale(0.85);
}

.card-diamond-count {
  font-size: 0.6rem;
  color: inherit;
}

/* Song card diamond positioning */
.song-card .card-diamond-btn {
  flex-shrink: 0;
  margin-left: auto;
}

/* Songs card in main grid */
.songs-grid-card {
  cursor: default;
}

.songs-grid-card:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}

.songs-grid-card-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-sm);
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.songs-grid-card-inner::-webkit-scrollbar {
  width: 4px;
}

.songs-grid-card-inner::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ── Fractder card ──────────────────────────────────────────── */

.fractder-card .fractder-preview-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #000;
}

.fractder-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 960px;
  border: 0;
  transform-origin: top left;
  transform: scale(0.32);
  pointer-events: none;
  filter: brightness(0.85) saturate(1.05);
  transition: filter 0.6s ease, transform 0.6s ease;
}

/* Responsive scale: ~0.20 at narrow, ~0.45 at wide cards */
@media (min-width: 700px) { .fractder-preview { transform: scale(0.28); } }
@media (min-width: 1100px) { .fractder-preview { transform: scale(0.38); } }
@media (min-width: 1400px) { .fractder-preview { transform: scale(0.32); } }

.fractder-card:hover .fractder-preview {
  filter: brightness(1) saturate(1.15);
}

.fractder-preview-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 100%, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 60%),
    linear-gradient(180deg, rgba(0, 180, 188, 0.04) 0%, rgba(0, 0, 0, 0) 30%);
  pointer-events: none;
  transition: background 0.3s ease;
}

.fractder-card:hover .fractder-preview-shade {
  background:
    radial-gradient(120% 80% at 50% 100%, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 60%),
    linear-gradient(180deg, rgba(0, 180, 188, 0.10) 0%, rgba(0, 0, 0, 0) 35%);
}

.fractder-preview-hint {
  position: absolute;
  bottom: var(--space-sm);
  right: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  pointer-events: none;
}

.fractder-card:hover .fractder-preview-hint {
  border-color: var(--accent-3);
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
}

/* ── Fractder fullscreen lightbox ───────────────────────────── */

.fractder-lightbox {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: #000;
  animation: fadeIn 0.25s ease;
}

.fractder-iframe {
  width: 100vw;
  height: 100vh;
  border: 0;
  display: block;
}

.fractder-lb-controls {
  position: fixed;
  top: max(env(safe-area-inset-top, 0px), 14px);
  right: max(env(safe-area-inset-right, 0px), 14px);
  display: flex;
  gap: 8px;
  z-index: 260;
}

.fractder-lb-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.fractder-lb-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: var(--accent-3);
  color: #fff;
  transform: scale(1.05);
}

.fractder-lb-btn:active {
  transform: scale(0.92);
}

/* "Next is coming" card */
.next-coming-card {
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.next-coming-card:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}

.next-coming-content {
  padding: var(--space-xl);
  text-align: center;
}

.next-coming-content p {
  color: var(--muted);
  font-size: 0.95rem;
  font-style: italic;
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════════
   MUSIC SECTION
   ═══════════════════════════════════════════════════════════════ */

.music-section {
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.music-layout {
  display: grid;
  grid-template-columns: minmax(200px, 320px) 1fr;
  gap: var(--space-lg);
  min-height: 50vh;
  transition: gap var(--transition-flow);
}

@media (max-width: 700px) {
  .music-layout {
    grid-template-columns: 1fr;
  }
}

/* Music list (left) */
.music-list-wrap {
  max-height: 60vh;
  overflow-y: auto;
  border-radius: var(--radius-md);
  transition: border-radius var(--transition-flow);
}

.music-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.song-card {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    all 0.2s ease,
    border-radius var(--transition-flow);
}

.song-card:hover {
  border-color: var(--border);
  background: color-mix(in oklab, var(--surface) 80%, var(--accent-2) 20%);
}

.song-card.active {
  border-color: var(--accent-2);
  background: color-mix(in oklab, var(--surface) 70%, var(--accent-2) 30%);
}

.song-cover {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.song-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--muted);
  background: var(--bg);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.song-title {
  font-size: 0.9rem;
  color: var(--fg);
  transition: color var(--transition-flow);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-duration {
  font-size: 0.75rem;
  color: var(--muted);
  flex-shrink: 0;
}

/* Matched painting display (right) */
.music-painting-display {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.matched-painting {
  max-width: 100%;
  min-width: 0;
  text-align: center;
  animation: paintingSlideIn 1s ease;
  cursor: pointer;
}

@keyframes paintingSlideIn {
  from { opacity: 0; transform: translateX(40px) scale(0.96); filter: blur(8px); }
  to { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}

.matched-painting-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: inline-block;
  max-width: 100%;
  box-shadow:
    0 0 calc(var(--glow-spread) * 1.5) rgba(0, 180, 188, var(--glow-opacity)),
    0 16px 64px rgba(0, 0, 0, 0.7);
  transition: border-radius var(--transition-flow);
}

.matched-painting-image img {
  max-width: 100%;
  max-height: 55vh;
  display: block;
  transition: transform 0.15s ease;
}

.matched-painting-title {
  margin-top: var(--space-md);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.05em;
  transition: color var(--transition-flow);
}

/* ═══════════════════════════════════════════════════════════════
   AUDIO PLAYER
   ═══════════════════════════════════════════════════════════════ */

.player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--space-sm) var(--space-lg);
  z-index: 100;
  transition:
    transform 0.4s ease,
    background var(--transition-flow),
    border-color var(--transition-flow),
    padding var(--transition-flow);
}

.player.hidden {
  transform: translateY(100%);
  pointer-events: none;
}

.player-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.player-info {
  min-width: 0;
  flex-shrink: 1;
}

.player-title {
  font-size: 0.85rem;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  transition: color var(--transition-flow);
}

.player-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
}

.player-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.player-btn:hover {
  border-color: var(--accent-3);
  color: var(--accent-3);
}

.play-icon, .pause-icon {
  line-height: 1;
}

.pause-icon { font-size: 0.6rem; }

.player-progress-wrap {
  flex: 1;
  cursor: pointer;
  padding: 8px 0;
}

.player-progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  transition: background var(--transition-flow);
}

.player-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-3);
  border-radius: 2px;
  transition: background var(--transition-flow);
}

.player-time {
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 3em;
  text-align: right;
  transition: color var(--transition-flow);
}

/* ═══════════════════════════════════════════════════════════════
   LIGHTBOX
   ═══════════════════════════════════════════════════════════════ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: pointer;
}

.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: -8px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  transition: color 0.2s ease;
  z-index: 2;
}

.lightbox-close:hover {
  color: var(--fg);
}

.lightbox-image-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 calc(var(--glow-spread) * 2) rgba(0, 180, 188, var(--glow-opacity)),
    0 24px 80px rgba(0, 0, 0, 0.8);
}

.lightbox-image-wrap img {
  max-width: 85vw;
  max-height: 75vh;
  display: block;
  object-fit: contain;
}

.lightbox-footer {
  margin-top: var(--space-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.lightbox-title {
  font-size: 1rem;
  font-weight: 400;
  color: var(--fg);
  letter-spacing: 0.05em;
}

.lightbox-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.25rem 0 0;
  transition: color var(--transition-flow);
}

.lightbox-meta:empty {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════
   SHARE BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.share-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.share-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.share-btn:hover {
  border-color: var(--accent-3);
  color: var(--fg);
  background: rgba(255, 255, 255, 0.05);
}

/* ── Diamond clicker ──────────────────────────────────────────── */

.diamond-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.diamond-btn {
  transition: transform 0.1s ease, border-color 0.2s ease, color 0.2s ease;
}

.diamond-btn:active {
  transform: scale(0.85);
}

.diamond-btn svg {
  transition: fill 0.15s ease;
}

.diamond-btn:hover svg {
  fill: rgba(120, 200, 255, 0.15);
}

.diamond-count {
  font-size: 0.6rem;
  color: var(--muted);
  margin-top: 2px;
  cursor: default;
  user-select: none;
  min-width: 1.5em;
  text-align: center;
}

/* ── Share menu popover ─────────────────────────────────────── */

.share-menu {
  position: fixed;
  z-index: 10000;
  display: none;
  flex-direction: column;
  min-width: 180px;
  padding: 6px;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  animation: shareMenuIn 0.12s ease-out;
}

@keyframes shareMenuIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.share-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--fg);
  font: inherit;
  font-size: 0.85rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.share-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--fg);
}

.share-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}

.share-menu-item:hover .share-menu-icon {
  color: var(--fg);
}

.share-menu-icon svg {
  width: 18px;
  height: 18px;
}

.diamond-pop {
  position: fixed;
  font-size: 3rem;
  font-weight: 700;
  color: #7df;
  pointer-events: none;
  z-index: 9999;
  animation: diamondPop 0.8s ease-out forwards;
  text-shadow:
    0 0 10px rgba(120, 200, 255, 0.8),
    0 0 30px rgba(120, 200, 255, 0.5),
    0 0 60px rgba(120, 200, 255, 0.3);
}

@keyframes diamondPop {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.5);
  }
  30% {
    transform: translate(-50%, -50%) scale(1.3);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -120%) scale(1);
  }
}

.diamond-sparkle {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  animation: sparkleOut 0.6s ease-out forwards;
}

@keyframes sparkleOut {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--sx), var(--sy)) scale(0);
  }
}

/* ═══════════════════════════════════════════════════════════════
   SHARE TOAST
   ═══════════════════════════════════════════════════════════════ */

.share-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface);
  border: 1px solid var(--accent-3);
  color: var(--fg);
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 300;
}

.share-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* ═══════════════════════════════════════════════════════════════
   SELECTION
   ═══════════════════════════════════════════════════════════════ */

::selection {
  background: var(--accent-3);
  color: #000;
}

/* ═══════════════════════════════════════════════════════════════
   SITE FOOTER
   ═══════════════════════════════════════════════════════════════ */

.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-lg) var(--space-md);
  margin-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.site-footer-badge {
  display: block;
  height: 28px;
  width: auto;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.site-footer-badge:hover {
  opacity: 1;
}
