@import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&family=Oswald:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --accent: #e63946;
  --accent-glow: rgba(230, 57, 70, 0.3);
  --gold: #d4a843;
  --gold-glow: rgba(212, 168, 67, 0.3);
  --text: #e8e8e8;
  --text-muted: #888;
  --border: #222;
  --border-light: #333;
}

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

::selection { background: var(--accent); color: white; }

body {
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ─── NAV ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: linear-gradient(180deg, rgba(10,10,10,0.98), rgba(10,10,10,0.92));
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
}
.nav-logo-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), #c1121f);
  box-shadow: 0 0 20px var(--accent-glow);
  font-size: 18px;
}
.nav-logo-text h1 {
  font-family: 'Permanent Marker', cursive; font-size: 18px; color: var(--text); letter-spacing: 1px;
}
.nav-logo-text span {
  font-size: 9px; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; display: block; margin-top: -2px;
}
.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--border-light);
  color: var(--text-muted); width: 40px; height: 40px; border-radius: 8px;
  cursor: pointer; font-size: 20px; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0;
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent); }
.nav-links { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nav-link {
  background: transparent; border: 1px solid transparent;
  color: var(--text-muted); padding: 6px 14px; border-radius: 6px;
  cursor: pointer; font-size: 13px; text-transform: capitalize;
  font-family: 'Space Mono', monospace; transition: all 0.2s;
}
.nav-link:hover { color: var(--accent); border-color: var(--accent); }
.nav-link.active { background: rgba(230,57,70,0.15); border-color: var(--accent); color: var(--accent); }
.nav-link.admin-link { border-color: var(--border-light); }
.nav-link.admin-link:hover { border-color: var(--gold); color: var(--gold); }
.nav-link.admin-link.active { background: var(--gold); border-color: var(--gold); color: var(--bg); font-weight: 700; }

/* ─── HERO ─── */
.hero {
  min-height: 90vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 120px 24px 80px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0; opacity: 0.06;
  background: radial-gradient(circle at 20% 50%, var(--accent) 0%, transparent 50%),
              radial-gradient(circle at 80% 50%, var(--gold) 0%, transparent 50%);
}
.hero::after {
  content: ''; position: absolute; inset: 0; opacity: 0.03;
  background: repeating-linear-gradient(0deg, transparent, transparent 50px, rgba(255,255,255,0.03) 50px, rgba(255,255,255,0.03) 51px);
}
.hero-content { position: relative; z-index: 1; }
.hero-pre {
  font-family: 'Space Mono', monospace; font-size: 12px; color: var(--accent);
  letter-spacing: 4px; text-transform: uppercase; margin-bottom: 16px;
  animation: fadeIn 0.8s ease;
}
.hero h1 {
  font-family: 'Permanent Marker', cursive; font-size: clamp(40px, 8vw, 80px);
  color: var(--text); line-height: 1.1; letter-spacing: 2px;
  text-shadow: 0 0 60px var(--accent-glow); margin-bottom: 8px;
}
.hero h1 .accent { color: var(--accent); }
.hero-tagline {
  font-family: 'Space Mono', monospace; font-size: 11px; color: var(--gold);
  letter-spacing: 6px; text-transform: uppercase; margin-bottom: 32px;
}
.hero-desc {
  color: var(--text-muted); font-size: 16px; max-width: 500px;
  margin: 0 auto 40px; line-height: 1.7;
}
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ─── BUTTONS ─── */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #c1121f); border: none;
  color: #fff; padding: 14px 32px; border-radius: 8px; font-size: 14px; cursor: pointer;
  font-family: 'Oswald', sans-serif; letter-spacing: 1px; text-transform: uppercase;
  box-shadow: 0 4px 24px var(--accent-glow); transition: transform 0.2s; display: inline-block;
}
.btn-primary:hover { transform: scale(1.05); }
.btn-outline {
  background: transparent; border: 1px solid var(--border-light);
  color: var(--text); padding: 14px 32px; border-radius: 8px; font-size: 14px; cursor: pointer;
  font-family: 'Oswald', sans-serif; letter-spacing: 1px; text-transform: uppercase;
  transition: all 0.2s; display: inline-block;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm {
  padding: 8px 20px; border-radius: 6px; font-size: 13px;
  font-family: 'Space Mono', monospace; cursor: pointer;
}
.btn-gold { background: var(--gold); border: none; color: var(--bg); font-weight: 700; }

/* ─── SECTIONS ─── */
.section {
  max-width: 1200px; margin: 0 auto; padding: 0 24px 80px;
}
.section.narrow { max-width: 800px; }
.section-title {
  font-family: 'Permanent Marker', cursive; font-size: 32px; color: var(--text);
  position: relative; display: inline-block; margin-bottom: 8px;
}
.section-title::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 60%; height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent); border-radius: 2px;
}
.section-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 32px; }

