@import url('https://fonts.googleapis.com/css2?family=Creepster&family=Bebas+Neue&family=Courier+Prime:wght@400;700&display=swap');

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

body {
    background: #000;
    color: #fff;
    font-family: 'Courier Prime', monospace;
    overflow: hidden;
    cursor: none;
}

/* Custom cursor */
body::after {
    content: '';
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(139, 0, 0, 0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.1s ease;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
}

/* Grain overlay */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/images/grain.jpg');
    opacity: 0.15;
    pointer-events: none;
    z-index: 9998;
    animation: grain 0.5s steps(1) infinite;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -5%); }
    20% { transform: translate(-10%, 5%); }
    30% { transform: translate(5%, -10%); }
    40% { transform: translate(-5%, 15%); }
    50% { transform: translate(-10%, 5%); }
    60% { transform: translate(15%, 0); }
    70% { transform: translate(0, 10%); }
    80% { transform: translate(-15%, 0); }
    90% { transform: translate(10%, 5%); }
}

/* Blood vignette */
.blood-vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(139, 0, 0, 0.3) 100%);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    animation: blood-pulse 4s ease-in-out infinite;
}

@keyframes blood-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Main container */
#intro-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* Scene management */
.scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.5s ease;
}

.scene.active {
    opacity: 1;
    pointer-events: auto;
}

/* SCENE 0: Opening */
.typewriter-text {
    text-align: center;
    font-size: 2.5rem;
    letter-spacing: 0.1em;
    color: #8b0000;
    text-shadow: 0 0 20px rgba(139, 0, 0, 0.8);
}

.typewriter {
    display: inline-block;
    overflow: hidden;
    border-right: 3px solid #8b0000;
    white-space: nowrap;
    animation: typing 4s steps(40) forwards, blink 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

/* SCENE 1: The Room */
.room-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/images/room.png');
    background-size: cover;
    background-position: center;
    filter: brightness(0.4) contrast(1.2);
}

.parallax-zoom {
    animation: slow-zoom 15s ease-in-out forwards;
}

@keyframes slow-zoom {
    from { transform: scale(1); }
    to { transform: scale(1.15); }
}

.fragment-container {
    position: relative;
    z-index: 10;
    text-align: center;
    margin-bottom: 3rem;
}

.fragment {
    font-size: 3rem;
    font-family: 'Bebas Neue', sans-serif;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.8), 0 0 30px rgba(255, 0, 0, 0.4);
    opacity: 0;
    margin: 0.5rem 0;
    animation: fade-in-up 1s ease forwards;
}

.main-text {
    font-size: 2rem;
    color: #ff4444;
    text-align: center;
    text-shadow: 0 0 20px rgba(255, 68, 68, 0.9);
    opacity: 0;
    animation: fade-in-up 1.5s ease forwards;
    position: relative;
    z-index: 10;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delay-1 { animation-delay: 0.5s; }
.delay-2 { animation-delay: 1s; }
.delay-3 { animation-delay: 1.5s; }
.delay-4 { animation-delay: 2s; }
.delay-5 { animation-delay: 2.5s; }

/* SCENE 2: Systems Disagree */
.split-screen {
    display: flex;
    width: 100%;
    height: 100%;
}

.split-left, .split-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.split-left {
    background: rgba(20, 20, 20, 0.9);
    border-right: 2px solid #8b0000;
}

.split-right {
    background: rgba(0, 20, 0, 0.9);
}

.medical-report {
    padding: 3rem;
    border: 2px solid #666;
    background: rgba(40, 40, 40, 0.95);
    filter: blur(0px);
    animation: report-focus 2s ease forwards;
}

@keyframes report-focus {
    0% { filter: blur(5px); opacity: 0.3; }
    100% { filter: blur(0px); opacity: 1; }
}

.report-header {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 2rem;
    color: #999;
}

.report-content p {
    margin: 1rem 0;
    font-size: 1.2rem;
}

.cause-highlight {
    color: #ff4444;
    font-size: 1.5rem !important;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.terminal {
    font-family: 'Courier Prime', monospace;
    background: #000;
    padding: 2rem;
    border: 1px solid #0f0;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
}

.terminal-line {
    color: #0f0;
    font-size: 1.2rem;
    margin: 0.5rem 0;
    opacity: 0;
    animation: terminal-appear 0.5s ease forwards;
}

.error-line {
    color: #ff0000;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
    animation: glitch-effect 0.3s infinite;
}

@keyframes terminal-appear {
    to { opacity: 1; }
}

@keyframes glitch-effect {
    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); }
}

.override-text {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.glitch-text {
    font-size: 2.5rem;
    color: #fff;
    margin: 1rem 0;
    opacity: 0;
    animation: fade-in 1s ease forwards;
    position: relative;
}

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

.glitch-text::before {
    animation: glitch-1 2s infinite;
    color: #ff0000;
    z-index: -1;
}

.glitch-text::after {
    animation: glitch-2 2s infinite;
    color: #00ff00;
    z-index: -2;
}

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

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

/* SCENE 3: The Commit */
.github-interface {
    background: rgba(13, 17, 23, 0.95);
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 2rem;
    width: 80%;
    max-width: 900px;
    box-shadow: 0 0 50px rgba(139, 0, 0, 0.5);
}

.github-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #30363d;
}

.repo-name {
    font-size: 1.5rem;
    color: #58a6ff;
}

.repo-status {
    color: #ff4444;
    font-weight: bold;
}

.commit-info {
    margin: 2rem 0;
}

.commit-message {
    font-size: 2rem;
    color: #fff;
    font-family: 'Courier Prime', monospace;
    margin-bottom: 1rem;
}

