
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #7c3aed;
    --danger: #dc2626;
    --success: #059669;
    --light: #ffffff;
    --dark: #1f2937;
    --gray: #6b7280;
    --cell-bg: #e5e7eb;
    --cell-hover: #d1d5db;
    --cell-revealed: #f9fafb;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f3f4f6;
    color: var(--dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    margin-bottom: 20px;
}

h1 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 2rem;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.stats {
    display: flex;
    gap: 15px;
}

.stat-box {
    background-color: var(--light);
    padding: 12px 18px;
    border-radius: var(--border-radius);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    border: 2px solid #e5e7eb;
}

.stat-box i {
    font-size: 1.3rem;
}

.mines-count {
    color: var(--danger);
}

.timer {
    color: var(--secondary);
}

.difficulty {
    display: flex;
    gap: 10px;
    align-items: center;
}

button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
}

button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

button i {
    font-size: 1.1rem;
}

select {
    padding: 10px;
    border-radius: var(--border-radius);
    border: 2px solid #e5e7eb;
    font-weight: 600;
    cursor: pointer;
    background-color: white;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    margin: 0 auto;
}

.cell {
    width: 100%;
    aspect-ratio: 1;
    background-color: var(--cell-bg);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    font-size: 2.2rem;
}

.cell:hover {
    background-color: var(--cell-hover);
}

.cell:active {
    transform: scale(0.95);
}

.cell.revealed {
    background-color: var(--cell-revealed);
    cursor: default;
}

.cell.mine {
    background-color: var(--danger);
    color: white;
}

.cell.flagged::after {
    content: '🚩';
    position: absolute;
    font-size: 1.2rem;
}

.cell-1 { color: #0066ff; }
.cell-2 { color: #00c93c; }
.cell-3 { color: #ff0000; }
.cell-4 { color: #7d05df; }
.cell-5 { color: #ff00aa; }
.cell-6 { color: #074874; }
.cell-7 { color: #190a5c; }
.cell-8 { color: var(--dark); }

.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.game-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: translateY(20px);
    transition: var(--transition);
    border: 2px solid #e5e7eb;
}

.game-overlay.show .modal {
    transform: translateY(0);
}

.modal h2 {
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.modal p {
    margin-bottom: 20px;
    font-size: 1.2rem;
    line-height: 1.5;
}

.modal button {
    margin: 0 auto;
    padding: 12px 24px;
}

.win {
    color: var(--success);
}

.lose {
    color: var(--danger);
}

@media (max-width: 600px) {
    .game-header {
        flex-direction: column;
        gap: 15px;
    }

    .stats, .difficulty {
        width: 100%;
        justify-content: space-between;
    }

    .cell {
        font-size: 1.2rem;
    }
}

/* Animationen */
@keyframes reveal {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.cell.revealed {
    animation: reveal 0.2s ease-out;
}

@keyframes explode {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.cell.mine.exploded {
    animation: explode 0.3s ease-out;
}