/* ==========================================================================
   SHASHKA PRO 3D TELEGRAM MINI APP — MOBILE-FIRST ZERO-SCROLL STUDIO CSS
   ========================================================================== */

:root {
    --bg-primary: #030712;
    --bg-surface: rgba(15, 23, 42, 0.72);
    --bg-surface-glass: rgba(17, 24, 39, 0.65);
    --bg-surface-hover: rgba(30, 41, 59, 0.85);
    --bg-border: rgba(255, 255, 255, 0.12);
    --bg-border-subtle: rgba(255, 255, 255, 0.06);
    --bg-border-glow: rgba(245, 158, 11, 0.4);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --accent-gold: #f59e0b;
    --accent-gold-glow: rgba(245, 158, 11, 0.45);
    --accent-emerald: #10b981;
    --accent-cyan: #06b6d4;
    --accent-rose: #f43f5e;
    --accent-indigo: #6366f1;

    /* Mobile Responsive Board Sizing */
    --board-size: min(92vw, calc(100dvh - 230px), 390px);
    --cell-size: calc(var(--board-size) / 8);
    --piece-size: calc(var(--cell-size) * 0.84);

    /* Default Theme: Classic Obsidian */
    --sq-dark: #1e293b;
    --sq-light: #475569;
    --board-frame: #0b1120;
    --board-shadow-3d: 0 25px 50px -10px rgba(0,0,0,0.9), 0 0 0 8px #0b1120, 0 14px 0 8px #03060d;
}

/* ================= THEMES (STOL SKINLARI) ================= */

