:root {
    --bg-color: #0f172a;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;

    /* Construction Colors */
    --equip-yellow: #F59E0B;
    /* Main body color */
    --equip-dark: #B45309;
    /* Shadows/Darker parts */
    --equip-black: #1e293b;
    /* Tires/Tracks/Cabins */
    --metal-grey: #64748b;
    --glass-blue: #a5f3fc;

    --glass-bg: rgba(15, 23, 42, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-family: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    background: radial-gradient(circle at 50% 100%, #334155 0%, #0f172a 100%);
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 650px;
    /* Wider for the scene */
    padding: 1rem;
}

.content {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.6);
}

.logo-area {
    margin-bottom: 2rem;
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 14px;
    border-radius: 10px;
}

/* --- SITE SCENE --- */
.site-scene {
    height: 220px;
    width: 100%;
    position: relative;
    margin-bottom: 2rem;
    border-bottom: 3px solid rgba(255, 255, 255, 0.1);
    /* Ground line */
}

/* 1. TOWER CRANE (Far Back) */
.crane-wrapper {
    position: absolute;
    left: 10%;
    bottom: 0;
    width: 150px;
    height: 180px;
    opacity: 0.8;
    z-index: 1;
    transform: scale(0.8);
    transform-origin: bottom left;
}

.crane-tower {
    width: 12px;
    height: 100%;
    background: repeating-linear-gradient(45deg, var(--equip-yellow), var(--equip-yellow) 5px, transparent 5px, transparent 10px),
        linear-gradient(90deg, var(--equip-dark), var(--equip-yellow));
    position: absolute;
    left: 40px;
    bottom: 0;
}

.crane-top {
    position: absolute;
    top: 10px;
    left: 35px;
    transform-origin: 11px 1px;
    /* Pivot point */
    animation: sway 6s ease-in-out infinite alternate;
}

.crane-arm-back {
    width: 40px;
    height: 8px;
    background: var(--equip-dark);
    position: absolute;
    right: -5px;
    top: 0;
}

.crane-arm-front {
    width: 100px;
    height: 6px;
    background: var(--equip-yellow);
    position: absolute;
    left: 10px;
    top: 0;
}

.crane-cabin {
    width: 15px;
    height: 15px;
    background: var(--equip-black);
    position: absolute;
    top: -15px;
    left: 5px;
}

.trolley {
    position: absolute;
    left: 20px;
    top: 0;
    animation: trolleyMove 8s ease-in-out infinite alternate;
}

.cable {
    width: 1px;
    height: 30px;
    background: #fff;
    margin-left: 2px;
    animation: hoist 8s ease-in-out infinite alternate;
}

.hook-load {
    width: 12px;
    height: 8px;
    background: var(--metal-grey);
    position: absolute;
    bottom: -38px;
    /* Based on cable height */
    left: -4px;
    animation: loadBob 8s ease-in-out infinite alternate;
}

/* 2. DUMP TRUCK (Middle Ground) */
.truck-wrapper {
    position: absolute;
    right: 5%;
    bottom: 0px;
    width: 110px;
    height: 60px;
    z-index: 2;
    transform: scaleX(-1);
    /* Face left */
}

.truck-body {
    position: relative;
    width: 100%;
    height: 100%;
}

.truck-chassis {
    width: 100%;
    height: 12px;
    background: var(--equip-black);
    position: absolute;
    bottom: 12px;
    border-radius: 4px;
}

.truck-cab {
    width: 30px;
    height: 35px;
    background: var(--equip-yellow);
    /* Yellow Cab */
    position: absolute;
    right: 0;
    bottom: 18px;
    border-radius: 4px 10px 0 0;
}

.truck-cab::after {
    /* Window */
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 15px;
    height: 12px;
    background: var(--glass-blue);
    border-radius: 0 5px 0 0;
}

.truck-bed {
    width: 70px;
    height: 30px;
    background: #ef4444;
    /* SGC Redish/Pink for contrast */
    position: absolute;
    left: 0;
    bottom: 20px;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 15% 100%);
    transform-origin: bottom right;
    animation: dumpAction 8s ease-in-out infinite;
}

.dirt-load {
    width: 60px;
    height: 10px;
    background: #78350f;
    border-radius: 10px 10px 0 0;
    position: absolute;
    top: -5px;
    left: 5px;
    opacity: 0;
    /* Hidden initially */
    animation: showDirt 8s ease-in-out infinite;
}

.truck-wheels {
    position: absolute;
    bottom: 0;
    width: 100%;
}

.t-wheel {
    width: 22px;
    height: 22px;
    background: #000;
    border: 3px solid #333;
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    animation: wheelShake 0.5s linear infinite;
    /* Idling vibration */
}

