:root {
    --bg-color: #0a0a0a;
    --text-color: #00ff9f;
    --accent-color: #ff0033;
    --secondary-color: #ffcc00;
    --terminal-bg: rgba(20, 0, 0, 0.7);
    --border-color: #ff0033;
    --font-main: 'Roboto Mono', monospace;
    --font-heading: 'Press Start 2P', cursive;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* CRT Scanlines & Flicker */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 999;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

body::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    z-index: 999;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% { opacity: 0.02; }
    50% { opacity: 0.05; }
    100% { opacity: 0.02; }
}

/* Screen Crack Effect */
.screen-crack {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><path d="M0,0 L100,100 M50,0 L50,100 M100,0 L0,100" stroke="white" stroke-width="2" fill="none"/></svg>') no-repeat center center;
    background-size: cover;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s;
}

.screen-crack.active {
    opacity: 0.8;
    animation: crack-glitch 0.2s infinite;
}

@keyframes crack-glitch {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-5px, 5px); }
    40% { transform: translate(5px, -5px); }
    60% { transform: translate(-5px, -5px); }
    80% { transform: translate(5px, 5px); }
    100% { transform: translate(0, 0); }
}

/* Boot Sequence */
#boot-sequence {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    color: #0f0;
    font-family: var(--font-main);
    padding: 20px;
    z-index: 1000;
    overflow: hidden;
}

#terminal-output {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.hidden {
    display: none !important;
}

/* Marquee */
.marquee-container {
    width: 100%;
    background-color: var(--accent-color);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    padding: 10px 0;
    overflow: hidden;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid #fff;
}

