:root {
    --gold: #ffd700;
    --green-ui: #2ecc71;
    --font: 'Luckiest Guy', cursive;
}

body, html {
    margin: 0; padding: 0; height: 100%;
    font-family: var(--font); color: white; overflow: hidden;
    transition: background 1.5s ease;
}

/* Temi Città */
body.tema-napoli { background: radial-gradient(circle, #2e5a88, #051a30); }
body.tema-caserta { background: radial-gradient(circle, #8b0000, #300505); }

#game-container { display: flex; flex-direction: column; height: 100vh; position: relative; }

/* Header & Progressione */
header { padding: 15px; display: flex; flex-direction: column; align-items: center; gap: 10px; }

.power-badge {
    background: rgba(0,0,0,0.8); border: 3px solid var(--gold);
    border-radius: 50px; display: flex; align-items: center;
    padding: 8px 25px; box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.bolt { font-size: 24px; margin-right: 10px; color: var(--gold); }
.score-box { display: flex; flex-direction: column; }
.score-box small { font-size: 10px; opacity: 0.8; letter-spacing: 1px; }
#power-value { font-size: 22px; }

.map-container { width: 90%; max-width: 400px; }
.map-progress {
    width: 100%; height: 20px; background: #222; border-radius: 10px;
    border: 2px solid var(--gold); position: relative; overflow: hidden;
}
#progress-fill { height: 100%; width: 0%; background: var(--green-ui); transition: 1s cubic-bezier(0.17, 0.67, 0.83, 0.67); }
#city-target { position: absolute; width: 100%; text-align: center; top: 2px; font-size: 12px; text-shadow: 1px 1px 2px #000; }

/* Tavolo da Gioco */
#table { flex: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 10px 0; }
#middle-board { background: rgba(0,0,0,0.2); border-radius: 30px; margin: 0 10px; flex: 1; display: flex; align-items: center; justify-content: center; border: 2px dashed rgba(255,255,255,0.1); }
#table-cards, #my-hand { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

.card {
    width: 20vw; max-width: 90px; border-radius: 12px;
    border: 2px solid white; box-shadow: 0 6px 12px rgba(0,0,0,0.4);
    transition: transform 0.2s, filter 0.2s; cursor: pointer;
}
.card:hover { transform: translateY(-10px) scale(1.05); }

.badge { background: var(--gold); color: #000; padding: 2px 8px; border-radius: 5px; margin-left: 10px; }
.player-info { text-align: center; font-size: 14px; padding: 10px; opacity: 0.9; }

/* Effetti Speciali */
.shake { animation: shake 0.5s ease-in-out; }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px) rotate(-1deg); }
    40% { transform: translateX(5px) rotate(1deg); }
    60% { transform: translateX(-5px); }
}

.floating-point {
    position: fixed; color: #4ade80; font-family: var(--font);
    font-size: 3rem; pointer-events: none; z-index: 1000;
    text-shadow: 3px 3px 6px #000; animation: floatUp 1.2s ease-out forwards;
}
@keyframes floatUp {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-150px) scale(1.5); opacity: 0; }
}

.hidden { display: none !important; }
#overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85);
    display: flex; justify-content: center; align-items: center; z-index: 2000;
}
#overlay-text { font-size: 3.5rem; color: var(--gold); text-align: center; text-shadow: 0 0 20px rgba(255,215,0,0.5); }