/* ============================================================
   3C Public Library — Visual Skin Override v3
   library-skin.css
   Surgical CSS layer — no logic touched, no JS dependencies changed
   Built with ❤️ by Claude (Anthropic) × Chef Anica
   3C Thread To Success Cooking Lab 🧪👨‍🍳
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600&family=Raleway:wght@300;400;500&display=swap');

/* ── CSS VARIABLE OVERRIDES ─────────────────────────────────── */
:root {
  --bg-primary:         #0a0416;
  --bg-secondary:       rgba(20, 8, 48, 0.35);
  --text-primary:       #f0eaf8;
  --text-secondary:     #c8b8e8;
  --text-tertiary:      #8878a8;
  --border-color:       rgba(123, 63, 228, 0.15);
  --purple-light:       #9b6fd4;
  --purple-medium:      #7b3fe4;
  --purple-dark:        #4a1fa8;
  --teal:               #00d4c8;
  --gold:               #c9a84c;
  --glass-bg:           rgba(255, 255, 255, 0.04);
  --glass-border:       rgba(255, 255, 255, 0.08);
  --glass-hover-bg:     rgba(123, 63, 228, 0.1);
  --glass-hover-border: rgba(0, 212, 200, 0.25);
  --card-bg:            rgba(255, 255, 255, 0.04);
  --card-border:        rgba(255, 255, 255, 0.08);
  --card-hover-bg:      rgba(123, 63, 228, 0.1);
  --card-hover-border:  rgba(0, 212, 200, 0.25);
  --folder-bg:          rgba(255, 255, 255, 0.04);
  --shadow:             rgba(0, 0, 0, 0.5);
}

/* ── BODY ───────────────────────────────────────────────────── */
body {
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  background: var(--bg-primary);
  position: relative;
}

/* Grain texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.3;
  pointer-events: none;
}

/* Radial glow */
body::after {
  content: '';
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(ellipse at center,
    rgba(75, 31, 200, 0.18) 0%,
    rgba(45, 13, 107, 0.08) 50%,
    transparent 70%);
  z-index: 0;
  pointer-events: none;
}

/* Content above overlays */
.header,
.container,
.folder-sidebar,
#loadingOverlay,
#viewerContent,
#viewer,
.right-viewer,
.layout,
.cookie-banner {
  position: relative;
  z-index: 2;
}

/* Modals are position:fixed — z-index only, never override position */
#previewModal,
#pdfModal,
.pdf-modal {
  z-index: 1000;
}

/* ── HEADER ─────────────────────────────────────────────────── */
.header {
  background: rgba(10, 4, 22, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 212, 200, 0.12);
  box-shadow: 0 1px 40px rgba(0, 0, 0, 0.5);
}

.header h1 {
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-shadow: 0 0 24px rgba(0, 212, 200, 0.3);
}

/* ── LEFT SIDEBAR ───────────────────────────────────────────── */
.sidebar {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
}

.sidebar h2 {
  font-family: 'Raleway', sans-serif;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--teal);
  text-shadow: none;
}

/* ── FOLDER CARDS ───────────────────────────────────────────── */
.folder-icon {
  display: none !important;
}

.folder-card-item {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 28px 20px 22px;
  transition: all 0.35s ease;
  gap: 8px;
}

.folder-card-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  opacity: 0.4;
  transition: opacity 0.35s ease;
}

.folder-card-item:hover {
  background: rgba(123, 63, 228, 0.1);
  border-color: rgba(0, 212, 200, 0.25);
  transform: translateY(-4px);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 212, 200, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.folder-card-item:hover::before {
  opacity: 0.9;
}

/* ── FOLDER TEXT ────────────────────────────────────────────── */

/* Title — Raleway spaced, reduced to 10px */
.folder-title {
  font-family: 'Raleway', sans-serif;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* Count — the important info, stays visible */
.folder-details {
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* Slug — 5px, barely there, natural lowercase */
.folder-slug {
  font-family: 'Raleway', sans-serif;
  font-weight: 300;
  font-size: 5px;
  letter-spacing: 0.08em;
  color: rgba(0, 212, 200, 0.2);
  text-transform: none;
}

/* ── RIGHT SIDEBAR — transparent ───────────────────────────── */
/* !important needed — internal <style> block loads after this file */
.folder-sidebar {
  background: rgba(10, 4, 22, 0.2) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.2) !important;
}

.sidebar-header {
  background: rgba(10, 4, 22, 0.25) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.sidebar-header h2,
.sidebar-header h3 {
  font-family: 'Raleway', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
}

/* Slug inside sidebar header */
.sidebar-header p,
.sidebar-header span {
  font-family: 'Raleway', sans-serif;
  font-weight: 300;
  font-size: 5px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
}

/* ── SUBFOLDER CARDS — transparent, no emoji ────────────────── */
/* !important needed — JS renders these with inline styles */
.subfolder-card {
  background: rgba(255, 255, 255, 0.03) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 10px !important;
  transition: all 0.3s ease !important;
}

.subfolder-card:hover {
  background: rgba(123, 63, 228, 0.08) !important;
  border-color: rgba(155, 89, 182, 0.2) !important;
}

/* Hide folder emojis/icons inside subfolder cards */
.subfolder-card img,
.subfolder-card svg,
.subfolder-card .subfolder-icon,
.subfolder-card > span:first-child,
.subfolder-card .folder-emoji {
  display: none !important;
}

/* ── VIEW CONTENT BUTTON — purple, transparent ──────────────── */
.folder-sidebar button,
.sidebar-body button {
  font-family: 'Open Sans', sans-serif;
  font-weight: 500;
  letter-spacing: 0.06em;
  background: rgba(123, 63, 228, 0.15) !important;
  border: 1px solid rgba(155, 89, 182, 0.4) !important;
  color: #c084fc !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  border-radius: 8px;
}

.folder-sidebar button:hover,
.sidebar-body button:hover {
  background: rgba(123, 63, 228, 0.28) !important;
  border-color: rgba(155, 89, 182, 0.65) !important;
  box-shadow: 0 0 18px rgba(123, 63, 228, 0.2);
}

/* ── CONTENT CARDS ──────────────────────────────────────────── */
.content-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.content-card:hover {
  background: rgba(123, 63, 228, 0.1);
  border-color: rgba(0, 212, 200, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.content-title {
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.4;
}

/* Desktop content grid — breathing room
   !important needed — internal <style> block defines gap: 15px */
.content-grid {
  gap: 28px !important;
  margin-top: 20px !important;
}

/* ── SECTION HEADINGS ───────────────────────────────────────── */
.folders-section > h2,
.section-title {
  font-family: 'Raleway', sans-serif;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--teal);
}

/* ── MODALS ─────────────────────────────────────────────────── */
#previewModal .modal-content,
#pdfModal .modal-content,
.modal-content {
  background: rgba(10, 4, 22, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 212, 200, 0.12);
}

/* ── LOADING OVERLAY ────────────────────────────────────────── */
#loadingOverlay {
  background: var(--bg-primary);
  font-family: 'Open Sans', sans-serif;
}

/* ── MOBILE VIDEO CONTAINER ─────────────────────────────────── */
@media (max-width: 768px) {
  .right-viewer {
    background: var(--bg-primary) !important;
  }

  .right-viewer video {
    background: transparent !important;
    display: block;
    width: 100%;
    height: auto;
  }
}
