/* =====================================================
   💀 W.A.R.D.E.N. BOT // TEC1 STYLE CORE
   Handles: Architecture, Motion, Layout
   Theme colors pulled from theme_wardenbot.css
===================================================== */

/* ========== UNIVERSAL RESET ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ========== GLOBAL LAYOUT ========== */
body {
  font-family: "Courier New", monospace;
  background: var(--bg-primary);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
  animation: crtFlicker 1.5s infinite ease-in-out;
}

main {
  padding: 40px 20px;
  min-height: 70vh;
}

/* ========== CRT EFFECTS ========== */
.crt-scan {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03) 0px,
    rgba(0, 0, 0, 0.02) 2px,
    transparent 4px
  );
  mix-blend-mode: overlay;
  z-index: 1;
}

.fade-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 1000;
}

.fade-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* =====================================================
   🧭 NAVIGATION BAR (Scroll + Centered)
===================================================== */
.scroll-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--accent-border);
  box-shadow: 0 0 12px var(--accent-glow);
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 900;
}

.scroll-nav-left,
.scroll-nav-center,
.scroll-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* --- Nav Buttons --- */
.scroll-nav a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: bold;
  border: 2px solid var(--accent-border);
  border-radius: 10px;
  padding: 10px 18px;
  transition: all 0.3s ease;
  background: transparent;
  box-shadow: 0 0 12px var(--accent-glow);
  white-space: nowrap;
  text-align: center;
  min-height: 44px;
}

.scroll-nav a:hover {
  background: var(--accent-highlight);
  color: var(--bg-primary);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: scale(1.03);
}

.scroll-nav a:active {
  transform: scale(0.98);
  box-shadow: 0 0 20px var(--accent-glow-strong);
}

/* =====================================================
   🎨 THEME SELECTOR DROPDOWN
===================================================== */
.theme-selector-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg-primary);
  border: 2px solid var(--accent-border);
  border-radius: 10px;
  padding: 6px 14px;
  box-shadow: 0 0 10px var(--accent-glow);
  position: relative;
  min-height: 44px;
}

.theme-label {
  font-weight: bold;
  color: var(--accent-highlight);
  text-shadow: 0 0 8px var(--accent-glow);
  white-space: nowrap;
}

#theme-selector {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  border: none;
  background: transparent;
}

#theme-selector option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* =====================================================
   💳 LICENSE CARDS
===================================================== */
.license-section {
  margin: 60px auto;
  max-width: 1200px;
  text-align: center;
}

.license-heading {
  font-size: clamp(1.5rem, 2.5vw, 1.8rem);
  font-weight: 700;
  color: var(--accent-highlight);
  text-shadow: 0 0 10px var(--accent-glow);
  margin-bottom: 40px;
}

.license-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  grid-gap: 25px;
  margin-top: 30px;
}

/* 🆕 MAKE CARDS FLEXBOX SO BUTTONS STAY AT BOTTOM */
.license-card {
  background: var(--bg-secondary);
  border: 2px solid var(--accent-border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 0 25px var(--accent-glow);
  transition: all 0.3s ease;
  text-align: left;
  display: flex; /* NEW */
  flex-direction: column; /* NEW */
  justify-content: space-between; /* NEW */
  text-align: center;
  min-height: 350px; /* Ensures equal sizing */
  margin-bottom: 40px;
}

.license-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 0 35px var(--accent-glow);
}

/* 🆕 BUTTON WRAPPER — PUSHES BUTTONS TO BOTTOM */
.card-button-container {
  margin-top: auto;
  display: flex;
  justify-content: center;
  padding-top: 20px;
}

.license-title {
  color: var(--accent-highlight);
  font-size: 1.2rem;
  margin-bottom: 10px;
  text-shadow: 0 0 8px var(--accent-glow);
}

.license-text {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 16px;
}

.price {
  font-weight: bold;
  color: var(--accent-highlight);
  text-shadow: 0 0 10px var(--accent-glow);
  margin-bottom: 14px;
}

/* Prevent the "Selected Guild" card from being huge */
.guild-header-card {
  min-height: 200px !important;
  padding-top: 40px;
  padding-bottom: 20px;
  justify-content: flex-start !important;
}

/* =====================================================
   ⚙️ FEATURE GRID — INDEX PAGE CARDS (TEC1-STYLED)
===================================================== */

