/* RESET */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background-color: #050505; color: #ffffff; height: 100vh; display: flex; justify-content: center; align-items: center; overflow: hidden; }

/* Contenitore principale con scroll personalizzato per Mobile */
.container { width: 100%; max-width: 420px; padding: 20px; max-height: 100vh; position: relative; z-index: 10; }
.scrollable { overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; }
.scrollable::-webkit-scrollbar { width: 6px; }
.scrollable::-webkit-scrollbar-track { background: #111; border-radius: 4px; }
.scrollable::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

.hidden { display: none !important; }

/* OVERLAYS GLOBALI (Modali e Cookie) */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-content { background: #080808; border: 1px solid #222; padding: 30px; width: 100%; max-width: 350px; border-radius: 8px; text-align: center; }

/* Banner Cookie */
.cookie-container { position: fixed; bottom: 0; left: 0; width: 100%; background: #111; border-top: 2px solid #bdfd1a; padding: 15px 20px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; text-align: center; box-shadow: 0 -5px 20px rgba(0,0,0,0.8); }
.cookie-container p { font-size: 0.75rem; color: #ccc; line-height: 1.4; margin-bottom: 5px; }

/* Placeholder Pubblicità */
.ad-placeholder { width: 100%; height: 50px; background: #1a1a1a; border: 1px dashed #444; border-radius: 4px; display: flex; justify-content: center; align-items: center; margin-bottom: 15px; color: #555; font-size: 0.6rem; font-weight: 700; }
.ad-placeholder.large { height: 250px; margin: 20px 0; }

/* SCHERMATA LINGUA */
.lang-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 30px; }
.btn-lang { background: #080808; color: #fff; border: 2px solid #222; padding: 20px 10px; font-size: 1.1rem; font-weight: 900; border-radius: 8px; cursor: pointer; transition: 0.3s; letter-spacing: 0.5px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-lang:hover { border-color: #bdfd1a; color: #bdfd1a; box-shadow: 0 0 25px rgba(189, 253, 26, 0.2); transform: translateY(-3px); }

/* STILI BANDIERA IN GAME - FIX PROPORZIONI SCHIACCIATE */
.photo-placeholder { position: relative; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; }
.flag-icon { 
    position: absolute; 
    top: 8px; 
    right: 8px; 
    width: 40px !important; 
    height: auto !important; 
    object-fit: contain !important; 
    border-radius: 4px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.8); 
    border: 2px solid rgba(255, 255, 255, 0.1); 
    z-index: 20;
}

/* HOME */
.secondary-text { color: #444; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.15rem; text-transform: uppercase; }
.main-title { font-size: 4rem; font-weight: 900; line-height: 0.85; margin: 15px 0; letter-spacing: -3px; text-align: center; }
.outline-text { color: transparent; -webkit-text-stroke: 1.2px #bdfd1a; }
.accent-text { color: #bdfd1a; }
.middle-text { margin-top: 25px; margin-bottom: 60px; text-align: center; }
.bottom-text { margin-top: 60px; text-align: center; font-size: 0.6rem; opacity: 0.8; margin-bottom: 20px; }

.btn-play { display: block; margin: 0 auto; background: transparent; color: #fff; border: 1px solid #222; width: 110px; height: 110px; border-radius: 50%; font-weight: 900; cursor: pointer; transition: 0.3s; }
.btn-play:hover { border-color: #bdfd1a; color: #bdfd1a; box-shadow: 0 0 30px rgba(189, 253, 26, 0.3); }

/* MODALITA' */
.back-link { color: #444; font-size: 0.7rem; cursor: pointer; margin-bottom: 15px; display: inline-block; font-weight: 700; transition: color 0.3s;}
.back-link:hover { color: #bdfd1a; }
.section-title { font-size: 2rem; font-weight: 900; margin-bottom: 5px; letter-spacing: -1px; }
.mode-subtitle { margin-bottom: 30px !important; }
.mode-card { background: #080808; border: 1px solid #151515; padding: 15px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; border-radius: 4px; cursor: pointer; transition: 0.3s; }
.mode-info { display: flex; align-items: center; gap: 12px; }
.icon-circle { width: 28px; height: 28px; border: 1.5px solid #333; border-radius: 50%; display: flex; justify-content: center; align-items: center; }
.mode-icon { font-size: 0.9rem; color: #444; }
.mode-name { font-weight: 700; font-size: 0.85rem; }
.badge { background: #bdfd1a; color: #000; font-size: 0.5rem; padding: 2px 6px; font-weight: 900; border-radius: 2px; }
.badge-soon { background: #222; color: #fff; font-size: 0.5rem; padding: 2px 6px; font-weight: 700; border-radius: 2px; }
.dot { width: 6px; height: 6px; background: transparent; border-radius: 50%; }
.mode-card.active { border-color: #bdfd1a; }
.mode-card.active .icon-circle { border-color: #bdfd1a; }
.mode-card.active .mode-icon { color: #bdfd1a; }
.mode-card.active .dot { background: #bdfd1a; box-shadow: 0 0 10px #bdfd1a; }

.mode-card.mode-versus.active { border-color: #ffffff; }
.mode-card.mode-versus.active .icon-circle { border-color: #ffffff; }
.mode-card.mode-versus.active .mode-icon { color: #ffffff; }
.mode-card.mode-versus.active .dot { background: #ffffff; box-shadow: 0 0 10px #ffffff; }

.details-box { background: #080808; border: 1px solid #151515; padding: 15px; margin-top: 15px; min-height: 120px; border-radius: 4px; }
.details-box h3 { font-size: 0.9rem; margin-bottom: 8px; font-weight: 900; text-transform: uppercase; }
#detail-title.color-normal { color: #bdfd1a; }
#detail-title.color-versus { color: #ffffff; }
.details-box p { font-size: 0.75rem; color: #777; line-height: 1.4; margin-bottom: 10px; }
.details-list { list-style: none; padding: 0; font-size: 0.7rem; color: #555; }

.btn-start { background: #bdfd1a; color: #000; border: none; width: 100%; padding: 18px; margin-top: 15px; margin-bottom: 20px; font-weight: 900; text-transform: uppercase; cursor: pointer; font-size: 0.8rem; transition: 0.3s; border-radius: 4px; }
.btn-start.disabled { background: #1a1a1a; color: #555; cursor: not-allowed; }

/* GIOCO */
.game-header-inline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding: 10px 5px; }
.lives-container { display: flex; flex-wrap: wrap; gap: 4px; max-width: 100%; }
.lives-container span { font-size: 0.9rem; transition: transform 0.3s; display: inline-block; }
.heart-red { color: #ff4b4b; text-shadow: 0 0 5px rgba(255, 75, 75, 0.4); }
.heart-gray { filter: grayscale(100%) opacity(0.3); } 

.timer-container { display: flex; align-items: baseline; gap: 4px; color: #fff; font-weight: 900; font-size: 1.3rem; transition: color 0.3s; }
.timer-label { color: #444; font-size: 0.6rem; letter-spacing: 1px; }
.timer-danger { color: #ff4b4b; animation: blink 1s infinite; text-shadow: 0 0 10px rgba(255, 75, 75, 0.4); }
.timer-bonus { color: #2ecc71 !important; animation: scoreBump 0.4s ease-out; text-shadow: 0 0 10px rgba(46, 204, 113, 0.4); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.score-mini { display: flex; align-items: baseline; gap: 5px; }
.score-label { color: #444; font-size: 0.6rem; font-weight: 900; letter-spacing: 1px; }
#score-value { font-weight: 900; font-size: 1.3rem; transition: color 0.4s; }
.bump { animation: scoreBump 0.3s ease-out; }
@keyframes scoreBump { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }

.text-metal { text-align: center; font-size: 0.75rem; font-weight: 900; letter-spacing: 2px; background: linear-gradient(180deg, #ffffff 0%, #a0a0a0 45%, #444444 100%); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.8)); margin-top: 15px; text-transform: uppercase; margin-bottom: 20px;}

/* INTERFACCIA STANDARD */
.photo-card { width: 100%; aspect-ratio: 1/1; background: #080808; border: 1px solid #151515; margin-bottom: 20px; border-radius: 4px; display: flex; justify-content: center; align-items: center; overflow: hidden; position: relative; }
.answers-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.btn-answer { background: #080808; color: #fff; border: 1px solid #222; width: 100%; max-width: 90px; height: 70px; border-radius: 8px; font-size: 1.5rem; font-weight: 900; cursor: pointer; transition: 0.2s; margin: 0 auto; }
.btn-answer:hover { border-color: #bdfd1a; color: #bdfd1a; }

/* NUOVA INTERFACCIA HIGHER LOWER (Sinistra/Destra) */
#hl-game-ui { display: flex; flex-direction: row; gap: 10px; position: relative; height: 320px; margin-bottom: 15px; }
.hl-card { flex: 1; background: #080808; border: 2px solid #151515; border-radius: 4px; overflow: hidden; position: relative; cursor: pointer; transition: transform 0.2s, border-color 0.2s; }
.hl-card img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.hl-card:hover { border-color: #bdfd1a; transform: scale(1.02); z-index: 5; }
.hl-vs { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 10; background: #bdfd1a; color: #000; font-weight: 900; padding: 6px 12px; border-radius: 20px; border: 3px solid #050505; font-size: 1.1rem; box-shadow: 0 4px 10px rgba(0,0,0,0.6); }

/* Protezione foto */
.photo-card::after, .hl-card::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 20; background: rgba(0,0,0,0); }

/* SCHERMATA GAME OVER */
.over-content { width: 100%; text-align: center; margin: auto; }
#over-title { font-size: 2.8rem; font-weight: 900; line-height: 0.8; margin-bottom: 5px; letter-spacing: -1px; text-transform: uppercase; }
#over-msg { color: #888; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; line-height: 1.4; }
.score-box { background: #080808; border: 1px solid #151515; padding: 20px; border-radius: 4px; position: relative; }
.score-box .label { display: block; color: #444; font-size: 0.6rem; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px; }
#over-score { color: #bdfd1a; font-size: 4rem; font-weight: 900; line-height: 1; text-shadow: 0 0 30px rgba(189, 253, 26, 0.2); }

.over-buttons { display: flex; flex-direction: column; gap: 12px; }
.btn-share { background: #bdfd1a; color: #000; border: none; padding: 15px; font-weight: 900; text-transform: uppercase; cursor: pointer; font-size: 0.85rem; letter-spacing: 1px; transition: 0.3s; border-radius: 4px;}
.btn-share:hover { transform: translateY(-3px); box-shadow: 0 5px 20px rgba(189, 253, 26, 0.4); }

.btn-play-again { background: transparent; color: #bdfd1a; border: 1px solid #bdfd1a; padding: 15px; font-weight: 700; text-transform: uppercase; cursor: pointer; font-size: 0.75rem; letter-spacing: 1px; transition: 0.3s; border-radius: 4px;}
.btn-play-again:hover { background: #bdfd1a; color: #000; }

.btn-menu { background: transparent; color: #555; border: 1px solid #222; padding: 15px; font-weight: 700; text-transform: uppercase; cursor: pointer; font-size: 0.7rem; letter-spacing: 1px; transition: 0.3s; border-radius: 4px;}
.btn-menu:hover { color: #fff; border-color: #555; }

/* Disclaimer */
.disclaimer-box { background: #080808; border-left: 3px solid #bdfd1a; padding: 22px; margin: 10px 0 25px 0; text-align: left; border-radius: 0 4px 4px 0; }
.disclaimer-box p { font-size: 0.75rem; color: #999; line-height: 1.6; }
.disclaimer-box strong { color: #fff; font-weight: 700; }
.highlight-word { color: #fff; border-bottom: 1px dashed #bdfd1a; padding-bottom: 1px; }
.btn-prosegui { background: transparent; border: 1px solid #bdfd1a; color: #fff; font-size: 0.8rem; letter-spacing: 2px; padding: 18px; font-weight: 700; transition: all 0.3s ease; }
.btn-prosegui:hover { background: #bdfd1a; color: #000; box-shadow: 0 0 15px rgba(189, 253, 26, 0.4); transform: translateY(-2px); }

/* --- PROTEZIONE IMMAGINI E CONTENUTI --- */
body { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
img { pointer-events: none; -webkit-touch-callout: none; -webkit-user-drag: none; }

/* BANNER LATERALI PER PC (visibili solo su schermi grandi) */
.desktop-banner {
    display: none; 
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    height: 600px;
    background: #080808;
    border: 1px dashed #333;
    z-index: 5;
    justify-content: center;
    align-items: center;
}
.desktop-banner.left { left: 20px; }
.desktop-banner.right { right: 20px; }

.ad-placeholder-sidebar {
    color: #444;
    font-size: 0.7rem;
    font-weight: 900;
    text-align: center;
    transform: rotate(-90deg);
    white-space: nowrap;
}

@media (min-width: 1200px) {
    .desktop-banner { display: flex; }
}