.marquee-content {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 20s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Header */
header {
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(180deg, #1a0000, #0a0a0a);
    border-bottom: 4px solid var(--accent-color);
}

h1, h2, h3 {
    font-family: var(--font-heading);
}

h1 {
    font-size: 4rem;
    margin: 0;
    color: white;
    text-shadow: 0 0 20px var(--accent-color);
    position: relative;
    display: inline-block;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-top: 1rem;
    font-family: var(--font-heading);
    line-height: 1.5;
}

.tagline {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 1rem;
}

/* Glitch Text Effect */
.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(15px, 9999px, 71px, 0); }
    5% { clip: rect(88px, 9999px, 12px, 0); }
    10% { clip: rect(44px, 9999px, 97px, 0); }
    15% { clip: rect(22px, 9999px, 33px, 0); }
    20% { clip: rect(66px, 9999px, 55px, 0); }
    25% { clip: rect(11px, 9999px, 88px, 0); }
    30% { clip: rect(77px, 9999px, 44px, 0); }
    35% { clip: rect(33px, 9999px, 66px, 0); }
    40% { clip: rect(99px, 9999px, 22px, 0); }
    45% { clip: rect(55px, 9999px, 11px, 0); }
    50% { clip: rect(88px, 9999px, 77px, 0); }
    55% { clip: rect(22px, 9999px, 99px, 0); }
    60% { clip: rect(66px, 9999px, 33px, 0); }
    65% { clip: rect(11px, 9999px, 55px, 0); }
    70% { clip: rect(77px, 9999px, 88px, 0); }
    75% { clip: rect(33px, 9999px, 22px, 0); }
    80% { clip: rect(99px, 9999px, 66px, 0); }
    85% { clip: rect(55px, 9999px, 11px, 0); }
    90% { clip: rect(88px, 9999px, 77px, 0); }
    95% { clip: rect(22px, 9999px, 99px, 0); }
    100% { clip: rect(66px, 9999px, 33px, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    5% { clip: rect(52px, 9999px, 74px, 0); }
    10% { clip: rect(79px, 9999px, 85px, 0); }
    15% { clip: rect(75px, 9999px, 5px, 0); }
    20% { clip: rect(67px, 9999px, 61px, 0); }
    25% { clip: rect(14px, 9999px, 79px, 0); }
    30% { clip: rect(1px, 9999px, 66px, 0); }
    35% { clip: rect(86px, 9999px, 30px, 0); }
    40% { clip: rect(23px, 9999px, 98px, 0); }
    45% { clip: rect(85px, 9999px, 72px, 0); }
    50% { clip: rect(71px, 9999px, 75px, 0); }
    55% { clip: rect(2px, 9999px, 48px, 0); }
    60% { clip: rect(30px, 9999px, 16px, 0); }
    65% { clip: rect(59px, 9999px, 50px, 0); }
    70% { clip: rect(41px, 9999px, 62px, 0); }
    75% { clip: rect(2px, 9999px, 82px, 0); }
    80% { clip: rect(47px, 9999px, 73px, 0); }
    85% { clip: rect(3px, 9999px, 27px, 0); }
    90% { clip: rect(26px, 9999px, 55px, 0); }
    95% { clip: rect(42px, 9999px, 97px, 0); }
    100% { clip: rect(38px, 9999px, 49px, 0); }
}

/* CA Section */
.ca-section {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.ca-text {
    background: #000;
    padding: 1rem;
    border: 1px solid var(--text-color);
    font-family: var(--font-main);
    color: var(--text-color);
}

/* Buttons */
.btn, button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    margin: 0.5rem;
    transition: all 0.3s;
    text-transform: uppercase;
}

.btn:hover, button:hover {
    background: #ff3366;
    animation: button-glitch 0.2s infinite;
}

button.disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

button.disabled:hover {
    animation: none;
    background: #333;
}

@keyframes button-glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

section {
    margin-bottom: 4rem;
    padding: 2rem;
    border: 3px solid var(--border-color);
    background: var(--terminal-bg);
    position: relative;
}

section h2 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

/* Exploit Feed Terminal */
.exploit-feed-terminal {
    background: #000;
    border: 1px solid var(--text-color);
    padding: 1rem;
    height: 200px;
    overflow-y: auto;
    font-family: var(--font-main);
    color: var(--text-color);
}

.exploit-feed-terminal pre {
    margin: 0;
    white-space: pre-wrap;
}

/* Hall of Drains Grid */
.hall-of-drains-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.hack-card {
    background: #1a0000;
    padding: 1.5rem;
    border: 2px dashed var(--accent-color);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.hack-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.hack-card p {
    margin-bottom: 0.5rem;
}

.hack-card strong {
    color: var(--accent-color);
    font-size: 1.5rem;
}

.hack-card small {
    display: block;
    margin-top: 1rem;
    color: #888;
    font-style: italic;
}

.hack-card:hover {
    transform: scale(1.05) rotate(2deg);
    border-color: var(--text-color);
    box-shadow: 0 0 15px var(--accent-color);
}

.hack-card:hover::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 0, 51, 0.2);
    pointer-events: none;
    animation: card-glitch 0.1s infinite;
}

@keyframes card-glitch {
    0% { transform: translate(0); }
    50% { transform: translate(-2px, 2px); }
    100% { transform: translate(2px, -2px); }
}

/* Total Drained Counter */
.total-drained-section {
    text-align: center;
}

.drained-counter {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-color);
    margin-top: 1rem;
}

/* Attack Map */
.attack-map-section {
    text-align: center;
}

#attack-map-canvas {
    width: 100%;
    max-width: 800px;
    height: 300px;
    background: #000;
    border: 1px solid var(--text-color);
    margin: 0 auto;
    display: block;
}

/* Lists */
ul, ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

.why-hacked-list {
    list-style-type: none;
    margin-left: 0;
}

.why-hacked-list li {
    padding-left: 1.5rem;
    position: relative;
}

/* Easter Egg */
.easter-egg-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    opacity: 0.1;
    font-size: 2rem;
    cursor: pointer;
    z-index: 100;
    transition: opacity 0.3s;
}

.easter-egg-button:hover {
    opacity: 1;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 3px solid var(--accent-color);
    background: #0a0a0a;
    font-family: var(--font-main);
    font-size: 0.9rem;
}

footer p {
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .tagline {
        font-size: 1.2rem;
    }
    
    .btn, button {
        padding: 0.8rem 1.5rem;
        font-size: 0.8rem;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .drained-counter {
        font-size: 2rem;
    }
    
    .marquee-content {
        font-size: 0.6rem;
    }
}
