/* Base Reset and Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Accessibility - Screen reader only content */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Root Variables */
:root {
    --fire-red: #DC143C;
    --fire-orange: #FF6347;
    --fire-yellow: #FFD700;
    --smoke-black: #1a1a1a;
    --smoke-gray: #2d2d2d;
    --light-gray: #f5f5f5;
    --white: #ffffff;
}

/* Body Styling */
body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, var(--smoke-black) 0%, var(--smoke-gray) 50%, var(--fire-red) 100%);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Main Container */
.container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

/* Smoke Overlay Effect */
.smoke-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, 
        rgba(26, 26, 26, 0.3) 0%, 
        rgba(26, 26, 26, 0.6) 40%, 
        rgba(26, 26, 26, 0.9) 100%);
    animation: smoke 8s infinite ease-in-out;
    pointer-events: none;
}

@keyframes smoke {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Flame Border Effects */
.flame-border {
    position: absolute;
    width: 100%;
    height: 60px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--fire-yellow) 10%, 
        var(--fire-orange) 30%, 
        var(--fire-red) 50%, 
        var(--fire-orange) 70%, 
        var(--fire-yellow) 90%, 
        transparent 100%);
    filter: blur(2px);
    opacity: 0.8;
}

.flame-border.top {
    top: -30px;
    animation: flicker 3s infinite ease-in-out;
}

.flame-border.bottom {
    bottom: -30px;
    animation: flicker 3s infinite ease-in-out reverse;
}

@keyframes flicker {
    0%, 100% { 
        transform: scaleY(1);
        opacity: 0.8;
    }
    25% { 
        transform: scaleY(1.2);
        opacity: 0.9;
    }
    50% { 
        transform: scaleY(0.9);
        opacity: 0.7;
    }
    75% { 
        transform: scaleY(1.1);
        opacity: 0.85;
    }
}

/* Main Header */
.main-header {
    text-align: center;
    z-index: 20;
    position: relative;
}

/* Hero Name Styling with Word Animation */
.hero-name {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
}

.hero-name .word {
    display: inline-block;
    color: var(--white);
    text-shadow: 
        0 0 20px var(--fire-red),
        0 0 40px var(--fire-orange),
        0 0 60px var(--fire-yellow),
        3px 3px 0 var(--smoke-black),
        4px 4px 10px rgba(0, 0, 0, 0.8);
    animation: 
        fireGlow 2s ease-in-out infinite alternate,
        wordFloat 4s ease-in-out infinite,
        wordPulse 2s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.3s);
    transform-origin: center center;
    cursor: default;
    transition: all 0.3s ease;
    position: relative;
}

.hero-name .word:hover {
    animation: 
        fireGlow 0.5s ease-in-out infinite alternate,
        wordExplode 0.8s ease-out forwards;
    transform: scale(1.2) translateY(-10px) rotateZ(5deg);
    filter: brightness(1.5) saturate(1.5);
    z-index: 10;
}

@keyframes fireGlow {
    0% {
        text-shadow: 
            0 0 20px var(--fire-red),
            0 0 40px var(--fire-orange),
            0 0 60px var(--fire-yellow),
            3px 3px 0 var(--smoke-black),
            4px 4px 10px rgba(0, 0, 0, 0.8);
    }
    100% {
        text-shadow: 
            0 0 30px var(--fire-red),
            0 0 60px var(--fire-orange),
            0 0 80px var(--fire-yellow),
            3px 3px 0 var(--smoke-black),
            4px 4px 15px rgba(0, 0, 0, 0.9);
    }
}

@keyframes wordFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    25% {
        transform: translateY(-10px) scale(1.02);
    }
    50% {
        transform: translateY(3px) scale(0.98);
    }
    75% {
        transform: translateY(-5px) scale(1.01);
    }
}

@keyframes wordPulse {
    0%, 100% {
        filter: brightness(1) hue-rotate(0deg);
    }
    50% {
        filter: brightness(1.3) hue-rotate(15deg);
    }
}

@keyframes wordExplode {
    0% {
        transform: scale(1) translateY(0) rotateZ(0deg);
    }
    50% {
        transform: scale(1.3) translateY(-20px) rotateZ(10deg);
    }
    100% {
        transform: scale(1.2) translateY(-10px) rotateZ(5deg);
    }
}

/* Fire Particles Effect */
.fire-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.fire-particles::before,
.fire-particles::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--fire-orange);
    border-radius: 50%;
    box-shadow: 
        20px 20px 0 var(--fire-yellow),
        -20px -20px 0 var(--fire-red),
        40px -40px 0 var(--fire-orange),
        -40px 40px 0 var(--fire-yellow),
        60px 60px 0 var(--fire-red),
        -60px -60px 0 var(--fire-orange),
        80px -80px 0 var(--fire-yellow),
        -80px 80px 0 var(--fire-red),
        100px 100px 0 var(--fire-orange),
        -100px -100px 0 var(--fire-yellow),
        120px -120px 0 var(--fire-red),
        -120px 120px 0 var(--fire-orange),
        140px 140px 0 var(--fire-yellow),
        -140px -140px 0 var(--fire-red),
        160px -160px 0 var(--fire-orange),
        -160px 160px 0 var(--fire-yellow),
        180px 180px 0 var(--fire-red),
        -180px -180px 0 var(--fire-orange),
        200px -200px 0 var(--fire-yellow),
        -200px 200px 0 var(--fire-red);
    animation: floatParticles 15s infinite linear;
}

.fire-particles::before {
    left: 50%;
    bottom: 0;
}

.fire-particles::after {
    left: 50%;
    bottom: 0;
    animation-delay: -7.5s;
}

@keyframes floatParticles {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px) scale(0);
        opacity: 0;
    }
}

/* Badge Accent */
.badge-accent {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--fire-yellow) 0%, var(--fire-red) 100%);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    opacity: 0.6;
    animation: pulse 3s infinite ease-in-out, rotateBadge 10s infinite linear;
}

@keyframes pulse {
    0%, 100% { 
        transform: translateX(-50%) scale(1) rotate(0deg);
        opacity: 0.6;
    }
    50% { 
        transform: translateX(-50%) scale(1.1) rotate(180deg);
        opacity: 0.8;
    }
}

@keyframes rotateBadge {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        height: 300px;
    }
    
    .flame-border {
        height: 40px;
    }
    
    .badge-accent {
        width: 80px;
        height: 80px;
        bottom: -40px;
    }
    
    .hero-name .word {
        animation: 
            fireGlow 2s ease-in-out infinite alternate,
            wordPulse 2s ease-in-out infinite;
    }
}

@media (max-width: 480px) {
    .hero-name {
        letter-spacing: 0.02em;
        gap: 0.8rem;
        font-size: clamp(2rem, 7vw, 4rem);
    }
    
    .hero-section {
        height: 250px;
    }
    
    .badge-accent {
        width: 60px;
        height: 60px;
        bottom: -30px;
    }
    
    .fire-particles::before,
    .fire-particles::after {
        display: none;
    }
}