/* ===== BIOREZKA ARCHIVE — EMO ARTHOUSE STYLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=Courier+Prime:ital,wght@0,400;0,700;1,400&family=Unbounded:wght@300;700;900&display=swap');

:root {
  --black: #070707;
  --dark: #0f0f0f;
  --dark2: #181818;
  --dark3: #222;
  --red: #8b0000;
  --red2: #c0392b;
  --red-glow: #ff000033;
  --grey: #333;
  --grey2: #555;
  --light: #aaa;
  --white: #e8e8e8;
  --accent: #8b0000;
  --font-title: 'Unbounded', sans-serif;
  --font-body: 'Courier Prime', monospace;
  --font-deco: 'Special Elite', cursive;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ===== NOISE OVERLAY ===== */
#noise-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  opacity: 0.04;
  mix-blend-mode: overlay;
}

/* ===== SCANLINES ===== */
.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.15) 2px,
    rgba(0,0,0,0.15) 4px
  );
  pointer-events: none;
  z-index: 998;
}

/* ===== RAIN CANVAS ===== */
#rain-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 997;
  opacity: 0.18;
}
#rain-canvas.hidden { display: none; }

/* ===== HEADER ===== */
.site-header {
  border-bottom: 1px solid var(--red);
  padding: 1.5rem 2rem;
  background: linear-gradient(180deg, #000 0%, var(--dark) 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-header::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  box-shadow: 0 0 12px var(--red);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-width: 0;
}
.logo-symbol {
  font-size: 2rem;
  color: var(--red);
  text-shadow: 0 0 15px var(--red);
  animation: pulse-cross 3s ease-in-out infinite;
}
@keyframes pulse-cross {
  0%, 100% { opacity: 1; text-shadow: 0 0 15px var(--red); }
  50% { opacity: 0.5; text-shadow: 0 0 30px var(--red2); }
}
.logo-text {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  line-height: 1;
  text-align: center;
}
.logo-text em {
  font-style: italic;
  font-weight: 300;
  font-size: 1rem;
  color: var(--light);
  letter-spacing: 0.5em;
}
.header-sub {
  font-family: var(--font-deco);
  color: var(--grey2);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
}

/* ===== AUTH BAR ===== */
.auth-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.admin-badge {
  font-family: var(--font-title);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--red2);
  border: 1px solid var(--red);
  padding: 0.3rem 0.7rem;
  animation: pulse-cross 2s ease-in-out infinite;
}
.admin-badge.hidden { display: none; }
.auth-btn {
  background: var(--dark3);
  border: 1px solid var(--grey);
  color: var(--grey2);
  font-family: var(--font-body);
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: all 0.3s;
  white-space: nowrap;
}
.auth-btn:hover { border-color: var(--red); color: var(--red2); }
.auth-btn.is-admin { border-color: var(--red); color: var(--red2); }

/* ===== LOGIN MODAL ===== */
.login-modal {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-modal.hidden { display: none; }
.login-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(4px);
}
.login-box {
  position: relative;
  z-index: 1;
  background: var(--dark);
  border: 1px solid var(--red);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 0 60px rgba(139,0,0,0.3);
}
.login-cross {
  font-size: 2.5rem;
  color: var(--red);
  text-shadow: 0 0 20px var(--red);
  animation: pulse-cross 3s ease-in-out infinite;
}
.login-title {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--white);
}
.login-sub {
  color: var(--grey2);
  font-style: italic;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}
