.screen{
    display:none;
}

.screen.active{
    display:block;
}

.app-header{
    background:var(--primary);
    color: #251ab3;
    padding:15px;
    text-align:center;
    box-shadow:0 2px 10px rgba(0,0,0,.15);
}
.app-header h1{
    font-size:32px;
    font-weight:700;
}
.quiz-card {

    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem;

}

.quiz-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}


.quiz-card-button {
    min-height: 46px;
    font-size: 1rem;
}

.quiz-card-footer {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.quiz-card-footer .quiz-card-button {
    flex: 1;
    height: 46px;
    min-height: 46px;
    box-sizing: border-box;
}

#question-panel {
    display: flex;
    justify-content: center;
    align-items: center;

    min-height: 280px;
    margin-bottom: 1.5rem;
}

.question-flag {
    width: 240px;
    max-width: 90%;
    height: auto;

    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .15);
}


/*--------------------------------------------------
Settings Screen
--------------------------------------------------*/

.settings-content{

    display:flex;
    flex-direction:column;
    gap:1.25rem;
    max-width:420px;
    margin:2rem auto;
    padding:2rem;
    background:#fff;
    border-radius:12px;
    box-shadow:0 2px 10px rgba(0,0,0,.12);
}

.settings-content label{
    font-weight:600;
    margin-bottom:.35rem;
}

.settings-content select{
    width:100%;
    padding:.75rem;
    font-size:1rem;
    border:1px solid #ccc;
    border-radius:6px;
}

#screen-settings footer{
    display:flex;
    justify-content:center;
    margin-top:2rem;
}

#btn-start-quiz{
    min-width:180px;
    padding:.9rem 2rem;
    font-size:1rem;
    font-weight:bold;
    border:none;
    border-radius:8px;
    cursor:pointer;
}


/*--------------------------------------------------
  Settings Screen
--------------------------------------------------*/

#screen-settings {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
}

#settings-title {
    text-align: center;
    margin-bottom: 2rem;
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;

    max-width: 420px;
    margin: 0 auto;
    padding: 2rem;

    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}

.settings-content label {
    font-weight: 600;
}

.settings-content select {
    width: 100%;
    box-sizing: border-box;

    padding: .75rem;

    font-size: 1rem;

    border: 1px solid #ccc;
    border-radius: 6px;

    background: #fff;
}

#screen-settings footer {
    display: flex;
    justify-content: center;

    margin-top: 1.5rem;
}

#btn-start-quiz {
    min-width: 180px;

    padding: .9rem 2rem;

    font-size: 1rem;
    font-weight: bold;

    border: none;
    border-radius: 8px;

    cursor: pointer;
}

#btn-start-quiz:hover {
    opacity: .9;
}

.capital-question {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
}

.question-country-name {
    font-weight: bold;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.question-text {
    font-size: 1.1rem;
}
/*--------------------------------------------------
  Game Screen
--------------------------------------------------*/

#screen-game {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
}

/*--------------------------------------------------
  Answer Panel
--------------------------------------------------*/

#answer-panel {
    display: flex;
    flex-direction: column;
    gap: .75rem;

    max-width: 420px;
    margin: 0 auto;
}

#answer-panel button {
    width: 100%;
    padding: .9rem 1rem;
    font-size: 1rem;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition:
        background-color .2s,
        color .2s,
        border-color .2s;
}

#answer-panel button:hover:not(:disabled) {
    background: #f0f0f0;
}


#answer-panel button.correct:disabled {
    background: #2e7d32;
    color: white;
    border-color: #2e7d32;

    opacity: 1;
}

#answer-panel button.wrong:disabled {
    background: #c62828;
    color: white;
    border-color: #c62828;

    opacity: 1;
}

/*--------------------------------------------------*
 * Summary Screen
 *--------------------------------------------------*/

#screen-summary {
    min-height: 60vh;
    padding: 1rem;
}

#screen-summary.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.summary-card {
    width: min(420px, 100%);
    padding: 2rem;
    text-align: center;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
}

.summary-title {
    margin: 0 0 1.5rem;
    font-size: 1.8rem;
}

.summary-score {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1.25rem;
}

.summary-accuracy-label {
    font-size: 1rem;
    font-weight: 600;
}

