/* =========================================================
   Lilcrash15 — shared site styles
   ========================================================= */

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

:root {
  /* Color */
  --bg-base: #121216;
  --bg-raised: #1c1c22;
  --bg-raised-2: #26262e;
  --text-primary: #f2f1f6;
  --text-muted: #9a98a8;
  --accent-live: #8b5cf6;
  --accent-live-dim: #6d46d1;
  --accent-ember: #ff8a3d;
  --border-soft: #313138;

  /* Type */
  --font-display: 'Rajdhani', 'Segoe UI', sans-serif;
  --font-body: 'Work Sans', 'Segoe UI', sans-serif;

  /* Layout */
  --max-width: 1080px;
  --nav-height: 64px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #17171c 0%, #101013 60%, #0c0c0e 100%);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.5;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
  color: var(--text-muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent-live);
  color: #fff;
  padding: 0.6em 1em;
  z-index: 1000;
  border-radius: 0 0 6px 0;
}
.skip-link:focus {
  left: 0;
}

/* =========================================================
   Header / navigation
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(18, 18, 22, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}

.nav-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-live);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  width: 40px;
  height: 40px;
  padding: 0;
  cursor: pointer;
  color: var(--text-primary);
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.site-nav ul {
  display: flex;
  list-style: none;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text-primary);
}

.site-nav a[aria-current="page"] {
  color: var(--text-primary);
  border-bottom-color: var(--accent-live);
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border-soft);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
  }

  .site-nav.is-open {
    max-height: 400px;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.25rem 1rem;
  }

  .site-nav a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-soft);
  }

  .site-nav a[aria-current="page"] {
    border-bottom-color: var(--border-soft);
  }
}

/* =========================================================
   Account widget (Twitch / Discord sign-in)
   ========================================================= */

.account-widget {
  display: flex;
  align-items: center;
}

.account-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-mini {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn-mini-twitch:hover,
.btn-mini-twitch:focus-visible {
  border-color: #9146ff;
  background: rgba(145, 70, 255, 0.12);
}

.btn-mini-discord:hover,
.btn-mini-discord:focus-visible {
  border-color: #5865f2;
  background: rgba(88, 101, 242, 0.12);
}

.account-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.account-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  display: block;
}

.account-name {
  color: var(--text-primary);
  font-weight: 500;
}

.account-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.account-logout:hover {
  color: var(--text-primary);
}

@media (max-width: 720px) {
  .account-name {
    display: none;
  }
}

/* =========================================================
   Layout helpers
   ========================================================= */

.page {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.page-header {
  margin-bottom: 1.75rem;
}

.eyebrow-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
}

.status-dot.is-live {
  background: var(--accent-ember);
  box-shadow: 0 0 0 4px rgba(255, 138, 61, 0.18);
}

/* =========================================================
   Embeds — responsive video / widget frames
   ========================================================= */

.embed-frame {
  position: relative;
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  overflow: hidden;
}

.embed-frame.ratio-16-9 {
  aspect-ratio: 16 / 9;
}

.embed-frame.ratio-4-3 {
  aspect-ratio: 4 / 3;
}

.embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* =========================================================
   Buttons / CTAs
   ========================================================= */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent-live);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-live-dim);
}

.btn-ember {
  background: var(--accent-ember);
  color: #1a1005;
}

.btn-outline {
  background: transparent;
  border-color: var(--border-soft);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--accent-live);
}

/* =========================================================
   Clips grid
   ========================================================= */

.clip-intro {
  margin-bottom: 1.5rem;
}

.clip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.clip-card {
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  overflow: hidden;
}

/* =========================================================
   Minecraft page
   ========================================================= */

.mc-panel {
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.mc-server-address {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 6vw, 2.75rem);
  font-weight: 700;
  margin: 1rem 0 1.5rem;
  word-break: break-all;
}

.mc-server-address .seg-1 { color: #6bcf6b; }
.mc-server-address .seg-2 { color: #4fc3f7; }
.mc-server-address .seg-3 { color: #b98457; }

.copy-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.copy-input {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.6rem 0.8rem;
  border-radius: 4px;
  border: 1px solid var(--border-soft);
  background: var(--bg-base);
  color: var(--text-primary);
  min-width: 220px;
  text-align: center;
}

.hosted-by {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* =========================================================
   Discord / Twitter / Game / YouTube pages
   ========================================================= */

.widget-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

.widget-panel {
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 1.5rem;
  width: 100%;
  max-width: 420px;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 2.5rem 1.25rem 3rem;
  margin-top: 2rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-left: auto;
}

.footer-counter {
  margin-top: 0.75rem;
  opacity: 0.6;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-live);
  outline-offset: 2px;
}
