/* Campo Minado - Estilo Vektor Web */
:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-card: #1a1a3a;
    --bg-board: #1e3a4a;
    --gradient-main: linear-gradient(135deg, #00d4ff 0%, #00ff88 20%, #ffdd00 40%, #ff8800 60%, #ff0080 80%, #8000ff 100%);
    --color-cyan: #00d4ff;
    --color-green: #00ff88;
    --color-yellow: #ffd700;
    --color-orange: #ff8800;
    --color-red: #ff3366;
    --text-primary: #ffffff;
    --text-secondary: #b0b0c0;
    --border-radius: 12px;
    --transition-fast: 0.2s ease;
    --cell-size: 32px;
    --cell-size-sm: 28px;
    --cell-size-lg: 36px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg-primary); color: var(--text-primary); min-height: 100vh; line-height: 1.6; overflow-x: hidden; }

.game-container { min-height: calc(100vh - 70px); display: flex; flex-direction: column; }

.game-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(90deg, #1a1a3a 0%, #0d0d1a 50%, #1a1a3a 100%);
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    flex-wrap: wrap;
    gap: 1rem;
}

.header-left { flex: 0; text-align: center; }
.header-left h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
}

.stats-bar { display: flex; gap: 2rem; justify-content: center; }
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-label { font-size: 0.7rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }
.stat-value { font-size: 1.1rem; font-weight: 700; }
.stat-value.gold { background: linear-gradient(135deg, #ffd700, #ffaa00); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-value.green { color: var(--color-green); }
.stat-value.red { color: var(--color-red); }

.game-board-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.header-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.difficulty-select {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: 2px solid rgba(255, 215, 0, 0.3);
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.difficulty-select:hover { border-color: var(--color-cyan); }
.difficulty-select:focus { outline: none; border-color: var(--color-cyan); box-shadow: 0 0 15px rgba(0, 212, 255, 0.3); }

.board {
    display: grid;
    gap: 2px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 8px;
    border: 2px solid rgba(255, 215, 0, 0.2);
}

.cell {
    width: var(--cell-size);
    height: var(--cell-size);
    background: var(--bg-card);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: all 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}
.cell:hover { background: #2a2d4a; transform: scale(1.05); }
.cell:active { transform: scale(0.95); }
.cell:focus { outline: 2px solid var(--color-cyan); outline-offset: -2px; }
.cell--revealed { background: var(--bg-board); cursor: default; }
.cell--revealed:hover { background: var(--bg-board); transform: none; }
.cell--flagged { background: var(--color-orange); }
.cell--flagged::after { content: '⚑'; font-size: 0.8rem; color: #fff; }
.cell--mine { background: var(--color-red); }
.cell--mine::after { content: '💥'; font-size: 0.8rem; }
.cell--number-1 { color: var(--color-cyan); }
.cell--number-2 { color: var(--color-green); }
.cell--number-3 { color: var(--color-yellow); }
.cell--number-4 { color: var(--color-orange); }
.cell--number-5 { color: #ff6b6b; }
.cell--number-6 { color: #4ecdc4; }
.cell--number-7 { color: #a55eea; }
.cell--number-8 { color: var(--text-secondary); }

.game-footer {
    display: flex;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(90deg, #1a1a3a 0%, #0d0d1a 50%, #1a1a3a 100%);
    border-top: 2px solid rgba(255, 215, 0, 0.3);
}

.btn { padding: 1rem 2rem; font-size: 1rem; font-weight: 700; border: none; border-radius: var(--border-radius); cursor: pointer; transition: all var(--transition-fast); text-transform: uppercase; letter-spacing: 2px; }
.btn-primary { background: var(--gradient-main); color: #fff; box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 30px rgba(0, 212, 255, 0.6); }
.btn-secondary { background: var(--bg-card); color: var(--text-primary); border: 2px solid rgba(255, 215, 0, 0.3); }
.btn-secondary:hover { border-color: var(--color-yellow); box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}
.modal-overlay.hidden { opacity: 0; pointer-events: none; }

.modal {
    background: transparent;
    padding: 3rem;
    border-radius: var(--border-radius);
    text-align: center;
    max-width: 450px;
    width: 90%;
    transform: scale(1);
    transition: transform 0.3s ease;
}
.modal-overlay.hidden .modal { transform: scale(0.9); }
.modal h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}
.modal p { color: var(--text-primary); font-size: 1.2rem; margin-bottom: 2rem; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }

@media (max-width: 600px) {
    .game-header { flex-direction: column; text-align: center; }
    .stats-bar { width: 100%; justify-content: center; order: -1; margin-bottom: 0.5rem; }
    .header-left { margin-bottom: 0.5rem; }
    .header-controls { width: 100%; }
    .cell { width: var(--cell-size-sm); height: var(--cell-size-sm); font-size: 0.8rem; }
}

@media (min-width: 601px) and (max-width: 1024px) {
    .game-header { padding: 0.75rem 1.5rem; }
    .header-left h1 { font-size: 1.5rem; }
    .stats-bar { gap: 1.5rem; }
    .cell { width: 34px; height: 34px; font-size: 0.9rem; }
    .header-controls { gap: 0.75rem; margin-bottom: 1rem; }
    .difficulty-select { padding: 0.6rem 1.2rem; font-size: 0.85rem; }
}

@media (min-width: 768px) {
    .cell { width: var(--cell-size-lg); height: var(--cell-size-lg); font-size: 1rem; }
}
