:root {
    --primary: #FF5A00; /* Construction Orange */
    --secondary: #FFCC00; /* Warning Yellow */
    --accent: #FF2200; /* Danger Red */
    --bg-dark: #121212; /* Asphalt / Graphite */
    --text-main: #FFFFFF;
    --text-muted: #B3B3B3;
    --glass-bg: rgba(20, 20, 20, 0.85);
    --glass-border: rgba(255, 90, 0, 0.3);
    --hazard-black: #111111;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    /* Dirty/Grit radial gradient */
    background-image: radial-gradient(circle at 50% 50%, #2a2a2a 0%, #0a0a0a 100%), 
                      repeating-linear-gradient(0deg, transparent, transparent 49px, rgba(255,255,255,0.03) 50px);
    background-size: 100% 100%, 50px 50px;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.background-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

/* Wrecking Ball Animation */
.wrecking-ball-container {
    position: absolute;
    top: -50px;
    left: 15%;
    transform-origin: top center;
    animation: swing 6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
    z-index: 1;
}

.cable {
    width: 6px;
    height: 40vh;
    background: linear-gradient(90deg, #444, #777, #333);
    margin: 0 auto;
    position: relative;
    box-shadow: 2px 0 5px rgba(0,0,0,0.5);
}

.ball {
    width: 90px;
    height: 90px;
    background: radial-gradient(circle at 35% 35%, #9CA3AF, #4B5563 50%, #1F2937 90%);
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
    top: -5px;
    box-shadow: -10px 15px 25px rgba(0,0,0,0.8), inset -5px -5px 15px rgba(0,0,0,0.5);
}

.ball::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 15%;
    width: 20px;
    height: 20px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    filter: blur(2px);
}

@keyframes swing {
    0% { transform: rotate(25deg); }
    50% { transform: rotate(-25deg); }
    100% { transform: rotate(25deg); }
}

/* Sparks/Debris */
.spark {
    position: absolute;
    width: 4px;
    height: 20px;
    background: var(--secondary);
    border-radius: 2px;
    filter: blur(1px);
    opacity: 0;
    box-shadow: 0 0 10px var(--secondary), 0 0 20px var(--primary);
}

.spark-1 { top: 60%; left: 30%; transform: rotate(45deg); animation: shoot 2s infinite 0.2s; }
.spark-2 { top: 40%; left: 70%; transform: rotate(-30deg); animation: shoot 3s infinite 1.5s; background: var(--primary); }
.spark-3 { top: 70%; left: 80%; transform: rotate(-60deg); animation: shoot 2.5s infinite 0.7s; }
.spark-4 { top: 20%; left: 40%; transform: rotate(15deg); animation: shoot 4s infinite 2.2s; background: var(--primary); }

@keyframes shoot {
    0% { transform: translate(0, 0) scale(1) rotate(45deg); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translate(100px, -100px) scale(0) rotate(45deg); opacity: 0; }
}

/* Main Content */
.container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 650px;
    padding: 20px;
}

.hazard-bar {
    height: 16px;
    width: 100%;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5), inset 0 0 5px rgba(0,0,0,0.5);
    border: 2px solid var(--hazard-black);
}
.top-bar { margin-bottom: 24px; }
.bottom-bar { margin-top: 24px; }

.hazard-stripes {
    background-image: repeating-linear-gradient(
        -45deg,
        var(--secondary) 0,
        var(--secondary) 25px,
        var(--hazard-black) 25px,
        var(--hazard-black) 50px
    );
    background-size: 70.7px 70.7px; /* 50 * sqrt(2) */
    animation: stripeMove 2s linear infinite;
}

@keyframes stripeMove {
    0% { background-position: 0 0; }
    100% { background-position: 70.7px 0; }
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    padding: 4rem 3rem;
    text-align: center;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.9), inset 0 0 30px rgba(255, 90, 0, 0.05);
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
}

/* Gritty border effect on glass-panel top */
.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--primary), var(--secondary));
    box-shadow: 0 0 15px var(--primary);
}

@keyframes slideUp {
    to { transform: translateY(0); opacity: 1; }
}

/* Flashing warning light */
.warning-light {
    position: absolute;
    top: -2px;
    right: 20px;
    width: 40px;
    height: 15px;
    background: var(--accent);
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    box-shadow: 0 10px 30px var(--accent);
    animation: flashLight 1s infinite alternate;
}

@keyframes flashLight {
    0%, 20% { opacity: 0.3; box-shadow: 0 5px 10px rgba(255, 34, 0, 0.2); }
    80%, 100% { opacity: 1; box-shadow: 0 15px 40px rgba(255, 34, 0, 0.8), 0 0 20px var(--accent); }
}

.icon-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    background: var(--hazard-black);
    border: 3px solid var(--secondary);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 204, 0, 0.2);
    transform: rotate(45deg);
}

.icon-container svg {
    color: var(--secondary);
    transform: rotate(-45deg);
    filter: drop-shadow(0 0 5px var(--secondary));
}

.title {
    font-size: 3.2rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.title .highlight {
    color: var(--primary);
    text-shadow: 0 0 25px rgba(255, 90, 0, 0.4);
    display: inline-block;
    position: relative;
}

.description {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 3rem;
    font-weight: 400;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.progress-container {
    margin-bottom: 1rem;
    text-align: left;
    background: rgba(0,0,0,0.4);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}

.progress-bar {
    width: 100%;
    height: 24px;
    background: var(--hazard-black);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 2px solid #333;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.8);
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    animation: fillProgress 2s cubic-bezier(0.1, 0.7, 0.1, 1) 0.5s forwards, stripeMove 1.5s linear infinite;
}

@keyframes fillProgress {
    to { width: 65%; }
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blinking-text {
    color: var(--primary);
    animation: blink 1.5s steps(2, start) infinite;
}

@keyframes blink {
    to { opacity: 0.3; }
}

@media (max-width: 480px) {
    .title { font-size: 2.2rem; }
    .glass-panel { padding: 3rem 1.5rem; }
    .wrecking-ball-container { left: 5%; }
    .ball { width: 70px; height: 70px; }
    .cable { height: 35vh; }
}