.tw1 {
    left: 10px;
}

.tw2 {
    right: 5px;
}


/* 3. EXCAVATOR (Foreground) */
.excavator-wrapper {
    position: absolute;
    left: 45%;
    bottom: 0;
    transform: translateX(-50%);
    width: 120px;
    height: 80px;
    z-index: 3;
}

.excavator-body {
    position: absolute;
    bottom: 15px;
    left: 10px;
    width: 50px;
    height: 30px;
    background: var(--equip-yellow);
    border-radius: 5px;
    z-index: 2;
}

.cab {
    position: absolute;
    top: -15px;
    left: 5px;
    width: 25px;
    height: 25px;
    background: var(--equip-yellow);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px 4px 0 0;
}

.cab::before {
    /* Window */
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--glass-blue);
    border-radius: 2px;
}

.tracks {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 70px;
    height: 18px;
    background: var(--equip-black);
    border-radius: 8px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
}

.wheel {
    width: 10px;
    height: 10px;
    background: #555;
    border-radius: 50%;
}

/* Boom System */
.boom {
    position: absolute;
    bottom: 30px;
    right: 50px;
    /* Attached to body */
    width: 60px;
    height: 8px;
    background: var(--equip-yellow);
    transform-origin: left center;
    transform: rotate(-45deg);
    animation: boomDig 4s ease-in-out infinite;
}

.arm {
    position: absolute;
    right: -2px;
    top: 0;
    width: 45px;
    height: 6px;
    background: var(--equip-yellow);
    transform-origin: left center;
    transform: rotate(80deg);
    animation: armDig 4s ease-in-out infinite;
}

.bucket {
    position: absolute;
    right: -10px;
    top: -5px;
    width: 15px;
    height: 15px;
    background: var(--equip-dark);
    border-radius: 0 0 10px 0;
    transform-origin: left top;
    transform: rotate(-10deg);
    animation: bucketDig 4s ease-in-out infinite;
    clip-path: polygon(0 0, 100% 0, 80% 100%, 0 80%);
}

.dirt-pile {
    position: absolute;
    bottom: 0;
    right: -30px;
    width: 40px;
    height: 20px;
    background: #78350f;
    border-radius: 50% 50% 0 0;
    z-index: 4;
}

/* ANIMATIONS */
@keyframes sway {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(2deg);
    }
}

@keyframes trolleyMove {
    0% {
        left: 20px;
    }

    100% {
        left: 60px;
    }
}

@keyframes hoist {
    0% {
        height: 30px;
    }

    50% {
        height: 50px;
    }

    100% {
        height: 30px;
    }
}

@keyframes loadBob {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(20px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes boomDig {
    0% {
        transform: rotate(-45deg);
    }

    40% {
        transform: rotate(-25deg);
    }

    /* Lower */
    60% {
        transform: rotate(-25deg);
    }

    100% {
        transform: rotate(-45deg);
    }

    /* Lift */
}

@keyframes armDig {
    0% {
        transform: rotate(80deg);
    }

    40% {
        transform: rotate(110deg);
    }

    /* Reach out */
    50% {
        transform: rotate(60deg);
    }

    /* Scoop in */
    100% {
        transform: rotate(80deg);
    }
}

@keyframes bucketDig {
    0% {
        transform: rotate(-10deg);
    }

    45% {
        transform: rotate(-40deg);
    }

    /* Open */
    55% {
        transform: rotate(40deg);
    }

    /* Scoop */
    100% {
        transform: rotate(-10deg);
    }

    /* Dump */
}

@keyframes dumpAction {

    0%,
    60% {
        transform: rotate(0deg);
    }

    70% {
        transform: rotate(-25deg);
    }

    /* Tip up */
    90% {
        transform: rotate(-25deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes showDirt {

    0%,
    70% {
        opacity: 1;
    }

    80%,
    100% {
        opacity: 0;
    }

    /* Dumped */
}

@keyframes wheelShake {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-0.5px);
    }

    100% {
        transform: translateY(0);
    }
}

/* TEXT */
.title {
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    font-weight: 700;
}

.gradient-text {
    background: linear-gradient(135deg, var(--equip-yellow) 0%, #E6007E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

@media (max-width: 640px) {
    .site-scene {
        height: 180px;
    }

    .title {
        font-size: 2rem;
    }

    .truck-wrapper {
        right: -10px;
        transform: scaleX(-1) scale(0.8);
    }

    .crane-wrapper {
        left: -10px;
        transform: scale(0.6);
    }

    .excavator-wrapper {
        transform: translateX(-50%) scale(0.8);
        bottom: -10px;
    }
}