.core-systems-title,
#tec1Status {
  text-align: center;
  display: block;
  margin: 0 auto 15px auto;
}

#tec1Status {
  font-weight: bold;
  font-family: "Courier New", monospace;
  color: var(--accent-highlight);
  text-shadow: 0 0 8px var(--accent-glow);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin: 40px auto;
  max-width: 1200px;
  padding: 20px;
}

.feature-card {
  background: var(--bg-secondary);
  border: 2px solid var(--accent-border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 0 20px var(--accent-glow);
  color: var(--text-primary);
  font-family: "Courier New", monospace;
  text-align: left;
  transition: transform 0.25s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 30px var(--accent-glow-strong);
}

.feature-card h3 {
  color: var(--accent-highlight);
  text-shadow: 0 0 8px var(--accent-glow);
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* 🧠 Coming Soon Panel (matches Bot Access width) */
.coming-soon-panel {
  grid-column: 1 / -1;
  justify-self: center;
  width: 800px;
  max-width: 90%;
  border-style: dashed;
  border-color: var(--accent-highlight);
  background: var(--bg-secondary);
  box-shadow: 0 0 20px var(--accent-glow);
  border-radius: 12px;
  padding: 25px 20px;
  opacity: 0.95;
  text-align: left;
  transition: transform 0.25s ease, box-shadow 0.3s ease;
}

.coming-soon-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 30px var(--accent-glow-strong);
}

/* 📱 Responsive layout */
@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   ⚡ BUTTONS (Global + Footer)
===================================================== */
.warden-btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: bold;
  text-transform: uppercase;
  border: 2px solid var(--accent-border);
  color: var(--accent-highlight);
  text-decoration: none;
  background: var(--bg-secondary);
  transition: all 0.3s ease-in-out;
  box-shadow: 0 0 15px var(--accent-glow);
  white-space: nowrap;
  text-align: center;
}

.warden-btn:hover {
  color: var(--bg-primary);
  background: linear-gradient(
    180deg,
    var(--accent-highlight) 0%,
    var(--accent-border) 100%
  );
  box-shadow: 0 0 35px var(--accent-glow);
  transform: scale(1.05);
}

.warden-btn:active {
  transform: scale(0.98);
  box-shadow: 0 0 25px var(--accent-glow-strong);
}

/* =====================================================
   ⚡ FOOTER BUTTON LAYOUT — CENTERED PAIR
   Keeps buttons aligned with main content width
===================================================== */
.footer-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 80px;
  margin: 60px auto 0;
  max-width: 800px;
  padding: 10px 20px;
}

.footer-buttons .warden-btn {
  flex: 0 0 auto;
  min-width: 200px;
  text-align: center;
  white-space: nowrap;
  font-weight: bold;
  text-transform: uppercase;
  border: 2px solid var(--accent-border);
  border-radius: 10px;
  color: var(--accent-highlight);
  background: var(--bg-secondary);
  box-shadow: 0 0 20px var(--accent-glow);
  text-shadow: 0 0 10px var(--accent-glow);
  transition: all 0.3s ease;
}

.footer-buttons .warden-btn:hover {
  background: linear-gradient(
    180deg,
    var(--accent-highlight) 0%,
    var(--accent-border) 100%
  );
  color: var(--bg-primary);
  box-shadow: 0 0 35px var(--accent-glow-strong);
  transform: scale(1.05);
}

.footer-buttons .warden-btn:active {
  transform: scale(0.97);
  box-shadow: 0 0 25px var(--accent-glow-strong);
}

/* 📱 Responsive behavior */
@media (max-width: 600px) {
  .footer-buttons {
    flex-direction: column;
    gap: 20px;
    max-width: 90%;
  }
}

/* =====================================================
   💬 FOOTER STRUCTURE
===================================================== */
.tec1-footer {
  background: var(--bg-secondary);
  border-top: 2px solid var(--accent-border);
  padding: 30px 20px;
  box-shadow: 0 0 15px var(--accent-glow);
  text-align: center;
  color: var(--text-secondary);
}

.footer-divider {
  height: 2px;
  background: var(--accent-border);
  margin-bottom: 20px;
  box-shadow: 0 0 10px var(--accent-glow);
}

