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

:root {
  --primary-bg: #0a0a0a;
  --secondary-bg: #1a1a1a;
  --accent-red: #8b0000;
  --accent-purple: #4a0e4e;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --border-color: #333333;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Rajdhani", sans-serif;
  background-color: var(--primary-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: 150px; /* space for fixed player */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  min-height: 60vh;
  padding: 80px 0 180px 0;
  position: relative;
}

h1,
h2,
h3 {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.section-title {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.section-divider {
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-purple));
  margin: 0 auto 40px;
}

/* Header */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  padding: 20px 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

#main-header.scrolled {
  padding: 12px 0;
  background: rgba(10, 10, 10, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  border-bottom-color: var(--accent-red);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 30px;
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.logo-wordmark {
  font-family: "Orbitron", sans-serif;
  font-size: 1.1rem;
  letter-spacing: 4px;
  text-transform: uppercase;
}

/* Legacy text-only logo (kept for fallback) */
.logo-text {
  font-family: "Orbitron", sans-serif;
  font-size: 1.4rem;
  letter-spacing: 4px;
}

header nav {
  padding-right: 30px;
}

header nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-link {
  font-family: "Orbitron", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-decoration: none;
  color: var(--text-primary);
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-purple));
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Hero */
#hero {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 20% 50%, rgba(139, 0, 0, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(74, 14, 78, 0.1) 0%, transparent 50%),
    var(--primary-bg);
  position: relative;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.03) 2px,
    rgba(255, 255, 255, 0.03) 4px
  );
  pointer-events: none;
}

.hero-content {
  text-align: center;
  z-index: 2;
}

/* Hero banner image */
.hero-banner {
  margin: 0 auto 20px;
  max-width: 480px;
}

.hero-banner-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.9));
}

.glitch {
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 900;
  margin: 20px 0;
  text-shadow:
    0 0 10px rgba(139, 0, 0, 0.8),
    0 0 20px rgba(139, 0, 0, 0.6),
    0 0 30px rgba(139, 0, 0, 0.4);
}

.tagline {
  font-size: clamp(1rem, 3vw, 1.4rem);
  font-weight: 300;
  letter-spacing: clamp(2px, 0.5vw, 4px);
  margin-bottom: 15px;
  color: var(--accent-red);
}

.subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 20px;
}

.cta-button {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-purple));
  border: 2px solid transparent;
  padding: 16px 40px;
  font-size: 1rem;
  font-weight: 700;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 3px;
  cursor: pointer;
  color: var(--text-primary);
  text-transform: uppercase;
  margin-top: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(139, 0, 0, 0.4);
}

.cta-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.4), rgba(74, 14, 78, 0.4));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 35px rgba(139, 0, 0, 0.6);
  border-color: var(--accent-red);
}

.cta-button:hover::before {
  opacity: 1;
}

.cta-button:active {
  transform: translateY(-1px);
}

/* Secondary CTA styling */
.cta-secondary {
  background: transparent;
  border: 2px solid var(--accent-purple);
  padding: 12px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 2px;
  cursor: pointer;
  color: var(--text-primary);
  text-transform: uppercase;
  margin-top: 30px;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
}

.cta-secondary:hover {
  background: rgba(74, 14, 78, 0.2);
  border-color: var(--accent-red);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(74, 14, 78, 0.4);
}

.section-cta-wrapper {
  text-align: center;
  margin-top: 40px;
}

/* Generic text sections */
.mission,
.body-text {
  max-width: 900px;
  margin: 0 auto 20px;
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* Contact */
.contact-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.contact-item {
  text-align: center;
}

.contact-label {
  font-family: "Orbitron", sans-serif;
  font-size: 0.85rem;
  color: var(--accent-red);
  letter-spacing: 2px;
}

.contact-value {
  font-size: 1.2rem;
  margin-top: 6px;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-value:hover {
  color: var(--accent-red);
}

/* Footer (optional later) */

/* Responsive Breakpoints */

/* Small mobile (360px+) */
@media (max-width: 480px) {
  body {
    padding-bottom: 120px;
  }

  .container {
    padding: 0 16px;
  }

  section {
    padding: 40px 0 80px 0;
    min-height: auto;
  }

  #hero {
    min-height: 80vh;
    padding: 60px 0;
  }

  .hero-banner {
    max-width: 90%;
  }

  .subtitle,
  .body-text {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .cta-button {
    padding: 14px 32px;
    font-size: 0.95rem;
    min-height: 48px; /* Better thumb target */
  }

  header nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .nav-link {
    font-size: 0.85rem;
    padding: 8px 12px;
  }
}

/* Tablet/large mobile (768px+) */
@media (max-width: 768px) {
  #main-header {
    flex-direction: column;
    gap: 10px;
    padding: 15px 0;
  }

  header nav ul {
    gap: 15px;
  }

  section {
    padding: 60px 0 120px 0;
  }

  .container {
    padding: 0 20px;
  }
}

/* ================================
   CIRCUIT BOARD - Message Board
   ================================ */

#circuit-board {
  background: radial-gradient(circle at 10% 0, rgba(139, 0, 0, 0.12) 0, transparent 40%),
              radial-gradient(circle at 90% 100%, rgba(74, 14, 78, 0.12) 0, transparent 40%),
              var(--primary-bg);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.circuit-intro {
  max-width: 900px;
  margin: 0 auto 24px;
  color: var(--text-secondary);
  font-size: 1rem;
  text-align: center;
}

/* Auth Bar Styles */
.circuit-auth-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin: 0 auto 20px;
  max-width: 900px;
  background: rgba(5, 5, 5, 0.95);
  border: 1px solid #262626;
  border-radius: 4px;
  box-shadow: 0 0 15px rgba(139, 0, 0, 0.2);
}