/* 1. Classic Obsidian (Qora Granit & Po'lat) */
body.theme-classic {
    --sq-dark: #0f172a;
    --sq-light: #334155;
    --board-frame: #020617;
    --board-shadow-3d: 0 25px 50px -10px rgba(0,0,0,0.95), 0 0 0 10px #020617, 0 14px 0 10px #000000;
}
body.theme-classic .sq-dark {
    background: radial-gradient(circle at 50% 50%, #1e293b 0%, #090e17 100%), linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 100%);
    box-shadow: inset 0 0 8px rgba(0,0,0,0.8);
}
body.theme-classic .sq-light {
    background: radial-gradient(circle at 50% 50%, #475569 0%, #334155 100%), linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 100%);
    box-shadow: inset 0 0 6px rgba(0,0,0,0.4);
}

/* 2. Warm Walnut Wood (Qayrag'och Yog'och) */
body.theme-wood {
    --sq-dark: #3b1d0c;
    --sq-light: #cfa77b;
    --board-frame: #241106;
    --board-shadow-3d: 0 25px 50px -10px rgba(0,0,0,0.95), 0 0 0 10px #241106, 0 14px 0 10px #0e0501;
}
body.theme-wood .sq-dark {
    background: radial-gradient(circle at 50% 50%, #4a2512 0%, #2b1307 100%), repeating-linear-gradient(45deg, rgba(0,0,0,0.08) 0px, rgba(0,0,0,0.08) 2px, transparent 2px, transparent 7px);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.7);
}
body.theme-wood .sq-light {
    background: radial-gradient(circle at 50% 50%, #e2be93 0%, #b88d5e 100%), repeating-linear-gradient(45deg, rgba(255,255,255,0.07) 0px, rgba(255,255,255,0.07) 2px, transparent 2px, transparent 7px);
    box-shadow: inset 0 0 6px rgba(0,0,0,0.25);
}

/* 3. Cyberpunk Neon (Kelajak Matritsasi) */
body.theme-cyberpunk {
    --sq-dark: #050510;
    --sq-light: #181236;
    --board-frame: #03020a;
    --board-shadow-3d: 0 25px 50px -10px rgba(99,102,241,0.45), 0 0 0 10px #03020a, 0 14px 0 10px #010105, 0 0 25px rgba(99,102,241,0.35);
}
body.theme-cyberpunk .sq-dark {
    background: #060614;
    box-shadow: inset 0 0 14px rgba(99, 102, 241, 0.25), inset 0 0 1px 1px rgba(99, 102, 241, 0.2);
}
body.theme-cyberpunk .sq-light {
    background: radial-gradient(circle at 50% 50%, #281d58 0%, #150f33 100%);
    box-shadow: inset 0 0 16px rgba(168, 85, 247, 0.45), inset 0 0 1px 1px rgba(168, 85, 247, 0.3);
}

/* 4. Emerald Empire (Zumrad & Oltin) */
body.theme-emerald {
    --sq-dark: #04382a;
    --sq-light: #34d399;
    --board-frame: #011d15;
    --board-shadow-3d: 0 25px 50px -10px rgba(16,185,129,0.4), 0 0 0 10px #011d15, 0 14px 0 10px #000c08, 0 0 20px rgba(245,158,11,0.25);
}
body.theme-emerald .sq-dark {
    background: radial-gradient(circle at 50% 50%, #06533f 0%, #02261c 100%);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8), inset 0 0 1px 1px rgba(245, 158, 11, 0.2);
}
body.theme-emerald .sq-light {
    background: radial-gradient(circle at 50% 50%, #a7f3d0 0%, #10b981 100%);
    box-shadow: inset 0 0 8px rgba(255,255,255,0.4), inset 0 0 1px 1px rgba(245, 158, 11, 0.3);
}

/* 5. Volcano Magma (Qaynoq Lava & Obsidian) */
body.theme-volcano {
    --sq-dark: #140402;
    --sq-light: #991b1b;
    --board-frame: #0a0201;
    --board-shadow-3d: 0 25px 50px -10px rgba(239,68,68,0.5), 0 0 0 10px #0a0201, 0 14px 0 10px #000000, 0 0 25px rgba(239,68,68,0.3);
}
body.theme-volcano .sq-dark {
    background: radial-gradient(circle at 50% 50%, #200704 0%, #0d0201 100%);
    box-shadow: inset 0 0 12px rgba(0,0,0,0.9), inset 0 0 2px rgba(239,68,68,0.3);
}
body.theme-volcano .sq-light {
    background: radial-gradient(circle at 50% 50%, #ef4444 0%, #7f1d1d 100%);
    box-shadow: inset 0 0 14px rgba(254, 202, 202, 0.4), inset 0 0 20px rgba(239, 68, 68, 0.6);
}

/* 6. Arctic Frost (Muzlagan Qutb Kristali) */
body.theme-frost {
    --sq-dark: #051e2c;
    --sq-light: #7dd3fc;
    --board-frame: #020e17;
    --board-shadow-3d: 0 25px 50px -10px rgba(56,189,248,0.45), 0 0 0 10px #020e17, 0 14px 0 10px #000508, 0 0 25px rgba(56,189,248,0.3);
}
body.theme-frost .sq-dark {
    background: radial-gradient(circle at 50% 50%, #0a2f44 0%, #03131c 100%);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8), inset 0 0 1px 1px rgba(56, 189, 248, 0.2);
}
body.theme-frost .sq-light {
    background: radial-gradient(circle at 50% 50%, #e0f2fe 0%, #38bdf8 100%);
    box-shadow: inset 0 0 10px rgba(255,255,255,0.6), inset 0 0 1px 1px rgba(255, 255, 255, 0.5);
}

/* ================= GLOBAL RESETS & STYLING ================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    background-color: var(--bg-primary);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #030712;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.22) 0%, transparent 45%),
        radial-gradient(circle at 85% 10%, rgba(245, 158, 11, 0.18) 0%, transparent 40%),
        radial-gradient(circle at 50% 55%, rgba(16, 185, 129, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 90%, rgba(244, 63, 94, 0.16) 0%, transparent 45%),
        radial-gradient(circle at 20% 85%, rgba(6, 182, 212, 0.16) 0%, transparent 45%);
    background-attachment: fixed;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

#app {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ================= SVG ICON UTILITY ================= */
.icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    fill: currentColor;
    flex-shrink: 0;
}
.icon-lg {
    width: 26px;
    height: 26px;
}
.icon-xl {
    width: 32px;
    height: 32px;
}

/* ================= TOP APP BAR ================= */

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
    z-index: 50;
}

.brand-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    font-size: 15px;
    letter-spacing: 0.5px;
    color: #fff;
}
.brand-icon-svg {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
}

.economy-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.1) 100%);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 999px;
    padding: 5px 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.economy-pill:hover, .economy-pill:active {
    transform: scale(1.04);
    border-color: rgba(245, 158, 11, 0.8);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
}
.coin-svg {
    width: 18px;
    height: 18px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.economy-amount {
    font-weight: 900;
    font-size: 13px;
    color: #fbbf24;
}
.economy-plus {
    font-weight: 900;
    font-size: 13px;
    color: #000;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.6);
}

/* ================= VIEWS CONTAINER ================= */

.view-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 64px; /* Bottom bar clearance */
}

.view {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 12px 14px;
    animation: viewFadeIn 0.25s ease-out;
}
.view.active {
    display: flex;
}

/* GAME VIEW (Strictly Fits Screen without Scroll) */
#view-game.active {
    height: calc(100dvh - 105px);
    overflow: hidden;
    padding: 4px 10px;
    justify-content: space-between;
}

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

/* ================= LOBBY HERO & BANNER ================= */

.user-hero-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%), rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.22);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.user-hero-card:active {
    transform: scale(0.985);
    border-color: rgba(245, 158, 11, 0.5);
}

.user-hero-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.user-avatar-wrap {
    position: relative;
    width: 48px;
    height: 48px;
}
.user-avatar {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.user-name-box h2 {
    font-size: 16px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.2px;
}
.user-rank-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 8px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 800;
    color: #fbbf24;
    margin-top: 2px;
}

.user-hero-stats {
    text-align: right;
}
.user-hero-rating {
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.5px;
}
.user-hero-wr {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-emerald);
    margin-top: 1px;
}

/* DAILY BONUS BANNER */
.daily-bonus-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(15, 23, 42, 0.78) 100%);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-radius: 18px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.25);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.daily-bonus-card:active {
    transform: scale(0.985);
}
.daily-bonus-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.bonus-icon-orb {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(217, 119, 6, 0.15) 100%);
    border: 1px solid rgba(245, 158, 11, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.35);
}
.daily-bonus-info h3 {
    font-size: 14px;
    font-weight: 900;
    color: #fff;
}
.daily-bonus-info p {
    font-size: 11px;
    color: #fbbf24;
    font-weight: 700;
    margin-top: 1px;
}
.btn-claim-pill {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    color: #000;
    font-weight: 900;
    font-size: 12px;
    padding: 7px 16px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: transform 0.15s ease;
}
.btn-claim-pill:active {
    transform: scale(0.95);
}

