:root {
    --bg-main: #fff9ef;
    --bg-secondary: #fff1d9;
    --bg-card: rgba(255, 255, 255, 0.88);
    --bg-card-soft: rgba(255, 255, 255, 0.74);
    --border-soft: rgba(255, 138, 61, 0.18);
    --text-main: #382434;
    --text-muted: #7a6672;
    --primary: #ff7f50;
    --primary-dark: #ff5d7a;
    --secondary: #7b6dff;
    --accent: #12c7b8;
    --success: #31c48d;
    --warning: #ffbf47;
    --danger: #ff5f7a;
    --shadow-main: 0 22px 60px rgba(241, 120, 76, 0.18);
    --shadow-float: 0 14px 30px rgba(123, 109, 255, 0.18);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Nunito', sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 127, 80, 0.30), transparent 22%),
        radial-gradient(circle at 85% 18%, rgba(123, 109, 255, 0.24), transparent 20%),
        radial-gradient(circle at 80% 78%, rgba(18, 199, 184, 0.20), transparent 24%),
        linear-gradient(180deg, #fff8ef 0%, #fff3d6 46%, #ffe4e8 100%);
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(18px);
    z-index: -1;
    opacity: 0.8;
    animation: floatBlob 16s ease-in-out infinite;
}

body::before {
    width: 220px;
    height: 220px;
    top: 90px;
    left: -40px;
    background: rgba(255, 191, 71, 0.28);
}

body::after {
    width: 280px;
    height: 280px;
    right: -80px;
    bottom: 50px;
    background: rgba(123, 109, 255, 0.20);
    animation-delay: -6s;
}

h1, h2, h3, h4, h5 {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-weight: 600;
    color: #402541;
    letter-spacing: 0.01em;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

strong {
    color: #3f2040;
}

@supports (-webkit-touch-callout: none) {
    h1, h2, h3, h4, h5 {
        font-family: 'Nunito', sans-serif;
        font-weight: 800;
        letter-spacing: 0;
    }
}

p,
label,
span,
small,
.table td,
.table th,
.nav-link,
.btn {
    font-family: 'Nunito', sans-serif;
}

a {
    color: #7b4cff;
}

a:hover {
    color: #ff5d7a;
    text-decoration: none;
}

.page-shell {
    padding: 34px 0 68px;
}

.top-navbar {
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 10px 30px rgba(255, 173, 111, 0.12);
}

.top-navbar .nav-link {
    color: #65495d !important;
    font-weight: 700;
    transition: transform 0.2s ease, color 0.2s ease;
}

.top-navbar .nav-link:hover,
.top-navbar .nav-item.active .nav-link {
    color: #ff6b61 !important;
    transform: translateY(-1px);
}

.top-navbar .navbar-toggler {
    border: 1px solid rgba(123, 109, 255, 0.24);
    border-radius: 16px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 20px rgba(123, 109, 255, 0.10);
}

.top-navbar .navbar-toggler:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(123, 109, 255, 0.18);
}

.top-navbar .navbar-toggler-icon {
    width: 1.35rem;
    height: 1.35rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(91, 61, 93, 0.92)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.4' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.brand-mark__icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ff8a3d, #ff4da1 55%, #7b6dff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 18px 30px rgba(255, 111, 97, 0.26);
    animation: pulseGlow 2.8s ease-in-out infinite;
}

.brand-mark strong {
    display: block;
    font-size: 1.1rem;
}

.brand-mark small {
    display: block;
    color: #86697d;
    font-size: 12px;
}

.user-avatar {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    flex: 0 0 auto;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 138, 61, 0.18), rgba(123, 109, 255, 0.18));
    border: 1px solid rgba(255, 127, 80, 0.20);
    box-shadow: 0 14px 30px rgba(123, 109, 255, 0.12);
    color: #6b3f77;
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar--sm {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 0.9rem;
}

.user-avatar--xl {
    width: 104px;
    height: 104px;
    border-radius: 28px;
    font-size: 2rem;
}

.user-avatar--card {
    width: 120px;
    height: 120px;
    border-radius: 32px;
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: 18px;
}

