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

/* =============================================
   CSS VARIABLES
   ============================================= */
:root {
  --bg-primary: #1a1a1a;
  --bg-secondary: #202020;
  --bg-card: #252525;
  --bg-card-hover: #2e2e2e;
  --accent: #FF7700;
  --accent-dark: #cc5f00;
  --accent-light: #ff9a40;
  --accent-glow: rgba(255, 119, 0, 0.12);
  --text-primary: #f0f0f0;
  --text-secondary: #a8a8a8;
  --text-muted: #5a5a5a;
  --border: #303030;
  --border-light: #3a3a3a;
  --navbar-height: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3);
  --transition: 0.22s ease;
  --transition-slow: 0.38s ease;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-light);
}

img {
  max-width: 100%;
  height: auto;
}

/* =============================================
   CUSTOM SCROLLBAR
   ============================================= */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--navbar-height);
  background:
    radial-gradient(ellipse 55% 200% at 50% 50%, rgba(255, 119, 0, 0.17) 0%, transparent 70%),
    linear-gradient(180deg, #1d1d1d 0%, #1a1a1a 100%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
}

.navbar-inner {
  width: 100%;
  max-width: 1400px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  position: relative;
}

.nav-logo a {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: opacity var(--transition);
}

.nav-logo a:hover {
  opacity: 0.8;
}

.nav-logo img {
  height: 38px;
  width: auto;
  border-radius: var(--radius-sm);
}

.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: 0.025em;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-links a.active {
  color: var(--accent);
  background: var(--accent-glow);
}

/* Hamburger button (hidden on desktop) */
.hamburger {
  display: none;
  margin-left: auto;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  border: none;
  background: transparent;
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.06);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--transition);
  transform-origin: center;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--accent);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--accent);
}

/* Mobile dropdown nav */
.mobile-nav {
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  right: 0;
  background: #1c1c1c;
  border-bottom: 1px solid var(--border);
  padding: 10px 12px 14px;
  z-index: 99;
  flex-direction: column;
  gap: 3px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: none;
}

.mobile-nav.open {
  display: flex;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mobile-nav a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: block;
}

.mobile-nav a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.mobile-nav a.active {
  color: var(--accent);
  background: var(--accent-glow);
}

/* =============================================
   MAIN CONTENT WRAPPER
   ============================================= */
main {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  background:
    radial-gradient(ellipse 55% 100% at 50% 100%, rgba(255, 119, 0, 0.17) 0%, transparent 100%),
    linear-gradient(180deg, #181818 0%, #141414 100%);
  border-top: 1px solid var(--border);
  padding: 44px 24px 24px;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-brand img {
  height: 32px;
  width: auto;
  border-radius: 6px;
}

.footer-brand p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 270px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.footer-nav-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.footer-nav a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-social {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.footer-social-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.social-buttons {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: end;
  gap: 10px;
}

/* Email is the 4th item — pin it to column 2; Discord (5th/last) stays at column 3 */
.social-buttons a:nth-child(4) {
  grid-column: 2;
}
.social-buttons a:last-child {
  grid-column: 3;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  font-weight: 500;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  background: transparent;
  transition: all var(--transition);
}

.social-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: currentColor;
}

.social-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.footer-bottom {
  max-width: 1400px;
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* =============================================
   PAGE HEADER (gallery & downloads)
   ============================================= */
.page-header {
  margin-bottom: 28px;
}

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.page-eyebrow::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.page-header h1 {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.page-header p {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 0.93rem;
}

/* =============================================
   HOME PAGE
   ============================================= */
.streams-section {
  margin-bottom: 24px;
}

.streams-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}

.stream-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

/* Remove the shared inner corners only when the cards sit side-by-side */
@media (min-width: 961px) {
  .streams-grid .stream-card:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }
  .streams-grid .stream-card:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
}

.stream-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: filter var(--transition), opacity var(--transition);
}

.platform-badge:hover {
  filter: brightness(1.25);
  opacity: 0.9;
}

.platform-badge svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.badge-twitch {
  background: rgba(145, 70, 255, 0.12);
  color: #9146ff;
  border: 1px solid rgba(145, 70, 255, 0.25);
}

.badge-youtube {
  background: rgba(255, 50, 50, 0.1);
  color: #ff4545;
  border: 1px solid rgba(255, 50, 50, 0.22);
}

.stream-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.live-indicator {
  margin-left: auto;
  display: none; /* shown dynamically via JS when stream is confirmed live */
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff4545;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff4545;
  animation: livePulse 1.6s ease infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.75); }
}

