:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --dark-bg: #2C3E50;
    --light-bg: #F7F9FC;
    --text-color: #2C3E50;
    --accent-color: #FFE66D;
    --hole-color: #34495E;
    --font-main: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--light-bg);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.game-container {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    width: 95%;
}

.game-area {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-bg);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1;
}

.hole {
    background-color: var(--hole-color);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewport="0 0 100 100" style="fill:black;font-size:24px;"><text y="50%">🔨</text></svg>') 16 0, auto;
    /* Custom cursor attempt, fallback to auto */
    box-shadow: inset 0 10px 20px rgba(0, 0, 0, 0.5);
}

.hole::after {
    content: '';
    display: block;
    padding-bottom: 100%;
}

.mole {
    width: 100%;
    height: 100%;
    background-image: url('assets/hamza.png');
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 100%;
    left: 0;
    transition: top 0.1s;
    pointer-events: none;
    /* Let the click pass through to the hole if needed, or handle on mole */
}

.hole.up .mole {
    top: 0;
    pointer-events: auto;
}

/* Sidebar & Scoreboard */
.sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 250px;
}

.panel {
    background: var(--dark-bg);
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.panel h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
    letter-spacing: 1px;
}

.score-display {
    font-size: 4rem;
    font-weight: 900;
    color: var(--accent-color);
    line-height: 1;
}

.level-display {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.level-info {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    opacity: 0.9;
    display: flex;
    justify-content: space-between;
}

.progress-container {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar {
    height: 100%;
    background: var(--secondary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.controls {
    margin-top: auto;
}

.btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-family: var(--font-main);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, filter 0.2s;
}

.btn:active {
    transform: scale(0.98);
}

.btn.primary {
    background: var(--primary-color);
    color: white;
}

.btn.secondary {
    background: var(--secondary-color);
    color: white;
}

.btn:hover {
    filter: brightness(1.1);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: translateY(0);
    transition: transform 0.3s;
}

.modal.hidden .modal-content {
    transform: translateY(50px);
}

.modal h2 {
    color: var(--dark-bg);
    margin-bottom: 1rem;
}

.modal p {
    margin-bottom: 2rem;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .game-container {
        flex-direction: column;
        padding: 1rem;
    }

    .grid {
        max-width: 100%;
    }

    .sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .panel {
        flex: 1;
    }
}