.nav-bar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 0; 
    border-bottom: 1px solid #e5e7eb; 
    margin-bottom: 8px; 
}

.game-header { 
    border-bottom: 2px solid #3b82f6; 
    margin-bottom: 30px; 
}

.back-link { 
    text-decoration: none; 
    color: #6b7280; 
    font-size: 0.9rem; 
    font-weight: 600; 
    transition: color 0.2s;
}

.back-link:hover {
    color: #3b82f6;
}

.logo { 
    font-weight: 800; 
    text-transform: uppercase; 
    color: #1a1a1a; 
    letter-spacing: 1px;
}

.logo span { 
    color: #3b82f6; 
}

/* Globální herní plocha */
.game-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 850px;
    margin: 0 auto;
    padding-bottom: 40px;
}

/* Panel statistik */
.stats-panel {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
    gap: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-item { text-align: center; font-weight: 700; }
.stat-label { display: block; font-size: 0.75rem; color: #64748b; text-transform: uppercase; margin-bottom: 4px; }
.xp-val { font-size: 1.8rem; }
.blue { color: #2563eb; }

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 16px;
    background: #f1f5f9;
    border-radius: 20px;
    overflow: hidden;
    margin: 8px 0;
    border: 1px solid #e2e8f0;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Herní plátno */
.canvas-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
    background-image: url('Mines.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }

/* Mřížka upgradů */
.upgrades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.upg-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.upg-card:hover { transform: translateY(-4px); border-color: #3b82f6; box-shadow: 0 10px 15px rgba(0,0,0,0.05); }

/* Animace nákupu */
.purchased-anim {
    animation: pulseBuy 0.4s ease-out;
    border-color: #2563eb !important;
}

@keyframes pulseBuy {
    0% { transform: scale(1); background-color: #fff; }
    50% { transform: scale(1.05); background-color: #dbeafe; }
    100% { transform: scale(1); background-color: #fff; }
}

/* Zašednutí při MAX levelu */
.maxed-out {
    background-color: #f3f4f6 !important;
    opacity: 0.6;
    cursor: not-allowed !important;
    pointer-events: none;
    filter: grayscale(1);
}

.upg-header { background: #f8fafc; padding: 10px; font-weight: 700; font-size: 0.95rem; border-bottom: 1px solid #e2e8f0; text-align: center; }
.upg-body { padding: 15px; display: flex; flex-direction: column; gap: 6px; text-align: center; }
.upg-cost { font-weight: 700; color: #2563eb; font-size: 1rem; }
.upg-next { color: #059669; font-weight: 600; font-size: 0.75rem; }
.upg-current { font-weight: 700; color: #475569; font-size: 0.85rem; }

.controls-area { padding: 15px; text-align: center; }
.ui-button { padding: 10px 30px; font-weight: 700; border-radius: 8px; border: 1px solid #d1d5db; background: #fff; cursor: pointer; }