:root {
    --bg-color: #0d0d1a;
    --text-color: #c8c8d4; /* Slightly dimmer */
    --primary-color: #00f6ff; /* Cyan */
    --secondary-color: #ff00ff; /* Magenta */
    --accent-bg-color: #1a1a2e;
    --accent-bg-color-2: #2a1a2e;
    --card-bg-color: #23233b;
    --terminal-color: #39ff14; /* Hacker green */
    --font-heading: 'Russo One', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
    --mouse-x: 50%;
    --mouse-y: 50%;
}

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

body {
    background-color: var(--bg-color);
    background-image: url('background.png');
    background-size: cover;
    background-attachment: fixed;
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(
        circle 60vmax at var(--mouse-x) var(--mouse-y),
        rgba(26, 26, 46, 0.2) 0%,
        rgba(13, 13, 26, 0.5) 40%,
        var(--bg-color) 70%
    );
    transition: background 0.5s linear;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: #fff;
    text-shadow: 0 0 8px var(--primary-color), 0 0 20px rgba(0, 246, 255, 0.5), 0 0 35px rgba(0, 246, 255, 0.3);
    position: relative;
}

h2 {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--text-color);
    opacity: 0.9;
    text-transform: uppercase;
}

h3 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--secondary-color);
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    text-shadow: 0 0 5px rgba(255, 0, 255, 0.7);
}

p, li, blockquote {
    font-size: clamp(1rem, 2vw, 1.1rem);
    max-width: 70ch;
}

.section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
}

header {
    text-align: center;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.intro-banner {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    background: transparent;
    color: var(--secondary-color);
    padding: 0.75rem 2rem;
    margin: 2rem 0;
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    text-shadow: 0 0 10px var(--secondary-color);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3), inset 0 0 15px rgba(255, 0, 255, 0.2);
    transform: none;
    display: inline-block;
}

.accent-section {
    background-color: var(--accent-bg-color);
    border-radius: 15px;
    margin-top: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.accent-section-2 {
    background-color: var(--accent-bg-color-2);
    border-radius: 15px;
    margin-top: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.math-breakdown {
    display: flex;
    justify-content: center;
    align-items: stretch; /* Make blocks same height */
    gap: 0.5rem 1rem; /* Adjust gap for wrapping */
    flex-wrap: wrap;
    margin: 2rem 0;
    text-align: center;
}

.math-breakdown .stat-block {
    background: rgba(0,0,0,0.2);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
}

.math-breakdown .stat-block:hover {
    transform: scale(1.05);
    border-color: var(--secondary-color);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
}
.stat-highlight {
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-color);
}
.stat-label {
    font-size: 0.9rem;
    color: #aaa;
}
.operator {
    font-size: 1.8rem;
    color: var(--text-color);
    align-self: center;
}
.math-result {
    text-align: center;
    margin-top: 2rem;
}
.you-lose {
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 1rem;
    text-shadow: 0 0 5px var(--primary-color);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: var(--card-bg-color);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid #333;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    transform-style: preserve-3d; /* For 3D hover effect */
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    border: 2px solid transparent;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)) border-box;
    -webkit-mask: 
        linear-gradient(#fff 0 0) padding-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}

.card:hover::before {
    opacity: 1;
}

.card img {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover img {
    filter: drop-shadow(0 0 10px var(--primary-color));
}

.card h4 {
    color: #fff;
    margin-bottom: 0.5rem;
}
.card.alt h4 {
    color: #fff;
}

.warning-text {
    background: transparent;
    color: var(--primary-color);
    font-weight: 700;
    padding: 1rem;
    text-align: center;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    margin-top: 2rem;
    box-shadow: 0 0 15px rgba(0, 246, 255, 0.3);
}

.final-check blockquote {
    font-size: 1.5rem;
    font-style: italic;
    border-left: 4px solid var(--primary-color);
    padding-left: 2rem;
    margin: 2rem 0;
    color: #fff;
}

.faq-section {
    border-top: 1px solid var(--card-bg-color);
    border-bottom: 1px solid var(--card-bg-color);
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.faq-section h4 {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-top: -0.5rem;
    margin-bottom: 2rem;
    font-family: var(--font-body);
    font-weight: 700;
    opacity: 0.8;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

details {
    background: var(--card-bg-color);
    border: 1px solid #333;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

details[open] {
    border-color: var(--primary-color);
    background-color: var(--accent-bg-color);
}

summary {
    padding: 1rem 1.5rem;
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-color);
    cursor: pointer;
    list-style: none; /* Remove default marker */
    position: relative;
    padding-right: 3.5rem; /* Space for custom marker */
    transition: color 0.2s ease;
}

summary:hover {
    color: var(--primary-color);
}

summary::-webkit-details-marker {
    display: none; /* Hide for Safari */
}

summary::before, summary::after {
    content: '';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    width: 1.2em;
    height: 2px;
    background-color: var(--secondary-color);
    transition: transform 0.3s ease-in-out;
}

summary::before {
    transform: translateY(-50%) rotate(0deg);
}
summary::after {
    transform: translateY(-50%) rotate(90deg);
}

details[open] summary::after {
    transform: translateY(-50%) rotate(0deg);
}

details p {
    padding: 0 1.5rem 1.5rem 1.5rem;
    max-width: none;
    color: var(--text-color);
    border-top: 1px solid #333;
    margin: 0.5rem 1.5rem 0 1.5rem;
    padding-top: 1.5rem;
    line-height: 1.6; /* Adjust for vertical alignment */
}

footer {
    text-align: center;
    border-top: 1px solid var(--card-bg-color);
}

.final-statement {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.terminal-section {
    background: rgba(13, 13, 26, 0.5);
    border: 1px solid var(--terminal-color);
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.2);
}

.terminal-section h3 {
    color: var(--terminal-color);
    border-left-color: var(--terminal-color);
    text-shadow: 0 0 5px var(--terminal-color);
}

.terminal-window {
    background: #000;
    border: 2px solid #222;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 5px;
    overflow-x: auto;
    min-height: 200px;
    box-shadow: inset 0 0 10px rgba(57, 255, 20, 0.2);
}

.terminal-window pre {
    color: var(--terminal-color);
    font-family: var(--font-mono);
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    white-space: pre-wrap;
    word-wrap: break-word;
    text-shadow: 0 0 3px var(--terminal-color);
}

/* Glitch Effect */
.glitch {
  position: relative;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  overflow: hidden;
}
.glitch::before {
  left: 2px;
  text-shadow: -2px 0 var(--secondary-color);
  animation: glitch-anim-1 2s infinite linear alternate-reverse;
}
.glitch::after {
  left: -2px;
  text-shadow: -2px 0 var(--primary-color), 2px 2px var(--secondary-color);
  animation: glitch-anim-2 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
  0% { clip-path: inset(15% 0 86% 0); }
  25% { clip-path: inset(55% 0 23% 0); }
  50% { clip-path: inset(22% 0 33% 0); }
  75% { clip-path: inset(88% 0 3% 0); }
  100% { clip-path: inset(45% 0 46% 0); }
}

@keyframes glitch-anim-2 {
  0% { clip-path: inset(78% 0 15% 0); }
  25% { clip-path: inset(23% 0 54% 0); }
  50% { clip-path: inset(63% 0 12% 0); }
  75% { clip-path: inset(34% 0 55% 0); }
  100% { clip-path: inset(88% 0 5% 0); }
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 1rem;
    }
    h1 { font-size: 2.2rem; }
    h3 { font-size: 1.6rem; }
}