* {box-sizing: border-box}

h1 {color: white;}

body {
    background-color: #151F38;
    font-family: Holtwood One SC, monospace;
    text-align: center;
    margin: 0;
}

div {align-items: center}

nav {
    background-color: #8B5CF6;
    display: grid;
    grid-template-columns: 2.65fr 3.37fr 1.4fr 1.58fr 1fr;
    align-items: center;
    border-bottom: 4px solid black;
}

nav a {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;

    font-family: Holtwood One SC, monospace;
    font-size: 24px;
    text-decoration: none;
    color: black;

    margin: 0;
    padding: 0 10px;
}

nav a:not(:first-child) {
    border-left: 5px solid black;
}

.some {margin: 6px 0 0 0;}

#selected {color: #D9D9D9}

img {
    border-radius: 25px;
    margin: 10px 0 0 0;
}

/*Адаптив*/
@media (width <= 900px) {
    #characters {grid-template-columns: repeat(3, 1fr)}
    a {gap: 0;}
}

@media (width <= 700px) {
    #characters {grid-template-columns: repeat(2, 1fr)}
}

@media (width <= 600px) {
    nav {display: flex; flex-direction: column; border-bottom: none;}
    nav a {margin: 5px 0;}
    nav a:not(:first-child) {border-left: none}
}

@media (width <= 500px) {
    #characters {grid-template-columns: repeat(1, 1fr)}
    a {
        gap: 0;
        margin: 5px;
        width: 100%;
        justify-content: center;
        border: none;
    }
    nav {display: flex; flex-direction: column;}
}

.card {
    max-width: 650px;
    margin: 30px auto;
    padding: 25px;
    border-radius: 16px;
    background: #ffffff;
    color: #222222;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card h2 {
    margin-top: 0;
    line-height: 1.5;
}

.answers-list {padding-left: 25px;}

.answers-list li {
    margin: 12px 0;
    border: 2px solid #dddddd;
    border-radius: 10px;
    background: #f8f9fa;
    transition: background-color 0.2s,
    border-color 0.2s,
    color 0.2s;
}

.answers-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    cursor: pointer;
}

.answers-list input {
    flex-shrink: 0;
    accent-color: #4f46e5;
}

.answers-list li:has(input:not(:disabled)):hover {
    border-color: #818cf8;
    background: #eef2ff;
}

.answers-list li.correct {
    border-color: #16a34a;
    background: #dcfce7;
    color: #166534;
}

.answers-list li.incorrect {
    border-color: #dc2626;
    background: #fee2e2;
    color: #991b1b;
}


.answers-list li.selected-correct {
    border-color: #15803d;
    background: #bbf7d0;
    color: #14532d;
}

.feedback-success {
    padding: 12px;
    border-radius: 8px;
    background: #dcfce7;
    color: #166534;
    font-weight: bold;
}

.feedback-error {
    padding: 12px;
    border-radius: 8px;
    background: #fee2e2;
    color: #991b1b;
    font-weight: bold;
}

.progress {
    color: #666666;
    font-size: 14px;
}

button {
    margin-top: 15px;
    padding: 12px 22px;
    border: none;
    border-radius: 9px;
    background: #4f46e5;
    color: #ffffff;
    font-family: Holtwood One SC, monospace;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s,
    transform 0.2s;
}

button:hover {
    background: #3730a3;
    transform: translateY(-1px);
}

button:focus-visible,
input:focus-visible {
    outline: 3px solid #818cf8;
    outline-offset: 3px;
}

.results {text-align: center;}

.results meter {
    display: block;
    width: 100%;
    height: 25px;
    margin: 20px 0;
}

[hidden] {display: none !important;}