body {
    background-color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.banner-image {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.banner-image img {
    display: block;
    width: 100vw;
    text-align: center;
    filter: brightness(40%);
    object-fit: cover;
    object-position: center;
    height: 100vh;
}

.page-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    text-align: center;
}

.error-content {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 60px 40px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.error-number {
    color: white;
    font-size: 180px;
    font-weight: 900;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    margin: 0;
    line-height: 1;
    animation: glowPulse 3s ease-in-out infinite;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    position: relative;
    display: inline-block;
    overflow: visible;
    z-index: 999;
}

.error-number:hover {
    transform: scale(1.05);
    text-shadow: 0 0 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Lightning Strike Effect */
.lightning-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.lightning-bolt {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 0;
    background: linear-gradient(to bottom,
    #ffffff 0%,
    #87ceeb 20%,
    #4169e1 40%,
    #0000ff 60%,
    #4b0082 80%,
    transparent 100%);
    box-shadow:
            0 0 10px #ffffff,
            0 0 20px #87ceeb,
            0 0 30px #4169e1,
            0 0 40px #0000ff;
    opacity: 0;
    border-radius: 2px;
}

.lightning-bolt::before {
    content: '';
    position: absolute;
    top: 0;
    left: -1px;
    width: 6px;
    height: 100%;
    background: linear-gradient(to bottom,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(135, 206, 235, 0.6) 20%,
    rgba(65, 105, 225, 0.4) 40%,
    rgba(0, 0, 255, 0.2) 60%,
    transparent 80%);
    border-radius: 3px;
}

.lightning-bolt::after {
    content: '';
    position: absolute;
    top: 0;
    left: -2px;
    width: 8px;
    height: 100%;
    background: linear-gradient(to bottom,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(135, 206, 235, 0.3) 20%,
    rgba(65, 105, 225, 0.2) 40%,
    transparent 60%);
    border-radius: 4px;
}

/* Spark Effects */
.spark {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 6px #ffffff, 0 0 12px #87ceeb;
    opacity: 0;
    pointer-events: none;
}

.spark.electric {
    background: linear-gradient(45deg, #ffffff, #87ceeb, #4169e1);
    box-shadow:
            0 0 8px #ffffff,
            0 0 16px #87ceeb,
            0 0 24px #4169e1;
}

/* Lightning Strike Animation */
@keyframes lightningStrike {
    0% {
        height: 0;
        opacity: 0;
    }
    10% {
        height: 300px;
        opacity: 1;
    }
    15% {
        height: 400px;
        opacity: 0.8;
    }
    20% {
        height: 500px;
        opacity: 1;
    }
    25% {
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    35% {
        opacity: 0;
    }
    40% {
        opacity: 0.6;
    }
    50% {
        opacity: 0;
    }
    100% {
        height: 500px;
        opacity: 0;
    }
}

/* Spark Burst Animations */
@keyframes sparkBurst1 {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-80px, -60px) scale(0.3);
    }
}

@keyframes sparkBurst2 {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(70px, -40px) scale(0.4);
    }
}

@keyframes sparkBurst3 {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50px, 80px) scale(0.2);
    }
}

@keyframes sparkBurst4 {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(90px, 70px) scale(0.5);
    }
}

@keyframes sparkBurst5 {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-40px, -90px) scale(0.3);
    }
}

@keyframes sparkBurst6 {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(60px, -80px) scale(0.4);
    }
}

@keyframes sparkBurst7 {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-70px, 50px) scale(0.2);
    }
}

@keyframes sparkBurst8 {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(85px, -30px) scale(0.6);
    }
}

/* Number Flash Effect */
.error-number.lightning-flash {
    color: #ffffff !important;
    text-shadow:
            0 0 20px #ffffff,
            0 0 40px #87ceeb,
            0 0 60px #4169e1,
            0 0 80px #0000ff !important;
    animation: numberFlash 2s ease-out;
}

@keyframes numberFlash {
    0% {
        filter: brightness(1);
    }
    10% {
        filter: brightness(3) saturate(2);
    }
    20% {
        filter: brightness(1.5);
    }
    30% {
        filter: brightness(2.5) saturate(1.8);
    }
    40% {
        filter: brightness(1.2);
    }
    50% {
        filter: brightness(1);
    }
    100% {
        filter: brightness(1);
    }
}

