* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: #1a0f08;
    color: #d4a574;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    perspective: 1000px;
}

.transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    overflow: hidden;
}

.transition-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Das Hasenloch - schwarzer Kreis der sich öffnet */
.rabbit-hole {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, #000 0%, #000 60%, #1a0505 80%, #2a0a0a 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 
        0 0 60px 30px rgba(0, 0, 0, 0.8),
        inset 0 0 100px rgba(180, 50, 50, 0.3);
}

.transition-overlay.active .rabbit-hole {
    animation: holeOpen 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes holeOpen {
    0% {
        width: 0;
        height: 0;
        box-shadow: 
            0 0 60px 30px rgba(0, 0, 0, 0.8),
            inset 0 0 100px rgba(180, 50, 50, 0.3);
    }
    30% {
        width: 150px;
        height: 150px;
        box-shadow: 
            0 0 80px 40px rgba(0, 0, 0, 0.9),
            inset 0 0 80px rgba(200, 50, 50, 0.4);
    }
    100% {
        width: 300vmax;
        height: 300vmax;
        box-shadow: 
            0 0 0 0 transparent,
            inset 0 0 200px rgba(100, 20, 20, 0.5);
    }
}

/* Spiralisierende Ringe im Loch */
.hole-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 2px solid rgba(139, 69, 69, 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.transition-overlay.active .hole-ring {
    animation: ringSpiral 2s ease-in forwards;
}

.hole-ring:nth-child(2) { animation-delay: 0.1s; }
.hole-ring:nth-child(3) { animation-delay: 0.2s; }
.hole-ring:nth-child(4) { animation-delay: 0.3s; }
.hole-ring:nth-child(5) { animation-delay: 0.4s; }
.hole-ring:nth-child(6) { animation-delay: 0.5s; }

@keyframes ringSpiral {
    0% {
        width: 300px;
        height: 300px;
        opacity: 0;
        transform: translate(-50%, -50%) rotate(0deg);
    }
    20% {
        opacity: 0.8;
    }
    100% {
        width: 0;
        height: 0;
        opacity: 0;
        transform: translate(-50%, -50%) rotate(720deg);
    }
}

/* Fallende Partikel die ins Loch gezogen werden */
.hole-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #cc4444;
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 6px #ff6666;
}

.transition-overlay.active .hole-particle {
    animation: particleFall 2s ease-in forwards;
}

@keyframes particleFall {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(1);
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(var(--end-x), var(--end-y)) scale(0) rotate(720deg);
    }
}

/* Text der erscheint */
.hole-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #cc4444;
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    text-shadow: 0 0 20px #ff4444, 0 0 40px #cc0000;
    opacity: 0;
    white-space: nowrap;
    letter-spacing: 3px;
}

.transition-overlay.active .hole-text {
    animation: textFade 2.5s ease-in-out forwards;
}

@keyframes textFade {
    0%, 30% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    80%, 100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

/* ===== BLAUE PILLE - ZURÜCK IN DEN SCHLAF ===== */

.transition-overlay.sleep-mode {
    background: transparent;
}

.sleep-fog {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, 
        rgba(30, 60, 90, 0) 0%,
        rgba(30, 60, 90, 0.3) 30%,
        rgba(20, 40, 70, 0.7) 60%,
        rgba(10, 20, 40, 0.95) 100%);
    animation: fogRoll 3s ease-in forwards;
}

@keyframes fogRoll {
    0% {
        opacity: 0;
        filter: blur(0);
    }
    50% {
        opacity: 0.7;
        filter: blur(3px);
    }
    100% {
        opacity: 1;
        filter: blur(5px);
        background: radial-gradient(ellipse at center, 
            rgba(20, 40, 70, 0.8) 0%,
            rgba(15, 30, 50, 0.95) 50%,
            rgba(5, 15, 30, 1) 100%);
    }
}

.sleep-particle {
    position: absolute;
    color: rgba(100, 140, 180, 0.6);
    font-size: 0.9rem;
    font-style: italic;
    white-space: nowrap;
    opacity: 0;
    filter: blur(1px);
    animation: floatAndFade 3s ease-in-out forwards;
    text-shadow: 0 0 10px rgba(100, 150, 200, 0.5);
}

@keyframes floatAndFade {
    0% {
        opacity: 0;
        transform: translateY(0) scale(1);
        filter: blur(1px);
    }
    30% {
        opacity: 0.8;
        filter: blur(0);
    }
    70% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
        transform: translateY(-50px) scale(0.8);
        filter: blur(3px);
    }
}

.sleep-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    border: 2px solid rgba(100, 149, 168, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    animation: sleepWaveExpand 2.5s ease-out forwards;
}

@keyframes sleepWaveExpand {
    0% {
        width: 50px;
        height: 50px;
        opacity: 0;
        border-color: rgba(100, 149, 168, 0.6);
    }
    20% {
        opacity: 0.8;
    }
    100% {
        width: 150vmax;
        height: 150vmax;
        opacity: 0;
        border-color: rgba(100, 149, 168, 0);
    }
}

.sleep-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(150, 180, 200, 0.9);
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    text-align: center;
    line-height: 2;
    opacity: 0;
    animation: sleepTextFade 3s ease-in-out forwards;
    text-shadow: 0 0 20px rgba(100, 150, 200, 0.5);
}

.sleep-text span {
    display: block;
    font-size: 0.9rem;
    color: rgba(120, 150, 180, 0.6);
    margin-top: 0.5rem;
}

@keyframes sleepTextFade {
    0%, 20% {
        opacity: 0;
        filter: blur(5px);
    }
    50% {
        opacity: 1;
        filter: blur(0);
    }
    85%, 100% {
        opacity: 0;
        filter: blur(3px);
    }
}