.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.login-input {
  width: 100%;
  background: var(--dark2);
  border: 1px solid var(--grey);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  outline: none;
  caret-color: var(--red2);
  letter-spacing: 0.15em;
  transition: border-color 0.3s;
  text-align: center;
}
.login-input:focus { border-color: var(--grey2); }
.login-error {
  color: var(--red2);
  font-size: 0.8rem;
  font-style: italic;
  text-align: center;
  letter-spacing: 0.05em;
}
.login-error.hidden { display: none; }
.login-submit {
  width: 100%;
  background: var(--dark3);
  border: 1px solid var(--red);
  color: var(--red2);
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.3s;
}
.login-submit:hover { background: var(--red); color: #fff; box-shadow: 0 0 20px rgba(139,0,0,0.4); }
.login-cancel {
  background: none;
  border: none;
  color: var(--grey2);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-style: italic;
  cursor: pointer;
  letter-spacing: 0.1em;
  transition: color 0.2s;
}
.login-cancel:hover { color: var(--white); }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* ===== TAB NAV ===== */
.tab-nav {
  display: flex;
  background: var(--dark);
  border-bottom: 1px solid var(--grey);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  flex: 1;
  padding: 1rem 1.5rem;
  background: none;
  border: none;
  border-right: 1px solid var(--grey);
  color: var(--grey2);
  font-family: var(--font-title);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
  white-space: nowrap;
}
.tab-btn:last-child { border-right: none; }
.tab-btn:hover { color: var(--white); background: var(--dark2); }
.tab-btn.active {
  color: var(--white);
  background: var(--dark2);
}
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}
.tab-btn.emo-btn { color: #c44; }
.tab-btn.emo-btn.active { color: #ff6666; }
.tab-btn.emo-btn.active::after { background: #ff4444; box-shadow: 0 0 12px #ff4444; }
.tab-icon { font-size: 1rem; }

/* ===== MAIN CONTENT ===== */
.main-content { max-width: 1200px; margin: 0 auto; padding: 2rem; }

/* ===== TAB PANELS ===== */
.tab-panel { display: none; animation: fadeIn 0.4s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ===== PANEL HEADER ===== */
.panel-header { margin-bottom: 2rem; border-left: 3px solid var(--red); padding-left: 1rem; }
.panel-title {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--white);
}
.panel-desc { color: var(--grey2); font-style: italic; margin-top: 0.3rem; font-size: 0.9rem; }

/* ===== UPLOAD ZONE ===== */
.upload-zone {
  border: 1px dashed var(--grey);
  background: var(--dark2);
  border-radius: 4px;
  margin-bottom: 2.5rem;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--red);
  background: #1a0a0a;
  box-shadow: inset 0 0 30px rgba(139,0,0,0.1), 0 0 20px rgba(139,0,0,0.2);
}
.upload-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 2.5rem;
  text-align: center;
}
.upload-icon {
  font-size: 2.5rem;
  color: var(--grey2);
  font-family: var(--font-title);
  transition: color 0.3s;
}
.upload-zone:hover .upload-icon { color: var(--red); }
.upload-inner p { color: var(--light); font-size: 0.95rem; }
.accent { color: var(--red2); font-weight: 700; }
.upload-or { color: var(--grey); font-size: 0.8rem; }
.upload-btn {
  background: var(--dark3);
  border: 1px solid var(--grey);
  color: var(--white);
  padding: 0.5rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 0.1em;
}
.upload-btn:hover { border-color: var(--red); color: var(--red2); background: #1a0a0a; }
.upload-formats { color: var(--grey); font-size: 0.75rem; letter-spacing: 0.15em; }

/* ===== VIDEO GRID ===== */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.video-card {
  background: var(--dark2);
  border: 1px solid var(--grey);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}
.video-card:hover { border-color: var(--red); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.6); }
.video-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.video-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--dark3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--grey);
}
.video-card-info { padding: 0.75rem; }
.video-card-name { font-size: 0.8rem; color: var(--light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-card-size { font-size: 0.7rem; color: var(--grey2); margin-top: 0.2rem; }
.remove-btn {
  position: absolute;
  top: 5px; right: 5px;
  background: rgba(0,0,0,0.7);
  border: 1px solid var(--red);
  color: var(--red2);
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: 2px;
}
.video-card:hover .remove-btn { opacity: 1; }

/* ===== MUSIC LIST ===== */
.music-list { display: flex; flex-direction: column; gap: 0.5rem; }
.music-item {
  background: var(--dark2);
  border: 1px solid var(--grey);
  border-radius: 3px;
  padding: 1rem 1.2rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s;
  position: relative;
  cursor: pointer;
}
.music-item:hover { border-color: var(--red); background: #1a0a0a; }
.music-item.playing { border-color: var(--red2); background: #1a0505; }
.music-item.playing::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--red2);
  box-shadow: 0 0 10px var(--red);
}
.music-play-btn {
  width: 40px; height: 40px;
  background: var(--dark3);
  border: 1px solid var(--grey);
  color: var(--white);
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
  border-radius: 2px;
  flex-shrink: 0;
}
.music-play-btn:hover, .music-item.playing .music-play-btn {
  border-color: var(--red);
  color: var(--red2);
  background: #1a0a0a;
}
.music-info { overflow: hidden; }
.music-name { font-size: 0.9rem; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-size { font-size: 0.75rem; color: var(--grey2); margin-top: 0.2rem; }
.music-controls { display: flex; gap: 0.5rem; align-items: center; flex-shrink: 0; }
.music-duration {
  font-size: 0.72rem;
  color: var(--grey2);
  min-width: 56px;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.music-remove {
  background: none;
  border: 1px solid transparent;
  color: var(--grey2);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px 8px;
  transition: all 0.2s;
}
.music-remove:hover { border-color: var(--red); color: var(--red2); }

/* ===== IMAGE MASONRY ===== */
.image-masonry {
  columns: 4 200px;
  column-gap: 0.75rem;
}
.image-card {
  break-inside: avoid;
  margin-bottom: 0.75rem;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid var(--grey);
  border-radius: 2px;
  transition: all 0.3s;
}
.image-card:hover { border-color: var(--red); transform: scale(1.01); }
.image-card img { width: 100%; display: block; filter: contrast(1.05) saturate(0.8); transition: filter 0.3s; }
.image-card:hover img { filter: contrast(1.1) saturate(0.4); }
.image-card .remove-btn { opacity: 0; }
.image-card:hover .remove-btn { opacity: 1; }

/* ===== LIGHTBOX ===== */
.lightbox { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; }
.lightbox.hidden { display: none; }
.lightbox-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.92); }
.lightbox-content { position: relative; z-index: 1; display: flex; align-items: center; gap: 1rem; max-width: 90vw; max-height: 90vh; }
.lightbox-content img { max-width: 85vw; max-height: 85vh; object-fit: contain; border: 1px solid var(--grey); }
.lightbox-close {
  position: fixed; top: 1rem; right: 1rem;
  background: var(--dark2); border: 1px solid var(--red);
  color: var(--red2); font-size: 1.2rem;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2; border-radius: 2px;
}
.lightbox-close:hover { background: var(--red); color: #fff; }
.lightbox-nav {
  background: var(--dark2); border: 1px solid var(--grey);
  color: var(--white); font-size: 2rem;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; border-radius: 2px;
  flex-shrink: 0;
}
.lightbox-nav:hover { border-color: var(--red); color: var(--red2); }

/* ===== VIDEO MODAL ===== */
.video-modal { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; }
.video-modal.hidden { display: none; }
.video-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.95); }
.video-modal-content { position: relative; z-index: 1; max-width: 90vw; }
.video-modal-content video { max-width: 90vw; max-height: 85vh; border: 1px solid var(--grey); display: block; }
.modal-filename { color: var(--grey2); font-size: 0.8rem; margin-top: 0.5rem; text-align: center; font-style: italic; }

/* ===== PLAYER ===== */
body.player-visible .main-content {
  padding-bottom: 7.5rem;
}
#global-audio {
  display: none;
}
.player-dock {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  width: min(720px, calc(100vw - 2rem));
  background: var(--dark2);
  border: 1px solid var(--red);
  border-radius: 4px;
  box-shadow: 0 0 30px rgba(139,0,0,0.22);
  z-index: 320;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
}
.player-dock.hidden,
.player-sheet.hidden {
  display: none;
}
.player-dock-open {
  background: linear-gradient(180deg, rgba(26,10,10,0.88), rgba(9,9,9,0.96));
  border: none;
  color: inherit;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  align-items: flex-start;
  text-align: left;
  min-width: 0;
  cursor: pointer;
}
.player-dock-kicker,
.player-sheet-kicker {
  font-family: var(--font-title);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red2);
}
.player-dock-title,
.player-sheet-title {
  font-family: var(--font-title);
  color: var(--white);
  font-size: 1rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.player-dock-subtitle,
.player-sheet-subtitle {
  color: var(--light);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.player-dock-actions {
  display: flex;
  align-items: stretch;
  border-left: 1px solid rgba(192,57,43,0.2);
}
.player-control-btn,
.player-sheet-btn {
  min-width: 52px;
  border: none;
  background: rgba(15,15,15,0.96);
  color: var(--white);
  font-family: var(--font-title);
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.player-control-btn:hover,
.player-sheet-btn:hover {
  background: #1d0b0b;
  color: var(--red2);
}
.player-control-btn:disabled,
.player-sheet-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.player-control-btn-primary,
.player-sheet-btn-primary {
  background: linear-gradient(180deg, rgba(139,0,0,0.3), rgba(80,0,0,0.15));
}
.player-sheet {
  position: fixed;
  inset: 0;
  z-index: 420;
}
.player-sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(8px);
}
.player-sheet-card {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(720px, 100vw);
  background: linear-gradient(180deg, #140808 0%, #090909 100%);
  border: 1px solid rgba(192,57,43,0.35);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  padding: 1.4rem 1.2rem 1.5rem;
  box-shadow: 0 -12px 50px rgba(0,0,0,0.55);
}
.player-sheet-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.player-sheet-headline {
  min-width: 0;
}
.player-sheet-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(192,57,43,0.3);
  background: rgba(20,20,20,0.88);
  color: var(--white);
  cursor: pointer;
}
.player-sheet-progress {
  margin-top: 1.4rem;
}
.player-progress {
  width: 100%;
  accent-color: var(--red2);
}
.player-sheet-times,
.player-sheet-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--grey2);
  font-size: 0.78rem;
  margin-top: 0.4rem;
}
.player-sheet-controls {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 1.3rem;
}
.player-sheet-btn {
  min-width: 74px;
  min-height: 56px;
  border-radius: 14px;
  border: 1px solid rgba(192,57,43,0.18);
}
.player-sheet-btn-primary {
  min-width: 92px;
}

