/* ===================== THEME BASE ===================== */
:root {
    --bg-deep: #120a26;
    --bg-deep-2: #1c1040;
    --panel-bg: rgba(255, 255, 255, 0.06);
    --panel-border: rgba(255, 255, 255, 0.12);
    --accent-pink: #ec4899;
    --accent-violet: #8b5cf6;
    --accent-cyan: #22d3ee;
    --accent-gold: #f59e0b;
    --accent-green: #34d399;
    --accent-red: #f43f5e;
    --text-main: #f4f2fb;
    --text-muted: #a8a5c0;
}

* {
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
}

body {
    background: radial-gradient(circle at 20% 15%, #23134a 0%, var(--bg-deep) 45%, #0b0718 100%);
    color: var(--text-main);
    font-family: 'Inter', system-ui, sans-serif;
    overflow-x: hidden;
    position: relative;
}

/* ===================== BACKGROUND DECOR ===================== */
.bg-decor {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.45;
    animation: floatBlob 14s ease-in-out infinite;
}

.blob1 {
    width: 420px;
    height: 420px;
    top: -120px;
    left: -100px;
    background: radial-gradient(circle, var(--accent-violet), transparent 70%);
}

.blob2 {
    width: 380px;
    height: 380px;
    bottom: -140px;
    right: -80px;
    background: radial-gradient(circle, var(--accent-pink), transparent 70%);
    animation-delay: -4s;
}

.blob3 {
    width: 340px;
    height: 340px;
    top: 40%;
    left: 45%;
    background: radial-gradient(circle, var(--accent-cyan), transparent 70%);
    animation-delay: -8s;
    opacity: 0.3;
}

.spy-icon {
    position: absolute;
    font-size: 2.6rem;
    opacity: 0.12;
    animation: driftIcon 9s ease-in-out infinite;
}

.spy1 { top: 8%; left: 8%; }
.spy2 { top: 65%; right: 10%; animation-delay: -3s; }
.spy3 { bottom: 8%; left: 12%; animation-delay: -6s; }

@keyframes floatBlob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -40px) scale(1.08); }
}

@keyframes driftIcon {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-18px) rotate(8deg); }
}

/* ===================== LAYOUT SHELL ===================== */
.game-shell {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
}

.game-hero {
    text-align: center;
    margin-bottom: 1.25rem;
}

.game-logo {
    font-family: 'Baloo 2', 'Inter', sans-serif;
    font-weight: 800;
    font-size: clamp(2.2rem, 6vw, 3.4rem);
    letter-spacing: 0.06em;
    margin: 0;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet), var(--accent-pink));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: logoShine 6s linear infinite;
}

.game-logo-icon {
    display: inline-block;
    filter: none;
    -webkit-text-fill-color: initial;
    margin-right: 0.3rem;
}

@keyframes logoShine {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.game-tagline {
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.35rem;
    font-size: 0.95rem;
}

/* ===================== SITE FOOTER ===================== */
.site-footer {
    max-width: 640px;
    margin: 2.5rem auto 0.5rem;
    padding: 0 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ===================== TOP PLAYER PILL ===================== */
.player-pill {
    width: fit-content;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(14px);
    border-radius: 999px;
    padding: 0.5rem 0.6rem 0.5rem 1.1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.player-pill-name {
    font-weight: 700;
    color: var(--accent-cyan);
}

.btn-exit {
    border: 1px solid rgba(244, 63, 94, 0.5);
    background: rgba(244, 63, 94, 0.12);
    color: #ffb4c2;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    transition: transform 0.15s ease, background 0.15s ease;
}

.btn-exit:hover {
    background: rgba(244, 63, 94, 0.28);
    transform: translateY(-1px);
}

/* ===================== PANELS ===================== */
.panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    margin-bottom: 1.5rem;
}

.panel-body {
    padding: 1.5rem;
}

.panel-title {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.panel-icon {
    font-size: 1.15em;
}

.panel-divider,
hr {
    border-color: var(--panel-border);
    opacity: 1;
}

.section-label {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

@media (max-width: 991.98px) {
    .sticky-top {
        position: static !important;
        top: auto !important;
    }
}

/* ===================== GAME STATUS / GUIDE PANELS ===================== */
.round-badge {
    display: inline-block;
    background: linear-gradient(90deg, var(--accent-violet), var(--accent-pink));
    color: #fff;
    font-weight: 700;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}

.history-list {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 2px;
}

.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

.history-list div {
    color: var(--text-muted) !important;
    font-size: 0.82rem;
    padding: 0.35rem 0.5rem;
    border-left: 2px solid var(--accent-violet);
    margin-bottom: 0.35rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0 8px 8px 0;
}

.guide-item {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
    line-height: 1.4;
}

.guide-item strong {
    color: var(--text-main);
}

.guide-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ===================== CARD REMINDER ===================== */
.card-reminder {
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(34, 211, 238, 0.35);
    color: var(--text-main);
    border-radius: 16px;
    padding: 0.75rem 1.1rem;
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* ===================== FORM CONTROLS ===================== */
.form-label {
    color: var(--text-main);
}

.form-control {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    border-radius: 14px !important;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.09);
    border-color: var(--accent-cyan);
    color: var(--text-main);
    box-shadow: 0 0 0 0.2rem rgba(34, 211, 238, 0.25);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.text-muted {
    color: var(--text-muted) !important;
}

/* ===================== BUTTONS ===================== */
.btn-game {
    border: none;
    border-radius: 999px;
    padding: 0.8rem 1.4rem;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-game:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.btn-game:active {
    transform: translateY(0);
}

.btn-game:disabled {
    opacity: 0.5;
    transform: none;
    filter: none;
    cursor: not-allowed;
}

.btn-game-primary {
    background: linear-gradient(90deg, var(--accent-violet), var(--accent-pink));
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.45);
}

.btn-game-accent {
    background: linear-gradient(90deg, var(--accent-cyan), #3b82f6);
    box-shadow: 0 8px 24px rgba(34, 211, 238, 0.4);
}

.btn-game-warning {
    background: linear-gradient(90deg, var(--accent-gold), #fbbf24);
    color: #402a00;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}

.btn-game-danger {
    background: linear-gradient(90deg, var(--accent-red), var(--accent-pink));
    box-shadow: 0 8px 24px rgba(244, 63, 94, 0.4);
}

.btn-game-muted {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--panel-border);
    box-shadow: none;
}

.btn-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    transition: transform 0.15s ease, background 0.15s ease;
}

.btn-chip:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.divider-or {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    gap: 0.75rem;
}

.divider-or::before,
.divider-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--panel-border);
}

/* ===================== ROOM INFO ===================== */
.room-info-label {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
}

.room-code-display {
    font-family: 'Baloo 2', sans-serif;
    font-size: 2.6rem;
    letter-spacing: 0.25em;
    font-weight: 700;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-pink));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0.25rem 0 0.75rem;
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.35);
}

/* ===================== PLAYER LIST ===================== */
.player-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.player-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    padding: 0.55rem 0.9rem;
    animation: fadeSlideUp 0.35s ease;
}

