@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

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

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: #0b0f1a;
    color: #f1f5f9;
    margin: 0; padding: 0 0 40px;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Vibrant background mesh */
body::before {
    content: '';
    position: fixed; inset: 0;
    background:
        radial-gradient(ellipse 70% 40% at 15% 0%,   rgba(239,68,68,0.12) 0%, transparent 55%),
        radial-gradient(ellipse 50% 35% at 85% 5%,   rgba(56,189,248,0.1) 0%, transparent 55%),
        radial-gradient(ellipse 60% 40% at 50% 100%,  rgba(139,92,246,0.08) 0%, transparent 55%);
    pointer-events: none; z-index: 0;
}

/* ── GRID ── */
#main-menu-wrapper {
    width: 100%;
    max-width: 1300px;
    margin: 16px auto 0;
    padding: 0 20px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 1fr 1.9fr 1fr;
    gap: 16px;
    align-items: start;
    position: relative; z-index: 1;
}

/* ── GLASS CARD ── */
.menu-box {
    background: linear-gradient(145deg, rgba(22,28,46,0.95), rgba(14,20,36,0.95));
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
    max-width: 100%;
    margin: 0 auto;
    padding: 24px 22px;
    position: relative;
}

.side-panel {
    background: linear-gradient(145deg, rgba(18,24,42,0.97), rgba(12,17,32,0.97));
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

/* ── LOGO & TITLE ── */
.logo-container { margin-bottom: 6px; text-align: center; }
.menu-logo { max-width: 70%; height: auto; max-height: 68px; }

h1 {
    color: #ef4444;
    margin: 0 0 4px;
    font-size: 26px;
    text-transform: uppercase;
    letter-spacing: 5px;
    font-weight: 900;
    text-shadow: 0 0 30px rgba(239,68,68,0.4);
}

/* ── BUTTONS ── */
button {
    font-family: 'Inter', sans-serif;
    color: white;
    border: none;
    padding: 13px 24px;
    font-size: clamp(12px, 3.5vw, 14px); font-weight: 700;
    cursor: pointer;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    transition: all 0.18s ease;
    margin-top: 8px;
}

#start-btn {
    background: linear-gradient(135deg, #ef4444 0%, #c62828 100%);
    box-shadow: 0 4px 24px rgba(239,68,68,0.4);
}
#start-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(239,68,68,0.55); }

label {
    display: block; text-align: left;
    margin-top: 12px; font-weight: 600;
    color: #64748b; font-size: 11px;
    text-transform: uppercase; letter-spacing: 0.8px;
}

input {
    width: 100%;
    padding: 11px 14px;
    margin: 5px 0 14px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #f1f5f9;
    border-radius: 10px;
    font-size: 14px; font-family: 'Inter', sans-serif;
    transition: border-color 0.15s, background 0.15s;
}
input:focus { border-color: #38bdf8; outline: none; background: rgba(56,189,248,0.07); }

/* ── LEADERBOARD ROWS ── */
.lb-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 6px;
    border-radius: 10px;
    transition: background 0.15s;
    margin-bottom: 3px;
}
.lb-row:hover { background: rgba(255,255,255,0.04); }
.lb-row.lb-me { background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2); }
.lb-row.lb-top1 { background: rgba(251,191,36,0.08); }
.lb-row.lb-top2 { background: rgba(148,163,184,0.06); }
.lb-row.lb-top3 { background: rgba(180,120,60,0.07); }