/* ===== EMO TAB ===== */
.emo-panel {
  background:
    radial-gradient(circle at top, rgba(139,0,0,0.28), transparent 42%),
    linear-gradient(180deg, #120707 0%, #050505 100%);
}
.emo-stage {
  min-height: calc(100vh - 220px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
.emo-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 3rem 1rem 1rem;
  position: relative;
}
.emo-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, #1a0000 0%, transparent 70%);
  pointer-events: none;
}
.emo-cross-left, .emo-cross-right {
  font-size: 4rem;
  color: #3a0000;
  text-shadow: 0 0 30px #8b0000;
  animation: pulse-cross 4s ease-in-out infinite;
}
.emo-cross-right { animation-delay: 2s; }
.emo-title {
  font-family: var(--font-title);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900;
  text-align: center;
  line-height: 1.1;
  letter-spacing: 0.1em;
  text-shadow: 0 0 40px rgba(139,0,0,0.5);
}
.emo-title em {
  display: block;
  font-style: italic;
  font-weight: 300;
  font-size: 0.4em;
  color: var(--grey2);
  letter-spacing: 0.4em;
}
.emo-wip {
  position: relative;
  padding: 0.95rem 1.6rem;
  border: 1px solid rgba(192,57,43,0.32);
  background: linear-gradient(180deg, rgba(28,10,10,0.88), rgba(10,5,5,0.92));
  box-shadow: 0 0 28px rgba(139,0,0,0.16), inset 0 0 0 1px rgba(255,255,255,0.03);
  color: rgba(232,232,232,0.78);
  font-family: var(--font-deco);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-style: italic;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.emo-wip::before,
.emo-wip::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 3.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(192,57,43,0.5), transparent);
}
.emo-wip::before { right: calc(100% + 1rem); }
.emo-wip::after { left: calc(100% + 1rem); }
.emo-section-title {
  font-family: var(--font-deco);
  color: var(--grey2);
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  border-bottom: 1px solid var(--dark3);
  padding-bottom: 0.5rem;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--grey2);
  font-style: italic;
  font-size: 0.9rem;
  display: none;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--grey); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .site-header {
    padding: 1.1rem 0.9rem;
    flex-direction: column;
    justify-content: center;
    gap: 0.9rem;
  }
  .header-inner {
    width: 100%;
  }
  .logo {
    width: 100%;
    justify-content: center;
    gap: 0.8rem;
  }
  .logo-symbol {
    font-size: 1.35rem;
    flex-shrink: 0;
  }
  .logo-text {
    font-size: 1.3rem;
    letter-spacing: 0.14em;
  }
  .logo-text em {
    font-size: 0.7rem;
    letter-spacing: 0.26em;
  }
  .header-sub {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-align: center;
  }
  .auth-bar {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.55rem;
  }
  .admin-badge {
    font-size: 0.58rem;
    padding: 0.28rem 0.55rem;
  }
  .auth-btn {
    font-size: 0.72rem;
    padding: 0.45rem 0.85rem;
  }
  .tab-nav {
    justify-content: flex-start;
  }
  .tab-btn {
    flex: 0 0 auto;
    min-width: 88px;
    font-size: 0.58rem;
    padding: 0.8rem 0.7rem;
    gap: 0.35rem;
  }
  .tab-icon {
    font-size: 0.85rem;
  }
  .main-content { padding: 1rem; }
  .image-masonry { columns: 2 150px; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .music-item {
    grid-template-columns: auto 1fr;
  }
  .music-controls {
    grid-column: 1 / -1;
    justify-content: space-between;
  }
  .music-duration {
    min-width: 0;
  }
  .panel-title {
    font-size: 1.15rem;
    letter-spacing: 0.16em;
  }
  .panel-desc {
    font-size: 0.82rem;
  }
  body.player-visible .main-content {
    padding-bottom: 8.6rem;
  }
  .player-dock {
    width: calc(100vw - 1rem);
    bottom: 0.5rem;
    grid-template-columns: 1fr;
  }
  .player-dock-open {
    padding: 0.85rem 0.9rem 0.55rem;
  }
  .player-dock-actions {
    border-left: none;
    border-top: 1px solid rgba(192,57,43,0.18);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .player-control-btn {
    min-height: 50px;
  }
  .player-sheet-card {
    width: 100vw;
    padding: 1.2rem 1rem calc(1.6rem + env(safe-area-inset-bottom));
  }
  .player-sheet-title {
    font-size: 1.15rem;
  }
  .player-sheet-subtitle {
    white-space: normal;
  }
  .player-sheet-btn {
    min-width: 70px;
  }
  .player-sheet-btn-primary {
    min-width: 92px;
  }
  .emo-cross-left, .emo-cross-right { display: none; }
  .emo-stage { min-height: calc(100vh - 180px); }
  .emo-wip::before,
  .emo-wip::after { display: none; }
}

/* ===== RENAME ===== */
.name-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.rename-btn {
  background: none;
  border: none;
  color: var(--grey2);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 4px;
  flex-shrink: 0;
  transition: color 0.2s;
  line-height: 1;
}
.rename-btn:hover { color: var(--red2); }
.rename-input {
  background: var(--dark3);
  border: 1px solid var(--red);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 2px 6px;
  outline: none;
  width: 100%;
  min-width: 0;
}

/* ===== VIDEO THUMB ===== */
.video-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  cursor: pointer;
  filter: contrast(1.05) saturate(0.8);
  transition: filter 0.3s;
}
.video-card:hover .video-thumb { filter: contrast(1.1) saturate(0.5); }
.video-card-name-wrap, .video-card .name-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}
.video-card-name {
  font-size: 0.8rem;
  color: var(--light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

/* ===== IMAGE NAME BAR ===== */
.img-name-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 1.5rem 0.5rem 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  opacity: 0;
  transition: opacity 0.3s;
}
.image-card:hover .img-name-bar { opacity: 1; }
.img-name {
  font-size: 0.75rem;
  color: var(--light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* ===== PLAYLISTS ===== */
#playlist-section { margin-top: 2.5rem; }
.playlist-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.create-pl-btn {
  background: var(--dark3);
  border: 1px solid var(--grey);
  color: var(--grey2);
  font-family: var(--font-body);
  font-size: 0.8rem;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: all 0.3s;
}
.create-pl-btn:hover { border-color: var(--red); color: var(--red2); }

.playlist-card {
  background: var(--dark2);
  border: 1px solid var(--grey);
  border-radius: 3px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color 0.3s;
}
.playlist-card:hover { border-color: #444; }
.pl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.pl-icon { color: var(--red2); font-size: 0.8rem; flex-shrink: 0; }
.pl-name {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pl-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.pl-count { font-size: 0.75rem; color: var(--grey2); }
.pl-play-btn {
  background: var(--dark3);
  border: 1px solid var(--grey);
  color: var(--white);
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font-body);
}
.pl-play-btn:hover:not(:disabled) { border-color: var(--red); color: var(--red2); }
.pl-play-btn:disabled { opacity: 0.3; cursor: default; }
.pl-del {
  background: none;
  border: 1px solid transparent;
  color: var(--grey2);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 3px 7px;
  transition: all 0.2s;
}
.pl-del:hover { border-color: var(--red); color: var(--red2); }
.pl-tracks {
  padding: 0 1rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.pl-track {
  font-size: 0.8rem;
  color: var(--grey2);
  padding: 0.2rem 0;
  border-bottom: 1px solid var(--dark3);
}
.pl-track:last-child { border-bottom: none; }

/* add-to-playlist btn */
.atp-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--grey2);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 3px 7px;
  transition: all 0.2s;
  white-space: nowrap;
}
.atp-btn:hover { border-color: var(--red); color: var(--red2); }

/* music name row fix */
.music-name {
  font-size: 0.9rem;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.music-info .name-row { min-width: 0; overflow: hidden; }