.circuit-auth-status {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-family: "Rajdhani", sans-serif;
}

.circuit-auth-status.authenticated {
  color: var(--accent-red);
  font-weight: 600;
}

.circuit-auth-buttons {
  display: flex;
  gap: 10px;
}

.circuit-auth-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid #444;
  background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.circuit-auth-btn:hover {
  border-color: var(--accent-red);
  background: linear-gradient(135deg, #2a0000, #0a0a0a);
  box-shadow: 0 0 10px rgba(139, 0, 0, 0.3);
}

.auth-btn-icon {
  font-size: 1rem;
}

.circuit-auth-btn-logout {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-family: "Rajdhani", sans-serif;
  border-radius: 4px;
  border: 1px solid #333;
  background: #0a0a0a;
  color: #888;
  cursor: pointer;
  transition: all 0.2s ease;
}

.circuit-auth-btn-logout:hover {
  border-color: #666;
  color: var(--text-primary);
}

.circuit-board-layout {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 24px;
  align-items: flex-start;
  margin-top: 20px;
}

.circuit-thread-list {
  background: rgba(10, 10, 10, 0.9);
  border: 1px solid #262626;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.circuit-thread-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-family: "Orbitron", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-bottom: 1px solid #262626;
  background: radial-gradient(circle at 0 0, rgba(139, 0, 0, 0.4), transparent 70%);
}

.circuit-thread-count {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #444;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.circuit-thread-list-body {
  max-height: 360px;
  overflow-y: auto;
}

.circuit-thread-item {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-bottom: 1px solid #1a1a1a;
  cursor: pointer;
  color: var(--text-primary);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.circuit-thread-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--accent-red);
}

.circuit-thread-item.active {
  background: rgba(139, 0, 0, 0.15);
  border-left: 3px solid #00ffff;
}

.circuit-thread-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.circuit-thread-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.circuit-thread-author {
  opacity: 0.8;
}

.circuit-thread-replies {
  opacity: 0.7;
}

/* Empty forum state */
.circuit-empty-prompt {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-secondary);
}

.circuit-empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
  animation: pulse-glow 3s ease-in-out infinite;
}

.circuit-empty-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-red);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.circuit-empty-text {
  font-size: 0.9rem;
  opacity: 0.7;
  font-style: italic;
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

/* Active thread panel */

.circuit-thread-view {
  background: rgba(10, 10, 10, 0.9);
  border: 1px solid #262626;
  padding: 14px 16px;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.7);
}

.circuit-thread-view-header {
  margin-bottom: 10px;
}

.circuit-thread-view h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.circuit-thread-submeta {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.circuit-posts {
  max-height: 280px;
  overflow-y: auto;
  margin-top: 12px;
  padding-right: 6px;
  border-top: 1px solid #262626;
  border-bottom: 1px solid #262626;
}

.circuit-post {
  padding: 10px 0;
  border-bottom: 1px solid #191919;
}

.circuit-post:last-child {
  border-bottom: none;
}

.circuit-post-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.circuit-post-author {
  font-family: "Orbitron", sans-serif;
  letter-spacing: 1px;
}

.circuit-post-time {
  color: var(--text-secondary);
  font-size: 0.7rem;
}

.circuit-post-tag {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid #444;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.circuit-post-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.circuit-post-aimee .circuit-post-header {
  color: #00ffff;
}

.circuit-post-aimee .circuit-post-body {
  color: #e0ffff;
}

/* Forms */

.circuit-form {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.circuit-form-row {
  display: flex;
  gap: 8px;
}

.circuit-form-row .circuit-input {
  flex: 1;
}

.circuit-input,
.circuit-textarea {
  width: 100%;
  background: #050505;
  border: 1px solid #333;
  color: var(--text-primary);
  padding: 8px 10px;
  font-family: "Rajdhani", sans-serif;
  font-size: 0.9rem;
}

.circuit-input::placeholder,
.circuit-textarea::placeholder {
  color: #555;
}

.circuit-textarea {
  min-height: 70px;
  resize: vertical;
}

.circuit-form.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.circuit-form.disabled .circuit-input,
.circuit-form.disabled .circuit-textarea {
  background: #0a0a0a;
  cursor: not-allowed;
}

.circuit-submit {
  align-self: flex-end;
  padding: 8px 18px;
  border: 1px solid var(--accent-red);
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.4), rgba(74, 14, 78, 0.4));
  color: var(--text-primary);
  font-family: "Orbitron", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.circuit-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(139, 0, 0, 0.6);
  border-color: #00ffff;
}

