/* Základní nastavení */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #fff;
    padding: 15px 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

h1 { margin: 0; font-size: 1.5em; }
h2 { text-align: center; font-size: 1.3em; margin: 25px 0 15px 0; color: #444; }
.subtitle { text-align: center; color: #666; font-size: 0.9em; margin-top: -10px; margin-bottom: 20px; }

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 15px 80px 15px;
}

/* Utility */
.hidden { display: none !important; }

/* Menu a tlačítka */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

button {
    display: block;
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

button:active { transform: scale(0.98); }
button:disabled { opacity: 0.6; cursor: not-allowed; }

/* Barvy tlačítek */
.primary-btn, #submit-btn {
    background-color: #007bff;
    color: white;
}
.secondary-btn {
    background-color: #6c757d;
    color: white;
}
.circuit-btn {
    background-color: #17a2b8; /* Tyrkysová pro okruhy */
    color: white;
    font-size: 1em;
    padding: 12px;
}
.outline-btn {
    background-color: transparent;
    border: 2px solid #6c757d;
    color: #6c757d;
    box-shadow: none;
}

/* Grid pro okruhy */
.circuits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); /* Responsivní mřížka */
    gap: 12px;
    margin-bottom: 30px;
}

/* Kvízové otázky */
.question-box {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.question-title {
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 1.15em;
    color: #2c3e50;
}

/* Možnosti odpovědí */
.options label {
    display: flex;
    align-items: flex-start;
    margin: 8px 0;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    background-color: #fff;
    /* Odstranění prodlevy na dotykových zařízeních */
    touch-action: manipulation; 
}

.options label:hover { background-color: #f8f9fa; border-color: #dee2e6; }
.options input[type="radio"] {
    margin-right: 12px;
    margin-top: 5px;
    transform: scale(1.3);
    flex-shrink: 0;
}

/* Vyhodnocení */
.correct { background-color: #d4edda !important; border-color: #c3e6cb !important; color: #155724; }
.incorrect { background-color: #f8d7da !important; border-color: #f5c6cb !important; color: #721c24; }

.explanation {
    margin-top: 15px;
    padding: 12px;
    background-color: #e8f5e9;
    border-radius: 5px;
    color: #155724;
    display: none;
    border-left: 5px solid #28a745;
}

/* Sticky footer pro tlačítko Vyhodnotit */
.sticky-footer {
    position: sticky;
    bottom: 20px;
    z-index: 90;
    margin-top: 20px;
}

/* Výsledky */
#result-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 30px;
    border-top: 5px solid #007bff;
}

#score-display {
    font-size: 1.6em;
    font-weight: bold;
    margin-bottom: 20px;
}

/* Responsivita pro větší displeje */
@media (min-width: 600px) {
    .action-buttons {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    button { width: auto; min-width: 200px; }
    .circuits-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}