/* ================= GAME MODES (BENTO CARDS) ================= */

.section-title {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: var(--text-dim);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.modes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.mode-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%), rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mode-card:active {
    transform: scale(0.98);
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(30, 41, 59, 0.85);
}
.mode-card.span-2 {
    grid-column: span 2;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
}
.mode-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mode-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
}
.icon-ranked {
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45), inset 0 1px 0 rgba(255,255,255,0.4);
}
.icon-bot {
    background: linear-gradient(135deg, #06b6d4, #0e7490);
    box-shadow: 0 6px 18px rgba(6, 182, 212, 0.45), inset 0 1px 0 rgba(255,255,255,0.4);
}
.icon-random {
    background: linear-gradient(135deg, #10b981, #047857);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45), inset 0 1px 0 rgba(255,255,255,0.4);
}
.icon-friend {
    background: linear-gradient(135deg, #6366f1, #4338ca);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45), inset 0 1px 0 rgba(255,255,255,0.4);
}

.mode-info h3 {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}
.mode-info p {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 1px;
}
.badge-ranked {
    font-size: 10px;
    font-weight: 900;
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.15);
    padding: 3px 8px;
    border-radius: 8px;
    letter-spacing: 0.5px;
}

/* ================= 3D BOARD & ZERO-SCROLL GAME VIEW ================= */

.player-card {
    width: 100%;
    max-width: var(--board-size);
    margin: 0 auto;
    background: var(--bg-surface-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--bg-border);
    border-radius: 14px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.player-card.active-turn {
    border-color: var(--accent-gold);
    box-shadow: 0 0 14px var(--accent-gold-glow);
}

.player-details {
    display: flex;
    align-items: center;
    gap: 8px;
}
.player-piece-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
}
.piece-ind-white { background: #f8fafc; }
.piece-ind-black { background: #0f172a; border-color: #64748b; }

.player-name-text {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}
.player-rating-sub {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.player-clock {
    font-family: "SF Mono", Monaco, Consolas, monospace;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 3px 8px;
    border-radius: 6px;
}
.player-clock.low-time {
    color: var(--accent-rose);
    animation: pulseRed 1s infinite;
}

/* 3D PERSPECTIVE WRAPPER */
.board-perspective-wrapper {
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 2px auto;
}

.checkers-board {
    width: var(--board-size);
    height: var(--board-size);
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    border-radius: 14px;
    position: relative;
    background: var(--board-frame);
    border: 6px solid var(--board-frame);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    transform-style: preserve-3d;
}

.checkers-board.is-3d-view {
    transform: rotateX(24deg) scale(0.96);
    box-shadow: var(--board-shadow-3d);
}
.checkers-board.flipped {
    transform: rotate(180deg);
}
.checkers-board.is-3d-view.flipped {
    transform: rotateX(24deg) rotate(180deg) scale(0.96);
}

.cell {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}
.sq-dark { background-color: var(--sq-dark); }
.sq-light { background-color: var(--sq-light); }

/* Legal Move Target Dot */
.cell.legal-target::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.9);
    box-shadow: 0 0 10px #10b981;
    z-index: 5;
    animation: targetPulse 1.2s infinite ease-in-out;
}
@keyframes targetPulse {
    0%, 100% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
}

/* Capture Target Ring */
.cell.capture-target::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2.5px solid #f43f5e;
    background: rgba(244, 63, 94, 0.3);
    box-shadow: 0 0 14px #f43f5e;
    z-index: 5;
    animation: capturePulse 0.9s infinite ease-in-out;
}
@keyframes capturePulse {
    0%, 100% { transform: scale(0.85); }
    50% { transform: scale(1.15); }
}

/* ================= 3D PIECES & ALL SKINS ================= */

.piece {
    width: var(--piece-size);
    height: var(--piece-size);
    border-radius: 50%;
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.checkers-board.flipped .piece {
    transform: rotate(180deg);
}

.piece.selected {
    transform: translateY(-10px) scale(1.12) !important;
    z-index: 20;
}
.checkers-board.flipped .piece.selected {
    transform: rotate(180deg) translateY(-10px) scale(1.12) !important;
}

.piece::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 60%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

/* ================= PIECE SKINS (ALL SELECTORS & SHOP PREVIEWS) ================= */

/* 1. Standard: Classic Onyx & Pearl */
.skin-standard .piece-w, .piece-w.skin-standard, .piece-w {
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e2e8f0 45%, #94a3b8 100%);
    box-shadow: inset 0 3px 6px #fff, inset 0 -3px 6px rgba(0,0,0,0.5), 0 5px 12px rgba(0,0,0,0.6);
    border: 2px solid #cbd5e1;
}
.skin-standard .piece-b, .piece-b.skin-standard, .piece-b {
    background: radial-gradient(circle at 35% 30%, #334155 0%, #0f172a 55%, #020617 100%);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.3), inset 0 -4px 8px rgba(0,0,0,0.9), 0 5px 12px rgba(0,0,0,0.7);
    border: 2px solid #1e293b;
}

/* 2. Modern: Electric Neon Yellow & Cyber Blue */
.skin-modern .piece-w, .piece-w.skin-modern {
    background: radial-gradient(circle at 35% 30%, #fef08a 0%, #eab308 50%, #854d0e 100%);
    border: 2px solid #fde047;
    box-shadow: inset 0 3px 6px #fff, inset 0 -3px 6px rgba(0,0,0,0.4), 0 0 16px rgba(234, 179, 8, 0.7);
}
.skin-modern .piece-b, .piece-b.skin-modern {
    background: radial-gradient(circle at 35% 30%, #a5f3fc 0%, #06b6d4 50%, #0e7490 100%);
    border: 2px solid #22d3ee;
    box-shadow: inset 0 3px 6px #fff, inset 0 -3px 6px rgba(0,0,0,0.4), 0 0 16px rgba(6, 182, 212, 0.7);
}

/* 3. Gold & Silver: 24K Royal Bullion & Polished Platinum */
.skin-gold_silver .piece-w, .piece-w.skin-gold_silver {
    background: radial-gradient(circle at 35% 30%, #fffbeb 0%, #fde68a 30%, #f59e0b 60%, #78350f 100%);
    border: 2px solid #fbbf24;
    box-shadow: inset 0 3px 7px #fff, inset 0 -4px 8px rgba(0,0,0,0.6), 0 0 18px rgba(245, 158, 11, 0.8), 0 6px 14px rgba(0,0,0,0.8);
}
.skin-gold_silver .piece-b, .piece-b.skin-gold_silver {
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e2e8f0 40%, #64748b 75%, #0f172a 100%);
    border: 2px solid #cbd5e1;
    box-shadow: inset 0 3px 7px #fff, inset 0 -4px 8px rgba(0,0,0,0.8), 0 0 14px rgba(203, 213, 225, 0.6), 0 6px 14px rgba(0,0,0,0.8);
}

/* 4. Gems: Faceted Ruby Gem & Deep Royal Sapphire */
.skin-gems .piece-w, .piece-w.skin-gems {
    background: radial-gradient(circle at 35% 30%, #ffe4e6 0%, #f43f5e 45%, #9f1239 80%, #4c0519 100%);
    border: 2px solid #fda4af;
    box-shadow: inset 0 4px 8px #fff, inset 0 -4px 8px rgba(0,0,0,0.7), 0 0 18px rgba(244, 63, 94, 0.8), 0 6px 14px rgba(0,0,0,0.8);
}
.skin-gems .piece-b, .piece-b.skin-gems {
    background: radial-gradient(circle at 35% 30%, #dbeafe 0%, #2563eb 45%, #1e40af 80%, #030712 100%);
    border: 2px solid #93c5fd;
    box-shadow: inset 0 4px 8px #fff, inset 0 -4px 8px rgba(0,0,0,0.7), 0 0 18px rgba(37, 99, 235, 0.8), 0 6px 14px rgba(0,0,0,0.8);
}

/* 5. Laser: High-Energy Plasma Core */
.skin-laser .piece-w, .piece-w.skin-laser {
    background: radial-gradient(circle at 50% 50%, #ffffff 0%, #fef08a 25%, #eab308 65%, #ca8a04 100%);
    border: 2px solid #fef9c3;
    box-shadow: 0 0 22px #eab308, inset 0 0 10px #ffffff, 0 6px 14px rgba(0,0,0,0.8);
}
.skin-laser .piece-b, .piece-b.skin-laser {
    background: radial-gradient(circle at 50% 50%, #ffffff 0%, #a5f3fc 25%, #06b6d4 65%, #0891b2 100%);
    border: 2px solid #cffafe;
    box-shadow: 0 0 22px #06b6d4, inset 0 0 10px #ffffff, 0 6px 14px rgba(0,0,0,0.8);
}

/* 6. Beasts: Wild Lion & Wolf Totem */
.skin-beasts .piece-w, .piece-w.skin-beasts {
    background: radial-gradient(circle at 35% 30%, #ffedd5 0%, #f97316 45%, #c2410c 80%, #431407 100%);
    border: 2px solid #fdba74;
    box-shadow: inset 0 3px 6px #fff, inset 0 -3px 6px rgba(0,0,0,0.6), 0 0 16px rgba(249, 115, 22, 0.6);
}
.skin-beasts .piece-b, .piece-b.skin-beasts {
    background: radial-gradient(circle at 35% 30%, #f1f5f9 0%, #64748b 45%, #334155 80%, #020617 100%);
    border: 2px solid #94a3b8;
    box-shadow: inset 0 3px 6px #fff, inset 0 -3px 6px rgba(0,0,0,0.7), 0 0 16px rgba(100, 116, 139, 0.6);
}

/* Selected states for pieces */
.piece-w.selected {
    box-shadow: 0 0 20px #ffffff, inset 0 3px 6px #fff, 0 12px 24px rgba(0,0,0,0.8) !important;
}
.piece-b.selected {
    box-shadow: 0 0 20px #38bdf8, inset 0 2px 5px rgba(255,255,255,0.7), 0 12px 24px rgba(0,0,0,0.9) !important;
}

/* Piece Inner Insignia Icon */
.piece-insignia-svg {
    width: 55%;
    height: 55%;
    position: absolute;
    top: 22.5%;
    left: 22.5%;
    pointer-events: none;
    z-index: 12;
    opacity: 0.85;
}

/* DAMA / KING CROWN SVG */
.king-crown-svg {
    width: 22px;
    height: 22px;
    fill: #f59e0b;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.9)) drop-shadow(0 0 10px rgba(245, 158, 11, 1));
    z-index: 16;
    animation: crownGlow 1.8s infinite alternate ease-in-out;
}
@keyframes crownGlow {
    0% { transform: scale(1); filter: drop-shadow(0 2px 4px rgba(0,0,0,0.9)) drop-shadow(0 0 8px rgba(245, 158, 11, 0.8)); }
    100% { transform: scale(1.1); filter: drop-shadow(0 2px 4px rgba(0,0,0,0.9)) drop-shadow(0 0 14px rgba(245, 158, 11, 1)); }
}

/* ================= GAME CONTROLS TOOLBAR ================= */

.game-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    max-width: var(--board-size);
    margin: 0 auto;
    flex-shrink: 0;
}

.btn-control {
    flex: 1;
    background: var(--bg-surface-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--bg-border);
    color: #fff;
    padding: 8px 4px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.btn-control:hover, .btn-control:active {
    background: var(--bg-surface-hover);
}
.btn-danger {
    background: rgba(244, 63, 94, 0.15);
    border-color: rgba(244, 63, 94, 0.35);
    color: #fda4af;
}

/* ================= SHOP & SKINS VIEW ================= */

.shop-tabs {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 12px;
}
.shop-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 12px;
    padding: 7px 0;
    border-radius: 8px;
    cursor: pointer;
}
.shop-tab-btn.active {
    background: var(--bg-surface);
    color: #fff;
}

.shop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.shop-item-card {
    background: var(--bg-surface-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--bg-border);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}
.shop-item-preview {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0,0,0,0.3);
}
.shop-item-name {
    font-size: 12px;
    font-weight: 800;
    color: #fff;
}
.shop-item-desc {
    font-size: 10px;
    color: var(--text-dim);
}
.btn-shop-action {
    width: 100%;
    padding: 6px 0;
    border-radius: 8px;
    font-weight: 800;
    font-size: 11px;
    border: none;
    cursor: pointer;
}
.btn-buy {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
}
.btn-equip {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}
.btn-equipped {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

/* ================= BOTTOM NAVIGATION BAR ================= */

.bottom-nav {
    position: fixed;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    right: 12px;
    max-width: 456px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.02) 100%), rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(32px) saturate(210%);
    -webkit-backdrop-filter: blur(32px) saturate(210%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    display: flex;
    justify-content: space-around;
    padding: 6px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(99, 102, 241, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.25);
    z-index: 50;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--text-dim);
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 16px;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav-item:active {
    transform: scale(0.92);
}
.nav-item.active {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.3);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
}
.nav-item.active .icon {
    stroke: #fbbf24;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.7));
}

/* ================= MODALS & POPUPS ================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 16px;
}
.modal-overlay.active {
    display: flex;
}
.modal-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%), rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(32px) saturate(200%);
    -webkit-backdrop-filter: blur(32px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    padding: 22px 20px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}
.modal-title {
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 6px;
}
.modal-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    color: #000;
    font-weight: 900;
    font-size: 13px;
    padding: 12px 0;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: transform 0.15s ease;
}
.btn-primary:active {
    transform: scale(0.97);
}
.btn-secondary {
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%), rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    padding: 11px 0;
    border-radius: 14px;
    cursor: pointer;
    margin-top: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: transform 0.15s ease;
}
.btn-secondary:active {
    transform: scale(0.97);
}

/* ================= PROFILE VIEW STYLING ================= */

.profile-card-main {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%), rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: 18px 14px 14px;
    text-align: center;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.22);
}

.profile-avatar-wrap {
    position: relative;
    width: 68px;
    height: 68px;
    margin-bottom: 10px;
}
.profile-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    object-fit: cover;
    display: block;
    background: #1e293b;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}
.profile-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(135deg, #4f46e5, #9333ea);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 900;
    color: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.profile-name {
    font-size: 17px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 2px;
}
.profile-handle {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 600;
    margin-bottom: 8px;
}
.profile-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.profile-stat-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%), rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(24px) saturate(190%);
    -webkit-backdrop-filter: blur(24px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 12px 6px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.18);
}
.stat-box-val {
    font-size: 16px;
    font-weight: 900;
    color: #fff;
}
.stat-box-lbl {
    font-size: 10px;
    color: var(--text-dim);
    font-weight: 700;
    margin-top: 2px;
}

/* History Card inside Profile */
.history-section-wrap {
    margin-top: 10px;
}

/* ================= LEADERBOARD & PODIUM STYLING ================= */

.leaderboard-tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--bg-border);
    border-radius: 12px;
    padding: 3px;
    margin-bottom: 12px;
    gap: 4px;
}

.lb-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 8px 0;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lb-tab-btn.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.3));
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.my-rank-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(245, 158, 11, 0.15);
}

.my-rank-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.my-rank-num {
    font-size: 16px;
    font-weight: 900;
    color: #fbbf24;
    min-width: 28px;
}

.my-rank-name {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
}

.my-rank-stats {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 1px;
}

.my-rank-elo {
    font-size: 15px;
    font-weight: 900;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 4px 10px;
    border-radius: 10px;
}

/* Podium Layout */
.leaderboard-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 0;
}

.podium-card {
    flex: 1;
    background: var(--bg-surface-glass);
    border: 1px solid var(--bg-border);
    border-radius: 16px;
    padding: 12px 6px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.podium-card.rank-1 {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.15) 0%, rgba(15, 23, 42, 0.9) 100%);
    border-color: rgba(245, 158, 11, 0.5);
    order: 2;
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.25);
}