.lb-rank {
    width: 22px; text-align: center;
    font-weight: 800; font-size: 13px;
    flex-shrink: 0; color: #475569;
}
.lb-rank.gold   { color: #fbbf24; font-size: 16px; }
.lb-rank.silver { color: #94a3b8; font-size: 16px; }
.lb-rank.bronze { color: #b87c3c; font-size: 16px; }

.lb-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 13px;
    flex-shrink: 0; color: #fff;
    border: 2px solid rgba(255,255,255,0.15);
}

.lb-info { flex: 1; min-width: 0; text-align: left; }
.lb-name { font-weight: 700; font-size: clamp(11px, 2.8vw, 13px); color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-name.me { color: #22c55e; }
.lb-score-badge {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 7px; padding: 3px 8px;
    font-size: 11px; font-weight: 700; color: #94a3b8;
    white-space: nowrap; flex-shrink: 0;
}

ol { padding-left: 22px; margin: 0; }
li { padding: 6px 4px; border-bottom: 1px solid rgba(255,255,255,0.04); color: #64748b; font-size: 13px; }
li b { color: #f1f5f9; }
li:last-child { border-bottom: none; }

/* ── CHAR SELECT ── */
#char-selector > div:hover:not([style*="not-allowed"]) {
    border-color: #38bdf8 !important;
    background: rgba(56,189,248,0.08) !important;
    transform: translateX(3px);
}

/* ── STAT BAR ── */
.stat-bar-wrap { margin-bottom: 6px; text-align: left; }
.stat-bar-label { display: flex; justify-content: space-between; font-size: 10px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 3px; }
.stat-bar-track { height: 5px; background: rgba(255,255,255,0.08); border-radius: 10px; overflow: hidden; }
.stat-bar-fill { height: 100%; border-radius: 10px; transition: width 0.4s ease; }

/* ── MISC ── */
.red-text    { color: #ef4444; animation: blink 1s infinite; }
.cyan-text   { color: #38bdf8; }
.green-text  { color: #22c55e; }
.yellow-text { color: #eab308; }
@keyframes blink { 50% { opacity: 0.4; } }
@keyframes kfPulse { 0%,100% { box-shadow: 0 0 12px rgba(34,197,94,0.3); } 50% { box-shadow: 0 0 28px rgba(34,197,94,0.7); } }

/* ── GAME CONTAINER ── */
#game-container {
    max-width: 1100px; margin: 16px auto;
    position: relative; border-radius: 14px;
    overflow: hidden;
    border: 1.5px solid rgba(239,68,68,0.35);
    box-shadow: 0 0 50px rgba(239,68,68,0.12), 0 20px 80px rgba(0,0,0,0.7);
}
#game-container { width: 100%; overflow: hidden; }
#game { width: 100% !important; max-width: 1000px; height: auto !important; display: block; touch-action: none; }
canvas { display: block; width: 100%; height: auto; }

/* ── HUD ── */
#hud {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(11,15,26,0.97);
    padding: 10px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-wrap: wrap; gap: 8px;
    backdrop-filter: blur(10px);
}
.hud-sc { display: flex; gap: 20px; font-weight: 700; font-size: clamp(11px, 3vw, 14px); align-items: center; }
.hud-right { display: flex; align-items: center; gap: 12px; }
.health-container { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
#pause-btn {
    background: rgba(255,255,255,0.06); color: #94a3b8; width: auto;
    padding: 7px 14px; font-size: 11px;
    border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
    font-weight: 600; cursor: pointer; margin: 0; letter-spacing: 0.5px;
}

/* ── PAUSE ── */
#pause-screen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(11,15,26,0.94); display: flex; flex-direction: column;
    align-items: center; justify-content: center; z-index: 5;
    backdrop-filter: blur(10px);
}

/* ── GAME OVER ── */
#game-over-screen { position: relative; overflow: hidden; }
#game-over-screen::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(ellipse at center, rgba(239,68,68,0.09) 0%, transparent 70%);
    pointer-events: none; animation: goGlow 2s ease-in-out infinite alternate;
}
@keyframes goGlow { from { opacity:0.5; transform:scale(0.95); } to { opacity:1; transform:scale(1.05); } }
.go-crash-title { font-size:36px !important; color:#ef4444 !important; text-shadow:0 0 30px #ef4444; animation:crashShake 0.15s infinite,blink 0.8s infinite; letter-spacing:4px; }
@keyframes crashShake { 0%{transform:translateX(-2px)} 50%{transform:translateX(2px)} 100%{transform:translateX(0)} }
.go-score-big { font-size:48px !important; font-weight:900; color:#f59e0b !important; text-shadow:0 0 20px rgba(245,158,11,0.4); display:block; margin:8px 0 4px; }
.go-subtitle { color:#475569; font-size:12px; margin-bottom:18px; text-transform:uppercase; letter-spacing:2px; }
.go-stars { font-size:26px; margin:6px 0; }

/* ── SHARE ── */
.share-buttons { display:flex; gap:8px; margin:10px 0; flex-wrap:wrap; }
.share-btn { flex:1; min-width:110px; padding:10px 12px; font-size:12px; font-weight:700; border-radius:10px; cursor:pointer; border:none; color:#fff; display:flex; align-items:center; justify-content:center; gap:6px; margin:0; transition:all 0.18s; }
.share-btn:hover { transform:translateY(-2px); filter:brightness(1.12); }
.share-btn-wa { background:linear-gradient(135deg,#25D366,#128C7E); }
.share-btn-ig { background:linear-gradient(135deg,#E1306C,#833AB4); }
.share-btn-copy { background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.12) !important; }

/* ── CHAT ── */
.kf-chat-wrap { width:100%; background:rgba(11,15,26,0.97); border-top:1px solid rgba(255,255,255,0.06); display:flex; flex-direction:column; }
.kf-chat-wrap.gameover-style { border-top:none; border:1px solid rgba(255,255,255,0.07); border-radius:12px; overflow:hidden; margin-top:14px; }
.kf-chat-wrap.pause-style { border-top:none; border:1px solid rgba(255,255,255,0.07); border-radius:10px; overflow:hidden; width:90%; max-width:480px; margin:0 auto; }
.kf-chat-header { background:rgba(255,255,255,0.04); padding:7px 14px; font-size:11px; font-weight:700; color:#38bdf8; text-transform:uppercase; letter-spacing:1.5px; display:flex; align-items:center; gap:7px; }
.kf-chat-dot { width:6px; height:6px; background:#22c55e; border-radius:50%; animation:blink 1.5s infinite; flex-shrink:0; }
.kf-chat-msgs { height:110px; overflow-y:auto; padding:6px 12px; display:flex; flex-direction:column; gap:3px; scrollbar-width:thin; scrollbar-color:rgba(255,255,255,0.08) transparent; }
.kf-chat-msgs::-webkit-scrollbar { width:4px; }
.kf-chat-msgs::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.08); border-radius:2px; }
.chat-msg { font-size:12px; line-height:1.5; color:#64748b; word-break:break-word; }
.chat-msg .chat-name { font-weight:700; color:#38bdf8; margin-right:4px; }
.chat-msg .chat-time { font-size:10px; color:#1e293b; margin-left:5px; }
.chat-msg.own .chat-name { color:#22c55e; }
.kf-chat-input-zone { border-top:1px solid rgba(255,255,255,0.05); background:rgba(0,0,0,0.3); padding:8px 10px; display:flex; flex-direction:column; gap:6px; }
.kf-chat-name-row input,.kf-chat-msg-row input { background:rgba(255,255,255,0.05) !important; border:1px solid rgba(255,255,255,0.1) !important; border-radius:8px !important; color:#e2e8f0 !important; font-size:12px !important; padding:9px 12px !important; outline:none !important; width:100% !important; transition:border-color 0.15s; }
.kf-chat-name-row input:focus,.kf-chat-msg-row input:focus { border-color:#38bdf8 !important; }
.kf-chat-name-row input::placeholder,.kf-chat-msg-row input::placeholder { color:#334155 !important; }
.kf-chat-msg-row { display:flex; gap:8px; align-items:center; }
.kf-chat-msg-row input { flex:1 !important; width:auto !important; }
.kf-send-btn { background:linear-gradient(135deg,#38bdf8,#0284c7) !important; color:#fff !important; border:none !important; border-radius:8px !important; padding:9px 16px !important; font-size:12px !important; font-weight:700 !important; cursor:pointer !important; white-space:nowrap !important; flex-shrink:0 !important; width:auto !important; margin:0 !important; transition:opacity 0.15s; }
.kf-send-btn:hover { opacity:0.85; }
.kf-who-label { font-size:10px; color:#334155; text-align:right; padding:0 2px 2px; }
.kf-who-label b { color:#38bdf8; }

/* ── RANK NOTIF ── */
#kf-rank-notif { position:fixed; top:20px; left:50%; transform:translateX(-50%); background:rgba(11,15,26,0.96); border:1px solid rgba(239,68,68,0.4); border-radius:14px; padding:12px 22px; color:#f1f5f9; font-size:13px; font-weight:600; text-align:center; z-index:9999999; box-shadow:0 4px 30px rgba(239,68,68,0.25); animation:rankNotifIn 0.3s ease,rankNotifOut 0.4s ease 4.6s forwards; pointer-events:none; line-height:1.5; backdrop-filter:blur(16px); }
#kf-rank-notif b { color:#ef4444; }
@keyframes rankNotifIn { from{opacity:0;transform:translateX(-50%) translateY(-16px)} to{opacity:1;transform:translateX(-50%) translateY(0)} }
@keyframes rankNotifOut { from{opacity:1} to{opacity:0;transform:translateX(-50%) translateY(-10px)} }

.kf-badge-tag { display:inline-block; font-size:12px; vertical-align:middle; margin-right:2px; }
#powerup-hud { display:inline-flex; align-items:center; gap:5px; font-size:13px; font-weight:700; }

/* ── TUTORIAL ── */
#tutorial-overlay { display:none; position:absolute; top:0; left:0; width:100%; height:100%; background:rgba(11,15,26,0.9); z-index:10; flex-direction:column; align-items:center; justify-content:center; pointer-events:none; }
#tutorial-overlay.active { display:flex; }
.tutorial-text { color:#38bdf8; font-size:18px; font-weight:800; text-transform:uppercase; letter-spacing:2px; text-align:center; padding:0 20px; text-shadow:0 0 20px #38bdf8; animation:tutorialPulse 0.6s ease-in-out infinite alternate; }
.tutorial-arrow { font-size:44px; margin-top:12px; animation:tutorialBounce 0.5s ease-in-out infinite alternate; }
@keyframes tutorialPulse { from{opacity:0.7} to{opacity:1} }
@keyframes tutorialBounce { from{transform:translateY(0)} to{transform:translateY(-10px)} }

/* ── RESPONSIVE ── */
@media (max-width:900px) {
    #main-menu-wrapper { grid-template-columns:1fr !important; max-width:520px !important; }
    #main-menu-wrapper > div:first-child, #main-menu-wrapper > div:last-child { position:static !important; }
}

/* ── MOBILE PORTRAIT ── */
@media screen and (max-width:600px) and (orientation:portrait) {
    body { padding:0 0 calc(74px + env(safe-area-inset-bottom, 0px)); }

    /* ── Chat FAB: sakriven, koristimo bottom nav ── */
    #kf-wrap { display:none !important; }
    #kf-fab { display:none !important; }
    #kf-wrap.kf-mob-chat-open {
        display:flex !important; position:fixed !important; inset:0 !important;
        bottom:90px !important; right:0 !important; width:100% !important;
        max-width:100% !important; align-items:stretch !important; z-index:8999 !important;
    }
    #kf-wrap.kf-mob-chat-open #kf-fab { display:none !important; }
    #kf-wrap.kf-mob-chat-open #kf-box {
        display:flex !important; width:100% !important; max-width:100% !important;
        height:calc(100vh - 90px) !important; max-height:none !important;
        border-radius:0 !important; border:none !important;
        border-top:1px solid rgba(56,189,248,0.2) !important;
    }

    /* ── Profile bar: 2 reda na mobu ── */
    #top-profile-bar { margin:6px auto 0; padding:0 8px; }
    #top-profile-bar > div {
        padding:6px 10px !important; gap:8px !important;
        border-radius:12px !important; flex-wrap:wrap !important;
        align-items:center !important;
    }
    #bar-achievements-btn, #bar-badges-btn { display:none !important; }
    #top-profile-bar button[onclick="kfOpenProfile()"] { display:none !important; }
    /* Avatar manji */
    #profile-avatar { width:36px !important; height:36px !important; font-size:14px !important; flex-shrink:0 !important; }
    /* Ime + LVL red */
    #profile-name { font-size:13px !important; }
    #profile-level { font-size:9px !important; padding:2px 5px !important; }
    /* XP bar: puni red ispod, cijela širina */
    #top-profile-bar > div > div:not([style*="flex:1"]):nth-child(2) { flex:1 !important; min-width:0 !important; }
    #profile-xp-fill { display:block !important; }
    #profile-xp-next { display:none !important; }
    #profile-xp-text { font-size:10px !important; color:#f59e0b !important; white-space:nowrap !important; }
    /* XP bar širi na mobu */
    #top-profile-bar div[style*="width:130px"] { width:100px !important; }
    /* Spacer nestaje */
    #top-profile-bar > div > div[style*="flex:1"] { display:none !important; }
    /* Dan/Noć — emoji + tekst */
    #theme-toggle-btn {
        padding:4px 9px !important; font-size:12px !important;
        flex-shrink:0 !important;
    }

    /* ── Glavni wrapper ── */
    #main-menu-wrapper { max-width:100% !important; padding:0 8px !important; margin-top:6px !important; gap:6px !important; }
    #side-left { display:none !important; }
    #side-right { display:none !important; }

    /* ── Menu box ── */
    .menu-box { padding:8px 10px !important; margin:0 !important; border-radius:12px !important; }
    /* Logo: sakrij na mobu da uštedimo prostor */
    .logo-container { display:none !important; }
    /* Naslov manji */
    #main-menu-wrapper h1 { font-size:17px !important; margin-bottom:1px !important; letter-spacing:3px !important; }
    #main-menu-wrapper p { font-size:10px !important; margin-bottom:6px !important; }

    /* ── Char selector: lijevo 2 kolone, desno dance preview ── */
    /* Wrapper reda ostaje flex row */
    div[style*="flex:0 0 205px"], div[style*="flex: 0 0 205px"] {
        flex:0 0 auto !important; width:55% !important; min-width:0 !important;
    }
    #char-selector { grid-template-columns:1fr 1fr !important; width:100% !important; gap:4px !important; }
    #char-selector > div { min-height:62px !important; padding:4px 3px !important; }
    #char-selector > div img, #char-selector > div canvas { max-height:38px !important; }
    /* Preview panel desno — dance animacija */
    #char-preview-panel {
        display:flex !important; flex:1 !important;
        min-height:0 !important; max-height:none !important;
        padding:6px 6px !important;
    }
    #char-preview-img { height:80px !important; width:80px !important; }
    #char-preview-emoji { font-size:40px !important; }
    #char-preview-name { font-size:10px !important; margin-top:2px !important; }
    #char-preview-desc { font-size:9px !important; margin-bottom:2px !important; }
    #char-preview-stats { display:none !important; }
    #char-preview-glow { width:80px !important; height:80px !important; bottom:50px !important; }
    #kf-mob-char-strip { display:none !important; }

    /* "Izaberi lika" label */
    #main-menu-wrapper div[style*="IZABERI"],
    #main-menu-wrapper div[style*="Izaberi"] { margin-bottom:5px !important; font-size:10px !important; }

    /* ── Dnevni izazov ── */
    #menu-daily { padding:5px 10px !important; margin-bottom:6px !important; font-size:10px !important; }

    /* ── Play dugmad ── */
    #start-btn, #l2-btn { padding:12px !important; font-size:14px !important; margin-top:4px !important; }

    /* ── Bottom nav ── */
    #kf-mob-nav { display:flex !important; }

    /* ── In-game ── */
    #game-container { margin:5px !important; border-radius:10px !important; }
    .hud-sc { font-size:10px !important; gap:8px !important; }
    #pause-btn { font-size:9px !important; padding:5px 8px !important; }
}

/* ── MOBILE LANDSCAPE (igra) ── */
@media screen and (max-width:900px) and (orientation:landscape) and (max-height:500px) {
    /* Sakrij sve osim igre i HUD-a */
    body > *:not(#game-container):not(#kf-rank-notif):not(#game-over-screen):not(#kf-fade-overlay):not(.kf-overlay-class) { display:none !important; }
}

/* Mobile landscape menu (tablet landscape) */
@media screen and (max-width:900px) and (orientation:landscape) and (min-height:500px) {
    #char-preview-panel { min-height:160px !important; }
    #char-selector { gap:4px !important; }
}

/* Mob elements — skriveni na desktopu */
#kf-mob-char-strip { display:none; }
#kf-mob-nav { display:none; }
#kf-mob-panel-leaderboard, #kf-mob-panel-chat, #kf-mob-panel-hof { display:none; }

/* Character -> level flow */
.kf-flow-enabled #menu-daily,
.kf-flow-enabled #start-btn,
.kf-flow-enabled #l2-btn,
.kf-flow-enabled #l3-btn,
.kf-flow-enabled #menu-best {
    display: none !important;
}

.kf-flow-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 0 12px;
    padding: 5px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    background: rgba(255,255,255,0.035);
}

.kf-flow-tab {
    width: 100%;
    margin: 0;
    padding: 9px 12px;
    border-radius: 10px;
    background: transparent;
    color: #64748b;
    border: none;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.2px;
}

.kf-flow-tab.active {
    background: linear-gradient(135deg,#ef4444,#dc2626);
    color: #fff;
    box-shadow: 0 8px 24px rgba(239,68,68,0.24);
}

.kf-flow-level-mode .kf-character-section {
    display: none !important;
}

.kf-level-panel {
    display: none;
    gap: 12px;
    text-align: left;
}

.kf-flow-level-mode .kf-level-panel {
    display: block;
}

.kf-selected-hero {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 16px;
    align-items: center;
    margin-bottom: 12px;
    padding: 14px;
    border-radius: 16px;
    background: linear-gradient(145deg,rgba(7,18,32,0.95),rgba(12,18,35,0.95));
    border: 1px solid rgba(56,189,248,0.16);
}

.kf-selected-hero-img {
    height: 150px;
    width: 130px;
    object-fit: contain;
    object-position: center bottom;
    justify-self: center;
    filter: drop-shadow(0 18px 34px rgba(56,189,248,0.16));
}

.kf-selected-hero-kicker,
.kf-level-kicker {
    color: #38bdf8;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.kf-selected-hero-name {
    margin-top: 4px;
    color: #f1f5f9;
    font-size: 28px;
    font-weight: 950;
    letter-spacing: 3px;
}

.kf-selected-hero-desc {
    margin-top: 4px;
    color: #94a3b8;
    font-size: 12px;
}

.kf-change-char-btn {
    width: auto;
    margin: 14px 0 0;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 800;
}

.kf-level-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.kf-level-card {
    position: relative;
    min-height: 150px;
    width: 100%;
    margin: 0;
    padding: 14px;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.09);
    background: linear-gradient(145deg,#111827,#0b1020);
    text-align: left;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 14px 34px rgba(0,0,0,0.28);
}

.kf-level-card::before {
    content: '';
    position: absolute;
    inset: auto -30px -40px auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--level-glow, rgba(239,68,68,0.2));
    filter: blur(12px);
    opacity: .8;
}

.kf-level-card:not(.locked):hover {
    transform: translateY(-2px);
    border-color: rgba(239,68,68,0.42);
}

.kf-level-card.locked {
    cursor: not-allowed;
    opacity: .58;
    filter: grayscale(.35);
}

.kf-level-icon {
    position: relative;
    z-index: 1;
    font-size: 30px;
    line-height: 1;
}

.kf-level-title {
    position: relative;
    z-index: 1;
    margin-top: 14px;
    color: #fff;
    font-size: 15px;
    font-weight: 950;
}

.kf-level-city {
    position: relative;
    z-index: 1;
    margin-top: 2px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
}

.kf-level-status {
    position: relative;
    z-index: 1;
    display: inline-flex;
    margin-top: 12px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: #e2e8f0;
    font-size: 10px;
    font-weight: 900;
}

.kf-level-card.ready .kf-level-status {
    background: rgba(34,197,94,0.12);
    color: #86efac;
}

.kf-level-card.locked .kf-level-status {
    background: rgba(255,255,255,0.06);
    color: #64748b;
}

.kf-level-note {
    margin-top: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.035);
    padding: 10px 12px;
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.45;
}

@media screen and (max-width:600px) and (orientation:portrait) {
    .kf-flow-tabs {
        margin-bottom: 7px;
        gap: 5px;
        padding: 4px;
    }

    .kf-flow-tab {
        padding: 7px 8px;
        font-size: 10px;
    }

    .kf-selected-hero {
        grid-template-columns: 96px 1fr;
        gap: 10px;
        padding: 10px;
    }

    .kf-selected-hero-img {
        height: 92px;
        width: 86px;
    }

    .kf-selected-hero-name {
        font-size: 18px;
        letter-spacing: 2px;
    }

    .kf-selected-hero-desc,
    .kf-level-note {
        font-size: 10px;
    }

    .kf-change-char-btn {
        margin-top: 8px;
        padding: 7px 10px;
        font-size: 10px;
    }

    .kf-level-grid {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .kf-level-card {
        min-height: 82px;
        padding: 11px 13px;
    }

    .kf-level-icon {
        position: absolute;
        right: 14px;
        top: 12px;
        font-size: 30px;
    }

    .kf-level-title {
        margin-top: 0;
        font-size: 14px;
    }

    .kf-level-status {
        margin-top: 8px;
    }
}

/* Desktop compact menu: keep levels visible without page scrolling. */
@media screen and (min-width:901px) {
    body {
        padding-bottom: 16px !important;
    }

    #top-profile-bar {
        max-width: 1180px !important;
        margin-top: 10px !important;
        padding: 0 14px !important;
    }

    #top-profile-bar > div {
        min-height: 58px !important;
        padding: 8px 16px !important;
        border-radius: 14px !important;
    }

    #profile-avatar {
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
    }

    #kf-coin-pill {
        display: inline-flex !important;
        align-items: center !important;
        gap: 5px !important;
        height: 24px !important;
        padding: 0 9px !important;
        border-radius: 999px !important;
        background: rgba(245,158,11,0.1) !important;
        border: 1px solid rgba(245,158,11,0.28) !important;
        color: #fbbf24 !important;
        font-size: 11px !important;
        font-weight: 800 !important;
        white-space: nowrap !important;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.06) !important;
        order: 3 !important;
    }

    #kf-daily-reward-pill {
        display: inline-flex !important;
        order: 4 !important;
        margin-left: 2px !important;
    }

    #main-menu-wrapper {
        max-width: 1180px !important;
        margin-top: 12px !important;
        padding: 0 14px !important;
        grid-template-columns: 245px minmax(600px, 620px) 245px !important;
        gap: 14px !important;
    }

    #side-left,
    #side-right {
        top: 10px !important;
    }

    #main-menu.menu-box {
        padding: 16px 18px !important;
        border-radius: 16px !important;
    }

    #main-menu .logo-container {
        margin-bottom: 2px !important;
    }

    #main-menu .menu-logo {
        max-height: 44px !important;
    }

    #main-menu h1 {
        font-size: 22px !important;
        letter-spacing: 5px !important;
        margin-bottom: 2px !important;
    }

    #main-menu p {
        margin-bottom: 10px !important;
    }

    div[style*="flex:0 0 205px"],
    div[style*="flex: 0 0 205px"] {
        flex: 0 0 270px !important;
        width: 270px !important;
    }

    #char-selector {
        width: 270px !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5px !important;
    }

    #char-selector > div {
        min-height: 88px !important;
        border-radius: 12px !important;
        padding: 5px 4px 7px !important;
    }

    #char-selector > div img {
        height: 54px !important;
        width: 56px !important;
        margin-bottom: 2px !important;
    }

    #char-selector > div div[style*="font-size:12px"] {
        font-size: 9px !important;
        letter-spacing: 0.8px !important;
    }

    #char-selector > div div[style*="font-size:9px"] {
        font-size: 8px !important;
    }

    #char-preview-panel {
        min-height: 250px !important;
        max-height: 260px !important;
        padding: 8px 10px !important;
        justify-content: flex-end !important;
    }

    #char-preview-glow {
        width: 150px !important;
        height: 150px !important;
        bottom: 64px !important;
    }

    #char-preview-img {
        height: 168px !important;
        width: 158px !important;
    }

    #char-preview-name {
        font-size: 12px !important;
        margin-top: 2px !important;
    }

    #char-preview-desc {
        margin-bottom: 5px !important;
    }

    #char-preview-stats {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5px !important;
    }

    #char-preview-stats .stat-bar-wrap {
        margin-bottom: 0 !important;
    }

    #char-preview-stats .stat-bar-label {
        font-size: 8px !important;
        letter-spacing: 0 !important;
    }

    #menu-daily {
        padding: 7px 12px !important;
        margin-bottom: 8px !important;
        font-size: 11px !important;
    }

    #start-btn,
    #l2-btn,
    #l3-btn {
        padding: 10px 14px !important;
        margin-top: 6px !important;
        font-size: 13px !important;
        border-radius: 12px !important;
    }

    #menu-best {
        margin-top: 6px !important;
    }

    #side-right > div {
        padding: 14px !important;
    }
}

