:root {
    --bg-color: #0b0e14;
    --card-bg: #16213e;
    --text-color: #1dd1a1;
    --danger-color: #ff4757;
    --warning-color: #feca57;
    --award-color: #ff9f43;
    --nav-bg: #1a1a2e;
    --accent: #0f3460;
}

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

body { 
    font-family: 'Segoe UI', sans-serif; 
    background: var(--bg-color); 
    color: white; 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
    overflow-y: auto; 
}

nav { 
    background: var(--nav-bg); 
    padding: 15px 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.6); 
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo { font-size: 1.5rem; font-weight: bold; color: var(--text-color); }
.nav-right { display: flex; align-items: center; gap: 15px; }

main { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 10px; 
    gap: 15px;
}

.ads-wrapper {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
}

.game-container { 
    background: var(--card-bg); 
    padding: 20px; 
    border-radius: 20px; 
    width: 100%; 
    max-width: 450px; 
    text-align: center; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-bottom: 20px;
}

#game-board { 
    display: grid; 
    gap: 2px; 
    background: #07090f; 
    padding: 6px; 
    border-radius: 12px; 
    width: 100%; 
    aspect-ratio: 1/1; 
    margin-bottom: 15px; 
}

.cell { width: 100%; height: 100%; border-radius: 2px; transition: 0.3s; }

.controls { 
    display: flex; 
    justify-content: center; 
    gap: 12px; 
    flex-wrap: wrap; 
    padding: 15px; 
    background: rgba(0,0,0,0.3); 
    border-radius: 15px; 
}

.btn-color { width: 45px; height: 45px; cursor: pointer; border-radius: 50%; border: 3px solid rgba(255,255,255,0.2); transition: 0.2s; }
.btn-color:active { transform: scale(0.9); }

#award-overlay, #guide-overlay, #start-screen { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.95); display: flex; flex-direction: column; 
    align-items: center; justify-content: center; z-index: 2500; text-align: center; padding: 20px; 
}

#start-screen { background: var(--bg-color); z-index: 2000; }

.modal-card { background: #1a1a2e; padding: 30px; border-radius: 25px; border: 2px solid var(--award-color); max-width: 400px; width: 100%; }

.btn-action { padding: 12px 25px; border-radius: 8px; border: none; background: var(--text-color); color: #0b0e14; font-weight: bold; cursor: pointer; margin-top: 10px; width: 100%; }

input#user-name { width: 100%; padding: 12px; margin: 20px 0; border-radius: 8px; border: none; background: #0f3460; color: white; text-align: center; font-size: 1.1rem; border: 1px solid var(--text-color); }

footer {
    text-align: center;
    padding: 20px;
    font-size: 0.75rem;
    color: #666;
    background: var(--nav-bg);
    width: 100%;
}
