/* Copyright (c) 2024-2026. Jericho Crosby (Chalwk) */

.app-grid {
    margin-top: 2rem;
}

.minesweeper-panel {
    background: var(--light);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.minesweeper-title {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.minesweeper-description {
    color: var(--gray);
}

.minesweeper-game-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

.difficulty-select {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.difficulty-select label {
    font-weight: 500;
    color: var(--dark);
}

.difficulty-select .select {
    padding: 0.5rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
}

.minesweeper-custom-panel {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.custom-input {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.custom-input input {
    width: 70px;
    padding: 0.5rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
}

.minesweeper-status-display {
    display: flex;
    gap: 1.5rem;
    margin-left: auto;
}

.status-item {
    font-family: var(--font-mono);
    font-weight: 500;
}

.minesweeper-board-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.minesweeper-board {
    display: grid;
    gap: 2px;
    touch-action: manipulation;
    user-select: none;
    padding: 1rem;
    background: var(--light);
    border-radius: var(--radius);
}

.cell {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border-radius: var(--radius-sm);
    background: var(--gray-light);
    border: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.06);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: var(--transition);
}

.cell:hover {
    background: #b0b7c5;
    transform: translateY(-1px);
}

.cell.revealed {
    background: var(--light);
    cursor: default;
    box-shadow: none;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transform: none;
}

.cell.mine {
    background: linear-gradient(180deg, #ffe2e2, #ff9b9b);
    color: #d00;
}

.cell.flag {
    color: #ef4444;
}

.cell.question {
    color: #8b7d7d;
}

.cell[style*="color:#0b61f7"] {
    color: #0b61f7;
}

.cell[style*="color:#0b8f1a"] {
    color: #0b8f1a;
}

.cell[style*="color:#f22f2f"] {
    color: #f22f2f;
}

.cell[style*="color:#1b2f6b"] {
    color: #1b2f6b;
}

.cell[style*="color:#7b1f1f"] {
    color: #7b1f1f;
}

.cell[style*="color:#009966"] {
    color: #009966;
}

.cell[style*="color:#333333"] {
    color: #333333;
}

.cell[style*="color:#666666"] {
    color: #666666;
}

.minesweeper-game-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.theme-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.theme-toggle-label input {
    display: none;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal.hidden {
    display: none;
}

.modal-inner {
    background: var(--light);
    padding: 2rem;
    border-radius: var(--radius-lg);
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.modal-title {
    color: var(--primary);
    margin-bottom: 1rem;
}

.best-times-list {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.best-times-list li {
    padding: 0.75rem;
    border-bottom: 1px solid var(--gray-light);
    font-family: var(--font-mono);
    display: flex;
    justify-content: space-between;
}

.best-times-list li:last-child {
    border-bottom: none;
}

body.dark .cell {
    background: #1f2937;
    border-color: #374151;
}

body.dark .cell.revealed {
    background: #111827;
}

body.dark .cell:hover {
    background: #374151;
}

@media (max-width: 768px) {
    .cell {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .minesweeper-game-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .minesweeper-status-display {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .cell {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }

    .minesweeper-game-actions {
        flex-direction: column;
    }

    .minesweeper-game-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}