/* 7 day reward */
#kf-daily-reward-pill {
    align-items: center;
    justify-content: center;
    align-self: center;
    gap: 6px;
    width: auto !important;
    height: 24px !important;
    min-height: 24px;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 9px !important;
    border-radius: 999px;
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.26);
    color: #86efac;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

#kf-daily-reward-pill.claimed {
    background: rgba(255,255,255,0.055);
    border-color: rgba(255,255,255,0.1);
    color: #94a3b8;
}

#kf-daily-reward-pill.ready {
    animation: kfRewardPulse 1.8s ease-in-out infinite;
}

@keyframes kfRewardPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(34,197,94,0), inset 0 1px 0 rgba(255,255,255,0.06); }
    50% { box-shadow: 0 0 22px rgba(34,197,94,0.32), inset 0 1px 0 rgba(255,255,255,0.06); }
}

.kf-reward-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(2,6,23,0.78);
    backdrop-filter: blur(8px);
}

.kf-reward-card {
    width: min(520px, 100%);
    border-radius: 22px;
    border: 1px solid rgba(34,197,94,0.24);
    background: linear-gradient(155deg,#0d1b14,#07111d 58%,#111827);
    box-shadow: 0 28px 80px rgba(0,0,0,0.68), 0 0 40px rgba(34,197,94,0.12);
    padding: 22px;
    text-align: left;
}

.kf-reward-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.kf-reward-title {
    color: #f1f5f9;
    font-size: 22px;
    font-weight: 950;
    letter-spacing: .4px;
}

.kf-reward-sub {
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.5;
    margin-top: 5px;
}

.kf-reward-close {
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    color: #94a3b8;
    font-size: 16px;
}

.kf-reward-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.kf-reward-day {
    position: relative;
    min-height: 92px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.045);
    padding: 10px 6px;
    text-align: center;
}

