/* Exit International Video Library — public library theme
   Edit this file to change the look of the public video catalogue. */
:root {
  --library-bg: #101521;
  --library-surface: rgba(19, 25, 36, .90);
  --library-ink: #f5f3fa;
  --library-muted: #a9afbd;
  --library-line: rgba(205, 211, 229, .20);
  --library-purple: #762bb4;
  --library-purple-deep: #3d1768;
  --library-magenta: #a64df0;
  --library-teal: #70c5c8;
  --library-shadow: 0 12px 34px rgba(0, 0, 0, .30);
}
body {
  background-color: var(--library-bg) !important;
  background-image: linear-gradient(rgba(9, 14, 25, .36), rgba(9, 14, 25, .60)), url('/assets/videos-background.png') !important;
  background-repeat: no-repeat !important;
  background-position: center top !important;
  background-size: cover !important;
  background-attachment: fixed !important;
  color: var(--library-ink) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  line-height: 1.55;
}
header {
  position: relative;
  background: rgba(13, 19, 31, .30) !important;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--library-ink);
  border-bottom: 1px solid rgba(220, 225, 240, .15) !important;
  box-shadow: 0 3px 22px rgba(0,0,0,.12);
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}




nav { align-items: center; gap: 8px 18px !important; }
header nav a { color: #f0eff6 !important; text-decoration: none; font-size: 14px; font-weight: 650; }
header nav a:hover { color: #c98cff !important; }
main {
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: 22px 24px 0 !important;
}
.library-intro {
  display: none !important;
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4vw, 48px);
  margin: 0 0 26px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(118deg, rgba(35, 18, 43, .88), rgba(65, 30, 80, .82) 62%, rgba(92, 32, 105, .78));
  box-shadow: var(--library-shadow);
}
.library-intro:after {
  content: "";
  position: absolute;
  width: 250px; height: 250px;
  border: 42px solid rgba(229,27,138,.24);
  border-radius: 50%;
  right: -62px; top: -115px;
  pointer-events: none;
}
.library-intro .eyebrow {
  margin: 0 0 8px;
  color: #f6a6d4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
}
.library-intro h1 {
  position: relative; z-index: 1;
  margin: 0 0 10px;
  max-width: 760px;
  color: #fff;
  font-size: clamp(32px, 4vw, 48px) !important;
  letter-spacing: -.045em;
  line-height: 1.08 !important;
}
.library-intro > p:last-child {
  position: relative; z-index: 1;
  margin: 0;
  max-width: 660px;
  color: #eee3f3 !important;
  font-size: 16px;
}
.video-search {
  max-width: 100% !important;
  padding: 18px 20px 12px;
  margin: 0 0 26px;
  background: rgba(20, 27, 39, .84);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--library-line);
  border-radius: 14px;
  box-shadow: 0 5px 18px rgba(44,17,56,.04);
}
.video-search label { margin-bottom: 8px; color: var(--library-ink); font-size: 14px; }
.search-controls { display: grid; grid-template-columns: minmax(180px, 1.5fr) minmax(180px, 1fr) auto; gap: 12px; align-items: center; }
.video-search input, .video-search select {
  min-width: 0;
  width: 100%;
  min-height: 48px;
  margin: 0 0 6px !important;
  padding: 12px 14px !important;
  color: var(--library-ink) !important;
  background: #fff !important;
  border: 1px solid #d8d0df !important;
  border-radius: 9px !important;
  font: inherit;
}
.video-search input:focus, .video-search select:focus { outline: 3px solid rgba(229,27,138,.16); border-color: var(--library-magenta) !important; }
.video-search button {
  min-height: 48px;
  margin-bottom: 6px;
  padding: 12px 18px !important;
  background: var(--library-magenta) !important;
  color: #fff !important;
  border-radius: 9px !important;
  white-space: nowrap;
  transition: transform .18s ease, background .18s ease;
}
.video-search button:hover { background: #c91476 !important; transform: translateY(-1px); }
.video-library-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)) !important;
  align-items: stretch !important;
  gap: 22px !important;
}
.video-library-card {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0;
  height: 100%;
  padding: 14px !important;
  overflow: hidden;
  background: rgba(20, 27, 39, .90) !important;
  border: 1px solid var(--library-line) !important;
  border-radius: 15px !important;
  box-shadow: 0 5px 18px rgba(44,17,56,.045);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.video-library-card:hover { transform: translateY(-3px); box-shadow: var(--library-shadow); border-color: #cbb5d5 !important; }
.video-thumb-link { display: block; text-decoration: none; color: inherit; }
.thumb.video-thumb {
  display: block !important; position: relative !important;
  width: 100% !important; height: 0 !important; min-height: 0 !important;
  aspect-ratio: auto !important; padding: 0 0 56.25% !important;
  margin: 0 0 15px !important; overflow: hidden !important;
  box-sizing: content-box !important; background: #211a28 !important;
  border-radius: 10px !important;
}
.video-thumb .thumb-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: #e7dceb; z-index: 1; }
.video-thumb .thumb-video { position: absolute !important; inset: 0 auto auto 0 !important; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; object-fit: contain !important; display: block; opacity: 0; background: #000; }
.video-thumb.has-frame .thumb-video { opacity: 1; }
.video-thumb.has-frame .thumb-fallback { display: none; }
.video-category-label { margin: 0 0 8px !important; color: #c89aff !important; font-size: 12px !important; font-weight: 750; letter-spacing: .015em; }
.video-library-card h2 { margin: 0 0 10px !important; font-size: clamp(19px, 2vw, 22px) !important; line-height: 1.28; letter-spacing: -.025em; }
.video-library-card h2 a { color: var(--library-ink) !important; text-decoration: none; }
.video-library-card h2 a:hover { color: #c89aff !important; }
.video-library-card p { color: var(--library-muted) !important; }
.video-library-card .video-description {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden; min-height: 4.5em; max-height: 4.5em; line-height: 1.5em;
  margin: 0 0 18px !important; font-size: 14px;
}
.video-library-card > .button {
  align-self: flex-start; margin-top: auto; padding: 10px 15px !important;
  color: #fff !important; background: var(--library-purple) !important;
  border-radius: 8px !important; text-decoration: none;
}
.video-library-card > .button:hover { background: var(--library-magenta) !important; }
footer { max-width: 1180px !important; margin: 46px auto 0 !important; padding: 22px 24px 32px !important; color: #a9afbd !important; }
@media (max-width: 680px) {
  main { padding: 22px 14px 0 !important; }
  header { padding-left: 16px !important; padding-right: 16px !important; }
  header strong a { width: 142px; height: 56px; }
  .library-intro { border-radius: 13px; padding: 27px 22px; }
  .search-controls { grid-template-columns: 1fr; gap: 8px; }
  .video-search { padding: 15px; }
  .video-library-grid { grid-template-columns: 1fr !important; gap: 15px !important; }
  footer { padding-left: 14px !important; padding-right: 14px !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Category navigation and editorial metadata */
.category-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin: 0 0 24px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--library-line);
    text-align: center;
}
.category-chip{display:inline-flex;align-items:center;padding:8px 13px;border:1px solid rgba(205,211,229,.13);border-radius:9px;background:rgba(23,30,43,.80);color:#eee8f4 !important;text-decoration:none;font-size:.92rem;transition:background .15s,color .15s}
.category-chip:hover,.category-chip:focus,.category-chip.active{background:#762bb4 !important;color:#fff !important;border-color:#9b52dc !important}
.featured-badge{display:inline-block;background:#f8e7fb;color:#772b82;border-radius:999px;padding:4px 9px;font-size:11px;font-weight:800;letter-spacing:.07em}
.video-date{margin:10px 0 3px;font-size:.85rem}
.video-description{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;min-height:4.5em}
.video-library-card{display:flex;flex-direction:column;height:100%}
.video-library-card>.button{margin-top:auto;align-self:flex-start}

/* Public single-video and login styling; admin pages retain their original styling. */
.site-nav, .page-nav {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  max-width: 1180px; margin: 0 auto; padding: 12px 24px;
  background: rgba(13, 19, 31, .50); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--library-line);
}
.button, a.button {
  display: inline-block; padding: 9px 13px; border-radius: 8px;
  background: var(--library-purple); color: #fff !important;
  text-decoration: none; font-weight: 750;
}
.panel, .login-panel, .watch-panel {
  max-width: none; background: rgba(20, 27, 39, .90); color: var(--library-ink);
  border: 1px solid var(--library-line); border-radius: 14px;
  padding: 22px; box-shadow: 0 5px 18px rgba(0,0,0,.18);
}
input, select, textarea {
  color: var(--library-ink) !important; background: rgba(255,255,255,.96) !important;
  border: 1px solid #d8d0df !important; border-radius: 8px;
}
.watch-page { max-width:1000px; margin:0 auto; }
.watch-intro { margin-bottom:20px; }
.watch-intro h1 { overflow-wrap:anywhere; }
.watch-content { margin-bottom:24px; }
.watch-content .video { display:block; width:100%; aspect-ratio:16/9; background:#09070b; border-radius:12px; }
.watch-category { color:var(--library-purple) !important; font-weight:750; }
.login-layout { max-width:560px; margin:0 auto; }
.login-panel { max-width:none; }
.login-panel input { color:var(--library-ink) !important; background:#fff !important; border:1px solid #d8d0df !important; }

/* Force the main header to be transparent */
html body header {
    background: rgba(13, 19, 31, 0.12) !important;
    background-color: rgba(13, 19, 31, 0.12) !important;
    background-image: none !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* Keep the navigation itself transparent */
html body header nav {
    background: transparent !important;
    background-color: transparent !important;
}

/* Header layout and responsive logo sizing */
html body header {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
}

html body header strong {
    display: block !important;
    flex: 0 0 50% !important;
    width: 40% !important;
    min-width: 0 !important;
    margin: 0 !important;
}

html body header strong a {
    display: block !important;
    width: 100% !important;
    height: 104px !important;
    box-sizing: border-box !important;
    background-image: url('/assets/logo.png') !important;
    background-position: left center !important;
    background-repeat: no-repeat !important;
    background-size: 100% auto !important;
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
}

html body header nav {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    background: transparent !important;
}

@media (max-width: 680px) {
    html body header strong {
        flex-basis: 55% !important;
        width: 55% !important;
    }

    html body header strong a {
        height: 65px !important;
    }

    html body header {
        gap: 10px !important;
    }
}

/* Make text readable inside search and login fields */
html body input,
html body select,
html body textarea {
    color: #24212a !important;
    -webkit-text-fill-color: #24212a !important;
    background-color: #ffffff !important;
}

/* Placeholder text */
html body input::placeholder,
html body textarea::placeholder {
    color: #77717d !important;
    -webkit-text-fill-color: #77717d !important;
    opacity: 1 !important;
}

/* Login form labels */
html body .login-panel label,
html body .login-layout label {
    color: #f5f3fa !important;
}

/* Dropdown options */
html body select option {
    color: #24212a !important;
    background-color: #ffffff !important;
}

.featured-badge {
    display: none !important;
}

/* Hide featured badge on the single-video page too */
.watch-page .featured-badge,
.watch-intro .featured-badge {
    display: none !important;
}


/* Admin video forms: readable light text on dark fields */
body .panel input:not([type="checkbox"]):not([type="radio"]),
body .panel textarea,
body .panel select {
    color: #f2f4f5 !important;
    -webkit-text-fill-color: #f2f4f5 !important;
    background-color: #0e1317 !important;
    border: 1px solid #485762 !important;
}

body .panel input::placeholder,
body .panel textarea::placeholder {
    color: #9aa5ad !important;
    -webkit-text-fill-color: #9aa5ad !important;
    opacity: 1 !important;
}

body .panel select option {
    color: #f2f4f5 !important;
    background-color: #0e1317 !important;
}


/* FIX: Admin Add/Edit Video fields */
html body .panel input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
html body .panel textarea,
html body .panel select {
    color: #f2f4f5 !important;
    -webkit-text-fill-color: #f2f4f5 !important;
    background: #171f24 !important;
    background-color: #171f24 !important;
    border: 1px solid #485762 !important;
}

html body .panel input::placeholder,
html body .panel textarea::placeholder {
    color: #aeb9c1 !important;
    -webkit-text-fill-color: #aeb9c1 !important;
    opacity: 1 !important;
}

html body .panel select option {
    color: #f2f4f5 !important;
    background-color: #171f24 !important;
}


/* Footer: keep every text element and link white, with no underline in any state */
html body footer,
html body footer *,
html body footer *::before,
html body footer *::after {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-decoration: none !important;
}

html body footer a:link,
html body footer a:visited,
html body footer a:hover,
html body footer a:active,
html body footer a:focus,
html body footer a:focus-visible {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-decoration: none !important;
}
