:root {
    --loki-green: #00ff88;
    --tva-orange: #ff8c00;
    --tva-brown: #2b1d0e;
    --shield-blue: #0047ab;
    --bg-dark: #0a0a0a;
}

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

body {
    background-color: var(--bg-dark);
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    overflow-x: hidden;
    height: 100vh;
}

/* --- Welcome Overlay --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('assets/first_bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: opacity 0.5s ease;
}

.welcome-content {
    text-align: center;
    max-width: 800px;
    padding: 2rem;
}

.hero-image {
    width: 600px;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.3));
}

/* Removed pulse animation */

.glitch-text {
    font-size: 5rem;
    font-weight: 700;
    color: var(--loki-green);
    letter-spacing: 5px;
    position: relative;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.sub-text {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

#start-btn {
    background: transparent;
    border: 1px solid var(--loki-green);
    color: var(--loki-green);
    padding: 1rem 2rem;
    font-size: 1.2rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    font-family: 'Space Grotesk', sans-serif;
}

#start-btn:hover {
    background: var(--loki-green);
    color: black;
    box-shadow: 0 0 20px var(--loki-green);
}

/* --- Shatter Effect --- */
#shatter-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 101;
}

.shard {
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border: 0.5px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1), inset 0 0 10px rgba(255, 255, 255, 0.05);
    transform-origin: center;
    pointer-events: none;
}

/* Crack overlay texture */
.crack-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/crack.png');
    background-size: cover;
    opacity: 0;
    pointer-events: none;
    z-index: 102;
}

/* --- Comic Content --- */
#main-content {
    position: relative;
    z-index: 10;
    opacity: 0;
    padding: 2rem;
    min-height: 100vh;
    background: radial-gradient(circle at center, #1a0a2e 0%, #050505 100%);
    background-image: 
        radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 40px),
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 30px),
        radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 40px);
    background-size: 550px 550px, 350px 350px, 250px 250px;
    background-position: 0 0, 40px 60px, 130px 270px;
}

#main-content.visible {
    opacity: 1;
    transition: opacity 1s ease;
}

.comic-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.comic-panel {
    border: 6px solid black;
    background: white;
    color: black;
    position: relative;
    padding: 1.5rem;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.5);
    overflow: hidden;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.panel-image {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: top center;
    border: 3px solid black;
    margin-bottom: 1rem;
    filter: grayscale(20%) contrast(110%);
}

/* TVA Theming */
.tva-panel {
    border-color: var(--tva-brown);
    background-color: #f4ece1;
}

.tva-panel::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/pinstriped-suit.png');
    opacity: 0.1;
    pointer-events: none;
}

/* SHIELD Theming */
.shield-panel {
    border-color: #111;
    background-color: #e0e0e0;
}

/* Speech Bubbles */
.speech-bubble {
    background: white;
    border: 3px solid black;
    border-radius: 50px;
    padding: 1rem 1.5rem;
    font-family: 'Kalam', cursive;
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    margin: 0.5rem 0;
    box-shadow: 3px 3px 0 black;
}

.speech-bubble::before {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 20px;
    border-width: 15px 15px 0;
    border-style: solid;
    border-color: black transparent;
}

.speech-bubble::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 22px;
    border-width: 13px 13px 0;
    border-style: solid;
    border-color: white transparent;
}

.narrative-box {
    background: #ffd700; /* Yellow narrative box */
    border: 2px solid black;
    padding: 0.8rem;
    font-family: 'Bangers', cursive;
    font-size: 1.2rem;
    margin: 1rem 0;
    transform: rotate(-1deg);
}

.caption-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: black;
    color: white;
    padding: 5px 15px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    z-index: 5;
}

.fury-bubble {
    align-self: flex-start;
}

.loki-bubble-2 {
    align-self: flex-end;
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    .comic-container {
        grid-template-columns: 1fr;
    }
    .glitch-text {
        font-size: 3rem;
    }
}
