:root {
    --bg-color: #0d0914;
    --primary: #9d4edd;
    --secondary: #7b2cbf;
    --pink: #9d4edd;
    --yellow: #f8f9fa;
    --black: #f8f9fa;
    --border-width: 1px;
    --shadow-offset: 0px;
    --radius: 0px;
    
    --cell-size: 40px;
    --cols: 10;
}

body {
    background-color: var(--bg-color);
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    color: var(--black);
    user-select: none;
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: transparent;
    color: var(--black);
    text-decoration: none;
    font-weight: 700;
    padding: 10px 20px;
    border: 1px solid var(--primary);
    box-shadow: none;
    border-radius: var(--radius);
    transition: 0.1s;
    z-index: 100;
}
.back-btn:hover {
    transform: none;
    background: var(--primary);
    color: #fff;
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.header-panel {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
    gap: 30px;
}

h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin: 0;
    color: var(--primary);
    text-shadow: none;
    line-height: 0.9;
}

.score-container {
    display: flex;
    gap: 15px;
}

.score-box {
    background: #000;
    border: 1px solid var(--secondary);
    box-shadow: none;
    border-radius: var(--radius);
    padding: 10px 20px;
    font-size: 2rem;
    font-weight: 900;
    text-align: center;
    min-width: 80px;
}
.score-box div:first-child {
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.instructions {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

#game-board-wrapper {
    position: relative;
    border: 1px solid var(--secondary);
    box-shadow: none;
    border-radius: var(--radius);
    overflow: auto;
    max-width: 100vw;
    background: #000;
}

#game-board {
    display: grid;
    grid-template-columns: repeat(var(--cols), var(--cell-size));
    grid-template-rows: repeat(var(--cols), var(--cell-size));
}

.cell {
    width: var(--cell-size);
    height: var(--cell-size);
    background: #1a1a1a;
    border: 1px solid #333;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: none;
}

.cell:hover {
    background: #222;
}

.cell.revealed {
    background: #0d0914;
    border: 1px solid var(--secondary);
    box-shadow: none;
    cursor: default;
}

.cell.revealed.mine { background: var(--primary); }
.cell.flagged { font-size: 1.5rem; }

/* Numbers */
.val-1 { color: #0000ff; }
.val-2 { color: #008000; }
.val-3 { color: #ff0000; }
.val-4 { color: #000080; }
.val-5 { color: #800000; }
.val-6 { color: #008080; }
.val-7 { color: #000000; }
.val-8 { color: #808080; }

.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(13, 9, 20, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.overlay h2 {
    font-size: 3.5rem;
    color: var(--primary);
    text-shadow: none;
    margin: 0 0 20px 0;
}

#restart-btn {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--secondary);
    box-shadow: none;
    padding: 15px 30px;
    font-size: 1.5rem;
    font-weight: 900;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    border-radius: 4px;
    transition: 0.1s;
}
#restart-btn:hover {
    background: var(--secondary);
    color: #fff;
    transform: none;
    box-shadow: none;
}

.diff-btn {
    background: #110c1b;
    color: var(--text);
    border: 1px solid var(--primary);
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.2s;
}
.diff-btn:hover, .diff-btn.active {
    background: var(--primary);
    color: #fff;
}

@media (max-width: 768px) {
    .header-panel {
        flex-direction: column;
        gap: 10px;
    }
    h1 {
        font-size: 2.5rem;
    }
}