/* ─── PAGE HEADER (for inner pages) ─── */
.page-header { padding: 100px 24px 0; max-width: 1200px; margin: 0 auto; }
.page-header.narrow { max-width: 800px; }

/* ─── BADGE ─── */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px;
  font-family: 'Space Mono', monospace; text-transform: uppercase; letter-spacing: 1px;
}
.badge-accent { background: rgba(230,57,70,0.13); color: var(--accent); border: 1px solid rgba(230,57,70,0.27); }
.badge-gold { background: rgba(212,168,67,0.13); color: var(--gold); border: 1px solid rgba(212,168,67,0.27); }

/* ─── CARDS GRID ─── */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;
}
.card-list { display: flex; flex-direction: column; gap: 20px; }
.resource-list { display: flex; flex-direction: column; gap: 12px; }

/* ─── VIDEO CARD ─── */
.video-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; transition: all 0.3s; cursor: pointer;
}
.video-card:hover {
  border-color: var(--accent); transform: translateY(-4px);
  box-shadow: 0 8px 32px var(--accent-glow);
}
.video-thumb {
  height: 180px; background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.video-play {
  width: 56px; height: 56px; border-radius: 50%; background: rgba(230,57,70,0.9);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 30px var(--accent-glow);
}
.video-play svg { width: 20px; height: 20px; fill: white; }
.video-type-badge { position: absolute; top: 12px; right: 12px; }
.video-info { padding: 16px; }
.video-info .badges { display: flex; gap: 6px; margin-bottom: 8px; }
.video-info h3 {
  color: var(--text); font-size: 16px; font-family: 'Oswald', sans-serif;
  font-weight: 500; margin-bottom: 6px;
}
.video-info .date { color: var(--text-muted); font-size: 12px; font-family: 'Space Mono', monospace; }

/* ─── POST CARD ─── */
.post-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; transition: all 0.3s; cursor: pointer;
}
.post-card:hover {
  border-color: var(--accent); box-shadow: 0 4px 20px var(--accent-glow);
}
.post-meta {
  display: flex; justify-content: space-between; margin-bottom: 12px;
  font-size: 12px; font-family: 'Space Mono', monospace;
}
.post-meta .date { color: var(--text-muted); }
.post-meta .read-time { color: var(--accent); }
.post-card h3 {
  color: var(--text); font-size: 20px; font-family: 'Oswald', sans-serif;
  font-weight: 500; margin-bottom: 8px;
}
.post-card p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* ─── RESOURCE CARD ─── */
.resource-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px; transition: all 0.3s; display: flex; align-items: center; gap: 16px;
}
.resource-card:hover { border-color: var(--gold); background: var(--bg-card-hover); }
.resource-icon {
  width: 48px; height: 48px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(212,168,67,0.2), rgba(212,168,67,0.07));
  border: 1px solid rgba(212,168,67,0.27);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.resource-card .info { flex: 1; }
.resource-card .info h3 {
  color: var(--text); font-size: 16px; font-family: 'Oswald', sans-serif;
  font-weight: 500; margin: 6px 0 4px;
}
.resource-card .info p { color: var(--text-muted); font-size: 13px; }
.resource-arrow { color: var(--gold); font-size: 20px; }

/* ─── FILTER PILLS ─── */
.filters { display: flex; gap: 8px; margin-bottom: 32px; flex-wrap: wrap; }
.filter-pill {
  background: transparent; border: 1px solid var(--border-light);
  color: var(--text-muted); padding: 6px 16px; border-radius: 20px;
  cursor: pointer; font-size: 12px; font-family: 'Space Mono', monospace;
  transition: all 0.2s;
}
.filter-pill:hover { border-color: var(--accent); color: var(--accent); }
.filter-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-pill.active-gold { background: var(--gold); border-color: var(--gold); color: var(--bg); font-weight: 700; }