.kf-reward-day.active {
    border-color: rgba(34,197,94,0.55);
    background: linear-gradient(160deg,rgba(34,197,94,0.16),rgba(15,23,42,0.78));
    box-shadow: 0 12px 24px rgba(34,197,94,0.08);
}

.kf-reward-day.claimed {
    border-color: rgba(34,197,94,0.28);
    background: rgba(34,197,94,0.08);
}

.kf-reward-day .check {
    position: absolute;
    top: -6px;
    right: -6px;
    display: none;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: #22c55e;
    color: #052e16;
    align-items: center;
    justify-content: center;
    font-weight: 950;
    box-shadow: 0 5px 18px rgba(34,197,94,0.36);
}

.kf-reward-day.claimed .check {
    display: flex;
}

.kf-reward-day-num {
    color: #86efac;
    font-size: 10px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 1.4px;
}

.kf-reward-icon {
    margin: 7px 0 5px;
    font-size: 24px;
}

.kf-reward-amount {
    color: #f8fafc;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.35;
}

.kf-reward-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
}

.kf-reward-claim {
    flex: 1;
    margin: 0;
    background: linear-gradient(135deg,#22c55e,#16a34a);
    box-shadow: 0 12px 26px rgba(34,197,94,0.22);
}

.kf-reward-claim:disabled {
    cursor: default;
    opacity: .58;
    filter: grayscale(.2);
    box-shadow: none;
}

.kf-reward-profile {
    width: auto;
    margin: 0;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e2e8f0;
}

.kf-side-streak {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-top: 10px;
}

.kf-side-streak span {
    position: relative;
    height: 30px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.045);
    color: #94a3b8;
    font-size: 10px;
    font-weight: 900;
}