.profile-editor-grid {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.profile-avatar-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.leaderboard-player {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none !important;
}

.leaderboard-player__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.leaderboard-player__text strong {
    line-height: 1.15;
}

.leaderboard-player__text small {
    line-height: 1.1;
}

.btn {
    border: none;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.btn-pill {
    border-radius: 999px;
}

.btn-primary,
.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #ff8a3d, #ff5d7a);
    color: #fff;
    box-shadow: 0 14px 24px rgba(255, 111, 97, 0.24);
}

.btn-outline-light {
    border: 2px solid rgba(123, 109, 255, 0.24);
    color: #714f7a;
    background: rgba(255, 255, 255, 0.72);
}

.btn-outline-light:hover,
.btn-outline-light:focus {
    background: linear-gradient(135deg, rgba(123, 109, 255, 0.12), rgba(18, 199, 184, 0.14));
    color: #4f3580;
    border-color: rgba(123, 109, 255, 0.34);
}

.hero-section {
    padding: 48px 0 18px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: center;
}

.hero-title {
    font-size: clamp(2.8rem, 5vw, 4.8rem);
    line-height: 0.95;
    margin-bottom: 18px;
    color: #3b2543;
}

.hero-subtitle {
    max-width: 620px;
    color: #7a6672;
    font-size: 1.12rem;
}

.hero-actions {
    margin-top: 30px;
}

.hero-panel,
.content-card,
.dashboard-card,
.auth-card,
.feature-card,
.stat-panel,
.glass-card,
.arena-card,
.mini-stat,
.category-stat-card,
.review-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-main);
    backdrop-filter: blur(10px);
}

.glass-card,
.feature-card,
.mini-stat,
.category-stat-card,
.review-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.74));
}

.arena-card,
.content-card,
.dashboard-card,
.auth-card,
.feature-card,
.stat-panel {
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.arena-card::before,
.content-card::before,
.dashboard-card::before,
.auth-card::before,
.feature-card::before,
.stat-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.25), transparent 52%);
    pointer-events: none;
}

.arena-card__label,
.section-badge,
.card-kicker,
.mini-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 127, 80, 0.16), rgba(123, 109, 255, 0.12));
    color: #7d4777;
    padding: 9px 16px;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(255, 127, 80, 0.12);
}

.feature-card p,
.dashboard-card p,
.content-card p,
.stat-panel span,
.text-muted,
.table td,
.table th,
small {
    color: var(--text-muted) !important;
}

.feature-strip,
.hero-mini-stats {
    margin-right: 0;
    margin-left: 0;
}

.dashboard-card,
.feature-card,
.mini-stat,
.option-btn,
.category-option,
.review-card,
.score-row--current {
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.dashboard-card:hover,
.feature-card:hover,
.category-option:hover,
.option-btn:hover,
.review-card:hover,
.mini-stat:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 18px 34px rgba(255, 118, 100, 0.18);
    border-color: rgba(255, 127, 80, 0.28);
}

.card-accent-primary {
    background: linear-gradient(145deg, rgba(255, 148, 89, 0.28), rgba(255,255,255,0.92) 50%, rgba(255, 93, 122, 0.16));
}

.card-accent-secondary {
    background: linear-gradient(145deg, rgba(18, 199, 184, 0.22), rgba(255,255,255,0.92) 52%, rgba(123, 109, 255, 0.18));
}

.stat-panel {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-panel strong {
    font-size: 2.35rem;
    margin-top: 10px;
}

.auth-shell {
    min-height: calc(100vh - 220px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 540px;
    animation: riseIn 0.7s ease;
}

.auth-link {
    color: var(--text-muted);
}

.form-control,
.custom-select,
select.form-control {
    background: rgba(255, 255, 255, 0.92);
    border: 2px solid rgba(255, 184, 92, 0.18);
    color: var(--text-main);
    border-radius: 18px;
    min-height: 58px;
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.55);
}

.form-control:focus,
select.form-control:focus {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(123, 109, 255, 0.5);
    color: var(--text-main);
    box-shadow: 0 0 0 0.2rem rgba(123, 109, 255, 0.16);
}

.form-group label {
    font-weight: 800;
    color: #6d4d65;
}

.setup-card h1,
.room-hero h1,
.result-shell h1 {
    font-size: 2.55rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.category-option {
    position: relative;
    padding: 14px 16px;
    border-radius: 20px;
    border: 2px solid rgba(255, 184, 92, 0.18);
    background: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    font-weight: 800;
    color: #694f63;
}

.category-option.active {
    background: linear-gradient(135deg, rgba(255, 127, 80, 0.18), rgba(123, 109, 255, 0.12));
    border-color: rgba(123, 109, 255, 0.42);
    color: #5d3a74;
}

.category-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.room-shell .content-card,
.game-shell .content-card {
    min-height: 100%;
}

.room-hero,
.game-card {
    animation: riseIn 0.65s ease;
}

.mini-stat {
    padding: 18px;
}

.mini-stat strong {
    display: block;
    margin-top: 6px;
    font-size: 1.2rem;
}

.score-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 0;
    border-bottom: 1px dashed rgba(255, 127, 80, 0.18);
}

.score-row:last-child {
    border-bottom: none;
}

.score-row__link {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.score-row__link:hover,
.score-row__link:focus {
    color: #ff5d7a;
    text-decoration: none;
}

.score-row--current {
    background: linear-gradient(135deg, rgba(255, 127, 80, 0.16), rgba(123, 109, 255, 0.08));
    border-radius: 18px;
    padding: 15px 16px;
}

.timer-chip {
    min-width: 148px;
    text-align: right;
    padding: 14px 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,243,214,0.85));
    border: 1px solid rgba(255, 127, 80, 0.18);
    box-shadow: var(--shadow-float);
}