/* New thread panel */

.circuit-new-thread {
  margin-top: 30px;
  background: rgba(5, 5, 5, 0.95);
  border: 1px solid #262626;
  padding: 14px 16px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.circuit-new-thread h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.circuit-new-thread-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.circuit-policy {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.8;
}

/* System messages */

.circuit-system-message {
  margin-top: 8px;
  font-size: 0.8rem;
  font-family: "Rajdhani", sans-serif;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.circuit-system-message.visible {
  opacity: 1;
}

.circuit-system-message[data-type="error"] {
  color: #ff6666;
}

.circuit-system-message[data-type="success"] {
  color: #66ff99;
}

.circuit-system-message[data-type="info"] {
  color: var(--text-secondary);
}

/* Responsive */

@media (max-width: 900px) {
  .circuit-board-layout {
    grid-template-columns: 1fr;
  }

  .circuit-thread-list {
    order: -1;
  }
}

/* ============================================================================
   Aimee Chat Widget
   ============================================================================ */
.aimee-chat-widget {
  position: fixed;
  right: 16px;
  bottom: 80px;
  z-index: 9999;
  font-family: "Rajdhani", system-ui, sans-serif;
}

.aimee-chat-toggle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid #00ffff;
  background: radial-gradient(circle at 30% 0, #00ffff 0, transparent 45%), #050508;
  color: #f5f5f5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(0, 255, 255, 0.35);
}

.aimee-chat-toggle-label {
  font-family: "Orbitron", sans-serif;
  font-size: 0.6rem;
  letter-spacing: 1px;
}

.aimee-chat-panel {
  position: absolute;
  right: 0;
  bottom: 60px;
  width: 320px;
  max-height: 420px;
  background: rgba(5, 5, 8, 0.98);
  border: 1px solid #262626;
  box-shadow: 0 0 28px rgba(0, 0, 0, 0.85);
  display: none;
  flex-direction: column;
}

.aimee-chat-panel.open {
  display: flex;
}

.aimee-chat-header {
  padding: 8px 10px;
  border-bottom: 1px solid #262626;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.aimee-chat-title {
  font-family: "Orbitron", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.aimee-chat-subtitle {
  font-size: 0.7rem;
  color: #aaaaaa;
}

.aimee-chat-close {
  background: transparent;
  border: none;
  color: #888;
  font-size: 1rem;
  cursor: pointer;
}

.aimee-chat-messages {
  flex: 1;
  padding: 8px 8px 4px;
  overflow-y: auto;
  font-size: 0.8rem;
}

.aimee-chat-message {
  margin-bottom: 6px;
  display: flex;
}

.aimee-chat-message.user {
  justify-content: flex-end;
}

.aimee-chat-message .bubble {
  max-width: 85%;
  padding: 6px 8px;
  border-radius: 8px;
}

.aimee-chat-message.user .bubble {
  background: #0e2a3c;
  border: 1px solid #144d73;
}

.aimee-chat-message.aimee .bubble {
  background: #141414;
  border: 1px solid #333;
}

.aimee-chat-form {
  border-top: 1px solid #262626;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aimee-chat-input {
  background: #050505;
  border: 1px solid #333;
  color: #f5f5f5;
  resize: none;
  padding: 6px;
  font-size: 0.8rem;
}

.aimee-chat-input::placeholder {
  color: #666;
}

.aimee-chat-send {
  align-self: flex-end;
  padding: 4px 12px;
  font-size: 0.75rem;
  border-radius: 999px;
  border: 1px solid #00ffff;
  background: #0b1013;
  color: #f5f5f5;
  cursor: pointer;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .aimee-chat-widget {
    right: 12px;
    bottom: 70px;
  }

  .aimee-chat-panel {
    width: calc(100vw - 32px);
    max-width: 320px;
  }
}

/* ============================================================================
   VIDEOS SECTION
   ============================================================================ */

#videos {
  background: linear-gradient(180deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
}

.featured-video {
  margin-bottom: 60px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.featured-video .video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border: 2px solid var(--accent-red);
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(139, 0, 0, 0.4);
  background: #000;
}

.featured-video .video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-caption {
  text-align: center;
  margin-top: 12px;
  color: var(--accent-red);
  font-family: "Orbitron", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.video-item {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.video-item:hover {
  border-color: var(--accent-purple);
  box-shadow: 0 0 20px rgba(74, 14, 78, 0.3);
  transform: translateY(-4px);
}

.video-item .video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  background: #000;
}

.video-item .video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .featured-video {
    margin-bottom: 40px;
  }
}