.kf-side-streak span.active {
    border-color: rgba(34,197,94,0.48);
    color: #86efac;
}

.kf-side-streak span.claimed {
    background: rgba(34,197,94,0.12);
    color: #22c55e;
}

@media screen and (max-width:600px) and (orientation:portrait) {
    #kf-daily-reward-pill {
        order: 5;
        min-height: 22px;
        padding: 0 8px;
        font-size: 10px;
    }

    .kf-reward-card {
        padding: 18px;
        border-radius: 18px;
    }

    .kf-reward-days {
        grid-template-columns: repeat(4, 1fr);
    }

    .kf-reward-day {
        min-height: 82px;
    }

    .kf-reward-actions {
        flex-direction: column;
    }

    .kf-reward-profile {
        width: 100%;
    }
}

@media screen and (min-width:901px) and (max-height:760px) {
    #main-menu-wrapper {
        grid-template-columns: 220px minmax(560px, 590px) 220px !important;
        gap: 12px !important;
    }

    #main-menu.menu-box {
        padding: 14px 16px !important;
    }

    #main-menu .logo-container {
        display: none !important;
    }

    #char-preview-panel {
        min-height: 215px !important;
        max-height: 225px !important;
    }

    #char-preview-img {
        height: 142px !important;
        width: 140px !important;
    }

    #char-selector > div {
        min-height: 78px !important;
    }

    #char-selector > div img {
        height: 46px !important;
        width: 48px !important;
    }
}
@media screen and (orientation:landscape) and (max-height:500px) {
    html { overflow:hidden; height:100dvh; }
    body { overflow:hidden; height:100dvh; margin:0; padding:0; display:flex; flex-direction:column; align-items:center; }
    #game-container { margin:0 auto; width:100%; max-width:100%; max-height:100%; border-radius:0; border-left:none; border-right:none; overflow:hidden; flex-shrink:1; }
    #hud { padding:4px 10px; gap:6px; flex-wrap:nowrap; }
    .hud-sc { font-size:10px; gap:6px; }
    #pause-btn { font-size:9px; padding:3px 7px; }
    canvas { display:block; width:100% !important; height:auto !important; max-width:100%; max-height:calc(100vh - 44px); }
    .menu-box { margin:6px auto; padding:12px; max-width:90vw; }
    h1 { font-size:18px; }
    .kf-chat-wrap { display:none; }
    body > *:not(#game-container):not(#kf-rank-notif):not(#game-over-screen):not(#kf-fade-overlay) { display:none !important; }
    body.menu-active > .menu-box { display:block !important; }

    /* Game-over u landscape: scrollable, bez rank liste */
    #game-over-screen {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        overflow-y: auto !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 10px 16px !important;
        box-sizing: border-box !important;
        z-index: 9999 !important;
    }
    #game-over-screen .lb-container,
    #game-over-screen > h3 { display: none !important; }
    #game-over-screen .go-crash-title { font-size: 16px !important; margin: 2px 0 !important; }
    #game-over-screen .go-stars       { font-size: 16px !important; margin: 2px 0 !important; }
    #game-over-screen .go-score-big   { font-size: 34px !important; }
    #game-over-screen .go-subtitle    { font-size: 9px !important; }
}

