.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 8px;
}

.site-header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.site-header .logo img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.site-header .logo-name {
    font-family: "Roboto", "Helvetica", "Arial", sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.01em;
}

.site-header .header-cta {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 8px 18px;
    color: #fff;
    font-family: "Roboto", "Helvetica", "Arial", sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.site-header .header-cta:hover {
    background: rgba(255, 255, 255, 0.25);
}

body {
    background-color: #5831C7;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
li {
    font-family: "Roboto", "Helvetica", "Arial", sans-serif;
    color: #fff;
    line-height: 1.235;
    letter-spacing: 0.00735em;
    text-align: center;
}

p, li {
    text-align: left;
}

.start-button-container {
    text-align: center;
    margin: 40px;
}

.start-button {
    display: inline-block;
    background-color: #180268;
    border-radius: 8px;
    padding: 12px 28px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite ease-in-out;
    transition: background-color 0.3s ease;
}

.start-button:hover {
    background-color: #23038d;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(24, 2, 104, 0.5);
    }

    50% {
        transform: scale(1.08);
        box-shadow: 0 0 20px 4px rgba(24, 2, 104, 0.3);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(24, 2, 104, 0.5);
    }
}

/* Hero */
.hero {
    text-align: center;
    padding: 24px 0 8px;
}

.hero h1 {
    font-size: clamp(1.4rem, 5vw, 2rem);
    margin-bottom: 12px;
}

.hero p {
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto 8px;
    opacity: 0.92;
}

/* Feature badges */
.feature-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px 0 8px;
}

.feature-badge {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.88rem;
    color: #fff;
    font-family: "Roboto", "Helvetica", "Arial", sans-serif;
}

/* Topic list */
.topic-list {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px 20px 20px 36px;
    margin: 0 0 8px;
}

.topic-list li {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

.topic-list li:last-child {
    border-bottom: none;
}

/* Section title */
.section-title {
    text-align: center;
    font-size: 1.2rem;
    margin: 28px 0 12px;
}

/* FAQ */
.faq {
    margin: 16px 0 8px;
}

.faq h2 {
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 16px;
}

.faq h3 {
    font-size: 1rem;
    color: #ffd84d;
    margin: 14px 0 4px;
    text-align: left;
}

.faq p {
    margin: 0 0 4px;
    font-size: 0.95rem;
}

/* ── Trainer ── */
.trainer-wrap {
    max-width: 360px;
    margin: 0 auto 32px;
    background: rgba(0,0,0,0.18);
    border-radius: 16px;
    padding: 20px 20px 24px;
}

.tr-progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.tr-progress-fill {
    height: 100%;
    width: 0%;
    background: #4caf50;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.tr-problem {
    font-size: clamp(1.4rem, 6vw, 2.2rem);
    font-weight: 700;
    text-align: center;
    color: #fff;
    margin-bottom: 14px;
    font-family: "Roboto", sans-serif;
    min-height: 2.6rem;
    letter-spacing: 0.04em;
}

.tr-meta {
    display: flex;
    justify-content: space-between;
    font-family: "Roboto", sans-serif;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 12px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
}

.tr-calc {
    background: rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 14px;
    border: 1.5px solid rgba(255,255,255,0.15);
    transition: background 0.25s;
}

.tr-calc.flash-correct { animation: flashCorrect 0.4s ease; }
.tr-calc.flash-wrong   { animation: flashWrong 0.45s ease; }

@keyframes flashCorrect {
    0%   { background: rgba(76,175,80,0.15); }
    50%  { background: rgba(76,175,80,0.45); }
    100% { background: rgba(255,255,255,0.07); }
}

@keyframes flashWrong {
    0%   { background: rgba(244,67,54,0.15); transform: translateX(0); }
    20%  { background: rgba(244,67,54,0.4);  transform: translateX(-6px); }
    40%  { transform: translateX(6px); }
    60%  { transform: translateX(-4px); }
    80%  { transform: translateX(4px); }
    100% { background: rgba(255,255,255,0.07); transform: translateX(0); }
}

.tr-display {
    background: #fff;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 1.5rem;
    font-weight: 600;
    color: #222;
    font-family: "Roboto", sans-serif;
    min-height: 48px;
    margin-bottom: 10px;
    text-align: right;
    letter-spacing: 0.05em;
}

.tr-keypad {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.tr-keypad button {
    background: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.3rem;
    font-weight: 600;
    font-family: "Roboto", sans-serif;
    color: #222;
    padding: 14px 0;
    cursor: pointer;
    box-shadow: 0 3px 0 rgba(0,0,0,0.25);
    transition: transform 0.08s, box-shadow 0.08s;
}

.tr-keypad button:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.25);
}

.tr-key-c  { background: #f08080 !important; color: #fff !important; }
.tr-key-op { background: rgba(255,255,255,0.6) !important; color: #555 !important; cursor: default !important; }
.tr-key-ok { grid-column: span 2; background: #2e7d32 !important; color: #fff !important; font-size: 1.1rem !important; letter-spacing: 0.05em; }

.tr-gameover {
    text-align: center;
    padding: 16px 0 4px;
}

.tr-gameover p      { font-size: 1.1rem; margin-bottom: 14px; }
.tr-gameover strong { color: #ffd84d; font-size: 1.3rem; }

.tr-gameover button {
    background: #2e7d32;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    font-family: "Roboto", sans-serif;
    cursor: pointer;
}