/* =====================================================
   ⚙️ BOT ACCESS SECTION
===================================================== */
.bot-access {
  text-align: left;
  background: var(--bg-secondary);
  border: 2px solid var(--accent-border);
  border-radius: 12px;
  padding: 25px 20px;
  box-shadow: 0 0 20px var(--accent-glow);
  margin: 40px auto;
  max-width: 800px;
  color: var(--text-secondary);
}

.bot-access h3 {
  color: var(--accent-highlight);
  text-shadow: 0 0 10px var(--accent-glow);
  margin-bottom: 16px;
  text-align: center;
}

.bot-access p {
  margin: 10px 0;
  line-height: 1.5;
}

.or-divider {
  text-align: center;
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--accent-highlight);
  text-shadow: 0 0 10px var(--accent-glow);
  margin: 10px 0;
}

.panel-title h1,
.panel-title h3 {
  margin-top: 8px;
  font-size: 1.6rem;
  text-align: center;
  color: var(--text-primary);
}

/* =====================================================
   💀 TEC1 ERROR CARD STYLING
===================================================== */
.error-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-primary);
}

.error-container {
  background: var(--bg-secondary);
  border: 2px solid var(--accent-border);
  border-radius: 14px;
  padding: 30px 25px;
  box-shadow: 0 0 25px var(--accent-glow);
  max-width: 900px;
  width: 90%;
  margin: 40px auto;
  text-align: left;
  animation: crtCircle 6s infinite ease-in-out;
  background-image: radial-gradient(
    circle at center,
    color-mix(in srgb, var(--accent-highlight), transparent 70%) 0%,
    color-mix(in srgb, var(--bg-secondary), transparent 90%) 60%,
    transparent 100%
  );
  background-repeat: no-repeat;
  font-family: "Courier New", monospace;
}

.error-container h3 {
  color: var(--accent-highlight);
  text-shadow: 0 0 10px var(--accent-glow);
  margin-bottom: 15px;
}

.error-container pre {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  padding: 15px;
  color: var(--text-secondary);
  box-shadow: 0 0 10px var(--accent-glow);
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* =====================================================
   ⚡ MOTION
===================================================== */
@keyframes crtFlicker {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.97;
  }
}

/* =====================================================
   💀 TEC1 ERROR CARD — GLOBAL FALLBACK (ALWAYS ACTIVE)
===================================================== */
.error-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-primary);
}

.error-container {
  position: relative;
  overflow: hidden;
  background: var(--bg-secondary);
  border: 2px solid var(--accent-border);
  border-radius: 14px;
  padding: 30px 25px;
  box-shadow: 0 0 25px var(--accent-glow);
  max-width: 900px;
  width: 90%;
  margin: 40px auto;
  animation: crtCircle 6s infinite ease-in-out;
  background-image: radial-gradient(
    circle at center,
    color-mix(in srgb, var(--accent-highlight), transparent 70%) 0%,
    color-mix(in srgb, var(--bg-secondary), transparent 90%) 60%,
    transparent 100%
  );
  background-repeat: no-repeat;
  font-family: "Courier New", monospace;
  text-align: left;
  z-index: 2;
}

.error-container h3 {
  color: var(--accent-highlight);
  text-shadow: 0 0 10px var(--accent-glow);
  margin-bottom: 15px;
}

.error-container pre {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  padding: 15px;
  color: var(--text-secondary);
  box-shadow: 0 0 10px var(--accent-glow);
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Keep footer buttons aligned under error card */
.error-section .footer-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 50px;
  margin-top: 40px;
}

/* =====================================================
   🌐 THEME-CONTROLLED HYPERLINKS (Global)
   Makes all links readable on every theme
===================================================== */
a,
a:visited {
  color: var(--accent-highlight); /* theme glow color */
  text-shadow: 0 0 6px var(--accent-glow);
  text-decoration: none;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

a:hover {
  color: var(--accent-border); /* stronger theme color */
  text-shadow: 0 0 10px var(--accent-glow-strong);
}

a:active {
  color: var(--text-primary);
  text-shadow: 0 0 8px var(--accent-glow);
}

#count {
  letter-spacing: 0px !important;
  padding-left: 4px; /* optional – keeps space after 'in' */
  display: inline-block; /* prevents jitter */
}