/* Repair Hero UI polish layer: keeps the busy top bar from collapsing on phones. */
#top-profile-bar > div {
    box-sizing: border-box !important;
}

#kf-coin-pill,
#kf-daily-reward-pill {
    flex-shrink: 0 !important;
}

#kf-coin-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    height: 24px !important;
    min-height: 24px !important;
    padding: 0 9px !important;
    border-radius: 999px !important;
    background: rgba(245,158,11,0.1) !important;
    border: 1px solid rgba(245,158,11,0.28) !important;
    color: #fbbf24 !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

@media screen and (min-width:901px) {
    #top-profile-bar > div > div:nth-child(2) > div:nth-child(2) {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
}

@media screen and (max-width:600px) and (orientation:portrait) {
    body {
        background: radial-gradient(circle at 50% -120px, rgba(239,68,68,0.2), transparent 300px), #101827 !important;
    }

    #top-profile-bar {
        margin-top: 4px !important;
        padding: 0 7px !important;
    }

    #top-profile-bar > div {
        display: grid !important;
        grid-template-columns: 38px minmax(0,1fr) auto !important;
        grid-template-areas:
            "avatar profile theme"
            "wallet wallet wallet" !important;
        gap: 8px 9px !important;
        align-items: center !important;
        min-height: 0 !important;
        padding: 8px 10px 9px !important;
        border-radius: 14px !important;
        background: linear-gradient(145deg,rgba(12,18,32,0.98),rgba(5,10,22,0.99)) !important;
    }

    #profile-avatar {
        grid-area: avatar !important;
        width: 38px !important;
        height: 38px !important;
    }

    #top-profile-bar > div > div:nth-child(2) {
        grid-area: profile !important;
        min-width: 0 !important;
        width: 100% !important;
        display: contents !important;
    }

    #top-profile-bar > div > div:nth-child(2) > div:first-child {
        grid-area: profile !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        min-width: 0 !important;
        flex-wrap: nowrap !important;
    }

    #profile-name {
        max-width: 110px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    #profile-level,
    #profile-rank-badge {
        flex-shrink: 0 !important;
    }

    #top-profile-bar > div > div:nth-child(2) > div:nth-child(2) {
        grid-area: wallet !important;
        display: grid !important;
        grid-template-columns: minmax(0,1fr) auto !important;
        grid-template-areas:
            "bar xp"
            "reward coins" !important;
        gap: 6px 8px !important;
        align-items: center !important;
        width: 100% !important;
        margin-top: 7px !important;
    }

    #top-profile-bar > div > div:nth-child(2) > div:nth-child(2) > div:first-child {
        grid-area: bar !important;
        width: auto !important;
        min-width: 0 !important;
        height: 6px !important;
    }

    #profile-xp-text {
        grid-area: xp !important;
        justify-self: end !important;
        color: #f59e0b !important;
        font-size: 10px !important;
        min-width: 36px !important;
        text-align: right !important;
    }

    #profile-xp-next {
        display: none !important;
    }

    #kf-daily-reward-pill {
        grid-area: reward !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 27px !important;
        min-height: 27px !important;
        padding: 0 10px !important;
        justify-self: stretch !important;
        border-radius: 10px !important;
        font-size: 11px !important;
    }

    #kf-coin-pill {
        grid-area: coins !important;
        height: 27px !important;
        min-height: 27px !important;
        min-width: 106px !important;
        padding: 0 10px !important;
        border-radius: 10px !important;
        font-size: 11px !important;
    }

    #theme-toggle-btn {
        grid-area: theme !important;
        width: 44px !important;
        height: 34px !important;
        min-width: 44px !important;
        padding: 0 !important;
        overflow: hidden !important;
        text-indent: -999px !important;
        position: relative !important;
    }

    #theme-toggle-btn::before {
        content: "☀️" !important;
        position: absolute !important;
        inset: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-indent: 0 !important;
        font-size: 14px !important;
    }

    #bar-achievements-btn,
    #bar-badges-btn,
    #top-profile-bar button[onclick="kfOpenProfile()"],
    #top-profile-bar > div > div[style*="flex:1"] {
        display: none !important;
    }

    #main-menu-wrapper {
        margin-top: 8px !important;
    }

    .kf-flow-tabs {
        position: sticky !important;
        top: 4px !important;
        z-index: 3 !important;
        box-shadow: 0 10px 24px rgba(0,0,0,0.2) !important;
    }
}

