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

html,
body {
    height: 100%;
    width: 100%;
}

:root {
    /* Background Colors */
    --bg-primary-color: #0c0c0c;
    --bg-fill-color: #fdfdfc;
    --bg-food-color: #ff0000;

    /* Text Colors */
    --text-primary-color: #f0f0f0;

    /* Spacing variables */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 40px;
    --spacing-3xl: 48px;

    /* Border colors */
    --border-primary-color: #333333;

    /* Border Radius */
    --border-radius-xs: 4px;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
    --border-radius-2xl: 24px;

}

html {
    background-color: var(--bg-primary-color);
    color: var(--text-primary-color);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

main,
section {
    width: 100%;
    height: 100%;
}

.btn {
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
    color: #000;
}

.btn:hover {
    transform: scale(1.1);
}

section {
    padding: var(--spacing-2xl);
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: var(--spacing-lg);
}

.creator-credit {
    text-align: center;
    font-size: 14px;
    opacity: 0.8;
    /* padding: 0;
    margin: 0; */
}

.creator-credit a {
    color: var(--text-primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.creator-credit a:hover {
    opacity: 0.7;
    text-decoration: underline;

}

section .infos {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.info {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--border-primary-color);
    border-radius: var(--border-radius-sm);
}

.board {
    border: 1px solid var(--border-primary-color);
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    grid-template-rows: repeat(auto-fill, minmax(50px, 1fr));

}

.block {
    border: 1px solid var(--border-primary-color);
    border-radius: 50%;
}

.fill {
    background-color: var(--bg-fill-color);
}

.food {
    background-color: var(--bg-food-color);
}

.modal {
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    background-color: #35353587;
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.start-game,
.game-over {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg)
}

.game-over {
    display: none;
}

.pc-required {
    display: none;
}

@media (max-width: 768px) {
    .pc-required {
        display: flex;
        position: fixed;
        inset: 0;
        background: radial-gradient(circle at top, #111, #000);
        color: #fff;
        z-index: 9999;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 24px;
        font-family: system-ui, sans-serif;
    }

    .pc-required h2 {
        font-size: 1.9rem;
        margin-bottom: 12px;
    }

    .pc-required p {
        font-size: 1rem;
        opacity: 0.85;
        line-height: 1.5;
        max-width: 420px;
    }

    .pc-required .creator-credit {
        margin-top: 24px;
        font-size: 0.85rem;
        opacity: 0.7;
    }

    .pc-required a {
        color: #8b8bff;
        text-decoration: none;
        font-weight: 500;
    }

    .pc-required a:hover {
        text-decoration: underline;
    }

    /* Hide actual game on mobile */
    main {
        display: none;
    }
}