.player-item.player-eliminated {
    opacity: 0.5;
}

.player-item.player-eliminated .player-name {
    text-decoration: line-through;
}

.player-item.player-spectator {
    opacity: 0.65;
    border-style: dashed;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 0.85rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.player-name {
    font-weight: 600;
}

.player-tags {
    display: flex;
    gap: 0.35rem;
}

.badge {
    border-radius: 999px !important;
    font-weight: 700;
    font-size: 0.7rem;
    padding: 0.35em 0.7em;
}

.host-badge {
    background: linear-gradient(90deg, #fbbf24, var(--accent-gold));
    color: #402a00;
}

.ready-badge {
    background: rgba(52, 211, 153, 0.2);
    color: var(--accent-green);
    border: 1px solid rgba(52, 211, 153, 0.4);
}

.eliminated-badge {
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.spectator-badge {
    background: rgba(34, 211, 238, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(34, 211, 238, 0.35);
}

.exited-badge {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-gold);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

/* ===================== SECRET CARD (REVEAL) ===================== */
.screen-heading {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.secret-card-wrap {
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.secret-card {
    width: 100%;
    max-width: 340px;
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    background: linear-gradient(160deg, rgba(139, 92, 246, 0.25), rgba(15, 10, 35, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 40px rgba(139, 92, 246, 0.25);
    animation: cardFlipIn 0.6s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.secret-card h2 {
    font-family: 'Baloo 2', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.secret-card hr {
    border-color: rgba(255, 255, 255, 0.2);
    margin: 1rem 0;
}

.secret-card h4 {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.secret-card h1 {
    font-family: 'Baloo 2', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 0 24px rgba(255, 255, 255, 0.25);
}

.secret-card.role-spectator {
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 40px rgba(34, 211, 238, 0.2);
}

.spectator-msg {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

@keyframes cardFlipIn {
    from {
        opacity: 0;
        transform: rotateY(-90deg) scale(0.85);
    }
    to {
        opacity: 1;
        transform: rotateY(0) scale(1);
    }
}

/* ===================== SPEAKING / TIMER ===================== */
.speaker-text {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    animation: fadeSlideUp 0.4s ease;
}

.timer-wrap {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto;
}

.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 10;
}

.timer-progress {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.6));
}

.timer-number {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Baloo 2', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
}

.timer-wrap.timer-danger .timer-progress {
    stroke: var(--accent-red);
    filter: drop-shadow(0 0 12px rgba(244, 63, 94, 0.8));
}

.timer-wrap.timer-danger .timer-number {
    color: var(--accent-red);
    animation: pulseDanger 1s ease-in-out infinite;
}

@keyframes pulseDanger {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

/* ===================== VOTING ===================== */
.panel-vote .panel-body,
.panel-result .panel-body {
    animation: fadeSlideUp 0.4s ease;
}

.vote-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.vote-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--panel-border);
    border-radius: 16px;
    padding: 1rem 0.5rem;
    color: var(--text-main);
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.vote-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-cyan);
}

.vote-card.active {
    border-color: var(--accent-pink);
    background: rgba(236, 72, 153, 0.18);
    box-shadow: 0 0 24px rgba(236, 72, 153, 0.4);
}

.vote-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 1.1rem;
}

.vote-name {
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
}

.vote-blocked-msg {
    color: var(--text-muted);
    font-style: italic;
    padding: 1.5rem 0;
}

/* ===================== RESULTS ===================== */
.elimination-reveal {
    animation: popIn 0.5s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.elimination-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.elimination-name {
    font-family: 'Baloo 2', sans-serif;
    margin-bottom: 0.75rem;
}

.role-pill {
    display: inline-block;
    padding: 0.4em 1.1em;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
}

.role-pill.role-civilian {
    background: rgba(52, 211, 153, 0.18);
    color: var(--accent-green);
    border: 1px solid rgba(52, 211, 153, 0.4);
}

.role-pill.role-undercover {
    background: rgba(244, 63, 94, 0.18);
    color: #ff8fa3;
    border: 1px solid rgba(244, 63, 94, 0.4);
}

.role-pill.role-blank {
    background: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.guess-prompt {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--panel-border);
    animation: popIn 0.5s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.guess-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.guess-heading {
    font-family: 'Baloo 2', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.guess-subtext {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.guess-outcome-note {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.winner-banner {
    position: relative;
    padding: 1rem 0 1.5rem;
    overflow: visible;
}

.winner-banner h2 {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 800;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    animation: popIn 0.6s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.winner-civilian h2 {
    color: var(--accent-green);
    text-shadow: 0 0 30px rgba(52, 211, 153, 0.5);
}

.winner-undercover h2 {
    color: var(--accent-red);
    text-shadow: 0 0 30px rgba(244, 63, 94, 0.5);
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.5); }
    70% { transform: scale(1.08); }
    100% { opacity: 1; transform: scale(1); }
}

.confetti-layer {
    position: absolute;
    inset: 0;
    top: -20px;
    pointer-events: none;
    overflow: visible;
}

.confetti-piece {
    position: absolute;
    top: 0;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    animation-name: confettiFall;
    animation-timing-function: ease-in;
    animation-fill-mode: forwards;
}

@keyframes confettiFall {
    0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(280px) rotate(360deg); opacity: 0; }
}

.final-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
    text-align: left;
}

.final-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    border-left: 4px solid var(--text-muted);
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    animation: fadeSlideUp 0.4s ease;
}

.final-card.role-civilian {
    border-left-color: var(--accent-green);
}

.final-card.role-undercover {
    border-left-color: var(--accent-red);
}

.final-card.role-blank {
    border-left-color: #94a3b8;
}

.final-card-name {
    font-weight: 700;
    font-size: 1rem;
}

.final-card-role {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0.15rem 0;
}

.final-card-word {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-cyan);
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===================== TOAST ===================== */
#toast {
    position: fixed;
    left: 50%;
    bottom: 30px;
    transform: translate(-50%, 20px);
    background: linear-gradient(90deg, #1e1b3a, #2b1a4a);
    border: 1px solid var(--panel-border);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    font-weight: 600;
}

#toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ===================== PET COMPANION ===================== */
.pet-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.pet {
    position: absolute;
    opacity: 1;
    transition: opacity 0.5s ease;
    animation: petPopIn 0.4s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.pet.pet-leaving {
    opacity: 0;
}

.pet-emoji {
    position: relative;
    display: inline-block;
    font-size: 2.5rem;
    line-height: 1;
    transform-origin: bottom center;
    animation: petHop 0.7s ease-in-out infinite;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35));
}

.pet-shadow {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 9px;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.55), transparent 75%);
    border-radius: 50%;
    animation: petShadow 0.7s ease-in-out infinite;
}

.pet-bubble {
    position: absolute;
    top: -1.9rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #fff4fb, #f0f4ff);
    color: #3a2a5d;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pet-bubble-below {
    top: auto;
    bottom: -1.9rem;
}

@keyframes petPopIn {
    from { opacity: 0; transform: scale(0.4); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes petHop {
    0%, 100% { transform: translateY(0) scale(1, 1); }
    20% { transform: translateY(-1px) scale(1.08, 0.9); }
    45% { transform: translateY(-18px) scale(0.94, 1.08); }
    70% { transform: translateY(-1px) scale(1.08, 0.9); }
}

@keyframes petShadow {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.45; }
    45% { transform: translateX(-50%) scale(0.55); opacity: 0.2; }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 575.98px) {
    .panel-body {
        padding: 1.1rem;
    }

    .timer-wrap {
        width: 140px;
        height: 140px;
    }

    .timer-number {
        font-size: 2.3rem;
    }

    .room-code-display {
        font-size: 2rem;
        letter-spacing: 0.15em;
    }
}