.timer-chip strong {
    display: block;
    font-size: 2.5rem;
    line-height: 1;
    color: #ff6a5c;
    animation: pulseNumber 1.2s ease-in-out infinite;
}

.quiz-progress {
    height: 14px;
    background: rgba(255, 183, 92, 0.18);
    border-radius: 999px;
    overflow: hidden;
}

.quiz-progress .progress-bar {
    background: linear-gradient(90deg, #ff8a3d, #ff5d7a 40%, #7b6dff 100%);
    border-radius: 999px;
    animation: shimmerBar 2.2s linear infinite;
}

.question-text {
    font-size: 1.7rem;
    line-height: 1.35;
    color: #3f2743;
}

.options-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.option-btn {
    width: 100%;
    padding: 18px;
    border-radius: 22px;
    border: 2px solid rgba(255, 184, 92, 0.18);
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,246,236,0.92));
    color: var(--text-main);
    text-align: left;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(255, 176, 109, 0.10);
}

.option-btn strong {
    color: #ff6b61;
    margin-right: 6px;
}

.option-btn.active {
    border-color: rgba(123, 109, 255, 0.46);
    background: linear-gradient(135deg, rgba(123, 109, 255, 0.14), rgba(255,255,255,0.95));
}

.option-btn.correct {
    border-color: rgba(49, 196, 141, 0.56);
    background: linear-gradient(135deg, rgba(49, 196, 141, 0.16), rgba(255,255,255,0.95));
}

.option-btn.wrong {
    border-color: rgba(255, 95, 122, 0.44);
    background: linear-gradient(135deg, rgba(255, 95, 122, 0.16), rgba(255,255,255,0.95));
}

.answer-feedback {
    min-height: 90px;
}

.answer-feedback .alert {
    border: none;
    border-radius: 18px;
    box-shadow: 0 10px 22px rgba(123, 109, 255, 0.10);
}

.question-loading-state {
    padding: 26px 22px;
    border-radius: 24px;
    border: 1px dashed rgba(123, 109, 255, 0.22);
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246, 242, 255, 0.92));
    text-align: center;
    box-shadow: 0 14px 28px rgba(123, 109, 255, 0.10);
}

.question-loading-state .global-loading-orbit {
    margin-bottom: 16px;
}

.question-loading-state strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.question-loading-state p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.winner-card,
.winner-highlight {
    background: linear-gradient(135deg, rgba(255, 195, 92, 0.30), rgba(255, 107, 97, 0.14), rgba(123, 109, 255, 0.14));
}

.winner-highlight {
    padding: 18px 24px;
    border-radius: 24px;
    box-shadow: var(--shadow-float);
}

.winner-highlight strong {
    display: block;
    font-size: 1.55rem;
}

.site-footer {
    border-top: 1px solid rgba(255, 184, 92, 0.16);
    padding: 18px 0 24px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(8px);
}

.table-dark {
    background: transparent;
}

.table-dark td,
.table-dark th,
.table-dark thead th {
    border-color: rgba(255, 184, 92, 0.16);
    color: #6d5565;
}

.gap-12 {
    gap: 12px;
}

.form-feedback .alert {
    margin-bottom: 0;
}

.global-loading-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(26, 19, 34, 0.46);
    backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 2000;
}

.global-loading-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.loading-overlay-open {
    overflow: hidden;
}

.global-loading-card {
    width: min(100%, 430px);
    padding: 28px 24px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,246,236,0.92));
    border: 1px solid rgba(255, 184, 92, 0.20);
    box-shadow: 0 24px 80px rgba(18, 13, 23, 0.24);
    text-align: center;
}

.global-loading-card strong {
    display: block;
    font-size: 1.45rem;
    margin-bottom: 10px;
}

.global-loading-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.global-loading-orbit {
    position: relative;
    width: 82px;
    height: 82px;
    margin: 0 auto 18px;
}

