/* Chapter Transition Styles */
#chapter-warp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
}

#chapter-warp-overlay.active {
    display: flex;
    animation: fadeIn 1s ease-out forwards;
}

.warp-content {
    text-align: center;
    max-width: 600px;
    padding: 20px;
    z-index: 2;
}

.warp-title {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 10px;
    margin-bottom: 20px;
    background: linear-gradient(to bottom, #fff, #333);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.warp-stats {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 40px;
    text-align: left;
}

.warp-stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.warp-stat-label {
    color: #888;
}

.warp-stat-val {
    color: var(--accent-primary);
    font-weight: 700;
}

.warp-btn {
    background: #fff;
    color: #000;
    border: none;
    padding: 15px 50px;
    font-size: 1.5rem;
    font-weight: 900;
    border-radius: 50px;
    cursor: pointer;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.warp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.5);
}

.warp-btn:active {
    transform: scale(0.95);
}

/* Cinematic Stars */
.warp-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    opacity: 0.5;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes warp-flash {
    0% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(20);
    }

    100% {
        filter: brightness(1);
        opacity: 0;
    }
}

.flashing {
    animation: warp-flash 1.5s ease-in forwards;
}

@keyframes shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

.shaking {
    animation: shake 0.5s infinite;
}