/* ===== Library of Light Codes - Styles ===== */

:root {
  --gold: #a6872f;
  --gold-light: #d4af37;
  --gold-hover: #ff5722;
  --bg-dark: #0b0b0d;
  --bg-panel: #16151a;
  --bg-card: #1c1b21;
  --text-light: #f4f1ea;
  --text-muted: #b8b3a8;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-dark);
  color: var(--text-light);
  font-family: 'Raleway', sans-serif;
  scroll-behavior: smooth;
}

body.lcl-locked { overflow: hidden; height: 100vh; }

h1, h2, h3 { font-family: 'Cinzel', serif; margin: 0; }

a { color: var(--gold-light); }

/* ===== HEADER ===== */
.lcl-header {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 22px 30px;
  background: #070707;
  border-bottom: 2px solid rgba(166,135,47,0.4);
}

.lcl-logo img { height: 56px; width: auto; display: block; }

.lcl-title-wrap { flex: 1; min-width: 220px; }

.lcl-title {
  font-size: 1.6rem;
  letter-spacing: 1px;
  background: linear-gradient(90deg, var(--gold-light), #ff8c42, var(--gold-light));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold-light);
  animation: lcl-gold-shimmer 6s linear infinite;
}

.lcl-subtitle {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.lcl-compass-cta {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 10px 20px;
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(212,175,55,0.5), inset 0 0 6px rgba(255,255,255,0.2);
  transition: all 0.3s ease;
}

.lcl-compass-cta:hover {
  background: rgba(255,87,34,0.15);
  border-color: var(--gold-hover);
  box-shadow: 0 0 14px rgba(255,87,34,0.9), 0 0 30px rgba(255,140,0,0.5);
}

/* ===== INTRO ===== */
.lcl-intro {
  max-width: 820px;
  margin: 30px auto 10px;
  padding: 0 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== CONTROLS ===== */
.lcl-controls {
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.lcl-search {
  width: 100%;
  max-width: 420px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid rgba(166,135,47,0.5);
  background: var(--bg-panel);
  color: var(--text-light);
  font-family: 'Raleway', sans-serif;
  font-size: 0.9rem;
}

.lcl-search:focus { outline: none; border-color: var(--gold-light); }

.lcl-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.lcl-filter-btn {
  background: transparent;
  border: 1px solid rgba(166,135,47,0.5);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.lcl-filter-btn:hover { border-color: var(--gold-light); color: var(--text-light); }

.lcl-filter-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #0b0b0d;
  font-weight: 600;
}

/* ===== GRID ===== */
.lcl-grid {
  max-width: 1200px;
  margin: 20px auto 60px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 34px 30px;
}

.lcl-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
}

.lcl-card {
  background: transparent;
  cursor: pointer;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.lcl-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: #222;
  border: 2px solid #ff8c42;
  border-radius: 10px;
  box-shadow: 0 0 14px rgba(255,87,34,0.4);
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.lcl-card:hover .lcl-card-img,
.lcl-card:focus .lcl-card-img {
  border-color: #ff5722;
  box-shadow: 0 0 26px rgba(255,87,34,0.7);
  transform: translateY(-3px);
}

.lcl-card-title {
  font-size: 1rem;
  color: var(--gold-light);
  letter-spacing: 0.5px;
  margin: 0;
  line-height: 1.35;
}

.lcl-card-enter-btn {
  width: 100%;
  background: #0d0d10;
  border: 2px solid #5865f2;
  border-radius: 6px;
  color: #ff8c42;
  font-family: 'Raleway', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 13px 16px;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(88,101,242,0.4), 0 0 16px rgba(255,87,34,0.55), inset 0 0 10px rgba(255,87,34,0.08);
  transition: all 0.3s ease;
}

.lcl-card-enter-btn:hover {
  border-color: #ff5722;
  color: #ffb37a;
  box-shadow: 0 0 0 1px rgba(255,87,34,0.6), 0 0 28px rgba(255,87,34,0.8), inset 0 0 14px rgba(255,87,34,0.15);
}

/* ===== PORTAL VIEWER (WRAPPER) ===== */
.lcl-viewer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.lcl-viewer.open { transform: translateY(0); }

.lcl-viewer-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: #070707;
  border-bottom: 2px solid rgba(166,135,47,0.4);
  flex-shrink: 0;
}

.lcl-return {
  background: rgba(255,255,255,0.06);
  border: 2px solid var(--gold);
  border-radius: 8px;
  color: #fff;
  padding: 8px 16px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.lcl-return:hover {
  background: rgba(255,87,34,0.15);
  border-color: var(--gold-hover);
}

.lcl-return-icon { font-size: 1rem; }

.lcl-viewer-title {
  flex: 1;
  text-align: center;
  font-family: 'Cinzel', serif;
  color: var(--gold-light);
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lcl-viewer-open {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.2rem;
  padding: 6px 10px;
}

.lcl-viewer-open:hover { color: var(--gold-light); }

.lcl-viewer-frame-wrap {
  flex: 1;
  position: relative;
  background: #000;
}

.lcl-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.lcl-loading {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg-dark);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.lcl-loading.show { display: flex; }

.lcl-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(166,135,47,0.3);
  border-top-color: var(--gold-light);
  border-radius: 50%;
  animation: lcl-spin 0.9s linear infinite;
}

@keyframes lcl-spin { to { transform: rotate(360deg); } }

/* ===== HERO VIDEO ===== */
.lcl-hero {
  max-width: 900px;
  margin: 34px auto 0;
  padding: 0 24px;
  text-align: center;
}

.lcl-hero-title {
  font-size: 1.4rem;
  letter-spacing: 1px;
  margin-bottom: 20px;
  background: linear-gradient(90deg, var(--gold-light), #ff8c42, var(--gold-light));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold-light);
  animation: lcl-gold-shimmer 6s linear infinite;
}

@keyframes lcl-gold-shimmer {
  0% { background-position: 0% center; }
  100% { background-position: -200% center; }
}

.lcl-hero-video-wrap {
  border-radius: 50%;
  overflow: hidden;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: 0 0 40px rgba(212,175,55,0.35);
}

.lcl-hero-video {
  width: 100%;
  display: block;
}

/* ===== COMPASS PROMO ===== */
.lcl-compass-promo {
  max-width: 820px;
  margin: 50px auto;
  padding: 0 24px;
  text-align: center;
}

.lcl-compass-box {
  background: linear-gradient(180deg, rgba(255,87,34,0.08), rgba(13,13,16,0.4));
  border: 2px solid #ff8c42;
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(255,87,34,0.25), inset 0 0 30px rgba(255,87,34,0.05);
  padding: 34px 28px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.lcl-compass-eyebrow {
  font-family: 'Raleway', sans-serif;
  font-size: 0.95rem;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 6px;
}

.lcl-compass-welcome { margin: 0; color: var(--text-muted); }

.lcl-compass-name {
  color: var(--gold-light);
  font-size: 1.3rem;
  margin: 6px 0 18px;
  line-height: 1.4;
}

.lcl-compass-points {
  list-style: none;
  padding: 0;
  margin: 14px 0;
  text-align: left;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.lcl-compass-points li { margin: 6px 0; }

.lcl-compass-signup-note { color: var(--gold-light); font-weight: 600; }

.lcl-divider {
  border: none;
  border-top: 1px solid rgba(255,140,66,0.3);
  margin: 40px auto;
  max-width: 400px;
}

.lcl-library-lead { text-align: center; }

.lcl-compass-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.lcl-compass-logo-link { display: inline-block; }

.lcl-compass-logo-link img {
  width: 92px;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 15px rgba(255,140,0,0.5));
  cursor: pointer;
  transform: rotate(var(--rotation, 0deg));
  transition: transform 0.4s ease-out, filter 0.3s ease;
  animation: lcl-compass-pulse 3s ease-in-out infinite;
}

.lcl-compass-logo-link img:hover {
  filter: drop-shadow(0 0 32px rgba(255,140,0,0.85));
}

@keyframes lcl-compass-pulse {
  0%, 100% { filter: drop-shadow(0 0 15px rgba(255,140,0,0.5)); }
  50% { filter: drop-shadow(0 0 25px rgba(255,140,0,0.8)); }
}

.lcl-compass-signup-btn {
  display: inline-block;
  padding: 10px 26px;
  border-radius: 8px;
  border: 2px solid var(--gold-hover);
  color: var(--gold-hover);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
}

.lcl-compass-signup-btn:hover {
  background: rgba(255,87,34,0.15);
  box-shadow: 0 0 16px rgba(255,87,34,0.6);
}

.lcl-compass-explore-title {
  color: var(--gold-light);
  margin-top: 36px;
  font-size: 1.2rem;
}

.lcl-compass-explore-sub {
  color: var(--gold-hover);
  font-weight: 600;
  margin-top: 4px;
}

/* ===== PORTAL INFO MODAL ===== */
.lcl-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lcl-modal-overlay.open { opacity: 1; pointer-events: auto; }

.lcl-modal {
  position: relative;
  background: var(--bg-panel);
  border: 2px solid #ff8c42;
  border-radius: var(--radius);
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  box-shadow: 0 0 30px rgba(255,87,34,0.35), 0 20px 60px rgba(0,0,0,0.6);
}

.lcl-modal-img {
  height: 160px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  border: 2px solid #ff8c42;
  box-shadow: 0 0 14px rgba(255,87,34,0.4);
  margin-bottom: 16px;
}

.lcl-modal-title {
  color: var(--gold-light);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.lcl-modal-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0 0 20px;
}

.lcl-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.lcl-modal-cancel, .lcl-modal-enter {
  border-radius: 6px;
  padding: 11px 20px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  font-family: 'Raleway', sans-serif;
  transition: all 0.3s ease;
}

.lcl-modal-cancel {
  background: #0d0d10;
  border: 2px solid #ff5722;
  color: #ff8c42;
  box-shadow: 0 0 14px rgba(255,87,34,0.55);
}

.lcl-modal-cancel:hover {
  border-color: #ffb37a;
  color: #ffd4ab;
  box-shadow: 0 0 24px rgba(255,87,34,0.85);
}

.lcl-modal-enter {
  background: #0d0d10;
  border: 2px solid #5865f2;
  color: #ff8c42;
  box-shadow: 0 0 0 1px rgba(88,101,242,0.4), 0 0 16px rgba(255,87,34,0.55);
}

.lcl-modal-enter:hover {
  border-color: #ff5722;
  color: #ffb37a;
  box-shadow: 0 0 0 1px rgba(255,87,34,0.6), 0 0 28px rgba(255,87,34,0.8);
}

/* ===== TECHNICAL SUPPORT ===== */
.lcl-support-wrap {
  max-width: 900px;
  margin: 50px auto 10px;
  padding: 0 24px;
  text-align: center;
}

.lcl-alert {
  position: relative;
  background-color: #f4ecd8;
  color: #7a6a3a;
  border-radius: 4px;
  padding: 20px 22px;
  text-align: left;
  margin-bottom: 34px;
  font-size: 0.85rem;
  line-height: 1.6;
}

.lcl-alert-title {
  display: block;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1rem;
  color: #7a6a3a;
  margin-bottom: 6px;
}

.lcl-alert-dismiss {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: #7a6a3a;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

.lcl-alert.lcl-alert-hidden { display: none; }

.lcl-support-btn-wrap { margin-bottom: 40px; }

/* Exact match to the site's .tech-support-btn */
.tech-support-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #0d0d0d, #1a1a1a);
  border: 2px solid transparent;
  background-image:
    linear-gradient(135deg, #0d0d0d, #1a1a1a),
    linear-gradient(90deg, #00f0ff, #9d00ff, #ff4500, #d4af37);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  padding: 14px 28px;
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  text-decoration: none;
}

.tech-support-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.4), 0 0 25px rgba(255, 69, 0, 0.4);
  background-image:
    linear-gradient(135deg, #1a1a1a, #222),
    linear-gradient(90deg, #00f0ff, #9d00ff, #ff4500, #d4af37);
}

.tech-support-icon {
  font-size: 1.3rem;
  filter: drop-shadow(0 0 8px rgba(255, 165, 0, 0.6));
}

.tech-support-text {
  text-transform: uppercase;
  background: linear-gradient(90deg, #00f0ff, #d4af37);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lcl-mission-text {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  max-width: 720px;
  margin: 14px auto;
}

.lcl-mission-text strong { color: var(--text-light); }

.lcl-donate-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 10px 26px;
  border-radius: 8px;
  border: 2px solid var(--gold-hover);
  color: var(--gold-hover);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
}

.lcl-donate-btn:hover {
  background: rgba(255,87,34,0.15);
  box-shadow: 0 0 16px rgba(255,87,34,0.6);
}

/* ===== RETURN TO WEBSITE ===== */
.lcl-return-home-wrap {
  max-width: 420px;
  margin: 10px auto 40px;
  padding: 0 24px;
}

.lcl-return-home-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid rgba(166,135,47,0.35);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.lcl-return-home-card:hover {
  border-color: var(--gold-light);
  box-shadow: 0 0 16px rgba(212,175,55,0.3);
  transform: translateY(-2px);
}

.lcl-return-home-card img { height: 42px; width: auto; flex-shrink: 0; }

.lcl-return-home-text { display: flex; flex-direction: column; gap: 2px; }

.lcl-return-home-text strong { color: var(--gold-light); font-size: 0.95rem; }

.lcl-return-home-text small { color: var(--text-muted); font-size: 0.78rem; }

/* ===== FOOTER ===== */
.lcl-footer {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.75rem;
  border-top: 1px solid rgba(166,135,47,0.2);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .lcl-header { padding: 16px 18px; }
  .lcl-title { font-size: 1.25rem; }
  .lcl-compass-cta { font-size: 0.75rem; padding: 8px 14px; }
  .lcl-grid { grid-template-columns: 1fr; gap: 26px; }

  .lcl-hero { margin-top: 20px; padding: 0 16px; }
  .lcl-hero-title { font-size: 1.1rem; }
  .lcl-hero-video-wrap { border-radius: 16px; max-width: 100%; }

  .lcl-intro { padding: 0 16px; font-size: 0.88rem; }

  .lcl-compass-promo { padding: 0 16px; }
  .lcl-compass-box { padding: 22px 16px; font-size: 0.86rem; }
  .lcl-compass-name { font-size: 1.05rem; }
  .lcl-compass-cta-row { flex-direction: column; gap: 14px; }
  .lcl-compass-logo-link img { width: 76px; }
  .lcl-compass-signup-btn { width: 100%; text-align: center; }

  .lcl-controls { padding: 0 16px; }
  .lcl-filters { gap: 6px; }
  .lcl-filter-btn { padding: 5px 12px; font-size: 0.75rem; }

  .lcl-modal { padding: 18px; max-height: 90vh; }
  .lcl-modal-img { height: 120px; }
  .lcl-modal-title { font-size: 1.05rem; }
  .lcl-modal-actions { flex-direction: column-reverse; }
  .lcl-modal-cancel, .lcl-modal-enter { width: 100%; text-align: center; }

  .lcl-viewer-header { padding: 10px 12px; gap: 8px; }
  .lcl-return { padding: 7px 12px; font-size: 0.78rem; }
  .lcl-viewer-title { font-size: 0.85rem; }

  .lcl-support-wrap { padding: 0 16px; }
  .lcl-alert { padding: 16px; font-size: 0.8rem; }
  .tech-support-btn { padding: 12px 20px; font-size: 0.9rem; }
  .lcl-mission-text { font-size: 0.85rem; }

  .lcl-return-home-wrap { padding: 0 16px; }
  .lcl-return-home-card { padding: 12px 14px; gap: 12px; }
  .lcl-return-home-card img { height: 34px; }
}

@media (max-width: 400px) {
  .lcl-grid { grid-template-columns: 1fr; }
  .lcl-header { flex-direction: column; text-align: center; }
  .lcl-compass-cta { width: 100%; text-align: center; }
}