.global-loading-orbit::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 2px dashed rgba(123, 109, 255, 0.26);
    animation: globalLoadingSpin 8s linear infinite;
}

.global-loading-orbit span {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    box-shadow: 0 10px 18px rgba(123, 109, 255, 0.16);
    animation: globalLoadingOrbit 1.8s ease-in-out infinite;
}

.global-loading-orbit span:nth-child(1) {
    top: 0;
    left: 50%;
    margin-left: -8px;
    background: linear-gradient(135deg, #ff8a3d, #ff5d7a);
}

.global-loading-orbit span:nth-child(2) {
    right: 6px;
    bottom: 14px;
    background: linear-gradient(135deg, #7b6dff, #12c7b8);
    animation-delay: -0.6s;
}

.global-loading-orbit span:nth-child(3) {
    left: 6px;
    bottom: 14px;
    background: linear-gradient(135deg, #ffbf47, #ff8a3d);
    animation-delay: -1.2s;
}

.global-loading-bar {
    position: relative;
    height: 10px;
    margin-top: 18px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 183, 92, 0.18);
}

.global-loading-bar span {
    position: absolute;
    inset: 0;
    width: 42%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff8a3d, #ff5d7a 50%, #7b6dff 100%);
    animation: globalLoadingSweep 1.6s ease-in-out infinite;
}

.preparation-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 184, 92, 0.18);
}

.preparation-status__pulse {
    position: relative;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #31c48d;
    flex: 0 0 auto;
}

.preparation-status.is-active .preparation-status__pulse {
    background: #ff8a3d;
    animation: preparationPulse 1.35s ease-in-out infinite;
}

.preparation-status__pulse::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(255, 138, 61, 0.26);
    opacity: 0;
}

.preparation-status.is-active .preparation-status__pulse::after {
    animation: preparationRipple 1.35s ease-out infinite;
}

.preparation-status__text {
    display: inline-block;
}

.alert-info {
    background: rgba(123, 109, 255, 0.12);
    color: #5d3a74;
}

.alert-success {
    background: rgba(49, 196, 141, 0.16);
    color: #22684f;
}

.alert-danger {
    background: rgba(255, 95, 122, 0.16);
    color: #883045;
}

.alert-warning {
    background: rgba(255, 191, 71, 0.18);
    color: #7d5412;
}

@keyframes floatBlob {
    0%, 100% { transform: translateY(0) translateX(0) scale(1); }
    50% { transform: translateY(-18px) translateX(12px) scale(1.06); }
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); box-shadow: 0 18px 30px rgba(255, 111, 97, 0.26); }
    50% { transform: scale(1.06); box-shadow: 0 22px 38px rgba(123, 109, 255, 0.24); }
}

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

@keyframes shimmerBar {
    0% { filter: saturate(1); }
    50% { filter: saturate(1.25); }
    100% { filter: saturate(1); }
}

@keyframes riseIn {
    0% { opacity: 0; transform: translateY(18px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes globalLoadingSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes globalLoadingOrbit {
    0%, 100% { transform: scale(0.95); }
    50% { transform: scale(1.18); }
}

@keyframes globalLoadingSweep {
    0% { transform: translateX(-115%); }
    50% { transform: translateX(150%); }
    100% { transform: translateX(150%); }
}

@keyframes preparationPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 138, 61, 0.26); }
    50% { transform: scale(1.18); box-shadow: 0 0 0 8px rgba(255, 138, 61, 0.06); }
}

@keyframes preparationRipple {
    0% { opacity: 0.5; transform: scale(0.7); }
    100% { opacity: 0; transform: scale(1.35); }
}

@media (max-width: 991.98px) {
    .top-navbar .navbar-collapse {
        display: none;
        width: 100%;
        margin-top: 14px;
        padding: 14px;
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.92);
        border: 1px solid rgba(255, 184, 92, 0.20);
        box-shadow: 0 18px 34px rgba(255, 111, 97, 0.12);
    }

    .top-navbar .navbar-collapse.show {
        display: block;
    }

    .top-navbar .navbar-nav {
        gap: 8px;
        align-items: stretch !important;
    }

    .top-navbar .nav-item,
    .top-navbar .btn {
        width: 100%;
    }

    .top-navbar .nav-link,
    .top-navbar .btn {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        border-radius: 16px;
    }

    .top-navbar .nav-link {
        background: rgba(255, 248, 239, 0.88);
    }

    .top-navbar .ml-lg-2 {
        margin-left: 0 !important;
    }

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

    .options-wrap {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 3rem;
    }

    .profile-editor-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .page-shell {
        padding-top: 20px;
    }

    .content-card,
    .dashboard-card,
    .auth-card,
    .feature-card,
    .stat-panel,
    .arena-card {
        padding: 20px;
        border-radius: 22px;
    }

    .setup-card h1,
    .room-hero h1,
    .result-shell h1 {
        font-size: 2rem;
    }

    .timer-chip {
        text-align: left;
        margin-top: 16px;
    }

    .profile-hero {
        flex-direction: column;
        align-items: flex-start;
    }
}
.brand-logo {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 18px 30px rgba(255, 111, 97, 0.18);
    background: rgba(255,255,255,0.85);
    padding: 4px;
}

