:root {
    --bg: #13001a;
    --card: #2d0036;
    --text: #fff;
    --neon-pink: #ff00cc;
    --neon-blue: #00ccff;
}

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--text); font-family: 'Montserrat', sans-serif; margin: 0; min-height: 100vh; display: flex; flex-direction: column; }

/* HEADER */
header { text-align: center; padding: 15px; background: rgba(45, 0, 54, 0.9); position: fixed; width: 100%; top: 0; z-index: 10; backdrop-filter: blur(5px); }
.logo { font-size: 1.5rem; font-weight: 900; letter-spacing: 2px; color: var(--neon-pink); text-shadow: 0 0 10px var(--neon-pink); }
.subtitle { font-size: 0.7rem; letter-spacing: 4px; opacity: 0.7; margin-top: 5px; }

/* LAYOUT */
.main-wrapper { flex: 1; display: flex; justify-content: center; align-items: center; padding-top: 70px; padding-bottom: 50px; width: 100%; max-width: 600px; margin: 0 auto; }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 20px; width: 100%; }
.game-container { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; text-align: center; animation: fadeIn 0.3s ease; }

/* CARDS & UI */
.game-card { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 20px 10px; text-align: center; cursor: pointer; transition: 0.2s; display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1; }
.game-card:hover { background: rgba(255, 0, 204, 0.1); border-color: var(--neon-pink); transform: scale(1.02); }
.icon { font-size: 2.5rem; margin-bottom: 10px; }
h3 { margin: 0; font-size: 0.9rem; font-weight: 700; }
p { font-size: 0.6rem; opacity: 0.6; margin: 5px 0 0 0; }
h2 { color: var(--neon-blue); text-transform: uppercase; letter-spacing: 3px; margin-bottom: 20px; font-size: 1.5rem; }

/* BUTTONS */
.btn-back { position: absolute; top: 75px; left: 20px; background: rgba(0,0,0,0.3); padding: 5px 10px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.2); color: #fff; font-weight: bold; cursor: pointer; font-size: 0.7rem; }
.btn-action { background: var(--neon-pink); color: #fff; border: none; padding: 15px 40px; border-radius: 50px; font-size: 1.1rem; font-weight: 900; box-shadow: 0 0 20px var(--neon-pink); cursor: pointer; margin-top: 20px; width: 80%; max-width: 300px; transition: transform 0.1s; }
.btn-action:disabled { background: #555; box-shadow: none; opacity: 0.5; }
.btn-secondary { background: transparent; border: 1px solid #fff; color: #fff; padding: 10px 20px; border-radius: 50px; margin-top: 15px; cursor: pointer; font-weight: bold;}

/* PLAYER SETUP FORM */
.player-form { display: flex; gap: 10px; width: 100%; margin-bottom: 20px; justify-content: center; }
input[type="text"] { background: rgba(255,255,255,0.1); border: 1px solid #fff; padding: 10px; border-radius: 8px; color: #fff; width: 120px; outline: none; }
.gender-toggle { display: flex; background: rgba(0,0,0,0.3); border-radius: 8px; overflow: hidden; }
.gender-toggle button { background: transparent; border: none; padding: 10px; font-size: 1.2rem; cursor: pointer; opacity: 0.5; transition: 0.2s; }
.gender-toggle button.active { opacity: 1; background: rgba(255,255,255,0.1); }
.gender-toggle button.active.male { color: var(--neon-blue); }
.gender-toggle button.active.female { color: var(--neon-pink); }
.btn-add { background: var(--neon-pink); border: none; color: #fff; width: 40px; border-radius: 8px; font-size: 1.5rem; cursor: pointer; }

/* PLAYER LIST TAGS */
.player-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; width: 100%; }
.player-tag { padding: 5px 15px; border-radius: 20px; font-size: 0.9rem; font-weight: bold; display: flex; align-items: center; gap: 10px; border: 1px solid; }
.male-tag { border-color: var(--neon-blue); color: var(--neon-blue); background: rgba(0, 204, 255, 0.1); }
.female-tag { border-color: var(--neon-pink); color: var(--neon-pink); background: rgba(255, 0, 204, 0.1); }
.remove-btn { cursor: pointer; opacity: 0.7; font-size: 1.1rem; }

/* TURN INDICATOR */
.turn-indicator { margin-bottom: 20px; }
.player-name { font-size: 2.5rem; margin: 0; font-weight: 900; text-shadow: 0 0 20px rgba(255,255,255,0.2); line-height: 1; }
.blue-text { color: var(--neon-blue); text-shadow: 0 0 15px var(--neon-blue); }
.pink-text { color: var(--neon-pink); text-shadow: 0 0 15px var(--neon-pink); }

/* GAME ELEMENTS */
.tod-card { background: rgba(255,255,255,0.08); padding: 30px 20px; border-radius: 20px; width: 100%; max-width: 350px; min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--neon-blue); box-shadow: 0 0 20px rgba(0, 204, 255, 0.2); }
.tod-content { font-size: 1.3rem; line-height: 1.4; margin-bottom: 20px; font-weight: bold;}
.dice-wrapper { display: flex; gap: 15px; margin: 20px 0; justify-content: center; }
.die { width: 110px; height: 110px; background: #fff; color: #000; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: bold; text-align: center; padding: 5px; box-shadow: 0 0 15px rgba(255,255,255,0.3); word-break: break-word; }
.die.pink { background: var(--neon-pink); color: #fff; box-shadow: 0 0 15px var(--neon-pink); }
.scratch-area { position: relative; width: 300px; height: 150px; border-radius: 12px; overflow: hidden; margin: 20px auto; border: 2px solid #fff; box-shadow: 0 0 20px rgba(255,0,204,0.3); }
.hidden-msg { position: absolute; top:0; left:0; width:100%; height:100%; display: flex; align-items: center; justify-content: center; background: #fff; color: #000; font-weight: bold; font-size: 1.1rem; padding: 20px; }
canvas { position: absolute; top:0; left:0; cursor: crosshair; }
.mini-timer-area { margin-top: 15px; width: 100%; border-top: 1px dashed rgba(255,255,255,0.3); padding-top: 15px; }
.btn-start-task { background: #fff; color: #000; border: none; padding: 8px 16px; border-radius: 4px; font-weight: bold; cursor: pointer; font-size: 0.9rem; animation: pulse 1.5s infinite; }
.countdown-text { font-size: 2.5rem; font-weight: 900; color: var(--neon-pink); font-family: monospace; }
.timer-display { font-size: 4.5rem; font-weight: 900; color: #fff; font-family: monospace; text-shadow: 0 0 20px rgba(255,255,255,0.5); }
.controls-row { display: flex; gap: 15px; width: 100%; justify-content: center; margin-top: 10px; }
.controls-row .btn-action { margin-top: 0; width: auto; padding: 15px 25px; font-size: 1rem; }
.ad-banner { position: fixed; bottom: 0; width: 100%; background: #000; color: #444; text-align: center; padding: 10px; font-size: 0.7rem; border-top: 1px solid #333; z-index: 100; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }