/* =========================================
   NEON TIC TAC TOE — Enhanced Stylesheet
   - Duplicate player-stats merged
   - prefers-reduced-motion added
   - Light theme modal backdrop fixed
   - !important removed where unneeded
   - Active player card highlight
   - Undo button styles
========================================= */

/* =========================================
   RESET
========================================= */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    min-height: 100dvh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 20%, #172554 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, #4c1d95 0%, transparent 42%),
        var(--dark);
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
}

button,
input {
    font: inherit;
}

button {
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

/* =========================================
   VARIABLES
========================================= */

:root {
    --cyan:        #00f7ff;
    --pink:        #ff2bd6;
    --purple:      #8b5cf6;
    --dark:        #050816;
    --text:        #ffffff;
    --card-bg:     rgba(255, 255, 255, .06);
    --card-border: rgba(255, 255, 255, .15);
    --muted:       #94a3b8;
    --surface:     rgba(255, 255, 255, .05);
}

/* =========================================
   LIGHT THEME
========================================= */

body.light-theme {
    --dark:        #edf7ff;
    --text:        #0f172a;
    --card-bg:     rgba(255, 255, 255, .72);
    --card-border: rgba(15, 23, 42, .12);
    --muted:       #475569;
    --surface:     rgba(148, 163, 184, .12);
}

body.light-theme .home-card,
body.light-theme .mode-card,
body.light-theme .setup-card,
body.light-theme .player,
body.light-theme .victory-card,
body.light-theme .info-card {
    background:   var(--card-bg);
    border-color: var(--card-border);
    box-shadow:   0 0 32px rgba(59, 130, 246, .12);
}

body.light-theme .mode-button,
body.light-theme .difficulty-button,
body.light-theme .format-button,
body.light-theme .input-group input,
body.light-theme .cell,
body.light-theme .game-button,
body.light-theme .audio-btns .mini-button,
body.light-theme .back-game-button {
    background:   rgba(255, 255, 255, .35);
    border-color: rgba(15, 23, 42, .12);
    color:        var(--text);
}

body.light-theme .cell {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

body.light-theme .quick-stats div,
body.light-theme .mini-button,
body.light-theme .victory-buttons .back-button {
    background:   rgba(255, 255, 255, .42);
    border-color: rgba(15, 23, 42, .12);
}

/* Fix: modal backdrop was nearly invisible in light mode */
body.light-theme .info-modal {
    background: rgba(15, 23, 42, .55);
}

body.light-theme .info-card {
    background: rgba(255, 255, 255, .92);
    border-color: rgba(15, 23, 42, .15);
}

body.light-theme .info-card ul,
body.light-theme .info-card h3 {
    color: #0f172a;
}

/* =========================================
   BACKGROUND
========================================= */

.background {
    position:       fixed;
    inset:          0;
    overflow:       hidden;
    pointer-events: none;
    z-index:        -1;
}

.glow {
    position:      absolute;
    width:         320px;
    height:        320px;
    border-radius: 50%;
    filter:        blur(110px);
    opacity:       .22;
    animation:     floating 8s infinite alternate ease-in-out;
}

.glow-one {
    background: var(--cyan);
    top:  -140px;
    left: -140px;
}

.glow-two {
    background:       var(--pink);
    right:            -140px;
    bottom:           -140px;
    animation-delay:  2s;
}

.glow-three {
    background:       var(--purple);
    top:              40%;
    left:             45%;
    animation-delay:  4s;
}

@keyframes floating {
    from { transform: translate(0, 0)      scale(1);   }
    to   { transform: translate(80px, 60px) scale(1.2); }
}

/* =========================================
   COMMON SCREEN RULES
========================================= */

.home-screen,
.mode-screen,
.setup-screen,
.game-screen {
    width:      100%;
    height:     100dvh;
    min-height: 0;
    overflow:   hidden;
}

/* =========================================
   HOME SCREEN
========================================= */

.home-screen {
    display:         flex;
    align-items:     center;
    justify-content: center;
    padding:         20px;
}

.home-card {
    width:           min(460px, 92vw);
    padding:         clamp(28px, 5vw, 55px) clamp(20px, 5vw, 35px);
    text-align:      center;
    border-radius:   30px;
    background:      rgba(255, 255, 255, .06);
    border:          1px solid rgba(255, 255, 255, .15);
    backdrop-filter: blur(20px);
    box-shadow:      0 0 60px rgba(0, 247, 255, .12);
}

.home-toolbar {
    display:         flex;
    justify-content: flex-end;
    gap:             10px;
    margin-bottom:   8px;
}

/* Logged-in user greeting below toolbar */
.user-greeting {
    text-align:    right;
    font-size:     0.75rem;
    color:         var(--cyan);
    letter-spacing: 0.04em;
    margin-bottom: 12px;
    min-height:    1.1em;
    opacity:       0.85;
}

.mini-button {
    width:        38px;
    height:       38px;
    border:       1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    background:   rgba(255, 255, 255, .04);
    color:        var(--text);
    font-size:    18px;
    cursor:       pointer;
    transition:   0.2s ease;
    display:      inline-flex;
    align-items:  center;
    justify-content: center;
}

.mini-button svg {
    width:        18px;
    height:       18px;
    display:      inline-block;
    vertical-align: middle;
}

.mini-button:hover {
    transform:  translateY(-2px);
    border-color: var(--cyan);
    box-shadow: 0 0 16px rgba(0, 247, 255, .2);
}

.mini-button.pwa-install-btn {
    border-color: rgba(0, 247, 255, 0.3);
    color: var(--cyan);
}

.mini-button.pwa-install-btn:hover {
    background: rgba(0, 247, 255, 0.12);
    box-shadow: 0 0 18px rgba(0, 247, 255, 0.35);
}

.mini-button.pwa-install-btn.can-install {
    animation: pwaPulse 2.4s infinite;
}

@keyframes pwaPulse {
    0%, 100% {
        border-color: rgba(0, 247, 255, 0.35);
        box-shadow: 0 0 10px rgba(0, 247, 255, 0.2);
    }
    50% {
        border-color: rgba(0, 247, 255, 0.85);
        box-shadow: 0 0 20px rgba(0, 247, 255, 0.5);
    }
}

.mini-button.small {
    width:     34px;
    height:    34px;
    font-size: 16px;
}

.quick-stats {
    display:               grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap:                   12px;
    margin:                18px 0 22px;
}

.quick-stats div {
    padding:      12px 10px;
    border-radius: 14px;
    background:   rgba(255, 255, 255, .05);
    border:       1px solid rgba(255, 255, 255, .08);
}

.quick-stats span {
    display:       block;
    color:         #94a3b8;
    font-size:     9px;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}

.quick-stats strong {
    font-size: 18px;
    color:     white;
}

.game-logo {
    display:         flex;
    justify-content: center;
    gap:             15px;
    margin-bottom:   20px;
}

.game-logo span {
    font-size:   clamp(48px, 9vw, 65px);
    font-weight: bold;
}

.game-logo span:first-child {
    color:       var(--cyan);
    text-shadow: 0 0 10px var(--cyan), 0 0 30px var(--cyan);
}

.game-logo span:last-child {
    color:       var(--pink);
    text-shadow: 0 0 10px var(--pink), 0 0 30px var(--pink);
}

.brand {
    color:          var(--cyan);
    font-size:      clamp(8px, 1.5vw, 11px);
    letter-spacing: clamp(3px, .7vw, 5px);
    margin-bottom:  10px;
}

.home-card h1 {
    font-size:      clamp(34px, 7vw, 48px);
    line-height:    .95;
    letter-spacing: clamp(2px, .8vw, 5px);
}

.home-card h1 span {
    color:       var(--pink);
    text-shadow: 0 0 10px var(--pink), 0 0 30px var(--pink);
}

.subtitle {
    margin:    18px 0 26px;
    color:     #9ca3af;
    font-size: clamp(12px, 2vw, 16px);
}

/* =========================================
   PRIMARY BUTTON
========================================= */

.primary-button {
    min-height:     48px;
    padding:        12px 28px;
    border:         none;
    border-radius:  50px;
    color:          white;
    font-weight:    bold;
    font-size:      15px;
    letter-spacing: 1.5px;
    cursor:         pointer;
    background:     linear-gradient(90deg, var(--cyan), var(--purple), var(--pink));
    box-shadow:     0 0 25px rgba(0, 247, 255, .35);
    transition:     .25s;
}

.primary-button:hover {
    transform:  translateY(-3px) scale(1.03);
    box-shadow: 0 0 40px rgba(0, 247, 255, .55);
}

/* =========================================
   MODE SCREEN
========================================= */

.mode-screen {
    display:         none;
    align-items:     center;
    justify-content: center;
    padding:         18px;
}

.mode-screen.active {
    display:   flex;
    animation: appear .4s ease;
}

.mode-card {
    width:           min(480px, 92vw);
    padding:         clamp(24px, 5vw, 40px) clamp(18px, 5vw, 30px);
    text-align:      center;
    border-radius:   30px;
    background:      rgba(255, 255, 255, .06);
    border:          1px solid rgba(255, 255, 255, .15);
    backdrop-filter: blur(20px);
    box-shadow:      0 0 60px rgba(0, 247, 255, .1);
}

.mode-card h2 {
    font-size:      clamp(25px, 5vw, 32px);
    line-height:    1.15;
    margin-bottom:  25px;
    letter-spacing: 2px;
}

.mode-card h2 span {
    display:     block;
    color:       var(--pink);
    text-shadow: 0 0 15px var(--pink);
}

.mode-button {
    width:        100%;
    display:      flex;
    align-items:  center;
    gap:          16px;
    padding:      15px;
    margin-bottom: 12px;
    border-radius: 16px;
    border:       1px solid rgba(255, 255, 255, .12);
    background:   rgba(255, 255, 255, .05);
    color:        white;
    cursor:       pointer;
    text-align:   left;
    transition:   .25s;
}

.mode-button:hover {
    transform:    translateY(-3px);
    border-color: var(--cyan);
    background:   rgba(0, 247, 255, .08);
    box-shadow:   0 0 25px rgba(0, 247, 255, .18);
}

.mode-icon {
    width:           52px;
    height:          52px;
    flex-shrink:     0;
    display:         flex;
    align-items:     center;
    justify-content: center;
    border-radius:   14px;
    font-size:       26px;
    background:      rgba(0, 247, 255, .1);
}

.mode-icon svg {
    width:  28px;
    height: 28px;
    display: block;
    color:  var(--cyan);
    stroke: var(--cyan);
}

.mode-content strong {
    display:       block;
    font-size:     16px;
    margin-bottom: 4px;
}

.mode-content small {
    color:     #94a3b8;
    font-size: 11px;
}

/* =========================================
   SETUP SCREEN
========================================= */

.setup-screen {
    display:         none;
    align-items:     center;
    justify-content: center;
    padding:         12px;
}

.setup-screen.active {
    display:   flex;
    animation: appear .4s ease;
}

.setup-card {
    width:           min(480px, 94vw);
    max-height:      calc(100dvh - 24px);
    padding:         clamp(18px, 4vw, 40px) clamp(18px, 5vw, 30px);
    text-align:      center;
    border-radius:   28px;
    background:      rgba(255, 255, 255, .06);
    border:          1px solid rgba(255, 255, 255, .15);
    backdrop-filter: blur(20px);
    box-shadow:      0 0 60px rgba(0, 247, 255, .1);
    overflow:        hidden;
}

.setup-card h2 {
    font-size:      clamp(26px, 5vw, 32px);
    line-height:    1.1;
    margin-bottom:  clamp(18px, 4vw, 28px);
    letter-spacing: 2px;
}

.setup-card h2 span {
    display:     block;
    color:       var(--pink);
    text-shadow: 0 0 15px var(--pink);
}

/* INPUTS */

.input-group {
    text-align:    left;
    margin-bottom: 13px;
}

.input-group label,
.difficulty-box label,
.match-format-box label {
    display:        block;
    margin-bottom:  7px;
    color:          #94a3b8;
    font-size:      10px;
    letter-spacing: 2px;
    font-weight:    bold;
}

.input-group input {
    width:         100%;
    height:        46px;
    padding:       0 14px;
    border-radius: 12px;
    border:        1px solid rgba(255, 255, 255, .12);
    outline:       none;
    background:    rgba(255, 255, 255, .05);
    color:         white;
    font-size:     15px;
    transition:    .2s;
}

.input-group input::placeholder {
    color: #64748b;
}

.input-group input:focus {
    border-color: var(--cyan);
    box-shadow:   0 0 18px rgba(0, 247, 255, .15);
}

/* DIFFICULTY */

.difficulty-box {
    text-align: left;
    margin:     10px 0 14px;
}

.difficulty-buttons {
    display:               grid;
    grid-template-columns: repeat(3, 1fr);
    gap:                   7px;
}

.difficulty-button {
    min-height:     40px;
    padding:        8px;
    border-radius:  10px;
    border:         1px solid rgba(255, 255, 255, .12);
    background:     rgba(255, 255, 255, .05);
    color:          #cbd5e1;
    cursor:         pointer;
    font-weight:    bold;
    font-size:      10px;
    transition:     .2s;
}

.difficulty-button.active {
    background:   rgba(0, 247, 255, .12);
    border-color: var(--cyan);
    color:        var(--cyan);
    box-shadow:   0 0 15px rgba(0, 247, 255, .12);
}

/* MATCH FORMAT */

.match-format-box {
    text-align: left;
    margin:     10px 0 18px;
}

.match-format-buttons {
    display:               grid;
    grid-template-columns: repeat(2, 1fr);
    gap:                   8px;
}

.format-button {
    min-height:  42px;
    padding:     8px;
    border-radius: 10px;
    border:      1px solid rgba(255, 255, 255, .12);
    background:  rgba(255, 255, 255, .05);
    color:       #cbd5e1;
    cursor:      pointer;
    font-weight: bold;
    font-size:   10px;
    transition:  .2s;
}

.format-button.active {
    background:   rgba(255, 43, 214, .10);
    border-color: var(--pink);
    color:        var(--pink);
    box-shadow:   0 0 15px rgba(255, 43, 214, .15);
}

.setup-card .primary-button {
    width:      100%;
    margin-top: 3px;
}

.back-button {
    margin-top:    8px;
    padding:       9px 18px;
    border:        none;
    border-radius: 8px;
    background:    transparent;
    color:         #94a3b8;
    cursor:        pointer;
    font-size:     12px;
}

.back-button:hover {
    color: white;
}

/* =========================================
   GAME SCREEN
========================================= */

.game-screen {
    display:    none;
    width:      min(760px, 94vw);
    height:     100dvh;
    margin:     0 auto;
    padding:    18px 0 20px;
    overflow:   hidden;
}

.game-screen.active {
    display:   block;
    animation: appear .45s ease;
}

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

/* =========================================
   HEADER
========================================= */

.header-row {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    margin-bottom:   10px;
}

.top-bar {
    display:               grid;
    grid-template-columns: auto 1fr auto;
    align-items:           center;
    gap:                   12px;
    margin-bottom:         18px;
}

.top-bar > div {
    min-width: 0;
}

.top-bar h2 {
    margin:         0;
    font-size:      clamp(22px, 3vw, 34px);
    letter-spacing: 3px;
}

.sound-button {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    width:         clamp(36px, 4vw, 42px);
    height:        clamp(36px, 4vw, 42px);
    flex-shrink:   0;
    border-radius: 50%;
    border:        1px solid rgba(255, 255, 255, .2);
    background:    rgba(255, 255, 255, .06);
    color:         white;
    cursor:        pointer;
    transition:    .2s;
}

.sound-button svg {
    width:  18px;
    height: 18px;
    display: block;
}

.sound-button:hover {
    border-color: var(--cyan);
    box-shadow:   0 0 14px rgba(0, 247, 255, .25);
}

/* Audio buttons group (music + sfx side by side) */
.audio-btns {
    display:     flex;
    align-items: center;
    gap:         6px;
    flex-shrink: 0;
}

/* Main game audio buttons — same small size as online */
.audio-btns .mini-button {
    width:  32px;
    height: 32px;
}

.audio-btns .mini-button svg {
    width:  14px;
    height: 14px;
}

/* OFF state — muted/disabled look */
.audio-btn-off {
    color:        var(--muted);
    border-color: rgba(255, 255, 255, .08);
    background:   rgba(255, 255, 255, .02);
    opacity:      .6;
}

.audio-btn-off:hover {
    opacity:      1;
    border-color: var(--pink);
    box-shadow:   0 0 14px rgba(255, 43, 214, .2);
}

/* GAME BACK BUTTON */

.back-game-button {
    min-height:    38px;
    padding:       8px 12px;
    border-radius: 9px;
    border:        1px solid rgba(0, 247, 255, .35);
    background:    rgba(0, 247, 255, .06);
    color:         #cbd5e1;
    font-size:     11px;
    font-weight:   bold;
    cursor:        pointer;
    transition:    .2s;
}

.back-game-button:hover {
    color:        white;
    border-color: var(--cyan);
    background:   rgba(0, 247, 255, .12);
    box-shadow:   0 0 15px rgba(0, 247, 255, .2);
}

/* =========================================
   PLAYERS
========================================= */

.players {
    width:                 min(650px, 100%);
    margin:                0 auto 14px;
    display:               grid;
    grid-template-columns: 1fr auto 1fr;
    align-items:           center;
    gap:                   10px;
}

.player {
    min-width:     0;
    display:       flex;
    align-items:   center;
    gap:           10px;
    padding:       13px;
    border-radius: 17px;
    background:    rgba(255, 255, 255, .06);
    border:        1px solid rgba(255, 255, 255, .1);
    transition:    border-color .2s, box-shadow .2s;
}

/* Active player card highlight (new feature) */
.player.active-player {
    border-color: rgba(255, 255, 255, .35);
    box-shadow:   0 0 18px rgba(0, 247, 255, .18);
}

.player-x.active-player {
    border-color: var(--cyan);
    box-shadow:   0 0 20px rgba(0, 247, 255, .25);
}

.player-o.active-player {
    border-color: var(--pink);
    box-shadow:   0 0 20px rgba(255, 43, 214, .25);
}

.player .symbol {
    flex-shrink: 0;
    font-size:   clamp(27px, 4vw, 38px);
    font-weight: bold;
}

.player-x .symbol {
    color:       var(--cyan);
    text-shadow: 0 0 15px var(--cyan);
}

.player-o .symbol {
    color:       var(--pink);
    text-shadow: 0 0 15px var(--pink);
}

.player small {
    display:       block;
    max-width:     130px;
    overflow:      hidden;
    text-overflow: ellipsis;
    white-space:   nowrap;
    color:         #9ca3af;
    font-size:     9px;
    letter-spacing: 1px;
}

.player > div:last-child > strong {
    display:   block;
    font-size: clamp(19px, 3vw, 26px);
}

/* =========================================
   PLAYER STATS (wins display)
   — single merged definition, no !important
========================================= */

.player-stats {
    display:     flex;
    align-items: center;
    gap:         5px;
    margin-top:  2px;
}

.player-stats span {
    color:          #64748b;
    font-size:      7px;
    font-weight:    700;
    letter-spacing: 1.5px;
}

.player-stats strong {
    font-size:   10px;
    font-weight: 700;
    color:       #e2e8f0;
}

.player-x .player-stats strong {
    color: var(--cyan);
}

.player-o .player-stats strong {
    color: var(--pink);
}

/* =========================================
   VERSUS
========================================= */

.versus {
    flex-shrink: 0;
    color:       #64748b;
    font-size:   12px;
    font-weight: bold;
}

/* =========================================
   TURN
========================================= */

.turn {
    width:           100%;
    display:         flex;
    align-items:     center;
    justify-content: center;
    gap:             7px;
    margin:          5px 0 7px;
    text-align:      center;
    font-weight:     bold;
}

#turnSymbol {
    font-size:   clamp(24px, 4vw, 31px);
    color:       var(--cyan);
    text-shadow: 0 0 15px var(--cyan);
}

/* =========================================
   MATCH PROGRESS
========================================= */

.match-progress {
    width:      100%;
    text-align: center;
    margin:     4px 0 14px;
}

.round-label {
    color:          #94a3b8;
    font-size:      9px;
    font-weight:    bold;
    letter-spacing: 3px;
}

.round-dots {
    display:         flex;
    align-items:     center;
    justify-content: center;
    gap:             7px;
    margin-top:      6px;
}

.round-dot {
    width:         9px;
    height:        9px;
    border-radius: 50%;
    background:    rgba(255, 255, 255, .12);
    border:        1px solid rgba(255, 255, 255, .15);
    transition:    .2s;
}

.round-dot.played {
    background:   var(--cyan);
    border-color: var(--cyan);
    box-shadow:   0 0 10px var(--cyan);
}

.round-dot.current {
    background:   var(--pink);
    border-color: var(--pink);
    box-shadow:   0 0 12px var(--pink);
    transform:    scale(1.25);
}

/* =========================================
   BOARD
========================================= */

.board {
    width:                 min(430px, 72vw);
    height:                min(430px, 72vw);
    margin:                0 auto;
    display:               grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows:    repeat(3, minmax(0, 1fr));
    gap:                   10px;
    aspect-ratio:          1 / 1;
    overflow:              hidden;
}

.cell {
    width:           100%;
    height:          100%;
    min-width:       0;
    min-height:      0;
    padding:         0;
    margin:          0;
    display:         flex;
    align-items:     center;
    justify-content: center;
    border-radius:   18px;
    background:      rgba(255, 255, 255, .06);
    border:          1px solid rgba(255, 255, 255, .12);
    color:           white;
    font-size:       clamp(46px, 8vw, 82px);
    font-weight:     bold;
    line-height:     1;
    cursor:          pointer;
    overflow:        hidden;
    transition:      background .2s, border-color .2s, transform .15s;
}

.cell:hover:not(:disabled) {
    background:   rgba(255, 255, 255, .1);
    border-color: var(--cyan);
    transform:    scale(1.02);
}

/* Focused cell — keyboard navigation */
.cell:focus-visible {
    outline:      3px solid var(--cyan);
    outline-offset: 2px;
}

.cell.x {
    color:       var(--cyan);
    text-shadow: 0 0 10px var(--cyan), 0 0 30px var(--cyan);
    animation:   pop .25s ease;
}

.cell.o {
    color:       var(--pink);
    text-shadow: 0 0 10px var(--pink), 0 0 30px var(--pink);
    animation:   pop .25s ease;
}

@keyframes pop {
    from { transform: scale(.5); }
    to   { transform: scale(1);  }
}

.cell.winner {
    animation: winner .5s infinite alternate;
}

@keyframes winner {
    from { transform: scale(1); }
    to   { transform: scale(1.06); box-shadow: 0 0 30px currentColor; }
}

/* =========================================
   MESSAGE
========================================= */

.message {
    width:      100%;
    min-height: 20px;
    margin:     13px 0 10px;
    padding:    0 10px;
    text-align: center;
    color:      #94a3b8;
    font-size:  13px;
}

/* =========================================
   GAME BUTTONS
========================================= */

.game-buttons {
    width:           100%;
    display:         flex;
    align-items:     center;
    justify-content: center;
    flex-wrap:       wrap;
    gap:             7px;
    margin-top:      6px;
}

/* Global btn-svg — controls icon size inside ALL buttons */
.btn-svg {
    width:       14px;
    height:      14px;
    display:     inline-block;
    flex-shrink: 0;
    vertical-align: -0.15em;
}

.game-button {
    display:        inline-flex;
    align-items:    center;
    justify-content: center;
    gap:            5px;
    min-width:      80px;
    min-height:     32px;
    padding:        5px 12px;
    border-radius:  8px;
    border:         1px solid var(--cyan);
    background:     rgba(0, 247, 255, .08);
    color:          white;
    cursor:         pointer;
    font-weight:    bold;
    font-size:      10px;
    letter-spacing: .04em;
    transition:     background .2s, color .2s, opacity .2s;
}

.game-button .btn-svg {
    width:    12px;
    height:   12px;
    flex-shrink: 0;
    vertical-align: 0;
}

.game-button:hover:not(:disabled) {
    background: var(--cyan);
    color:      #020617;
}

.game-button:disabled {
    opacity: 0.35;
    cursor:  not-allowed;
}

/* Undo button style */
.undo-button {
    border-color: var(--purple);
    background:   rgba(139, 92, 246, .08);
}

.undo-button:hover:not(:disabled) {
    background: var(--purple);
    color:      white;
}

.game-button.secondary {
    border-color: var(--pink);
    background:   rgba(255, 43, 214, .06);
}

.game-button.secondary:hover:not(:disabled) {
    background: var(--pink);
    color:      white;
}

/* =========================================
   FOOTER
========================================= */

.game-screen footer {
    width:          100%;
    margin-top:     12px;
    text-align:     center;
    color:          #475569;
    font-size:      8px;
    letter-spacing: 3px;
}

/* =========================================
   VICTORY OVERLAY
========================================= */

.victory-overlay {
    position:        fixed;
    inset:           0;
    display:         none;
    align-items:     center;
    justify-content: center;
    padding:         15px;
    background:      rgba(2, 6, 23, .78);
    backdrop-filter: blur(12px);
    z-index:         1000;
    overflow:        hidden;
}

.victory-overlay.active {
    display: flex;
}

.victory-card {
    position:        relative;
    z-index:         1;
    width:           min(430px, 92vw);
    padding:         32px 25px;
    text-align:      center;
    border-radius:   28px;
    background:      linear-gradient(145deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .04));
    border:          1px solid rgba(255, 255, 255, .20);
    backdrop-filter: blur(25px);
    box-shadow:      0 0 30px rgba(0, 247, 255, .18), 0 0 80px rgba(255, 43, 214, .10);
    animation:       victoryCardIn .45s ease;
}

@keyframes victoryCardIn {
    from { opacity: 0; transform: translateY(30px) scale(.9); }
    to   { opacity: 1; transform: translateY(0)    scale(1);  }
}

.victory-icon {
    font-size:  65px;
    margin-bottom: 8px;
    animation:  trophyBounce 1.2s infinite alternate;
}

@keyframes trophyBounce {
    from { transform: translateY(0)    rotate(-3deg); }
    to   { transform: translateY(-8px) rotate(3deg); filter: drop-shadow(0 0 20px rgba(255, 215, 0, .8)); }
}

.victory-label {
    margin-bottom:  7px;
    color:          var(--cyan);
    font-size:      10px;
    font-weight:    bold;
    letter-spacing: 4px;
}

.victory-card h2 {
    margin-bottom: 8px;
    font-size:     clamp(30px, 7vw, 42px);
    color:         white;
}

.victory-message {
    margin-bottom: 22px;
    color:         #94a3b8;
    font-size:     14px;
}

.victory-buttons {
    display:        flex;
    flex-direction: column;
    gap:            9px;
}

.victory-buttons .primary-button {
    width: 100%;
}

.victory-buttons .back-button {
    margin-top:  0;
    background:  rgba(255, 255, 255, .05);
    border:      1px solid rgba(255, 255, 255, .10);
}

