/* ========================================
   CHUNGUS FUNGUS HOLDINGS - SHARED STYLES
   ======================================== */

:root {
  --primary: #7B0000;
  --secondary: #FFD700;
  --accent: #00FF41;
  --bg: #0a0a0a;
  --panel: #111;
  --ugly-pink: #FF69B4;
  --corporate-blue: #003399;
  --complaint-red: #ff2222;
  --ticker-bg: var(--secondary);
  --ticker-color: #000;
  --ticker-border: var(--primary);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: #e8e8e8;
  font-family: 'Comic Neue', cursive;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ctext y='28' font-size='28'%3E🍄%3C/text%3E%3C/svg%3E") 0 0, auto;
  overflow-x: hidden;
}

/* ========================================
   TICKER
   ======================================== */
.ticker {
  background: var(--ticker-bg);
  color: var(--ticker-color);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 0;
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 3px solid var(--ticker-border);
}
.ticker-inner {
  display: inline-block;
  animation: ticker 55s linear infinite;
}
@keyframes ticker {
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

/* ========================================
   HEADER
   ======================================== */
header {
  background: linear-gradient(135deg, #1a0000, #000033, #001a00);
  padding: 0;
  border-bottom: 4px solid var(--secondary);
  position: relative;
  overflow: hidden;
}
header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255,215,0,0.03) 10px,
    rgba(255,215,0,0.03) 20px
  );
  pointer-events: none;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  flex-wrap: wrap;
  gap: 16px;
}
.logo-block {
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo-emoji {
  font-size: 4rem;
  animation: spin3d 8s linear infinite;
  display: inline-block;
  filter: drop-shadow(0 0 12px #FFD700);
}
@keyframes spin3d {
  0%   { transform: rotateY(0deg) scale(1); }
  50%  { transform: rotateY(180deg) scale(1.2); }
  100% { transform: rotateY(360deg) scale(1); }
}
.logo-text h1 {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  background: linear-gradient(90deg, #FFD700, #FF69B4, #00FF41, #FFD700);
  background-size: 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s linear infinite;
  letter-spacing: 2px;
}
@keyframes shimmer {
  0%   { background-position: 0% }
  100% { background-position: 300% }
}
.logo-text p {
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 4px;
}
.header-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.badge {
  background: var(--primary);
  border: 2px solid var(--secondary);
  color: var(--secondary);
  padding: 4px 10px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: badgepulse 2s ease-in-out infinite;
}
.badge:nth-child(2) { animation-delay: 0.3s; background: #002200; border-color: var(--accent); color: var(--accent); }
.badge:nth-child(3) { animation-delay: 0.6s; background: #220033; border-color: var(--ugly-pink); color: var(--ugly-pink); }
@keyframes badgepulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%  { opacity: 0.7; transform: scale(1.05); }
}

/* ========================================
   NAVIGATION
   ======================================== */
nav {
  background: #000;
  border-bottom: 2px solid #333;
  padding: 0 40px;
  display: flex;
  gap: 0;
  overflow-x: auto;
}
nav a {
  color: #ccc;
  text-decoration: none;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.1s;
  border-right: 1px solid #222;
  white-space: nowrap;
  cursor: pointer;
}
nav a:hover {
  background: var(--secondary);
  color: #000;
  transform: skewX(-10deg) scale(1.05);
  letter-spacing: 3px;
}
nav a.active {
  background: var(--complaint-red);
  color: #fff;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
  background: #050505;
  border-top: 2px solid #1a1a1a;
  padding: 48px 40px 24px;
}
.footer-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand p { font-size: 0.82rem; color: #555; line-height: 1.8; margin-top: 16px; max-width: 280px; }
.footer-col h4 { font-family: 'Cinzel', serif; font-size: 0.8rem; color: var(--secondary); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { color: #555; text-decoration: none; font-size: 0.82rem; transition: color 0.2s; cursor: pointer; }
.footer-col ul li a:hover { color: var(--secondary); }
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  border-top: 1px solid #111;
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 0.72rem; color: #333; }
.footer-bottom .legal-links { display: flex; gap: 24px; }
.footer-bottom .legal-links a { color: #333; text-decoration: none; font-size: 0.72rem; transition: color 0.2s; cursor: pointer; }
.footer-bottom .legal-links a:hover { color: var(--secondary); }

/* ========================================
   MODAL / POPUP SYSTEM
   ======================================== */
.modal-overlay,
.popup-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadein 0.3s ease;
}
.modal-overlay.active,
.popup-overlay.active { display: flex; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.modal,
.popup {
  background: #111;
  border: 3px solid var(--secondary);
  padding: 40px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  position: relative;
  animation: popupin 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popupin {
  from { transform: scale(0.5) rotate(-5deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}
.modal h3,
.popup h3 { font-family: 'Cinzel', serif; font-size: 1.6rem; color: var(--secondary); margin-bottom: 16px; }
.modal p,
.popup p { color: #999; font-size: 0.9rem; line-height: 1.7; margin-bottom: 24px; }
.modal-emoji,
.popup-emoji { font-size: 4rem; display: block; margin-bottom: 16px; animation: spin3d 4s linear infinite; }
.modal-close,
.popup-close {
  background: var(--secondary);
  color: #000;
  border: none;
  padding: 12px 28px;
  font-family: 'Comic Neue', cursive;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ctext y='28' font-size='28'%3E👆%3C/text%3E%3C/svg%3E") 16 0, pointer;
  transition: all 0.2s;
}
.modal-close:hover,
.popup-close:hover { background: var(--ugly-pink); transform: scale(1.1); }
.modal-dismiss,
.popup-dismiss { display: block; margin-top: 12px; font-size: 0.7rem; color: #333; cursor: pointer; }
.modal-dismiss:hover,
.popup-dismiss:hover { color: #666; }

/* Alert banner variant */
.modal.alert { border-color: var(--complaint-red); }
.modal.alert h3 { color: var(--complaint-red); }

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
  background: var(--secondary);
  color: #000;
  border: none;
  padding: 14px 32px;
  font-family: 'Comic Neue', cursive;
  font-weight: 700;
  font-size: 1rem;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ctext y='28' font-size='28'%3E👆%3C/text%3E%3C/svg%3E") 16 0, pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.15s;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}
.btn-primary:hover {
  background: var(--ugly-pink);
  transform: rotate(-2deg) scale(1.08);
  letter-spacing: 5px;
}
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 14px 32px;
  font-family: 'Comic Neue', cursive;
  font-weight: 700;
  font-size: 1rem;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ctext y='28' font-size='28'%3E👆%3C/text%3E%3C/svg%3E") 16 0, pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.15s;
}
.btn-secondary:hover {
  background: var(--accent);
  color: #000;
  transform: rotate(2deg) scale(1.08);
}

/* ========================================
   SHARED COMPONENTS
   ======================================== */
.alert-banner {
  background: var(--primary);
  border-bottom: 2px solid #ff3333;
  padding: 10px 40px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ffaaaa;
}
.alert-banner a { color: var(--secondary); text-decoration: none; }
.alert-banner a:hover { text-decoration: underline; }

.section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 5px;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 20px;
  color: #fff;
}
.section-title span { color: var(--secondary); }
.section-subtitle { color: #888; line-height: 1.8; max-width: 600px; }

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #111;
  border: 1px solid var(--secondary);
  padding: 16px 24px;
  font-size: 0.85rem;
  color: #ccc;
  z-index: 2000;
  animation: toastin 0.3s ease, toastout 0.3s ease 2.7s forwards;
  max-width: 320px;
}
@keyframes toastin {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes toastout {
  to { transform: translateX(100%); opacity: 0; }
}

/* ========================================
   SPORE BREACH ALERT (Konami Code)
   ======================================== */
.spore-breach {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--complaint-red);
  color: #fff;
  text-align: center;
  padding: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  z-index: 9999;
  animation: breachpulse 0.5s ease-in-out infinite alternate;
}
@keyframes breachpulse {
  from { box-shadow: 0 0 10px var(--complaint-red); }
  to { box-shadow: 0 0 30px var(--complaint-red), 0 0 60px var(--complaint-red); }
}

/* ========================================
   SHARED LAYOUT COMPONENTS
   ======================================== */
.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 40px;
}

/* ========================================
   MUSHROOM FLOATERS
   ======================================== */
.mushroom-float {
  position: absolute;
  font-size: 2rem;
  opacity: 0.15;
  animation: floatup 10s linear infinite;
}
@keyframes floatup {
  0%   { transform: translateY(110%) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.15; }
  90%  { opacity: 0.15; }
  100% { transform: translateY(-10%) rotate(360deg); opacity: 0; }
}

/* ========================================
   BIOLOGICAL COOKIE BANNER
   ======================================== */
.cookie-banner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  animation: fadein 0.3s ease;
}

.cookie-banner {
  background: #111;
  border: 3px solid var(--secondary);
  padding: 40px;
  max-width: 520px;
  width: 90%;
  text-align: center;
  position: relative;
  animation: popupin 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cookie-banner-seal {
  font-size: 4rem;
  display: block;
  margin-bottom: 16px;
  animation: spin3d 4s linear infinite;
}

.cookie-banner h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  color: var(--secondary);
  margin-bottom: 16px;
}

.cookie-banner p {
  color: #999;
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

.cookie-banner-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.cookie-banner-actions button {
  background: var(--secondary);
  color: #000;
  border: none;
  padding: 12px 28px;
  font-family: 'Comic Neue', cursive;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ctext y='28' font-size='28'%3E👆%3C/text%3E%3C/svg%3E") 16 0, pointer;
  transition: all 0.2s;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

.cookie-banner-actions button:hover {
  background: var(--ugly-pink);
  transform: scale(1.1);
}

.cookie-banner-actions button.fast-accept:hover {
  background: var(--accent);
  transform: scale(1.15) rotate(-1deg);
}

/* Green vignette flash on cookie dismissal */
.spore-vignette {
  position: fixed;
  inset: 0;
  z-index: 2999;
  pointer-events: none;
  background: radial-gradient(circle, transparent 40%, #00ff4122 100%);
  opacity: 0;
  animation: vignetteFlash 0.5s ease-out forwards;
}

@keyframes vignetteFlash {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .header-inner { padding: 16px 20px; }
  section { padding: 60px 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  nav { padding: 0 20px; }
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr; }
}