.embed-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #0a0a0a;
  flex: 1;
}

.embed-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* About section */
.about-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.about-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}


.about-inner {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.about-avatar {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border-light);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.about-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.about-text h2 span {
  color: var(--accent);
}

.about-text p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 720px;
}

.about-text p + p {
  margin-top: 12px;
}

/* =============================================
   GALLERY PAGE
   ============================================= */
.gallery-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px 18px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}

.gallery-controls-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sort-select {
  appearance: none;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 7px 32px 7px 13px;
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23606060' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  transition: border-color var(--transition);
}

.sort-select:hover,
.sort-select:focus {
  border-color: var(--accent);
}

.sort-select option {
  background: #252525;
}

.gallery-count {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Gallery item */
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.gallery-item:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--accent-glow);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.gallery-item:hover img {
  transform: scale(1.06);
}

/* Hover info overlay — slides up from bottom, max ~40% height */
.gallery-info {
  position: absolute;
  bottom: -110%;
  left: 0;
  right: 0;
  max-height: 40%;
  background: linear-gradient(0deg, rgba(0,0,0,0.93) 0%, rgba(0,0,0,0.72) 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 12px 14px;
  transition: bottom 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
}

.gallery-item:hover .gallery-info {
  bottom: 0;
}

.gallery-info-creator {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.gallery-info-creator a {
  color: var(--accent-light);
}

.gallery-info-creator a:hover {
  text-decoration: underline;
}

.gallery-info-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-overlay.open {
  display: flex;
  animation: fadeIn 0.18s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: min(90vw, 900px);
  max-height: 90vh;
}

.lightbox-img-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  max-height: 76vh;
}

.lightbox-img-wrap img {
  display: block;
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 2;
  line-height: 1;
}

.lightbox-close:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.lightbox-info {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 22px;
  text-align: center;
  width: 100%;
}

.lightbox-info .lb-creator {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

.lightbox-info .lb-creator a {
  color: var(--accent-light);
}

.lightbox-info .lb-date {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* =============================================
   DOWNLOADS PAGE
   ============================================= */
.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.downloads-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.download-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.download-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--accent-glow);
  color: inherit;
}

.download-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  background: #111;
  flex-shrink: 0;
}

.download-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.download-card:hover .download-preview img {
  transform: scale(1.05);
}

.dl-hover-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 119, 0, 0.12);
  opacity: 0;
  transition: opacity var(--transition);
}

.download-card:hover .dl-hover-icon {
  opacity: 1;
}

.dl-icon-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(255, 119, 0, 0.45);
}

.dl-icon-circle svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.download-card-body {
  padding: 16px 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.download-card-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.download-card-desc {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
}

.download-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.dl-type-badge {
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-glow);
  color: var(--accent-light);
  border: 1px solid rgba(255, 119, 0, 0.2);
}

.dl-size {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* =============================================
   MEDIA QUERIES
   ============================================= */
@media (max-width: 640px) {
  .nav-links        { display: none; }
  .hamburger        { display: flex; }

  main { padding: 20px 16px 40px; }

  .streams-grid {
    grid-template-columns: 1fr;
  }

  .about-section {
    padding: 28px 22px;
  }

  .about-inner {
    flex-direction: column;
    gap: 20px;
    align-items: center;
    text-align: center;
  }

  .about-text p {
    max-width: 100%;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }

  .gallery-controls {
    gap: 8px;
  }

  .gallery-count { display: none; }

  .downloads-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 28px;
  }

  .footer-nav { align-items: center; }
  .footer-social { align-items: center; }
  .social-buttons { justify-content: center; }

  .page-header h1 { font-size: 1.5rem; }
}

@media (min-width: 641px) and (max-width: 960px) {
  .streams-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .gallery-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .sort-select { width: 100%; }
}
