:root {
    --flag-red: #c8102e;
    --flag-white: #fefdfb;
    --deep-blue: #0b3558;
    --soft-gray: #f2f2f2;
    --pastry-gold: #f0b429;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(160deg, rgba(200, 16, 46, 0.12), rgba(11, 53, 88, 0.2));
    color: #1f1f1f;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
}

.game-shell {
    background: rgba(254, 253, 251, 0.95);
    border-radius: 20px;
    border: 3px solid rgba(200, 16, 46, 0.4);
    padding: 28px;
    max-width: 960px;
    width: 100%;
    box-shadow: 0 18px 35px rgba(11, 53, 88, 0.12);
}

.banner {
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 4px double rgba(200, 16, 46, 0.35);
}

.banner h1 {
    margin: 0;
    font-size: 2.8rem;
    letter-spacing: 0.08em;
    color: var(--flag-red);
    text-transform: uppercase;
}

.banner .tagline {
    margin: 8px 0 0;
    font-size: 1rem;
    color: rgba(0, 0, 0, 0.65);
}

.status-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 24px 0;
    justify-content: space-between;
}

.meter {
    flex: 1 1 260px;
    background: var(--soft-gray);
    padding: 16px;
    border-radius: 14px;
    border: 2px solid rgba(11, 53, 88, 0.15);
}

.meter-label {
    font-weight: bold;
    margin-bottom: 6px;
}

.meter-track {
    width: 100%;
    height: 20px;
    background: rgba(11, 53, 88, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.meter-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--flag-red), #e2334a, var(--pastry-gold));
    transition: width 0.45s ease;
}

.meter-number {
    margin-top: 8px;
    font-size: 0.95rem;
    color: rgba(0, 0, 0, 0.7);
}

.scores {
    flex: 1 1 260px;
    display: grid;
    gap: 8px;
    align-content: center;
}

.score {
    background: rgba(11, 53, 88, 0.85);
    color: var(--flag-white);
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 600;
    position: relative;
}

.score::after {
    content: attr(data-label);
    position: absolute;
    top: -10px;
    right: 12px;
    background: var(--flag-red);
    color: var(--flag-white);
    padding: 2px 8px;
    font-size: 0.7rem;
    border-radius: 999px;
    letter-spacing: 0.05em;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 18px;
    border: 2px solid rgba(11, 53, 88, 0.08);
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
}

.card::before {
    content: "LEG GODT";
    position: absolute;
    top: -14px;
    left: 18px;
    background: var(--pastry-gold);
    color: #212121;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.12em;
    padding: 4px 10px;
    border-radius: 999px;
}

.card-title {
    margin: 0 0 12px;
    font-size: 1.6rem;
    color: var(--deep-blue);
}

.card-text {
    margin: 0 0 18px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.options {
    display: grid;
    gap: 14px;
}

.option {
    padding: 14px 18px;
    border-radius: 14px;
    border: none;
    font-size: 1.05rem;
    cursor: pointer;
    background: var(--deep-blue);
    color: var(--flag-white);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.option:hover,
.option:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(11, 53, 88, 0.15);
    outline: none;
    background: #0f466e;
}

.option:active {
    transform: translateY(0);
    box-shadow: none;
}

.log {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 18px;
    border: 2px dashed rgba(200, 16, 46, 0.25);
    padding: 20px;
}

.log h3 {
    margin: 0 0 12px;
    letter-spacing: 0.08em;
}

#log-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 220px;
    overflow-y: auto;
    display: grid;
    gap: 10px;
}

#log-list li {
    background: rgba(11, 53, 88, 0.08);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.95rem;
}

.controls {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.restart {
    background: var(--flag-red);
    color: var(--flag-white);
    border: none;
    padding: 12px 20px;
    border-radius: 14px;
    font-size: 1rem;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.restart:hover,
.restart:focus {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(200, 16, 46, 0.2);
    outline: none;
}

.footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.6);
    max-width: 760px;
}

@media (max-width: 700px) {
    body {
        padding: 16px;
    }

    .game-shell {
        padding: 20px;
    }

    .banner h1 {
        font-size: 2.2rem;
    }

    .status-panel {
        flex-direction: column;
    }

    .scores {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
