:root {
    --primary-color: #DEC28B;
    /* Cadbury Gold */
    --secondary-color: #000000;
    /* Black */
    --bg-color: #000000;
    /* Black */
    --ui-font: 'Outfit', sans-serif;
}

body {
    margin: 0;
    overflow: hidden;
    background-color: var(--bg-color);
    font-family: var(--ui-font);
    color: white;
    user-select: none;
}

#game-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(20, 20, 20, 0.9) 0%, rgba(0, 0, 0, 0.95) 100%);
    backdrop-filter: blur(15px);
    transition: opacity 0.5s ease;
    pointer-events: auto;
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.logo-img {
    width: min(400px, 70vw);
    height: auto;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 4px 20px rgba(222, 194, 139, 0.5));
}

.brand-title {
    font-size: 2.5rem;
    text-transform: uppercase;
    color: var(--primary-color);
    letter-spacing: 4px;
    margin-bottom: 2rem;
    text-shadow: 0 0 15px rgba(222, 194, 139, 0.4);
}

h1 {
    font-size: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(222, 194, 139, 0.5);
}

p {
    font-size: 1.2rem;
    color: #f5f0e8;
    margin-bottom: 2rem;
    max-width: 600px;
    text-align: center;
    line-height: 1.6;
}

.highlight {
    color: var(--primary-color);
    font-weight: 600;
}

button {
    background: rgba(222, 194, 139, 0.1);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

button:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(222, 194, 139, 0.4);
}

/* Loader */
.loader {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(222, 194, 139, 0.2);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    margin-bottom: 30px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* HUD */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#hud.hidden {
    display: none;
}

.score-board {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    font-weight: 600;
    color: var(--primary-color);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s;
}

@keyframes scorePulse {
    0% {
        transform: translateX(-50%) scale(1);
    }

    50% {
        transform: translateX(-50%) scale(1.2);
        color: #FFF;
        text-shadow: 0 0 20px #FFF;
    }

    100% {
        transform: translateX(-50%) scale(1);
    }
}

.score-board.pulse {
    animation: scorePulse 0.3s ease-out;
}

.floating-choc {
    position: absolute;
    width: 50px;
    height: 50px;
    background-image: url('assets/ai-generated-chocolate-clip-art-free-png.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 100;
    transition: all 2.0s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Even slower custom bounce easing */
    transform-origin: center;
    margin-left: -25px;
    margin-top: -25px;
}

.health-container {
    position: absolute;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 12px;
    background: rgba(45, 0, 107, 0.6);
    border: 1px solid rgba(222, 194, 139, 0.3);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#health-bar {
    height: 100%;
    background: linear-gradient(90deg, #DEC28B 0%, #B18D58 100%);
    box-shadow: 0 0 15px rgba(222, 194, 139, 0.5);
    transition: width 0.3s ease;
}

.status-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(45, 0, 107, 0.7);
    padding: 10px 18px;
    border-radius: 30px;
    border: 1px solid rgba(222, 194, 139, 0.2);
}

.status-indicator .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ff5555;
    box-shadow: 0 0 8px #ff5555;
    transition: all 0.3s;
}

.status-indicator.tracking .dot {
    background-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.status-indicator .text {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Gesture Cursor */
#gesture-cursor {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    display: none;
    box-shadow: 0 0 20px var(--primary-color);
    background: rgba(222, 194, 139, 0.1);
}

/* QR Code Styling */
#qrcode {
    padding: 10px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 150px;
    height: 150px;
    margin: 0 auto;
    /* Center in parent */
}

#qrcode img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}