* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial Black', 'Segoe UI', sans-serif;
    background: #000;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    cursor: none;
}

/* Fire Background */
.fire-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.fire {
    position: absolute;
    bottom: -100px;
    width: 200px;
    height: 200px;
    background: radial-gradient(ellipse at bottom, 
        rgba(255, 80, 0, 0.8) 0%,
        rgba(255, 40, 0, 0.6) 20%,
        rgba(255, 0, 0, 0.4) 40%,
        transparent 70%);
    border-radius: 50%;
    animation: fireAnimation 3s ease-in-out infinite;
    filter: blur(10px);
}

.fire:nth-child(1) { left: 10%; animation-delay: 0s; }
.fire:nth-child(2) { left: 30%; animation-delay: 0.5s; }
.fire:nth-child(3) { left: 50%; animation-delay: 1s; }
.fire:nth-child(4) { left: 70%; animation-delay: 1.5s; }
.fire:nth-child(5) { left: 90%; animation-delay: 2s; }
.fire:nth-child(6) { left: 20%; animation-delay: 2.5s; }
.fire:nth-child(7) { left: 40%; animation-delay: 0.7s; }
.fire:nth-child(8) { left: 80%; animation-delay: 1.2s; }

.container {
    text-align: center;
    max-width: 600px;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.animation-container {
    margin-bottom: 2rem;
}

/* Demon Face Animation */
.demon-face {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    position: relative;
    background: linear-gradient(45deg, #8B0000, #FF4500);
    border-radius: 50%;
    box-shadow: 
        0 0 50px #FF0000,
        inset 0 0 20px rgba(0,0,0,0.5);
    animation: demonFloat 4s ease-in-out infinite;
}

.eyes-container {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    padding: 0 30px;
}

.eye {
    width: 25px;
    height: 25px;
    background: #000;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    border: 2px solid #FFD700;
    transition: height 0.1s ease;
}

.pupil {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #FF0000;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
    box-shadow: 0 0 10px #FF0000;
}

.mouth {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 40px;
    background: #000;
    border-radius: 0 0 40px 40px;
    overflow: hidden;
    border: 2px solid #FF4500;
}

.teeth {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 15px;
    background: 
        repeating-linear-gradient(90deg,
            #FFF 0px, #FFF 5px,
            transparent 5px, transparent 10px);
}

.tongue {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 20px;
    background: #FF69B4;
    border-radius: 10px 10px 0 0;
    animation: tongueMove 2s ease-in-out infinite;
}

.horns {
    position: absolute;
    top: -30px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.horn {
    width: 30px;
    height: 60px;
    background: linear-gradient(45deg, #8B0000, #FF4500);
    border-radius: 50% 50% 0 0;
    transform: rotate(-15deg);
}

.horn.right-horn {
    transform: rotate(15deg);
}

/* Content Styling */
.error-code {
    font-size: 8rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #FF0000, #FF4500, #FF8C00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
    animation: codePulse 2s infinite;
}

.error-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #FF4500;
    text-shadow: 0 0 10px rgba(255, 69, 0, 0.7);
}

.error-message {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #FFA07A;
    line-height: 1.6;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hell-btn {
    background: linear-gradient(45deg, #8B0000, #FF0000);
    color: #FFF;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.heaven-btn {
    background: linear-gradient(45deg, #1E90FF, #00BFFF);
    color: #FFF;
    box-shadow: 0 0 20px rgba(30, 144, 255, 0.5);
}

.btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.7);
}

.heaven-btn:hover {
    box-shadow: 0 10px 30px rgba(30, 144, 255, 0.7);
}

/* Animations */
@keyframes fireAnimation {
    0%, 100% { 
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }
    50% { 
        transform: translateY(-50px) scale(1.2);
        opacity: 1;
    }
}

@keyframes demonFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(2deg); }
    75% { transform: translateY(-5px) rotate(-2deg); }
}

@keyframes tongueMove {
    0%, 100% { height: 20px; }
    50% { height: 15px; }
}

@keyframes codePulse {
    0%, 100% { 
        text-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 0 50px rgba(255, 0, 0, 0.8);
        transform: scale(1.05);
    }
}

/* Floating embers */
.container::before {
    content: '✦✦✦';
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    font-size: 2rem;
    color: #FF4500;
    animation: emberFloat 10s linear infinite;
    opacity: 0.3;
}

@keyframes emberFloat {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .error-code {
        font-size: 6rem;
    }
    
    .error-title {
        font-size: 1.5rem;
    }
    
    .demon-face {
        width: 150px;
        height: 150px;
    }
    
    .eyes-container {
        top: 45px;
        padding: 0 20px;
    }
    
    .eye {
        width: 20px;
        height: 20px;
    }
    
    .actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 250px;
    }
}