/* ─── VIEW ALL ─── */
.view-all {
  text-align: center; margin-top: 32px;
}
.view-all a {
  background: transparent; border: 1px solid var(--border-light);
  color: var(--text-muted); padding: 10px 24px; border-radius: 6px;
  font-family: 'Space Mono', monospace; font-size: 13px; display: inline-block;
  transition: all 0.2s;
}
.view-all a:hover { border-color: var(--accent); color: var(--accent); }

/* ─── ADMIN ─── */
.admin-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 32px;
}
.admin-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(212,168,67,0.27), rgba(212,168,67,0.07));
  border: 1px solid rgba(212,168,67,0.27); font-size: 18px;
}
.admin-header h2 {
  font-family: 'Permanent Marker', cursive; font-size: 28px; color: var(--text);
}
.admin-header .url {
  color: var(--gold); font-size: 12px; font-family: 'Space Mono', monospace;
}
.admin-tabs { display: flex; gap: 8px; margin-bottom: 32px; flex-wrap: wrap; }
.admin-tab {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); padding: 8px 20px; border-radius: 6px;
  cursor: pointer; font-size: 13px; font-family: 'Space Mono', monospace;
  text-transform: capitalize; transition: all 0.2s;
}
.admin-tab.active { background: var(--gold); border-color: var(--gold); color: var(--bg); font-weight: 700; }
.admin-panel {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden;
}
.admin-panel-padded { padding: 24px; }
.admin-row {
  padding: 16px 20px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.admin-row:last-child { border-bottom: none; }
.admin-row .left { display: flex; align-items: center; gap: 12px; }
.admin-row .actions { display: flex; gap: 8px; }
.admin-btn-edit {
  background: transparent; border: 1px solid var(--border-light);
  color: var(--text-muted); padding: 4px 12px; border-radius: 4px;
  cursor: pointer; font-size: 12px;
}
.admin-btn-delete {
  background: transparent; border: 1px solid rgba(230,57,70,0.27);
  color: var(--accent); padding: 4px 12px; border-radius: 4px;
  cursor: pointer; font-size: 12px;
}
.form-group { margin-bottom: 16px; }
.form-group label {
  color: var(--text-muted); font-size: 11px; font-family: 'Space Mono', monospace;
  text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 6px;
}
.form-input {
  width: 100%; padding: 10px 12px; background: var(--bg);
  border: 1px solid var(--border-light); border-radius: 6px;
  color: var(--text); font-size: 14px; outline: none; transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-muted); opacity: 0.5; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 12px; margin-top: 16px; }
.admin-section-title {
  color: var(--gold); font-family: 'Oswald', sans-serif; font-size: 18px; margin-bottom: 20px;
}
.admin-top-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.admin-top-bar h3 { color: var(--text); font-family: 'Oswald', sans-serif; }