/* =========================================
   CONFETTI
========================================= */

.confetti-container {
    position:       absolute;
    inset:          0;
    overflow:       hidden;
    pointer-events: none;
    z-index:        0;
}

.confetti {
    position:         absolute;
    top:              -20px;
    width:            8px;
    height:           16px;
    border-radius:    2px;
    animation:        confettiFall 2.5s linear forwards;
}

@keyframes confettiFall {
    0%   { transform: translateY(0)      rotate(0deg);   opacity: 1; }
    100% { transform: translateY(110vh)  rotate(720deg); opacity: 0; }
}

/* DRAW state */
.victory-overlay.draw .victory-card h2 {
    color:       var(--cyan);
    text-shadow: 0 0 15px var(--cyan);
}

/* =========================================
   RULES / INFO MODAL
========================================= */

.info-modal {
    position:        fixed;
    inset:           0;
    display:         none;
    align-items:     center;
    justify-content: center;
    padding:         20px;
    background:      rgba(2, 6, 23, .65);
    backdrop-filter: blur(10px);
    z-index:         1200;
}

.info-modal.active {
    display: flex;
}

.info-card {
    width:           min(440px, 92vw);
    padding:         clamp(22px, 5vw, 32px);
    border-radius:   24px;
    background:      rgba(255, 255, 255, .06);
    border:          1px solid rgba(255, 255, 255, .15);
    box-shadow:      0 0 34px rgba(0, 247, 255, .18);
    text-align:      center;
}