/* Screen Flash Effect */
@keyframes screenFlash {
    0% {
        background: rgba(255, 255, 255, 0);
    }
    5% {
        background: rgba(255, 255, 255, 0.3);
    }
    10% {
        background: rgba(135, 206, 235, 0.2);
    }
    15% {
        background: rgba(255, 255, 255, 0.4);
    }
    20% {
        background: rgba(65, 105, 225, 0.1);
    }
    100% {
        background: rgba(255, 255, 255, 0);
    }
}

.screen-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
}

.screen-flash.active {
    opacity: 1;
    animation: screenFlash 2s ease-out;
}

/* Thunder Sound Effect Visual */
.thunder-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

.thunder-ripple.active {
    animation: thunderRipple 1.5s ease-out;
}

@keyframes thunderRipple {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
    }
    50% {
        width: 300px;
        height: 300px;
        opacity: 0.4;
    }
    100% {
        width: 600px;
        height: 600px;
        opacity: 0;
    }
}

.error-title {
    color: white;
    font-size: 48px;
    font-weight: bold;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
    margin: 20px 0;
}

.error-subtitle {
    color: white;
    font-size: 24px;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
    margin: 20px 0 40px;
    opacity: 0.9;
}

.home-button {
    font-size: 20px;
    padding: 15px 35px;
    border-radius: 50px;
    margin: 10px;
    border: 2px solid white;
    background: transparent;
    color: white;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.home-button:hover {
    background: white;
    color: black;
    transform: translateY(-3px);
    box-shadow: 0 5px 25px rgba(255, 255, 255, 0.5);
}

.home-button i {
    margin-right: 8px;
}

/* Floating animation for the error content */
.error-content {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glowPulse {
    0%, 100% {
        text-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    }
    50% {
        text-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
    }
}

/* Responsive design */
@media (max-width: 1050px) {
    .error-number {
        font-size: 140px;
    }
    .error-title {
        font-size: 36px;
    }
    .error-subtitle {
        font-size: 20px;
    }
    .error-content {
        padding: 40px 30px;
    }

    .lightning-bolt {
        width: 3px;
    }

    .lightning-bolt::before {
        left: -0.5px;
        width: 4px;
    }

    .lightning-bolt::after {
        left: -1px;
        width: 5px;
    }
}

@media (max-width: 700px) {
    .error-number {
        font-size: 100px;
    }
    .error-title {
        font-size: 28px;
    }
    .error-subtitle {
        font-size: 16px;
    }
    .error-content {
        padding: 30px 20px;
    }
    .home-button {
        font-size: 18px;
        padding: 12px 25px;
    }

    .lightning-bolt {
        width: 2px;
    }

    .lightning-bolt::before {
        left: -0.5px;
        width: 3px;
    }

    .lightning-bolt::after {
        left: -1px;
        width: 4px;
    }

    .spark {
        width: 2px;
        height: 2px;
    }

    @keyframes lightningStrike {
        0% {
            height: 0;
            opacity: 0;
        }
        10% {
            height: 200px;
            opacity: 1;
        }
        15% {
            height: 250px;
            opacity: 0.8;
        }
        20% {
            height: 300px;
            opacity: 1;
        }
        25% {
            opacity: 0;
        }
        30% {
            opacity: 1;
        }
        35% {
            opacity: 0;
        }
        40% {
            opacity: 0.6;
        }
        50% {
            opacity: 0;
        }
        100% {
            height: 300px;
            opacity: 0;
        }
    }
}

@media (max-width: 400px) {
    .error-number {
        font-size: 80px;
    }
    .error-title {
        font-size: 24px;
    }
    .error-subtitle {
        font-size: 14px;
    }
    .page-content {
        width: 95%;
    }
    .error-content {
        margin: 10px 0;
    }
}

/* Background pattern overlay */
.banner-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(0, 0, 0, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 0, 0, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(0, 0, 0, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.page-content {
    z-index: 2;
}
