/* ── AATG Animal Quartet ─────────────────────────────────────────────────── */

.aatg-quartet {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 760px;
    margin: 0 auto;
}

.aatg-q__panel {
    position: relative;
    background: linear-gradient( 135deg, #0a2e1a 0%, #0d3b22 35%, #14532d 70%, #0f4a2a 100% );
    border-radius: 20px;
    padding: 28px 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.aatg-q__panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");
    opacity: .4;
    pointer-events: none;
}
.aatg-q__panel > * { position: relative; }

/* ── Start / end screen ──────────────────────────────────────────────────── */
.aatg-q__start { text-align: center; padding: 44px 28px; }
.aatg-q__logo  { font-size: 3.4rem; margin-bottom: 10px; animation: aatg-q-pop .5s ease both; }
.aatg-q__title {
    color: #fff;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 800;
    margin: 0 0 12px;
    letter-spacing: -.01em;
}
.aatg-q__sub {
    color: rgba(255,255,255,.75);
    font-size: .95rem;
    line-height: 1.65;
    max-width: 480px;
    margin: 0 auto 26px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.aatg-q__btn {
    background: linear-gradient( 135deg, #16a34a, #15803d );
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 26px;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 4px 15px rgba(22,163,74,.4);
}
.aatg-q__btn:hover { transform: translateY(-1px); box-shadow: 0 8px 25px rgba(22,163,74,.5); }
.aatg-q__btn--big  { padding: 15px 34px; font-size: 1.05rem; border-radius: 14px; }

/* ── HUD ─────────────────────────────────────────────────────────────────── */
.aatg-q__hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.aatg-q__score {
    color: rgba(255,255,255,.85);
    font-size: .85rem;
    font-weight: 600;
}
.aatg-q__score strong { color: #4ade80; font-size: 1rem; }
.aatg-q__round {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.18);
    color: #a8f0c0;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-radius: 100px;
    padding: 5px 14px;
}

/* ── Arena ───────────────────────────────────────────────────────────────── */
.aatg-q__arena {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: stretch;
}

.aatg-q__vs {
    align-self: center;
    color: rgba(255,255,255,.4);
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: .05em;
}

.aatg-q__card {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 16px;
    padding: 18px 16px;
    backdrop-filter: blur(6px);
    animation: aatg-q-pop .4s ease both;
}
.aatg-q__card--flip { animation: aatg-q-flip .45s ease both; }

.aatg-q__card-emoji { font-size: 2.6rem; text-align: center; line-height: 1.2; }
.aatg-q__card-name  {
    color: #fff;
    font-size: 1.02rem;
    font-weight: 800;
    text-align: center;
    margin: 6px 0 14px;
}

/* Card back (hidden CPU card) */
.aatg-q__card-back {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 220px;
    gap: 8px;
}
.aatg-q__card-back-icon { font-size: 3rem; opacity: .35; }
.aatg-q__card-back-text { color: rgba(255,255,255,.35); font-weight: 800; letter-spacing: .2em; }

/* ── Stats ───────────────────────────────────────────────────────────────── */
.aatg-q__stats { display: flex; flex-direction: column; gap: 8px; }

.aatg-q__stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    padding: 9px 13px;
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .1s;
    font-family: inherit;
    text-align: left;
}
button.aatg-q__stat:hover {
    background: rgba(74,222,128,.15);
    border-color: rgba(74,222,128,.5);
    transform: translateX(2px);
}
.aatg-q__stat--static { cursor: default; }
.aatg-q__stat--picked {
    background: rgba(74,222,128,.2) !important;
    border-color: #4ade80 !important;
}

.aatg-q__stat-label { color: rgba(255,255,255,.65); font-size: .78rem; font-weight: 600; }
.aatg-q__stat-value { color: #fff; font-size: .88rem; font-weight: 800; }

.aatg-q__hint {
    color: rgba(255,255,255,.45);
    font-size: .75rem;
    text-align: center;
    margin-top: 12px;
}

/* ── Result banner ───────────────────────────────────────────────────────── */
.aatg-q__result { display: none; margin-top: 18px; }
.aatg-q__result--show {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 14px;
    padding: 14px 18px;
    animation: aatg-q-pop .35s ease both;
}
.aatg-q__result p { margin: 0; font-size: .92rem; font-weight: 600; line-height: 1.5; flex: 1 1 300px; }

.aatg-q__result--win  { background: rgba(74,222,128,.16); border: 1px solid rgba(74,222,128,.45); }
.aatg-q__result--win p  { color: #a8f0c0; }
.aatg-q__result--lose { background: rgba(248,113,113,.14); border: 1px solid rgba(248,113,113,.4); }
.aatg-q__result--lose p { color: #fecaca; }
.aatg-q__result--draw { background: rgba(255,255,255,.1);  border: 1px solid rgba(255,255,255,.25); }
.aatg-q__result--draw p { color: rgba(255,255,255,.85); }

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes aatg-q-pop {
    from { opacity: 0; transform: scale(.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes aatg-q-flip {
    0%   { transform: rotateY(90deg); opacity: 0; }
    100% { transform: rotateY(0);     opacity: 1; }
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media ( max-width: 560px ) {
    .aatg-q__panel { padding: 20px 14px; }
    .aatg-q__arena { grid-template-columns: 1fr; }
    .aatg-q__vs    { text-align: center; padding: 2px 0; }
    .aatg-q__card-back { min-height: 120px; }
}