/* ─── FOOTER ─── */
.footer {
  border-top: 1px solid var(--border); padding: 40px 24px; text-align: center;
  background: linear-gradient(180deg, transparent, rgba(230,57,70,0.02));
}
.footer-logo {
  font-family: 'Permanent Marker', cursive; font-size: 20px; color: var(--text); margin-bottom: 8px;
}
.footer-logo .accent { color: var(--accent); }
.footer-copy {
  color: var(--text-muted); font-size: 12px; font-family: 'Space Mono', monospace; margin-bottom: 16px;
}
.footer-links { display: flex; gap: 16px; justify-content: center; }
.footer-links a {
  color: var(--text-muted); font-size: 13px; transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-links .sep { color: var(--border); }

/* ─── UTILITY ─── */
.hidden { display: none !important; }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-close {
  position: absolute; top: 20px; right: 20px;
  background: transparent; border: 1px solid #333; color: #888;
  padding: 8px 16px; border-radius: 6px; cursor: pointer;
  font-family: 'Space Mono', monospace; font-size: 13px; z-index: 10;
}
.modal-close:hover { border-color: var(--accent); color: var(--accent); }
.modal-title {
  color: var(--text); font-family: 'Oswald', sans-serif; font-size: 20px; margin-bottom: 16px;
}
.modal-video {
  width: 100%; max-width: 800px; aspect-ratio: 16/9; border: none; border-radius: 12px;
}

/* ─── DETAIL VIDEO ─── */
.detail-video {
  width: 100%; aspect-ratio: 16/9; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
}
.detail-video-placeholder {
  display: flex; align-items: center; justify-content: center;
}
.detail-video-placeholder p {
  color: var(--text-muted); font-family: 'Space Mono', monospace; font-size: 14px;
}

/* ─── PREMIUM BADGE ─── */
.premium-badge { position: absolute; bottom: 10px; left: 10px; }

/* ─── BLOG BODY ─── */
.blog-body {
  color: var(--text); font-size: 16px; line-height: 1.8;
}
.blog-body h1, .blog-body h2, .blog-body h3 {
  font-family: 'Oswald', sans-serif; color: var(--text); margin: 32px 0 12px;
}
.blog-body h2 { font-size: 22px; }
.blog-body h3 { font-size: 18px; }
.blog-body p { margin-bottom: 16px; }
.blog-body ul, .blog-body ol { margin: 0 0 16px 24px; }
.blog-body li { margin-bottom: 8px; }
.blog-body strong { color: var(--text); }
.blog-body code {
  background: var(--bg-card); padding: 2px 6px; border-radius: 4px;
  font-family: 'Space Mono', monospace; font-size: 14px; color: var(--accent);
}
.blog-body pre {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  padding: 16px; overflow-x: auto; margin-bottom: 16px;
}
.blog-body pre code { background: none; padding: 0; }
.blog-body blockquote {
  border-left: 3px solid var(--accent); padding-left: 16px; margin: 16px 0;
  color: var(--text-muted); font-style: italic;
}

/* ─── AUTH MESSAGES ─── */
.auth-message {
  background: rgba(230,57,70,0.15); border: 1px solid rgba(230,57,70,0.3);
  color: var(--accent); padding: 10px 14px; border-radius: 6px; margin-bottom: 16px;
  font-size: 13px; font-family: 'Space Mono', monospace;
}
.auth-message.auth-success {
  background: rgba(46,204,113,0.15); border-color: rgba(46,204,113,0.3); color: #2ecc71;
}

/* ─── TOAST ─── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 10000;
  padding: 12px 20px; border-radius: 8px;
  font-family: 'Space Mono', monospace; font-size: 13px;
  opacity: 0; transform: translateY(10px); transition: all 0.3s;
  max-width: 400px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-info { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.toast-success { background: rgba(46,204,113,0.15); color: #2ecc71; border: 1px solid rgba(46,204,113,0.3); }
.toast-error { background: rgba(230,57,70,0.15); color: var(--accent); border: 1px solid rgba(230,57,70,0.3); }

/* ─── COOKIE BANNER ─── */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9000;
  background: var(--bg-card); border-top: 1px solid var(--border);
  padding: 16px 24px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  transition: transform 0.4s ease, opacity 0.4s ease;
}
.cookie-banner p {
  color: var(--text-muted); font-size: 13px; flex: 1; min-width: 200px;
}
.cookie-banner .cookie-btns { display: flex; gap: 8px; }
.cookie-hidden { transform: translateY(100%); opacity: 0; }

/* ─── ANIMATIONS ─── */
.fade-in { opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ─── LOADING SPINNER ─── */
.loading-spinner {
  display: flex; align-items: center; justify-content: center; padding: 48px 0;
  color: var(--text-muted); font-size: 13px; font-family: 'Space Mono', monospace;
  gap: 10px;
}
.loading-spinner::before {
  content: ''; width: 20px; height: 20px; border: 2px solid var(--border-light);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state {
  text-align: center; padding: 48px 0; color: var(--text-muted);
  font-size: 14px; font-family: 'Space Mono', monospace;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .nav-inner { height: 64px; padding: 0 16px; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(10,10,10,0.98); backdrop-filter: blur(20px);
    flex-direction: column; padding: 12px 16px; gap: 4px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.nav-open { display: flex; }
  .nav-link { width: 100%; text-align: center; padding: 10px 14px; }
  .hero { padding: 100px 16px 60px; min-height: 80vh; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .section { padding: 0 16px 60px; }
  .card-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-row { flex-direction: column; gap: 8px; align-items: flex-start; }
}
