body {
    font-family: 'Fira Sans', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px 0;
    box-sizing: border-box;
    background: #e7e7e7;
    color: #2a2a2a;
}

.container {
    text-align: center;
    width: 100%;
    max-width: 520px;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

/* ── Header ── */
.game-header {
    padding: 4px 0 20px;
    text-align: center;
}

.game-title {
    font-size: 36px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.game-subtitle {
    font-size: 15px;
    color: #888;
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

/* ── Game container & card ── */
.game-container {
    width: 100%;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 40px rgba(20,30,60,0.10);
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
}

.game {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 300ms cubic-bezier(.2,.9,.2,1);
}

.card img {
    width: 100%;
    height: auto;
    display: block;
}

.label {
    padding: 8px 16px 4px;
    font-size: 15px;
    color: #666;
    text-align: center;
}

.card-counter {
    text-align: center;
    padding: 10px 0 14px;
    font-size: 13px;
    color: #bbb;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

/* ── Buttons ── */
.controls {
    display: flex;
    gap: 12px;
    width: 100%;
    margin: 18px 0 0;
}

.control-button {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: transform 160ms ease, box-shadow 160ms ease;
    -webkit-font-smoothing: antialiased;
}

.control-button.secondary {
    background: linear-gradient(180deg, #b8b8b8, #929292);
    color: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.13);
}

.control-button.primary {
    background: linear-gradient(180deg, #7d8f7d, #5f735f);
    color: #fff;
    box-shadow: 0 6px 20px rgba(80,100,80,0.25);
}

.control-button:hover {
    transform: translateY(-3px);
}

.control-button.secondary:hover {
    box-shadow: 0 10px 26px rgba(0,0,0,0.18);
}

.control-button.primary:hover {
    box-shadow: 0 10px 26px rgba(80,100,80,0.35);
}

.control-button:active {
    transform: translateY(1px) scale(0.99);
}

.control-button:focus {
    outline: 3px solid rgba(80,100,80,0.35);
    outline-offset: 3px;
}

.btn-text {
    font-size: 14px;
    font-weight: 700;
}

/* ── Keyboard hint ── */
.keyboard-hint {
    font-size: 12px;
    color: #ccc;
    margin: 8px 0 0;
    font-weight: 400;
    letter-spacing: 0.2px;
}

/* ── Score ── */
.results {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    padding: 12px 28px;
    background: rgba(255,255,255,0.95);
    border-radius: 50px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.07);
    border: 1px solid rgba(0,0,0,0.05);
    margin-top: 16px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 7px;
}

.result-icon {
    font-size: 15px;
    font-weight: 800;
}

.correct-count .result-icon { color: #2fc25b; }
.incorrect-count .result-icon { color: #ff5a5a; }

.result-label {
    font-size: 13px;
    color: #aaa;
    font-weight: 500;
}

.result-value {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a2e;
    min-width: 24px;
    text-align: center;
    line-height: 1;
}

.result-divider {
    width: 1px;
    height: 28px;
    background: #ebebeb;
}

/* ── Card entrance animation ── */
.card.pop-in {
    animation: pop 360ms cubic-bezier(.2,.9,.2,1);
}

@keyframes pop {
    0%   { transform: scale(0.97) translateY(6px); opacity: 0; }
    60%  { transform: scale(1.01) translateY(-3px); opacity: 1; }
    100% { transform: scale(1) translateY(0); }
}

/* ── Feedback toasts ── */
.feedback {
    position: fixed;
    left: 50%;
    top: 44%;
    transform: translate(-50%, 0);
    z-index: 1200;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    min-width: 220px;
    box-shadow: 0 12px 36px rgba(8,12,20,0.12);
    pointer-events: none;
    opacity: 0;
    will-change: transform, opacity;
    animation: feedback-pop 340ms cubic-bezier(.2,.9,.2,1) forwards;
}

.feedback.correct {
    background-color: rgba(46, 204, 113, 0.97);
    color: #fff;
    box-shadow: 0 14px 40px rgba(46,204,113,0.2);
}

.feedback.incorrect {
    background-color: rgba(255, 90, 90, 0.97);
    color: #fff;
    box-shadow: 0 14px 40px rgba(255,90,90,0.2);
}

@keyframes feedback-pop {
    0%   { transform: translate(-50%, -10%) scale(0.96); opacity: 0; }
    60%  { transform: translate(-50%, 4%) scale(1.03);  opacity: 1; }
    100% { transform: translate(-50%, 0) scale(1);      opacity: 1; }
}

/* ── Card-specific info bubble ── */
.card-feedback {
    position: fixed;
    left: 50%;
    top: 58%;
    transform: translate(-50%, 0);
    background: rgba(255,255,255,0.98);
    color: #1b3b2a;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(18,28,36,0.12);
    font-weight: 600;
    font-size: 14px;
    z-index: 1100;
    max-width: 88%;
    text-align: center;
    pointer-events: none;
}

/* ── End screen ── */
.end-message {
    font-size: 17px;
    font-weight: 500;
    color: #333;
    padding: 32px 24px;
    text-align: center;
    line-height: 1.7;
}

.end-message h5 {
    font-size: 15px;
    font-weight: 400;
    color: #777;
    margin: 12px 0 0;
    line-height: 1.6;
}

/* ── Confetti ── */
.confetti-container {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    pointer-events: none;
    overflow: visible;
    z-index: 2000;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 14px;
    opacity: 0.95;
    transform-origin: center;
    will-change: transform, opacity;
    border-radius: 2px;
}

@keyframes confetti-fall {
    0%   { transform: translateY(-10vh) rotate(0deg);   opacity: 1; }
    100% { transform: translateY(120vh) rotate(720deg); opacity: 0; }
}

/* ── Fullscreen button ── */
.fullscreen-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
    background: #6b7e6b;
    border: none;
    color: white;
    font-size: 18px;
    border-radius: 10px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(80,100,80,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fullscreen-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(80,100,80,0.35);
}

.fullscreen-btn:active {
    transform: scale(0.95);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .game-title      { font-size: 28px; }
    .game-subtitle   { font-size: 14px; }
    .control-button  { padding: 13px 14px; font-size: 14px; gap: 7px; }
    .btn-text        { font-size: 13px; }
    .results         { padding: 10px 20px; gap: 16px; }
    .result-value    { font-size: 19px; }
}

@media (max-width: 360px) {
    .game-title      { font-size: 24px; }
    .control-button  { padding: 12px 10px; gap: 5px; }
    .btn-text        { font-size: 12px; }
}