.typing-effect {
    overflow: hidden;
    border-right: 2px solid #fff;
    white-space: nowrap;
    animation: typing 2s steps(20) forwards, blink 0.75s step-end infinite;
}

.commit-meta {
    color: #8b949e;
    display: flex;
    gap: 2rem;
}

.commit-hash {
    font-family: 'Courier Prime', monospace;
    color: #ff4444;
}

.commit-description p {
    font-size: 1.3rem;
    margin: 1rem 0;
    color: #c9d1d9;
}

.ominous-text {
    position: absolute;
    bottom: 10%;
    font-size: 2rem;
    color: #ff4444;
    text-align: center;
    text-shadow: 0 0 20px rgba(255, 68, 68, 0.9);
    opacity: 0;
    animation: fade-in 2s ease forwards;
}

@keyframes fade-in {
    to { opacity: 1; }
}

/* SCENE 4: The Warning */
.code-block {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 3rem;
    font-family: 'Courier Prime', monospace;
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.3);
}

.code-comment {
    font-size: 1.8rem;
    color: #8b949e;
    line-height: 2.5;
}

.comment-line {
    display: block;
    opacity: 0;
    animation: fade-in 1s ease forwards;
}

.cursor {
    color: #fff;
    font-size: 2rem;
    display: inline-block;
    margin-left: 0.5rem;
}

.cursor.blink {
    animation: cursor-blink 1s step-end infinite, cursor-delete 3s ease forwards 3s;
}

@keyframes cursor-blink {
    50% { opacity: 0; }
}

@keyframes cursor-delete {
    to { opacity: 0; transform: translateX(-100px); }
}

.whisper-text {
    position: absolute;
    bottom: 15%;
    font-size: 1.5rem;
    color: #666;
    font-style: italic;
    text-align: center;
    opacity: 0;
    animation: whisper-fade 3s ease forwards;
}

@keyframes whisper-fade {
    0% { opacity: 0; }
    50% { opacity: 0.7; }
    100% { opacity: 0.3; }
}

/* SCENE 5: Suspect Montage */
.suspect-montage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.suspect-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    filter: grayscale(100%) contrast(1.5) brightness(0.3);
}

.suspect-flash[data-suspect="rhea"] {
    background-image: url('assets/images/rhea.jpeg');
    animation: flash 0.5s ease 0s;
}

.suspect-flash[data-suspect="mehta"] {
    background-image: url('assets/images/mehta.jpeg');
    animation: flash 0.5s ease 0.6s;
}

.suspect-flash[data-suspect="ananya"] {
    background-image: url('assets/images/ananya.jpeg');
    animation: flash 0.5s ease 1.2s;
}

.suspect-flash[data-suspect="kunal"] {
    background-image: url('assets/images/kunal.jpeg');
    animation: flash 0.5s ease 1.8s;
}

@keyframes flash {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.accusation-overlay {
    position: relative;
    z-index: 10;
    text-align: center;
}

.accusation {
    font-size: 3rem;
    font-family: 'Bebas Neue', sans-serif;
    color: #ff0000;
    text-shadow: 0 0 20px rgba(255, 0, 0, 1);
    margin: 1rem 0;
    opacity: 0;
    animation: accusation-flash 0.5s ease forwards;
}

.accusation:nth-child(1) { animation-delay: 0.3s; }
.accusation:nth-child(2) { animation-delay: 0.9s; }
.accusation:nth-child(3) { animation-delay: 1.5s; }
.accusation:nth-child(4) { animation-delay: 2.1s; }

@keyframes accusation-flash {
    0%, 100% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* SCENE 6: Call to Action */
.final-message {
    text-align: center;
    margin-bottom: 4rem;
}

.final-message p {
    font-size: 2.5rem;
    margin: 1rem 0;
    color: #fff;
    opacity: 0;
    animation: fade-in-up 1.5s ease forwards;
}

.final-message .emphasis {
    font-size: 3rem;
    color: #ff4444;
    text-shadow: 0 0 30px rgba(255, 68, 68, 1);
    font-weight: bold;
}

.enter-button {
    font-family: 'Creepster', cursive;
    font-size: 2.5rem;
    padding: 1.5rem 4rem;
    background: transparent;
    color: #8b0000;
    border: 3px solid #8b0000;
    cursor: pointer;
    text-shadow: 0 0 10px rgba(139, 0, 0, 0.8);
    box-shadow: 0 0 30px rgba(139, 0, 0, 0.5), inset 0 0 30px rgba(139, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    animation: fade-in 2s ease forwards 3s;
    letter-spacing: 0.1em;
}

.enter-button:hover {
    background: rgba(139, 0, 0, 0.2);
    box-shadow: 0 0 50px rgba(139, 0, 0, 1), inset 0 0 50px rgba(139, 0, 0, 0.3);
    transform: scale(1.05);
    animation: glitch-button 0.3s infinite;
}

@keyframes glitch-button {
    0% { transform: scale(1.05); }
    25% { transform: scale(1.05) translate(-2px, 2px); }
    50% { transform: scale(1.05) translate(2px, -2px); }
    75% { transform: scale(1.05) translate(-2px, -2px); }
    100% { transform: scale(1.05); }
}

/* Responsive */
@media (max-width: 768px) {
    .typewriter-text { font-size: 1.5rem; }
    .fragment { font-size: 2rem; }
    .main-text { font-size: 1.3rem; }
    .split-screen { flex-direction: column; }
    .github-interface { width: 95%; }
    .enter-button { font-size: 1.8rem; padding: 1rem 2rem; }
}