/* Character select polish */
.kf-character-section {
    gap: 14px !important;
}

#char-selector {
    align-items: stretch !important;
}

#char-selector > div {
    box-sizing: border-box !important;
    min-height: 104px !important;
    height: 104px !important;
    border-radius: 14px !important;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease !important;
}

#char-selector > div:hover:not([style*="not-allowed"]) {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 28px rgba(56,189,248,0.12) !important;
}

#char-selector > div img {
    width: 62px !important;
    height: 58px !important;
    object-fit: contain !important;
    object-position: center bottom !important;
}

#char-preview-panel {
    isolation: isolate !important;
    justify-content: flex-end !important;
}

#char-preview-panel::before {
    content: "" !important;
    position: absolute !important;
    left: 18px !important;
    right: 18px !important;
    bottom: 58px !important;
    height: 42px !important;
    border-radius: 50% !important;
    background: radial-gradient(ellipse, rgba(0,0,0,.34), transparent 70%) !important;
    z-index: 0 !important;
    pointer-events: none !important;
}

#char-preview-img {
    width: 100% !important;
    max-width: 210px !important;
    height: 220px !important;
    object-fit: contain !important;
    object-position: center bottom !important;
    margin: 0 auto !important;
}

#char-preview-emoji {
    min-height: 220px !important;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