.btn.is-loading {
    opacity: 0.8;
    cursor: wait;
    transform: none !important;
    box-shadow: none !important;
}

.form-feedback .alert {
    animation: fadeInUp 0.25s ease;
}

.quick-play-card {
    padding: 30px;
}

.quick-play-list li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 10px;
    color: var(--text-muted);
}

.quick-play-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.how-step {
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,246,236,0.88));
    border: 1px solid rgba(255, 138, 61, 0.18);
    border-radius: 22px;
    padding: 20px;
    min-height: 100%;
    box-shadow: 0 14px 26px rgba(255, 176, 109, 0.10);
}

.how-step strong {
    display: block;
    margin-bottom: 8px;
}

.room-invite-box {
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255,255,255,0.94), rgba(255,241,217,0.84));
    border: 1px solid rgba(255, 138, 61, 0.18);
}

.room-role-text {
    color: #7b6dff !important;
    font-weight: 800;
}

.option-btn {
    touch-action: manipulation;
}

.option-btn.is-pending,
.option-btn:disabled {
    opacity: 0.96;
    cursor: not-allowed;
}

.option-btn.is-pending {
    box-shadow: 0 0 0 4px rgba(123, 109, 255, 0.10), 0 10px 20px rgba(255, 176, 109, 0.10);
}

.review-card--correct {
    border-color: rgba(49, 196, 141, 0.35);
    background: linear-gradient(180deg, rgba(232,255,245,0.92), rgba(255,255,255,0.82));
}

.review-card--wrong {
    border-color: rgba(255, 95, 122, 0.35);
    background: linear-gradient(180deg, rgba(255,239,243,0.92), rgba(255,255,255,0.82));
}

.review-card--blank {
    border-color: rgba(255, 191, 71, 0.35);
    background: linear-gradient(180deg, rgba(255,249,232,0.92), rgba(255,255,255,0.82));
}

.review-card--wrong strong,
.review-card--wrong p {
    color: #8a3348;
}

.review-card--correct strong,
.review-card--correct p {
    color: #20634b;
}

.review-card--blank strong,
.review-card--blank p {
    color: #725520;
}

@media (max-width: 991.98px) {
    .quick-play-card {
        margin-top: 16px;
    }
}

.question-text,
.game-shell .question-text,
.game-shell #questionText {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-weight: 800;
    letter-spacing: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    font-kerning: normal;
}

.game-shell .option-btn,
.game-shell .answer-feedback,
.game-shell .mini-pill,
.game-shell .timer-chip strong {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    font-kerning: normal;
}

@supports (-webkit-touch-callout: none) {
    .game-shell .question-text,
    .game-shell #questionText,
    .game-shell .option-btn,
    .game-shell .mini-pill,
    .game-shell .answer-feedback,
    .game-shell .timer-chip strong {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
        letter-spacing: 0;
    }
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.site-footer__links a {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 138, 61, 0.18);
    color: #6c4a6f;
    font-weight: 700;
}

.site-footer__links a:hover {
    color: #ff5d7a;
    transform: translateY(-1px);
}

.consent-check {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 184, 92, 0.18);
}

.consent-check__label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.consent-check__label input {
    margin-top: 4px;
    transform: scale(1.15);
}

.consent-check__label span {
    display: block;
    color: var(--text-main);
}

.consent-check__label strong {
    display: block;
    margin-bottom: 2px;
}

.consent-check__label small {
    display: block;
    color: var(--text-muted);
}

.legal-note {
    padding: 16px 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,246,236,0.84));
    border: 1px solid rgba(255, 138, 61, 0.18);
}

.legal-document__hero {
    max-width: 900px;
}

.legal-document__grid {
    display: grid;
    gap: 18px;
}

.legal-document__section p:last-child {
    margin-bottom: 0;
}

@media (max-width: 575.98px) {
    .site-footer__links {
        gap: 10px;
    }

    .site-footer__links a {
        width: 100%;
        justify-content: center;
    }
}