.podium-card.rank-2 {
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.12) 0%, rgba(15, 23, 42, 0.9) 100%);
    border-color: rgba(148, 163, 184, 0.4);
    order: 1;
}

.podium-card.rank-3 {
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.12) 0%, rgba(15, 23, 42, 0.9) 100%);
    border-color: rgba(217, 119, 6, 0.4);
    order: 3;
}

.podium-crown {
    position: absolute;
    top: -12px;
    width: 24px;
    height: 24px;
    fill: #f59e0b;
    filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.8));
}

.podium-avatar-wrap {
    position: relative;
    width: 44px;
    height: 44px;
    margin-bottom: 6px;
}

.podium-avatar {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
    background: #1e293b;
}

.podium-name {
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.podium-elo {
    font-size: 12px;
    font-weight: 900;
    color: #fbbf24;
    margin-top: 2px;
}

.podium-rank-badge {
    position: absolute;
    bottom: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    color: #000;
}

.rank-1 .podium-rank-badge { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.rank-2 .podium-rank-badge { background: #cbd5e1; box-shadow: 0 0 8px #cbd5e1; }
.rank-3 .podium-rank-badge { background: #d97706; box-shadow: 0 0 8px #d97706; color: #fff; }

/* Leaderboard List Rows */
.lb-row {
    background: var(--bg-surface-glass);
    border: 1px solid var(--bg-border);
    border-radius: 14px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.lb-row:active {
    transform: scale(0.98);
}

.lb-row.is-me {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(30, 41, 59, 0.85);
}

.lb-row-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lb-rank-num {
    font-size: 13px;
    font-weight: 900;
    color: var(--text-dim);
    min-width: 24px;
}

.lb-avatar-wrap {
    position: relative;
    width: 34px;
    height: 34px;
}

.lb-avatar {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    background: #1e293b;
}

.lb-user-details {
    display: flex;
    flex-direction: column;
}

.lb-user-name {
    font-size: 12px;
    font-weight: 800;
    color: #fff;
}

.lb-user-sub {
    font-size: 10px;
    color: var(--text-dim);
}

.lb-row-right {
    text-align: right;
}

.lb-elo-val {
    font-size: 13px;
    font-weight: 900;
    color: #fbbf24;
}

.lb-rank-title-tag {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 700;
}

/* Avatar Frame Overhaul */
.avatar-frame {
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    border: 2px solid transparent;
    pointer-events: none;
    z-index: 5;
}

.avatar-frame.frame-default {
    border-color: rgba(255, 255, 255, 0.1);
}

.avatar-frame.frame-bronze {
    border: 2.5px solid #d97706;
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.7), inset 0 0 4px rgba(255, 255, 255, 0.3);
}

.avatar-frame.frame-swords {
    border: 2.5px solid #f43f5e;
    box-shadow: 0 0 12px #f43f5e, inset 0 0 6px rgba(244, 63, 94, 0.5);
    animation: pulseSwords 2s infinite alternate ease-in-out;
}
@keyframes pulseSwords {
    0% { box-shadow: 0 0 8px #f43f5e; }
    100% { box-shadow: 0 0 16px #f43f5e, inset 0 0 8px rgba(244, 63, 94, 0.8); }
}

.avatar-frame.frame-crown {
    border: 2.5px solid #f59e0b;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.85), inset 0 0 6px rgba(254, 240, 138, 0.6);
    animation: crownShimmer 2.2s infinite alternate ease-in-out;
}
@keyframes crownShimmer {
    0% { filter: drop-shadow(0 0 4px #f59e0b); }
    100% { filter: drop-shadow(0 0 10px #fbbf24); }
}

.avatar-frame.frame-neon {
    border: 2.5px solid #06b6d4;
    box-shadow: 0 0 15px #06b6d4, 0 0 25px rgba(168, 85, 247, 0.6), inset 0 0 6px #06b6d4;
    animation: neonBorderPulse 1.8s infinite alternate ease-in-out;
}
@keyframes neonBorderPulse {
    0% { border-color: #06b6d4; box-shadow: 0 0 10px #06b6d4; }
    100% { border-color: #a855f7; box-shadow: 0 0 20px #a855f7, 0 0 10px #06b6d4; }
}

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