#char-preview-name,
#char-preview-desc,
#char-preview-stats {
    flex-shrink: 0 !important;
}

.kf-selected-hero {
    grid-template-columns: 132px 1fr !important;
}

.kf-selected-hero-img {
    width: 116px !important;
    height: 138px !important;
    object-fit: contain !important;
    object-position: center bottom !important;
}

@media screen and (min-width:901px) {
    #char-preview-panel {
        min-height: 292px !important;
        max-height: 304px !important;
    }

    #char-preview-img {
        max-width: 218px !important;
        height: 218px !important;
    }

    #char-selector > div {
        min-height: 98px !important;
        height: 98px !important;
    }

    #char-selector > div img {
        width: 60px !important;
        height: 54px !important;
    }
}

@media screen and (max-width:600px) and (orientation:portrait) {
    .kf-character-section {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 134px !important;
        gap: 8px !important;
        align-items: stretch !important;
    }

    .kf-character-section > div:first-child {
        width: auto !important;
        flex: initial !important;
    }

    #char-selector {
        width: 100% !important;
        gap: 6px !important;
    }

    #char-selector > div {
        min-height: 74px !important;
        height: 84px !important;
        padding: 6px 4px !important;
    }

    #char-selector > div img {
        width: 38px !important;
        height: 34px !important;
    }

    #char-preview-panel {
        min-height: 0 !important;
        height: auto !important;
        padding: 8px 6px !important;
        border-radius: 13px !important;
    }

    #char-preview-panel::before {
        left: 12px !important;
        right: 12px !important;
        bottom: 44px !important;
        height: 28px !important;
    }

    #char-preview-img {
        max-width: 112px !important;
        height: 118px !important;
    }

    #char-preview-emoji {
        min-height: 118px !important;
    }

    #char-preview-glow {
        width: 92px !important;
        height: 92px !important;
        bottom: 48px !important;
    }

    #char-preview-name {
        font-size: 10px !important;
        letter-spacing: 1.4px !important;
    }

    #char-preview-desc {
        min-height: 22px !important;
        font-size: 9px !important;
        line-height: 1.2 !important;
        text-align: center !important;
    }

    .kf-selected-hero {
        grid-template-columns: 90px 1fr !important;
    }

    .kf-selected-hero-img {
        width: 82px !important;
        height: 98px !important;
    }
}