.info-card h3 {
    font-size:     clamp(26px, 5vw, 34px);
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.info-card ul {
    list-style:    none;
    display:       grid;
    gap:           12px;
    margin:        0 0 22px;
    text-align:    left;
    color:         #cbd5e1;
    font-size:     14px;
    line-height:   1.5;
}

.info-card li::before {
    content:      "✦";
    color:        var(--cyan);
    margin-right: 10px;
}

.info-card .primary-button {
    width: 100%;
}

/* =========================================
   TABLET
========================================= */

@media (min-width: 601px) and (max-width: 900px) {
    .game-screen {
        width:       min(700px, 92vw);
        padding-top: 18px;
    }

    .board {
        width:  min(410px, 58vw);
        height: min(410px, 58vw);
    }
}

/* =========================================
   MOBILE  (≤600px)
========================================= */

@media (max-width: 600px) {

    .home-screen,
    .mode-screen,
    .setup-screen {
        padding: 10px;
    }

    /* SETUP */
    .setup-card {
        width:      94vw;
        max-height: calc(100dvh - 20px);
        padding:    18px;
    }

    .setup-card .brand  { margin-bottom: 7px; }

    .setup-card h2 {
        font-size:     25px;
        margin-bottom: 16px;
    }

    .input-group { margin-bottom: 9px; }

    .input-group label,
    .difficulty-box label,
    .match-format-box label {
        font-size:     8px;
        margin-bottom: 5px;
    }

    .input-group input {
        height:    42px;
        font-size: 16px;
        padding:   0 12px;
    }

    .difficulty-box    { margin: 8px 0 10px; }
    .difficulty-button { min-height: 36px; font-size: 9px; }

    .match-format-box  { margin: 8px 0 12px; }
    .format-button     { min-height: 38px; font-size: 9px; }

    .setup-card .primary-button { min-height: 44px; font-size: 12px; }

    /* MODE */
    .mode-card    { width: 94vw; padding: 22px 18px; }
    .mode-card h2 { font-size: 25px; margin-bottom: 20px; }
    .mode-button  { padding: 12px; gap: 12px; }

    .mode-icon {
        width:     46px;
        height:    46px;
        font-size: 22px;
    }

    /* GAME */
    .game-screen {
        width:    94vw;
        height:   100dvh;
        padding:  7px 0 8px;
        overflow: hidden;
    }

    .top-bar        { margin-bottom: 8px; gap: 7px; }
    .top-bar h2     { font-size: 19px; letter-spacing: 2px; }

    .back-game-button {
        min-height: 34px;
        padding:    6px 10px;
        font-size:  9px;
    }

    .sound-button,
    .audio-btns .mini-button { width: 36px; height: 36px; }

    .players        { width: 100%; gap: 6px; margin-bottom: 5px; }
    .player         { padding: 7px; gap: 6px; border-radius: 12px; }
    .player .symbol { font-size: 23px; }

    .player small   { max-width: 62px; font-size: 7px; }

    .player > div:last-child > strong { font-size: 17px; }

    /* player-stats — mobile overrides only (no duplicate block) */
    .player-stats       { gap: 4px; margin-top: 1px; }
    .player-stats span  { font-size: 6px; }
    .player-stats strong { font-size: 8px; }

    .versus         { font-size: 8px; }

    .turn           { margin: 3px 0 4px; }
    #turnSymbol     { font-size: 22px; }

    .match-progress { margin: 2px 0 6px; }
    .round-label    { font-size: 7px; letter-spacing: 2px; }
    .round-dots     { gap: 5px; margin-top: 4px; }
    .round-dot      { width: 7px; height: 7px; }

    .board {
        width:  min(82vw, 42dvh, 340px);
        height: min(82vw, 42dvh, 340px);
        gap:    6px;
    }

    .cell {
        border-radius: 11px;
        font-size:     clamp(42px, 15vw, 62px);
    }

    .message {
        min-height: 16px;
        margin:     6px 0;
        font-size:  11px;
    }

    .game-buttons {
        flex-wrap:  nowrap;
        gap:        5px;
        margin-top: 4px;
    }

    .game-button {
        min-width:  0;
        flex:       1;
        min-height: 30px;
        padding:    5px 6px;
        font-size:  9px;
    }

    .game-button .btn-svg {
        width:  11px;
        height: 11px;
    }

    .game-screen footer { margin-top: 6px; font-size: 7px; }

    /* VICTORY & MODAL */
    .info-modal       { padding: 12px; }
    .info-card        { padding: 20px 16px; }
    .victory-overlay  { padding: 12px; }

    .victory-card {
        width:   92vw;
        padding: 25px 18px;
    }

    .victory-icon     { font-size: 54px; }
    .victory-card h2  { font-size: 31px; }

    .victory-message {
        font-size:     12px;
        margin-bottom: 17px;
    }
}

/* =========================================
   SMALL PHONES  (≤400px)
========================================= */

@media (max-width: 400px) {

    .setup-card    { padding: 15px 14px; }
    .setup-card h2 { font-size: 23px; margin-bottom: 12px; }

    .input-group input  { height: 40px; }
    .difficulty-button  { min-height: 34px; font-size: 8px; }
    .format-button      { min-height: 36px; }

    .board {
        width:  min(80vw, 39dvh, 300px);
        height: min(80vw, 39dvh, 300px);
        gap:    5px;
    }

    .cell        { border-radius: 10px; font-size: 43px; }
    .game-button { font-size: 8px; min-height: 28px; }
}

/* =========================================
   LANDSCAPE MOBILE
========================================= */

@media (max-width: 900px) and (orientation: landscape) {

    .game-screen    { height: 100dvh; padding: 5px 0 6px; }
    .top-bar        { margin-bottom: 5px; }
    .players        { margin-bottom: 4px; }
    .turn           { margin: 2px 0; }
    .match-progress { margin: 1px 0 4px; }

    .board {
        width:  min(43dvh, 330px);
        height: min(43dvh, 330px);
    }

    .message              { margin: 4px 0; }
    .game-buttons         { margin-top: 3px; }
    .game-screen footer   { display: none; }
}

/* =========================================
   REDUCED MOTION
   Respects OS-level "reduce motion" setting
========================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration:   0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration:  0.01ms !important;
    }
}

/* =========================================
   VOICE CHAT PANEL
   WebRTC mic / mute / status — buttons in top-bar
========================================= */

/* Sound + Mic grouped in top-bar */
.online-top-btns {
    display:     flex;
    align-items: center;
    gap:         5px;
}

/* Smaller buttons in online top bar */
.online-top-btns .mini-button {
    width:  30px;
    height: 30px;
}

.online-top-btns .mini-button svg {
    width:  13px;
    height: 13px;
}

/* Quit button — small round X, no text */
.quit-mini-btn {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    width:           30px;
    height:          30px;
    border-radius:   50%;
    border:          1px solid rgba(255, 68, 68, .3);
    background:      rgba(255, 68, 68, .06);
    color:           #ff6b6b;
    cursor:          pointer;
    flex-shrink:     0;
    transition:      .2s;
}

.quit-mini-btn svg {
    width:  14px;
    height: 14px;
    display: block;
}

.quit-mini-btn:hover {
    background:   rgba(255, 68, 68, .18);
    border-color: #ff6b6b;
    box-shadow:   0 0 12px rgba(255, 68, 68, .3);
    transform:    scale(1.08);
}

/* vc-panel hidden — buttons moved to top-bar */
.vc-panel {
    display: none;
}

/* Muted state on mute button */
.vc-mute-btn.vc-muted-btn {
    border-color: rgba(255, 68, 68, .4);
    color:        #ff6b6b;
    box-shadow:   0 0 14px rgba(255, 68, 68, .2);
}

.vc-mute-btn.vc-muted-btn:hover {
    border-color: #ff6b6b;
    box-shadow:   0 0 20px rgba(255, 68, 68, .35);
}

/* STATUS label */
.vc-status {
    font-size:      10px;
    font-weight:    600;
    letter-spacing: .04em;
    padding:        2px 7px;
    border-radius:  20px;
    transition:     color .3s;
    white-space:    nowrap;
}

.vc-idle       { color: transparent; }
.vc-requesting { color: #fbbf24;       animation: vcPulse 1s ease-in-out infinite; }
.vc-connecting { color: var(--purple); animation: vcPulse 1s ease-in-out infinite; }
.vc-connected  { color: #00ff88; }
.vc-muted      { color: #ff6b6b; }
.vc-error      { color: var(--muted); }

@keyframes vcPulse {
    0%, 100% { opacity: 1;   }
    50%      { opacity: .45; }
}

/* Mute badge on player card */
.vc-mute-badge {
    margin-left: auto;
    flex-shrink: 0;
    display:     flex;
    align-items: center;
    color:       #ff6b6b;
    opacity:     .85;
}

.vc-mute-badge svg { display: block; }

/* Mobile */
@media (max-width: 600px) {
    .online-top-btns .mini-button { width: 26px; height: 26px; }
    .online-top-btns .mini-button svg { width: 11px; height: 11px; }
    .quit-mini-btn { width: 26px; height: 26px; }
    .quit-mini-btn svg { width: 12px; height: 12px; }
    .vc-status { font-size: 9px; }
}

/* =========================================
   ONLINE GAME — Action Buttons & Copy Code
========================================= */

/* COPY CODE — compact pill button, not huge primary */
.copy-code-btn {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    gap:             8px;
    padding:         10px 22px;
    border:          none;
    border-radius:   50px;
    background:      linear-gradient(90deg, var(--cyan), var(--purple));
    color:           #020617;
    font-weight:     700;
    font-size:       13px;
    letter-spacing:  1px;
    cursor:          pointer;
    transition:      .2s;
    box-shadow:      0 0 18px rgba(0, 247, 255, .25);
}

.copy-code-btn svg {
    width:    16px;
    height:   16px;
    display:  block;
    flex-shrink: 0;
}

.copy-code-btn:hover {
    transform:  translateY(-2px);
    box-shadow: 0 0 28px rgba(0, 247, 255, .4);
}

/* ONLINE ACTION BUTTONS — rematch / leave, compact */
.online-action-btn {
    display:        inline-flex;
    align-items:    center;
    justify-content: center;
    gap:            7px;
    min-width:      110px;
    min-height:     38px;
    padding:        8px 16px;
    border-radius:  10px;
    border:         1px solid var(--cyan);
    background:     rgba(0, 247, 255, .07);
    color:          white;
    font-weight:    700;
    font-size:      11px;
    letter-spacing: .06em;
    cursor:         pointer;
    transition:     .2s;
}

.online-action-btn svg {
    width:    14px;
    height:   14px;
    display:  block;
    flex-shrink: 0;
}

.online-action-btn:hover {
    background: rgba(0, 247, 255, .15);
    box-shadow: 0 0 16px rgba(0, 247, 255, .2);
}

/* Leave variant — pink/red */
.online-leave-btn {
    border-color: rgba(255, 43, 214, .4);
    background:   rgba(255, 43, 214, .06);
}

.online-leave-btn:hover {
    background:   rgba(255, 43, 214, .15);
    border-color: var(--pink);
    box-shadow:   0 0 16px rgba(255, 43, 214, .2);
}

/* Mobile */
@media (max-width: 600px) {
    .copy-code-btn     { padding: 9px 18px; font-size: 12px; }
    .online-action-btn { min-width: 90px; min-height: 34px; font-size: 10px; padding: 7px 12px; }
}

/* =========================================
   PUBLIC LOBBY — Room cards (Teen Patti style)
========================================= */

/* Lobby divider — "OR JOIN A ROOM" */
.lobby-divider {
    display:     flex;
    align-items: center;
    gap:         10px;
    margin:      14px 0 10px;
    font-size:   9px;
    font-weight: 700;
    letter-spacing: 2px;
    color:       var(--muted);
}

.lobby-divider span:first-child,
.lobby-divider span:last-child {
    flex:        1;
    height:      1px;
    background:  rgba(255,255,255,.1);
    display:     block;
}

.lobby-divider-text { white-space: nowrap; }

/* Rooms scroll container */
.lobby-rooms {
    width:        100%;
    max-height:   220px;
    overflow-y:   auto;
    display:      flex;
    flex-direction: column;
    gap:          7px;
    padding:      2px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,247,255,.2) transparent;
}

.lobby-rooms::-webkit-scrollbar       { width: 4px; }
.lobby-rooms::-webkit-scrollbar-track { background: transparent; }
.lobby-rooms::-webkit-scrollbar-thumb { background: rgba(0,247,255,.2); border-radius: 4px; }

/* Empty state */
.lobby-empty {
    display:         flex;
    align-items:     center;
    justify-content: center;
    gap:             8px;
    padding:         18px;
    color:           var(--muted);
    font-size:       12px;
    border:          1px dashed rgba(255,255,255,.1);
    border-radius:   12px;
}

.lobby-empty svg {
    width:    18px;
    height:   18px;
    display:  block;
    flex-shrink: 0;
    opacity:  .5;
}

/* Individual room card */
.lobby-room-card {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    gap:             10px;
    padding:         10px 12px;
    border-radius:   12px;
    background:      rgba(255,255,255,.04);
    border:          1px solid rgba(255,255,255,.09);
    transition:      border-color .2s, background .2s;
    animation:       lobbyCardIn .25s ease;
}

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

.lobby-room-card:hover {
    background:   rgba(0,247,255,.05);
    border-color: rgba(0,247,255,.25);
}

/* Left side — host name + code */
.lrc-left {
    display:        flex;
    flex-direction: column;
    gap:            3px;
    min-width:      0;
}

.lrc-host {
    display:     flex;
    align-items: center;
    gap:         5px;
    font-size:   13px;
    font-weight: 700;
    color:       var(--text);
    white-space: nowrap;
    overflow:    hidden;
    text-overflow: ellipsis;
}

.lrc-host svg {
    width:    14px;
    height:   14px;
    display:  block;
    flex-shrink: 0;
    color:    var(--cyan);
}

.lrc-code {
    font-size:      10px;
    letter-spacing: .18em;
    color:          var(--muted);
    font-weight:    600;
}

/* Right side — time + join button */
.lrc-right {
    display:     flex;
    align-items: center;
    gap:         8px;
    flex-shrink: 0;
}

.lrc-ago {
    font-size: 9px;
    color:     var(--muted);
    white-space: nowrap;
}

/* JOIN button */
.lrc-join-btn {
    display:     inline-flex;
    align-items: center;
    gap:         5px;
    padding:     6px 13px;
    border-radius: 8px;
    border:      1px solid rgba(0,247,255,.4);
    background:  rgba(0,247,255,.08);
    color:       var(--cyan);
    font-size:   11px;
    font-weight: 700;
    letter-spacing: .04em;
    cursor:      pointer;
    transition:  .2s;
    white-space: nowrap;
}

.lrc-join-btn svg {
    width:    12px;
    height:   12px;
    display:  block;
    flex-shrink: 0;
}

.lrc-join-btn:hover {
    background:   rgba(0,247,255,.18);
    border-color: var(--cyan);
    box-shadow:   0 0 14px rgba(0,247,255,.25);
    transform:    translateY(-1px);
}

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

/* Join-by-code collapsible */
.join-by-code {
    width:      100%;
    margin-top: 8px;
}

.join-by-code summary {
    cursor:         pointer;
    font-size:      11px;
    color:          var(--muted);
    letter-spacing: .05em;
    padding:        6px 0;
    list-style:     none;
    display:        flex;
    align-items:    center;
    gap:            6px;
    user-select:    none;
    transition:     color .2s;
}

.join-by-code summary::-webkit-details-marker { display: none; }

.join-by-code summary::before {
    content:     "";
    display:     inline-block;
    width:       8px;
    height:      8px;
    border-right: 1.5px solid var(--muted);
    border-bottom: 1.5px solid var(--muted);
    transform:   rotate(-45deg);
    transition:  transform .2s;
    flex-shrink: 0;
    margin-right: 2px;
}

.join-by-code[open] summary::before {
    transform: rotate(45deg);
}

.join-by-code summary:hover { color: var(--cyan); }
.join-by-code summary:hover::before {
    border-color: var(--cyan);
}

/* Light theme */
body.light-theme .lobby-room-card {
    background:   rgba(255,255,255,.5);
    border-color: rgba(15,23,42,.1);
}

body.light-theme .lobby-empty {
    border-color: rgba(15,23,42,.12);
    color:        var(--muted);
}

/* Mobile */
@media (max-width: 600px) {
    .lobby-rooms    { max-height: 170px; }
    .lrc-host       { font-size: 12px; }
    .lrc-join-btn   { padding: 5px 10px; font-size: 10px; }
    .lrc-ago        { display: none; }
}

/* =========================================
   QUICK MATCH — Auto Matchmaking Button
========================================= */

/* Main CTA button */
.quick-match-btn {
    width:           100%;
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    justify-content: center;
    gap:             4px;
    padding:         18px 20px;
    margin-bottom:   4px;
    border:          none;
    border-radius:   18px;
    cursor:          pointer;
    position:        relative;
    overflow:        hidden;
    background:      linear-gradient(135deg, #00f7ff 0%, #8b5cf6 50%, #ff2bd6 100%);
    color:           #020617;
    font-weight:     900;
    letter-spacing:  2px;
    transition:      transform .2s, box-shadow .2s;
    box-shadow:      0 0 30px rgba(0,247,255,.35), 0 0 60px rgba(139,92,246,.2);
    animation:       qmPulse 2.5s ease-in-out infinite;
}

.quick-match-btn svg {
    width:    28px;
    height:   28px;
    display:  block;
    filter:   drop-shadow(0 0 6px rgba(2,6,23,.4));
}

.quick-match-btn span {
    font-size:      18px;
    letter-spacing: 3px;
}

.quick-match-btn small {
    font-size:   11px;
    font-weight: 600;
    opacity:     .75;
    letter-spacing: 1px;
}

/* Shimmer sweep effect */
.quick-match-btn::after {
    content:    "";
    position:   absolute;
    top:        0; left: -100%;
    width:      60%;
    height:     100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
    animation:  qmShimmer 2.5s ease-in-out infinite;
}

@keyframes qmShimmer {
    0%   { left: -100%; }
    60%  { left: 150%;  }
    100% { left: 150%;  }
}

@keyframes qmPulse {
    0%, 100% { box-shadow: 0 0 30px rgba(0,247,255,.35), 0 0 60px rgba(139,92,246,.2); }
    50%       { box-shadow: 0 0 45px rgba(0,247,255,.55), 0 0 80px rgba(255,43,214,.3); }
}

.quick-match-btn:hover {
    transform:  translateY(-3px) scale(1.02);
}

.quick-match-btn:active {
    transform:  translateY(0) scale(.99);
}

/* Light theme */
body.light-theme .quick-match-btn {
    color: #ffffff;
}

/* =========================================
   SEARCHING BOX — while in queue
========================================= */

.searching-box {
    width:           100%;
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    gap:             10px;
    padding:         20px 16px;
    border-radius:   18px;
    background:      rgba(139, 92, 246, .08);
    border:          1px solid rgba(139, 92, 246, .25);
    margin-bottom:   4px;
    animation:       appear .3s ease;
}

/* Spinning ring */
.searching-ring {
    width:         56px;
    height:        56px;
    border-radius: 50%;
    border:        3px solid rgba(139,92,246,.2);
    border-top:    3px solid var(--purple);
    border-right:  3px solid var(--cyan);
    animation:     searchSpin 1s linear infinite;
    flex-shrink:   0;
}

@keyframes searchSpin {
    to { transform: rotate(360deg); }
}

.searching-title {
    font-size:      13px;
    font-weight:    800;
    letter-spacing: 3px;
    color:          var(--purple);
    animation:      searchFade 1.5s ease-in-out infinite;
}

@keyframes searchFade {
    0%, 100% { opacity: 1;   }
    50%       { opacity: .55; }
}

.searching-sub {
    font-size:  12px;
    color:      var(--muted);
    text-align: center;
}

.searching-sub strong {
    color:       var(--cyan);
    font-size:   15px;
    font-weight: 800;
}

/* Mobile */
@media (max-width: 600px) {
    .quick-match-btn        { padding: 15px 16px; }
    .quick-match-btn svg    { width: 24px; height: 24px; }
    .quick-match-btn span   { font-size: 16px; }
    .searching-ring         { width: 48px; height: 48px; }
    .searching-title        { font-size: 12px; }
}