.summary-accuracy {
    font-size: 2rem;
    font-weight: bold;
    margin: .4rem 0 1.75rem;
}

.summary-buttons {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.summary-button {
    width: 100%;
    padding: .9rem 1rem;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/*--------------------------------------------------
  Quiz Help Modal
--------------------------------------------------*/

#quiz-help {
    position: fixed;
    inset: 0;
    z-index: 10000;

     /* pointer-events: auto; */

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 1rem;
    box-sizing: border-box;

    background: rgba(0, 0, 0, 0.45);
}


.help-card {
    width: min(560px, 100%);
    max-height: 85vh;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.25);
}

.help-section {
    margin-bottom: 1.25rem;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section h3 {
    margin: 0 0 0.4rem;
}

.help-section p {
    margin: 0;
    line-height: 1.6;
    white-space: pre-line;
}

#help-title {
    margin-top: 0;
    margin-bottom: 1rem;
    text-align: center;
}

#help-content {
    line-height: 1.6;
    white-space: pre-line;
}

#btn-help-close {
    display: block;
    margin: 1.5rem auto 0;
    min-height: 40px;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
}

.city-question {
    text-align: center;
}

.question-city-name {
    margin-top: 0.75rem;
    font-size: 1.8rem;
    font-weight: 700;
}

/*--------------------------------------------------
  Mobile
--------------------------------------------------*/

@media (max-width: 600px) {

    body {
        margin: 0;
        padding: 0.75rem;
    }

    /*----------------------------------------------
      Quiz Cards
    ----------------------------------------------*/

    .quiz-card {
        margin: 0.75rem 0;
        padding: 1.25rem;
        border-radius: 12px;
    }

    .quiz-card-icon {
        font-size: 2.25rem;
    }

    .quiz-card h3 {
        font-size: 1.2rem;
        margin: 0;
    }

    .quiz-card-description {
        font-size: 1rem;
        line-height: 1.5;
        margin: 1rem 0;
    }

    .quiz-card-footer button {
        flex: 1;
        min-height: 46px;
        font-size: 1rem;
    }

    .quiz-card-footer {
        display: flex;
        gap: 1rem;
        margin-top: 1rem;
    }

    .quiz-card-footer .quiz-card-button {
        flex: 1;
        min-height: 46px;
        height: 46px;
        font-size: 1rem;
    }

    .quiz-card-footer button {
        flex: 1;
        min-height: 46px;
        font-size: 1rem;
    }

    .quiz-card-help-button {
        width: 100%;
    }

    .quiz-card-help-button {
        flex: 1;
        min-height: 46px;
        font-size: 1rem;
    }
    /*----------------------------------------------
      Settings
    ----------------------------------------------*/

    #screen-settings {
        max-width: none;
        padding: 0.5rem;
    }

    #settings-title {
        font-size: 1.4rem;
        margin-bottom: 1.25rem;
    }

    .settings-content {
        max-width: none;
        padding: 1.25rem;
        margin: 0;

        gap: 0.75rem;
    }

    .settings-content label {
        font-size: 1rem;
    }

    .settings-content select {
        min-height: 46px;
        font-size: 1rem;
    }

    #screen-settings footer {
        margin-top: 1.25rem;
    }

    #btn-start-quiz {
        width: 100%;
        min-height: 48px;
        font-size: 1rem;
    }


    /*----------------------------------------------
      Game
    ----------------------------------------------*/

    #screen-game {
        max-width: none;
        padding: 0.5rem;
    }

    #question-panel {
        min-height: 220px;
        margin-bottom: 1rem;
    }

    .question-flag {
        width: 200px;
        max-width: 85%;
    }

    #answer-panel {
        max-width: none;
        gap: 0.65rem;
    }

    #answer-panel button {
        min-height: 48px;
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
  

    .summary-card {
        padding: 1.5rem;
    }
    .summary-title {
        font-size: 1.5rem;
    }
    .summary-score {
        font-size: 2.5rem;
    }
    .summary-accuracy {
        font-size: 1.75rem;
    }
    .summary-button {
        padding: 1rem;
        font-size: 1.05rem;
    }
    

}

@media (max-width: 480px) {
    .quiz-card-footer {
        flex-direction: column;
    }
}