/* Container-Effekt für blaue Pille */
.container.fading-away {
    animation: fadeToSleep 3s ease-in forwards;
}

@keyframes fadeToSleep {
    0% {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        filter: blur(3px);
    }
    100% {
        opacity: 0;
        filter: blur(15px);
        transform: scale(0.95);
    }
}

.matrix-bg.dissolving {
    animation: dissolveReality 3s ease-in forwards;
}

@keyframes dissolveReality {
    0% {
        opacity: 0.3;
        filter: hue-rotate(0deg);
    }
    50% {
        opacity: 0.4;
        filter: hue-rotate(180deg) blur(2px);
    }
    100% {
        opacity: 0;
        filter: hue-rotate(360deg) blur(10px);
    }
}

.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(0deg, transparent 24%, rgba(0, 255, 0, 0.05) 25%, rgba(0, 255, 0, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 255, 0, 0.05) 75%, rgba(0, 255, 0, 0.05) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(0, 255, 0, 0.05) 25%, rgba(0, 255, 0, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 255, 0, 0.05) 75%, rgba(0, 255, 0, 0.05) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
    opacity: 0.3;
    z-index: 0;
    transition: transform 2s ease-in, opacity 2s ease-in;
}

.matrix-bg.falling {
    transform: translateZ(-2000px) scale(3);
    opacity: 0;
}

.container {
    text-align: center;
    z-index: 1;
    position: relative;
    padding: 2rem;
    max-width: 800px;
    transition: all 2s ease-in;
    transform-style: preserve-3d;
}

.container.falling {
    transform: translateZ(-3000px) rotateX(20deg) scale(0.1);
    opacity: 0;
    filter: blur(10px);
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px #b8864f, 0 0 20px #d4a574;
    animation: flicker 3s infinite alternate;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.quote {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    font-style: italic;
    opacity: 0.9;
}

.choice-text {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    font-weight: bold;
}

.pills-container {
    display: flex;
    justify-content: center;
    gap: 6rem;
    margin-top: 4rem;
    flex-wrap: wrap;
}

.pill-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.pill-button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.4s ease;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

.pill-image {
    width: 200px;
    height: auto;
    transition: all 0.4s ease;
}

.pill-button:hover {
    transform: translateY(-10px) scale(1.1);
}

.blue-pill:hover .pill-image {
    filter: drop-shadow(0 0 20px #6495a8) 
            drop-shadow(0 0 40px #6495a8)
            drop-shadow(0 0 60px #6495a8);
}

.red-pill:hover .pill-image {
    filter: drop-shadow(0 0 20px #ff4444) 
            drop-shadow(0 0 40px #ff2222)
            drop-shadow(0 0 60px #cc0000);
}

.pill-label {
    font-size: 1rem;
    text-align: center;
    min-width: 200px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px currentColor;
}

.blue-label {
    color: #a0a8b0;
}

.red-label {
    color: #d4a574;
    animation: labelGlow 2s ease-in-out infinite;
}

@keyframes labelGlow {
    0%, 100% {
        text-shadow: 0 0 10px #b8864f;
    }
    50% {
        text-shadow: 0 0 20px #d4a574, 0 0 30px #d4a574;
    }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablets im Landscape */
@media (max-width: 1024px) {
    .container {
        padding: 1.5rem;
        max-width: 90%;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    .pills-container {
        gap: 4rem;
    }
    
    .pill-image {
        width: 180px;
    }
}

/* Tablets im Portrait & große Smartphones */
@media (max-width: 768px) {
    body {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 5vh;
    }
    
    .container {
        padding: 1rem;
        max-width: 100%;
    }
    
    h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .quote {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 2rem;
        padding: 0 0.5rem;
    }
    
    .choice-text {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .pills-container {
        flex-direction: row;
        gap: 2rem;
        margin-top: 2rem;
        justify-content: center;
    }
    
    .pill-wrapper {
        gap: 1rem;
    }
    
    .pill-image {
        width: 130px;
    }
    
    .pill-label {
        font-size: 0.8rem;
        min-width: auto;
        max-width: 140px;
    }
}

/* Smartphones */
@media (max-width: 576px) {
    body {
        padding: 0.5rem;
        padding-top: 3vh;
    }
    
    .container {
        padding: 0.75rem;
    }
    
    h1 {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }
    
    .quote {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }
    
    .quote br {
        display: none;
    }
    
    .choice-text {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .pills-container {
        gap: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .pill-image {
        width: 100px;
    }
    
    .pill-label {
        font-size: 0.7rem;
        max-width: 110px;
        line-height: 1.3;
    }
    
    /* Transition Anpassungen für Mobile */
    .hole-text {
        font-size: 1rem;
    }
    
    .sleep-text {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .sleep-text span {
        font-size: 0.8rem;
    }
}

/* Sehr kleine Smartphones */
@media (max-width: 380px) {
    h1 {
        font-size: 1.4rem;
    }
    
    .quote {
        font-size: 0.8rem;
    }
    
    .choice-text {
        font-size: 0.85rem;
    }
    
    .pills-container {
        gap: 1rem;
    }
    
    .pill-image {
        width: 85px;
    }
    
    .pill-label {
        font-size: 0.65rem;
        max-width: 95px;
    }
}

/* Landscape Modus auf Smartphones */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding-top: 1vh;
        align-items: center;
    }
    
    .container {
        padding: 0.5rem 1rem;
    }
    
    h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .quote {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
    
    .choice-text {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    
    .pills-container {
        gap: 3rem;
        margin-top: 0.5rem;
    }
    
    .pill-wrapper {
        gap: 0.5rem;
    }
    
    .pill-image {
        width: 80px;
    }
    
    .pill-label {
        font-size: 0.65rem;
    }
}
