:root {
    --bg-deep: #060711;
    --bg-panel: rgba(13, 16, 33, 0.94);
    --neon-cyan: #00f2fe;
    --neon-purple: #b537f2;
    --neon-pink: #ff2a85;
    --neon-gold: #ffd166;
    --neon-green: #06d6a0;
    --text-main: #f0f4ff;
    --text-muted: #93a1c8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    overflow: hidden;
    touch-action: pan-y;
}

#game-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #11152c 0%, #05060d 100%);
}

#gameCanvas {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: fill;
    display: block;
    box-shadow: 0 0 50px rgba(0, 242, 254, 0.15);
    touch-action: none;
}

.hidden {
    display: none !important;
}

/* HUD */
#hud {
    position: absolute;
    top: 12px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
    z-index: 20;
}

.hud-left, .hud-right {
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
    flex-wrap: wrap;
}

.hud-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.hud-stat {
    background: rgba(10, 12, 26, 0.85);
    border: 1px solid rgba(0, 242, 254, 0.3);
    padding: 6px 13px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
    backdrop-filter: blur(6px);
}

.emerald-stat {
    border-color: rgba(6, 214, 160, 0.65);
    box-shadow: 0 0 16px rgba(6, 214, 160, 0.25);
    color: #dbfff5;
}

.emerald-stat strong {
    color: var(--neon-green);
    font-size: 15px;
}

.emerald-stat small {
    color: #93e5d0;
    font-size: 11.5px;
    margin-left: 2px;
}

.icon-emerald {
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
    font-size: 17px;
}

.health-box {
    border-color: rgba(255, 42, 133, 0.45);
    gap: 4px;
    font-size: 17px;
}

.heart-full {
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink);
}

.heart-shield {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
}

.heart-empty {
    color: rgba(255, 255, 255, 0.2);
}

.power-badge {
    border-color: rgba(181, 55, 242, 0.5);
    color: #e6c6ff;
    font-size: 12.5px;
}

.checkpoint-badge {
    border-color: rgba(6, 214, 160, 0.65);
    color: var(--neon-green);
    font-size: 12px;
}

.power-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--neon-cyan);
    box-shadow: 0 0 8px var(--neon-cyan);
}

.icon-coin {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
    font-size: 16px;
}

.icon-star {
    color: var(--neon-gold);
    text-shadow: 0 0 10px var(--neon-gold);
}

.hud-level-title {
    background: rgba(10, 12, 26, 0.78);
    border: 1px solid rgba(181, 55, 242, 0.35);
    padding: 5px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: #d8c7ff;
    text-transform: uppercase;
}

.hud-portal-quota {
    margin-top: 3px;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3px;
    background: rgba(10, 14, 28, 0.88);
    border: 1px solid rgba(255, 209, 102, 0.65);
    color: #fde68a;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.hud-portal-quota.locked {
    border-color: rgba(245, 158, 11, 0.75);
    color: #fde68a;
}

.hud-portal-quota.unlocked {
    border-color: rgba(6, 214, 160, 0.85);
    background: rgba(4, 34, 28, 0.88);
    color: #6ee7b7;
    box-shadow: 0 0 12px rgba(6, 214, 160, 0.35);
}

#boss-hud {
    width: 380px;
    background: rgba(15, 6, 22, 0.88);
    border: 1px solid var(--neon-pink);
    border-radius: 10px;
    padding: 6px 10px;
    box-shadow: 0 0 20px rgba(255, 42, 133, 0.35);
}

.boss-name {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: var(--neon-pink);
    text-align: center;
    margin-bottom: 4px;
}

.boss-bar-bg {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    overflow: hidden;
}

#boss-bar-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #ff2a85, #b537f2);
    box-shadow: 0 0 10px #ff2a85;
    transition: width 0.2s ease;
}

.icon-btn {
    background: rgba(12, 16, 34, 0.9);
    border: 1.5px solid rgba(0, 242, 254, 0.45);
    color: var(--text-main);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    box-shadow: 0 0 14px rgba(0, 242, 254, 0.22);
}

#btn-pause {
    width: 56px;
    height: 56px;
    font-size: 25px;
    font-weight: 900;
    border: 2.5px solid var(--neon-cyan);
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.28), rgba(14, 20, 44, 0.95));
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.48), inset 0 0 10px rgba(255, 255, 255, 0.15);
}

.icon-btn:hover, #btn-pause:hover {
    border-color: var(--neon-gold);
    box-shadow: 0 0 22px rgba(255, 209, 102, 0.65);
    transform: scale(1.08);
}

/* Touch Controls */
#touch-controls {
    position: absolute;
    bottom: 20px;
    left: 24px;
    right: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
    z-index: 25;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.dpad-group, .action-group {
    display: flex;
    gap: 16px;
    pointer-events: auto;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.touch-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(15, 20, 42, 0.68);
    border: 2.5px solid rgba(0, 242, 254, 0.55);
    color: var(--neon-cyan);
    font-size: 28px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 18px rgba(0, 242, 254, 0.25);
    backdrop-filter: blur(4px);
    cursor: pointer;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    transition: transform 0.08s ease, background 0.1s, opacity 0.18s ease;
}

.touch-btn:active, .touch-btn.pressed {
    transform: scale(0.92);
    background: rgba(0, 242, 254, 0.35);
    box-shadow: 0 0 28px rgba(0, 242, 254, 0.75);
}

.btn-fire {
    border-color: rgba(255, 109, 0, 0.85);
    color: #ff9e00;
    background: rgba(45, 16, 12, 0.72);
    box-shadow: 0 0 20px rgba(255, 109, 0, 0.4);
}

.btn-fire:active, .btn-fire.pressed {
    background: rgba(255, 109, 0, 0.38);
    box-shadow: 0 0 28px rgba(255, 109, 0, 0.85);
}

.btn-fire.fire-passive,
.btn-fire.fire-passive:active,
.btn-fire.fire-passive.pressed {
    opacity: 0.28;
    filter: grayscale(100%);
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.45);
    color: rgba(148, 163, 184, 0.5);
    box-shadow: none;
    transform: none;
    cursor: default;
}

.btn-jump {
    width: 78px;
    height: 78px;
    border-color: rgba(181, 55, 242, 0.75);
    color: #e2a9ff;
}

/* Overlay Screens */
.overlay-screen {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(14, 17, 38, 0.88) 0%, rgba(5, 6, 14, 0.96) 100%);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
    padding: 10px 14px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.map-container {
    width: 96%;
    max-width: 1180px;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    background: var(--bg-panel);
    border: 1px solid rgba(0, 242, 254, 0.28);
    border-radius: 22px;
    padding: 14px 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75), 0 0 35px rgba(181, 55, 242, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: auto;
}

.map-top-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.currencies-group, .top-buttons-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wallet-pill {
    background: rgba(6, 10, 24, 0.9);
    border: 1px solid rgba(0, 242, 254, 0.4);
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
}

.wallet-pill strong {
    color: var(--neon-cyan);
    font-size: 15px;
}

.emerald-pill {
    border-color: rgba(6, 214, 160, 0.65);
    box-shadow: 0 0 16px rgba(6, 214, 160, 0.22);
}

.emerald-pill strong {
    color: var(--neon-green);
}

.customize-btn {
    background: linear-gradient(135deg, #06d6a0, #00b4d8);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #041418;
    font-weight: 800;
    font-size: 13px;
    padding: 9px 16px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 0 18px rgba(6, 214, 160, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.customize-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 0 26px rgba(6, 214, 160, 0.8);
}

.shop-btn {
    background: linear-gradient(135deg, #ff2a85, #b537f2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    padding: 9px 16px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 0 18px rgba(255, 42, 133, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.shop-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 0 26px rgba(255, 42, 133, 0.75);
}

.title-header {
    text-align: center;
}

.badge-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(181, 55, 242, 0.2);
    border: 1px solid var(--neon-purple);
    color: #e4b5ff;
    margin-bottom: 2px;
}

.title-header h1 {
    font-size: clamp(20px, 2.8vw, 30px);
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), #d580ff, var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 10 World / Action Zone Filter Bar + 100-Level Grid */
.world-tabs-bar {
    width: 100%;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 2px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
}

.world-tab-btn {
    background: rgba(14, 19, 42, 0.88);
    border: 1.5px solid rgba(0, 242, 254, 0.32);
    color: #cbd5e1;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.world-tab-btn:hover {
    border-color: var(--neon-gold);
    color: #ffffff;
}

.world-tab-btn.active {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.28), rgba(181, 55, 242, 0.42));
    border-color: var(--neon-cyan);
    color: #ffffff;
    box-shadow: 0 0 14px rgba(0, 242, 254, 0.45);
}

/* Feedback Modal Star & Category Chips */
.feedback-star-btn {
    width: 42px;
    height: 40px;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 209, 102, 0.35);
    background: rgba(15, 23, 42, 0.85);
    color: rgba(255, 255, 255, 0.25);
    font-size: 22px;
    cursor: pointer;
    transition: all 0.14s ease;
}

.feedback-star-btn.active {
    color: #ffd166;
    border-color: #ffd166;
    background: rgba(255, 209, 102, 0.16);
    text-shadow: 0 0 10px rgba(255, 209, 102, 0.75);
}

.feedback-cat-chip {
    background: rgba(15, 23, 42, 0.85);
    border: 1.5px solid rgba(0, 242, 254, 0.3);
    color: #cbd5e1;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.14s ease;
}

.feedback-cat-chip.active {
    background: rgba(0, 242, 254, 0.22);
    border-color: #00f2fe;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.35);
}

/* 100-Level Grid (10 Columns) */
.world-map-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    background: rgba(6, 8, 18, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 8px 10px;
    max-height: 240px;
    min-height: 110px;
    flex-shrink: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.map-node {
    background: rgba(16, 21, 46, 0.78);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 4px 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    opacity: 0.42;
    transition: all 0.16s ease;
    position: relative;
}

.map-node.unlocked {
    opacity: 1;
    border-color: rgba(0, 242, 254, 0.35);
}

.map-node.boss-node.unlocked {
    border-color: rgba(255, 42, 133, 0.6);
    background: rgba(42, 12, 36, 0.82);
}

.map-node.selected {
    transform: translateY(-2px) scale(1.03);
    border-color: var(--neon-cyan);
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.24), rgba(181, 55, 242, 0.35));
    box-shadow: 0 0 18px rgba(0, 242, 254, 0.45);
    z-index: 2;
}

.node-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0b0f24;
    border: 2px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-main);
}

.map-node.unlocked .node-circle {
    border-color: var(--neon-cyan);
}

.map-node.boss-node.unlocked .node-circle {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
}

.node-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.node-stars {
    font-size: 9px;
    color: var(--neon-gold);
    letter-spacing: 0.8px;
    line-height: 1;
}

.map-bottom-dock {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.level-preview-card {
    width: 100%;
    background: rgba(10, 13, 28, 0.86);
    border: 1px solid rgba(181, 55, 242, 0.35);
    border-radius: 14px;
    padding: 10px 16px;
    text-align: center;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 4px;
}

.world-tag {
    background: rgba(0, 242, 254, 0.15);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: 999px;
}

.level-preview-card h3 {
    color: var(--text-main);
    font-size: 16px;
}

.level-preview-card p {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 8px;
}

.mechanics-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.mechanics-list span {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 3px 10px;
    border-radius: 999px;
    color: #d6e0ff;
}

.map-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.primary-btn {
    background: linear-gradient(90deg, #00c6ff, #b537f2);
    border: none;
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.8px;
    padding: 11px 24px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 0 22px rgba(0, 242, 254, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.primary-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 30px rgba(181, 55, 242, 0.7);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--text-main);
    font-weight: 600;
    font-size: 12.5px;
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.secondary-btn:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 242, 254, 0.12);
}

.controls-hint {
    text-align: center;
    font-size: 11.5px;
    color: var(--text-muted);
}

/* Character Customization Studio Modal */
.customize-container {
    width: min(96vw, 1140px);
    max-width: 1140px;
    height: min(92vh, 760px);
    height: min(92dvh, 760px);
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
    overflow: hidden;
    margin: auto;
    background: var(--bg-panel);
    border: 1px solid rgba(6, 214, 160, 0.5);
    border-radius: 22px;
    padding: 16px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(6, 214, 160, 0.2);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.customize-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 18px;
    align-items: stretch;
}

.preview-stage {
    min-height: 0;
    overflow: hidden;
    background: radial-gradient(circle at center, #162044 0%, #070918 100%);
    border: 2px solid rgba(6, 214, 160, 0.45);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    box-shadow: inset 0 0 30px rgba(0, 242, 254, 0.12);
}

.preview-stage-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--neon-green);
}

#customizePreviewCanvas {
    width: 220px;
    height: 230px;
    display: block;
}

.preview-equipped-summary {
    font-size: 11.5px;
    color: #d6e0ff;
    text-align: center;
    background: rgba(255, 255, 255, 0.06);
    padding: 6px 10px;
    border-radius: 10px;
    width: 100%;
}

.customize-options-panel {
    min-height: 0;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cust-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.cust-tab {
    flex: 1;
    min-width: 120px;
    background: rgba(12, 16, 36, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text-muted);
    padding: 9px 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cust-tab.active {
    background: linear-gradient(135deg, rgba(6, 214, 160, 0.25), rgba(0, 242, 254, 0.25));
    border-color: var(--neon-green);
    color: #fff;
    box-shadow: 0 0 15px rgba(6, 214, 160, 0.3);
}

.scroll-grid-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.scroll-grid-wrap.has-more::after {
    content: "";
    position: absolute;
    left: 0;
    right: 6px;
    bottom: 0;
    height: 36px;
    background: linear-gradient(180deg, rgba(11, 15, 34, 0) 0%, rgba(11, 15, 34, 0.92) 100%);
    pointer-events: none;
    z-index: 2;
}

.cust-grid {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 10px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
    padding: 2px 6px 38px 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 209, 102, 0.75) rgba(255, 255, 255, 0.08);
}

.cust-grid::-webkit-scrollbar,
.shop-grid::-webkit-scrollbar {
    width: 6px;
}
.cust-grid::-webkit-scrollbar-track,
.shop-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
}
.cust-grid::-webkit-scrollbar-thumb,
.shop-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 209, 102, 0.85), rgba(0, 242, 254, 0.8));
    border-radius: 6px;
}

/* Shop Modal */
.shop-container {
    width: min(96vw, 1140px);
    max-width: 1140px;
    height: min(92vh, 760px);
    height: min(92dvh, 760px);
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
    overflow: hidden;
    margin: auto;
    background: var(--bg-panel);
    border: 1px solid rgba(255, 42, 133, 0.4);
    border-radius: 22px;
    padding: 16px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(255, 42, 133, 0.2);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}

.shop-header h2 {
    font-size: 20px;
    color: var(--neon-cyan);
}

.shop-sub {
    font-size: 12.5px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.shop-grid {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
    padding: 2px 6px 38px 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 242, 254, 0.75) rgba(255, 255, 255, 0.08);
}

.shop-card {
    background: rgba(8, 11, 24, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
}

.shop-card.owned {
    border-color: rgba(6, 214, 160, 0.5);
}

.shop-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.shop-icon {
    font-size: 24px;
}

.shop-card h4 {
    font-size: 13.5px;
    color: var(--text-main);
}

.shop-card p {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.35;
}

.shop-buy-btn {
    width: 100%;
    padding: 8px 10px;
    border-radius: 999px;
    border: none;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    background: linear-gradient(90deg, #00c6ff, #b537f2);
    color: #fff;
    transition: opacity 0.15s ease, transform 0.1s ease;
}

.shop-buy-btn.emerald-buy {
    background: linear-gradient(90deg, #06d6a0, #00b4d8);
    color: #031518;
}

.shop-buy-btn.equipped {
    background: rgba(6, 214, 160, 0.22);
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
}

.shop-buy-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.shop-footer {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

/* Modal Card */
.modal-card {
    background: var(--bg-panel);
    border: 1.5px solid rgba(0, 242, 254, 0.45);
    border-radius: 22px;
    padding: 28px 34px;
    text-align: center;
    max-width: 490px;
    width: 100%;
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    margin: auto;
    box-shadow: 0 0 45px rgba(0, 0, 0, 0.85);
}

.modal-card h2 {
    font-size: 26px;
    margin-bottom: 8px;
    color: var(--neon-cyan);
}

.modal-card p {
    color: var(--text-muted);
    font-size: 14.5px;
    margin-bottom: 18px;
}

.modal-stats {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-around;
    font-size: 14px;
}

#screen-modal .modal-card {
    max-width: 540px;
}

.modal-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

#screen-modal .modal-buttons button {
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 800;
    min-height: 46px;
    line-height: 1.25;
}

#btn-ad-revive,
#btn-ad-double,
#btn-resume,
#btn-next-level,
#btn-to-map {
    grid-column: 1 / -1;
}

/* Square Profile Frame Button (Map & HUD) */
.profile-square-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(12, 16, 36, 0.92);
    border: 2px solid var(--neon-cyan);
    border-radius: 10px;
    padding: 5px 12px 5px 6px;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    color: var(--text-main);
}

.profile-square-btn:hover {
    transform: translateY(-2px) scale(1.03);
    border-color: var(--neon-green);
    box-shadow: 0 0 22px rgba(6, 214, 160, 0.5);
}

.profile-frame-box {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: 2px solid #00f2fe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    line-height: 1;
    overflow: hidden;
    box-sizing: border-box;
    background: linear-gradient(135deg, #0f172a, #1e1b4b);
    box-shadow: inset 0 0 10px rgba(0, 242, 254, 0.35);
    flex-shrink: 0;
}

.profile-frame-box.hud-size {
    width: 34px;
    height: 34px;
    font-size: 16px;
    line-height: 1;
    border-radius: 6px;
}

.profile-btn-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.profile-btn-tag {
    font-size: 9.5px;
    font-weight: 800;
    color: var(--neon-cyan);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.profile-btn-name {
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Profile Modal Layout & Top-Right X Close Button */
.modal-close-x {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 2px solid #ff2a85;
    background: linear-gradient(135deg, rgba(255, 42, 133, 0.28), rgba(40, 8, 28, 0.92));
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(255, 42, 133, 0.45);
    transition: transform 0.14s ease, background 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
    z-index: 20;
}

.modal-close-x:hover {
    transform: scale(1.08) rotate(90deg);
    background: linear-gradient(135deg, #ff2a85, #d90429);
    border-color: #ffffff;
    box-shadow: 0 0 24px rgba(255, 42, 133, 0.85);
}

.modal-close-x.modal-close-inline {
    position: static;
    top: auto;
    right: auto;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
}

.profile-modal-card {
    position: relative;
    background: linear-gradient(180deg, rgba(12, 17, 38, 0.97), rgba(7, 10, 24, 0.98));
    border: 2px solid rgba(0, 242, 254, 0.55);
    border-radius: 20px;
    padding: 12px 20px;
    max-width: 1140px;
    width: min(96vw, 1140px);
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.92), 0 0 28px rgba(0, 242, 254, 0.2);
}

.profile-compact-top-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-right: 42px;
    flex-wrap: wrap;
}

.profile-top-avatar-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-hero-square {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 2.5px solid var(--neon-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: 0 0 18px rgba(0, 242, 254, 0.45), inset 0 0 12px rgba(255, 255, 255, 0.18);
    background: linear-gradient(135deg, #091e3a, #240046);
    flex-shrink: 0;
}

.profile-avatar-title-badge {
    font-size: 10.5px;
    font-weight: 800;
    color: var(--neon-gold);
    background: rgba(255, 209, 102, 0.14);
    border: 1px solid rgba(255, 209, 102, 0.45);
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
}

.profile-name-section {
    flex: 1 1 200px;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.profile-save-top-btn {
    padding: 8px 16px !important;
    font-size: 12px !important;
    white-space: nowrap;
    flex-shrink: 0;
}

.profile-name-label {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.7px;
    color: var(--neon-cyan);
    text-transform: uppercase;
}

.profile-name-input {
    width: 100%;
    padding: 5px 12px;
    border-radius: 8px;
    border: 2px solid rgba(0, 242, 254, 0.55);
    background: rgba(5, 8, 20, 0.95);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 800;
    text-align: left;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.profile-name-input:focus {
    border-color: var(--neon-green);
    box-shadow: 0 0 16px rgba(6, 214, 160, 0.45);
}

.profile-attributes-box {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    background: rgba(8, 12, 28, 0.9);
    border: 1px solid rgba(181, 55, 242, 0.45);
    border-radius: 12px;
    padding: 8px 12px;
    text-align: left;
}

.profile-section-title {
    font-size: 11px;
    font-weight: 900;
    color: var(--neon-gold);
    letter-spacing: 0.7px;
    margin-bottom: 6px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 8px;
    width: 100%;
    box-sizing: border-box;
    font-size: 11.5px;
    color: #d9e6ff;
}

.profile-stat-item {
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    padding: 5px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-stat-item span {
    font-size: 9.5px;
    color: var(--text-muted);
    font-weight: 800;
}

.profile-stat-item strong {
    color: #ffffff;
    font-size: 11.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-picker-box {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    background: rgba(8, 12, 28, 0.9);
    border: 1px solid rgba(6, 214, 160, 0.45);
    border-radius: 12px;
    padding: 8px 10px;
}

.profile-avatars-grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 5px;
    width: 100%;
    box-sizing: border-box;
    padding: 2px;
}

.avatar-option-card {
    width: 100%;
    min-width: 0;
    height: 48px;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 3px 2px;
    transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
    position: relative;
}

.avatar-option-card:hover {
    transform: translateY(-1px) scale(1.04);
    border-color: var(--neon-cyan);
    z-index: 2;
}

.avatar-option-card.selected {
    border-color: var(--neon-green);
    box-shadow: 0 0 12px rgba(6, 214, 160, 0.75);
    transform: scale(1.04);
    z-index: 2;
}

.avatar-option-icon {
    font-size: 19px;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar-option-label {
    font-size: 7.5px;
    line-height: 1.1;
    font-weight: 700;
    color: #e8f0ff;
    margin-top: 2px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    max-width: 100%;
    padding: 0 2px;
    box-sizing: border-box;
}

/* Square Human Tongue (👅) Language Selector Button & Modal */
.lang-square-btn {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    border: 2px solid #ff2a85;
    background: linear-gradient(135deg, rgba(255, 42, 133, 0.22), rgba(14, 18, 42, 0.94));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    padding: 2px;
    box-shadow: 0 0 16px rgba(255, 42, 133, 0.35), inset 0 0 10px rgba(255, 255, 255, 0.12);
    transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.lang-square-btn.hud-lang-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
}

.lang-square-btn:hover {
    transform: translateY(-2px) scale(1.06);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 22px rgba(0, 242, 254, 0.65);
}

.lang-tongue-icon {
    font-size: 21px;
    line-height: 1;
    filter: drop-shadow(0 0 6px rgba(255, 42, 133, 0.6));
}

.lang-square-btn.hud-lang-btn .lang-tongue-icon {
    font-size: 17px;
}

.lang-code-badge {
    font-size: 9px;
    font-weight: 900;
    color: #ffd166;
    letter-spacing: 0.6px;
    line-height: 1;
    margin-top: 2px;
}

/* =========================================================================
   🌍 ULTRA-COMPACT LANGUAGE SELECTOR MODAL (VIEWPORT-FITTED PHONE LANDSCAPE)
   ========================================================================= */
.lang-modal-card {
    position: relative;
    background: linear-gradient(180deg, rgba(12, 17, 38, 0.98), rgba(7, 10, 24, 0.99));
    border: 2px solid rgba(255, 42, 133, 0.65);
    border-radius: 18px;
    padding: 14px 22px;
    max-width: 1100px;
    width: min(96vw, 1100px);
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.95), 0 0 30px rgba(255, 42, 133, 0.25);
    overflow: hidden;
    margin: 0 auto;
}

.lang-modal-header {
    text-align: center;
    flex-shrink: 0;
    margin-bottom: 8px;
    padding-right: 32px;
}

.lang-modal-header h2 {
    font-size: 17px;
    color: var(--neon-cyan);
    font-weight: 900;
    letter-spacing: 0.5px;
    margin: 0 0 2px 0;
}

.lang-modal-header p {
    font-size: 11.5px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.2;
}

.lang-options-wrapper {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding: 2px 4px 6px 4px;
}

.lang-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    width: 100%;
}

.lang-option-card {
    background: rgba(10, 14, 32, 0.92);
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    padding: 6px 10px;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
    box-sizing: border-box;
}

.lang-option-card:hover {
    transform: translateY(-1px);
    border-color: var(--neon-cyan);
    background: rgba(0, 242, 254, 0.1);
}

.lang-option-card.selected {
    border-color: var(--neon-green);
    background: linear-gradient(135deg, rgba(6, 214, 160, 0.22), rgba(0, 242, 254, 0.14));
    box-shadow: 0 0 16px rgba(6, 214, 160, 0.45);
}

.lang-option-card.lang-auto-card {
    padding: 6px 12px;
    border-color: rgba(0, 242, 254, 0.45);
    background: rgba(0, 242, 254, 0.08);
}

.lang-option-card.lang-auto-card.selected {
    border-color: var(--neon-green);
    background: linear-gradient(135deg, rgba(6, 214, 160, 0.25), rgba(0, 242, 254, 0.18));
}

.lang-option-square {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.lang-option-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 1px;
    min-width: 0;
    overflow: hidden;
}

.lang-option-native {
    font-size: 12.5px;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lang-option-sub {
    font-size: 10px;
    font-weight: 700;
    color: var(--neon-gold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lang-modal-footer {
    flex-shrink: 0;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
}

.lang-save-btn {
    width: 100%;
    max-width: 340px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

/* =========================================================================
   ⚙️ ULTRA-COMPACT 2-COLUMN SETTINGS MODAL (VIEWPORT-FITTED PHONE LANDSCAPE)
   ========================================================================= */
.settings-modal-card {
    position: relative;
    background: linear-gradient(180deg, rgba(12, 17, 38, 0.98), rgba(7, 10, 24, 0.99));
    border: 2px solid rgba(0, 242, 254, 0.55);
    border-radius: 18px;
    padding: 14px 22px;
    max-width: 1140px;
    width: min(96vw, 1140px);
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.95), 0 0 25px rgba(0, 242, 254, 0.22);
    overflow: hidden;
    margin: 0 auto;
}

.settings-modal-header {
    text-align: center;
    flex-shrink: 0;
    margin-bottom: 6px;
    padding-right: 32px;
}

.settings-modal-header h2 {
    font-size: 17px;
    color: var(--neon-cyan);
    font-weight: 900;
    letter-spacing: 0.5px;
    margin: 0 0 2px 0;
}

.settings-modal-header p {
    font-size: 11.5px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.25;
}

.settings-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    flex: 1 1 auto;
    padding: 2px 4px 6px 4px;
}

.settings-column {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.settings-group-title {
    font-size: 9.5px;
    font-weight: 900;
    letter-spacing: 0.8px;
    color: var(--neon-gold);
    text-transform: uppercase;
    padding: 2px 4px;
    margin-bottom: 2px;
    border-bottom: 1px solid rgba(255, 209, 102, 0.25);
    display: flex;
    align-items: center;
    gap: 5px;
}

.settings-row-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 11px;
    min-height: 33px;
    background: rgba(14, 20, 44, 0.85);
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    border-radius: 9px;
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    width: 100%;
}

.settings-row-btn:hover {
    transform: translateY(-1px);
    border-color: var(--neon-cyan);
    background: rgba(0, 242, 254, 0.12);
}

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

.settings-badge-status {
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 900;
    margin-left: 6px;
    flex-shrink: 0;
}

.settings-badge-status.status-on {
    color: #06d6a0;
    background: rgba(6, 214, 160, 0.15);
    border: 1px solid rgba(6, 214, 160, 0.4);
}

.settings-badge-status.status-off {
    color: #ff2a85;
    background: rgba(255, 42, 133, 0.15);
    border: 1px solid rgba(255, 42, 133, 0.4);
}

.settings-badge-status.status-fps {
    color: #00f2fe;
    background: rgba(0, 242, 254, 0.15);
    border: 1px solid rgba(0, 242, 254, 0.45);
}

.settings-badge-icon {
    font-size: 13px;
    margin-left: 6px;
    flex-shrink: 0;
    opacity: 0.85;
}

/* Row-specific accents */
.settings-row-btn.btn-cloud-row {
    border-color: rgba(16, 185, 129, 0.45);
    color: #a7f3d0;
}
.settings-row-btn.btn-gdpr-row {
    border-color: rgba(6, 214, 160, 0.4);
    color: #6ee7b7;
}
.settings-row-btn.btn-privacy-row {
    border-color: rgba(0, 242, 254, 0.4);
    color: #7dd3fc;
}
.settings-row-btn.btn-changelog-row {
    border-color: rgba(255, 209, 102, 0.55);
    color: #fde047;
    background: rgba(255, 209, 102, 0.08);
}
.settings-row-btn.btn-tutorial-row {
    border-color: rgba(0, 242, 254, 0.45);
    color: #38bdf8;
}
.settings-row-btn.btn-rate-row {
    border-color: rgba(255, 209, 102, 0.65);
    color: #fcd34d;
    background: rgba(255, 209, 102, 0.1);
}
.settings-row-btn.btn-feedback-row {
    border-color: rgba(16, 185, 129, 0.55);
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.08);
}
.settings-row-btn.btn-restart-row {
    border-color: rgba(255, 209, 102, 0.45);
    color: #ffd166;
}
.settings-row-btn.btn-reset-row {
    border-color: rgba(255, 42, 133, 0.6);
    color: #ff2a85;
    background: rgba(255, 42, 133, 0.07);
}

.settings-modal-footer {
    flex-shrink: 0;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.settings-channel-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(15, 23, 42, 0.9);
    border: 1.5px solid rgba(0, 242, 254, 0.45);
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.settings-channel-btn:hover,
.settings-channel-btn:active {
    border-color: var(--neon-cyan);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 242, 254, 0.3);
}

.settings-channel-badge {
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.5px;
    display: inline-block;
}

.badge-internal {
    background: rgba(16, 185, 129, 0.25);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.badge-alpha {
    background: rgba(59, 130, 246, 0.25);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.badge-production {
    background: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.6);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.settings-save-btn {
    width: 100%;
    max-width: 380px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

/* 😡 Round Angry Man (Trol Modu) Button & 15-Level Troll Modal */
.troll-round-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2.5px solid #ff2a85;
    background: radial-gradient(circle at 35% 30%, #ff5400, #9b0047 65%, #2b0018 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    padding: 0;
    box-shadow: 0 0 18px rgba(255, 42, 133, 0.65), inset 0 0 10px rgba(255, 209, 102, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.troll-round-btn.hud-troll-btn {
    width: 39px;
    height: 39px;
}

.troll-round-btn:hover {
    transform: translateY(-2px) scale(1.09) rotate(-6deg);
    border-color: #ffd166;
    box-shadow: 0 0 26px rgba(255, 84, 0, 0.95);
}

.troll-face-icon {
    font-size: 22px;
    line-height: 1;
    filter: drop-shadow(0 0 6px rgba(255, 0, 0, 0.7));
}

.troll-round-btn.hud-troll-btn .troll-face-icon {
    font-size: 17px;
}

.troll-badge-text {
    font-size: 7.5px;
    font-weight: 900;
    color: #ffd166;
    letter-spacing: 0.5px;
    line-height: 1;
    margin-top: 1px;
    text-shadow: 0 1px 2px #000;
}

.troll-modal-card {
    position: relative;
    background: linear-gradient(180deg, rgba(24, 9, 26, 0.98), rgba(10, 6, 18, 0.99));
    border: 2px solid #ff2a85;
    border-radius: 22px;
    padding: 18px 22px;
    max-width: 820px;
    width: 96%;
    max-height: 94vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 0 55px rgba(0, 0, 0, 0.95), 0 0 32px rgba(255, 42, 133, 0.35);
}

.troll-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding-right: 42px;
    text-align: left;
}

.troll-hero-circle {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 3px solid #ffd166;
    background: radial-gradient(circle at 35% 30%, #ff5400, #d90429 70%, #2b0018 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    flex-shrink: 0;
    box-shadow: 0 0 24px rgba(255, 84, 0, 0.75);
}

.troll-mode-pill {
    display: inline-block;
    font-size: 10px;
    font-weight: 900;
    color: #ffd166;
    background: rgba(255, 84, 0, 0.22);
    border: 1px solid rgba(255, 209, 102, 0.55);
    padding: 2px 9px;
    border-radius: 999px;
    letter-spacing: 0.7px;
    margin-bottom: 4px;
}

.troll-modal-header h2 {
    font-size: 20px;
    font-weight: 900;
    color: #ff2a85;
    margin-bottom: 4px;
}

.troll-modal-header p {
    font-size: 12px;
    color: #e8d7f5;
    line-height: 1.38;
}

.troll-map-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    background: rgba(8, 5, 14, 0.88);
    border: 1px solid rgba(255, 42, 133, 0.35);
    border-radius: 14px;
    padding: 10px;
    max-height: 215px;
    overflow-y: auto;
}

.troll-preview-box {
    width: 100%;
    background: rgba(22, 10, 28, 0.88);
    border: 1px solid rgba(255, 84, 0, 0.45);
    border-radius: 12px;
    padding: 10px 16px;
    text-align: center;
}

.troll-preview-box h3 {
    color: #ffffff;
    font-size: 15px;
}

.troll-preview-box p {
    color: #dcb8cb;
    font-size: 12px;
    margin-top: 4px;
}

@media (max-width: 740px) and (min-height: 601px) {
    .customize-container,
    .shop-container {
        width: calc(100vw - 12px);
        max-width: calc(100vw - 12px);
        padding: 10px 12px;
        gap: 8px;
    }
    .customize-container .shop-header,
    .shop-container .shop-header {
        flex-wrap: wrap;
        gap: 6px;
        align-items: center;
    }
    .customize-container .shop-header > div:first-child,
    .shop-container .shop-header > div:first-child {
        flex: 1 1 100%;
        min-width: 0;
    }
    .customize-container .shop-header h2,
    .shop-container .shop-header h2 {
        font-size: 14px;
        line-height: 1.25;
    }
    .customize-container .shop-header .shop-sub {
        display: none;
    }
    .customize-container .shop-header > div:last-child,
    .shop-container .shop-header > div:last-child {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 6px;
    }
    #btn-ad-chest-char,
    #btn-ad-chest-cust {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding: 6px 10px !important;
        font-size: 11px !important;
    }
    .customize-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        gap: 8px;
    }
    .preview-stage {
        flex-direction: row;
        padding: 8px 10px;
        gap: 10px;
        align-items: center;
        justify-content: flex-start;
    }
    #charPreviewCanvas,
    #customizePreviewCanvas {
        width: 96px !important;
        height: 96px !important;
        flex-shrink: 0;
    }
}

@media (max-width: 740px) {
    .world-map-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
        padding: 8px;
        max-height: 195px;
    }
    .map-container {
        padding: 12px 14px;
        gap: 8px;
    }
    .map-top-bar {
        gap: 6px;
    }
    .wallet-pill {
        padding: 5px 10px;
        font-size: 11.5px;
    }
    .customize-btn, .shop-btn {
        padding: 7px 12px;
        font-size: 11.5px;
    }
    .level-preview-card {
        padding: 9px 12px;
    }
    .modal-close-x.modal-close-inline {
        width: 34px;
        height: 34px;
        font-size: 17px;
    }
}

@media (max-width: 640px) {
    .settings-modal-body {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .lang-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .settings-modal-card,
    .lang-modal-card {
        padding: 10px 12px;
        width: 96%;
    }
}

/* Phone Landscape & Short Mobile Viewports (Ensures Map Screen Bottom Buttons & Studio Modals 100% Fit Without Nested Scroll Traps!) */
@media (max-height: 600px) {
    .overlay-screen {
        align-items: center;
        padding: 4px 8px;
    }
    .troll-modal-card,
    .modal-card {
        width: min(96vw, 1140px);
        max-width: 1140px;
        max-height: calc(100vh - 10px);
        max-height: calc(100dvh - 10px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        padding: 10px 16px;
        gap: 6px;
        margin: 0 auto;
    }
    .customize-container,
    .shop-container {
        width: min(96vw, 1140px);
        max-width: 1140px;
        height: calc(100vh - 8px);
        height: calc(100dvh - 8px);
        max-height: calc(100vh - 8px);
        max-height: calc(100dvh - 8px);
        overflow: hidden;
        padding: 8px 12px;
        gap: 6px;
        margin: 0 auto;
    }
    .customize-container .shop-header,
    .shop-container .shop-header {
        flex-wrap: nowrap;
        gap: 8px;
        align-items: center;
    }
    .customize-container .shop-header > div:first-child,
    .shop-container .shop-header > div:first-child {
        min-width: 0;
        flex: 1 1 auto;
    }
    .shop-header h2 {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .modal-close-x.modal-close-inline {
        width: 32px;
        height: 32px;
        font-size: 16px;
        border-radius: 8px;
    }
    #btn-ad-chest-char,
    #btn-ad-chest-cust {
        padding: 5px 10px !important;
        font-size: 11px !important;
        white-space: nowrap;
    }
    .shop-sub {
        display: none;
    }
    .customize-body {
        grid-template-columns: 192px 1fr;
        gap: 10px;
    }
    .preview-stage {
        padding: 8px;
        gap: 4px;
        justify-content: center;
        overflow: hidden;
    }
    #charPreviewCanvas,
    #customizePreviewCanvas {
        width: 136px !important;
        height: 132px !important;
    }
    .preview-equipped-summary {
        font-size: 10px;
        padding: 4px 6px;
    }
    #char-preview-perk-badge,
    #cust-preview-perk-badge {
        font-size: 9.5px !important;
        padding: 3px 6px !important;
    }
    .cust-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 6px;
        padding-bottom: 2px;
        flex-shrink: 0;
    }
    .cust-tab {
        flex: 0 0 auto;
        min-width: auto;
        padding: 6px 10px;
        font-size: 11px;
        white-space: nowrap;
    }
    .shop-footer .primary-btn {
        padding: 8px 16px;
        font-size: 12.5px;
    }
    .lang-modal-card,
    .settings-modal-card {
        width: min(96vw, 1140px);
        max-width: 1140px;
        max-height: calc(100vh - 8px);
        max-height: calc(100dvh - 8px);
        overflow: hidden;
        padding: 10px 16px;
        margin: 0 auto;
    }
    .settings-modal-header {
        margin-bottom: 4px;
    }
    .settings-modal-header h2 {
        font-size: 15.5px;
    }
    .settings-modal-header p {
        font-size: 10.5px;
        display: none;
    }
    .settings-row-btn {
        padding: 5px 9px;
        min-height: 30px;
        font-size: 11px;
    }
    .settings-group-title {
        font-size: 8.5px;
        margin-bottom: 1px;
        padding: 1px 3px;
    }
    .settings-save-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
    .lang-modal-header {
        margin-bottom: 4px;
    }
    .lang-modal-header h2 {
        font-size: 15.5px;
    }
    .lang-modal-header p {
        font-size: 10.5px;
        display: none;
    }
    .lang-option-card {
        padding: 4px 8px;
        min-height: 32px;
        gap: 6px;
    }
    .lang-option-square {
        width: 24px;
        height: 24px;
        font-size: 13px;
    }
    .lang-option-native {
        font-size: 11px;
    }
    .lang-option-sub {
        font-size: 9px;
    }
    .lang-save-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
    /* Map Container: Strict viewport-fitted layout so BÖLÜME BAŞLA & bottom buttons are ALWAYS 100% visible! */
    .map-container {
        width: 96%;
        max-width: 1180px;
        height: calc(100vh - 8px);
        height: calc(100dvh - 8px);
        max-height: calc(100vh - 8px);
        max-height: calc(100dvh - 8px);
        overflow: hidden;
        padding: 7px 14px;
        gap: 5px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .map-top-bar {
        gap: 4px;
        flex-shrink: 0;
    }
    .currencies-group, .top-buttons-group {
        gap: 4px;
    }
    .wallet-pill {
        padding: 3px 8px;
        font-size: 10.5px;
    }
    .wallet-pill strong {
        font-size: 11.5px;
    }
    .profile-square-btn {
        padding: 2px 7px 2px 3px;
        gap: 5px;
    }
    .profile-frame-box {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    .profile-btn-tag {
        font-size: 8px;
    }
    .profile-btn-name {
        font-size: 10.5px;
    }
    .title-header h1 {
        font-size: 16px;
        line-height: 1.05;
    }
    .badge-tag {
        font-size: 7.5px;
        padding: 1px 6px;
        margin-bottom: 1px;
    }
    .customize-btn, .shop-btn {
        padding: 5px 10px;
        font-size: 10.5px;
    }
    .troll-round-btn, .lang-square-btn {
        width: 36px;
        height: 36px;
    }
    .troll-face-icon, .lang-tongue-icon {
        font-size: 16px;
    }
    #btn-map-settings {
        width: 36px !important;
        height: 36px !important;
        font-size: 17px !important;
    }
    .world-tabs-bar {
        padding: 3px 2px;
        gap: 6px;
        flex-shrink: 0;
    }
    .world-tab-btn {
        padding: 5px 12px;
        font-size: 11.5px;
    }
    .world-map-grid {
        flex: 1 1 auto;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        min-height: 62px;
        max-height: none;
        padding: 4px 8px;
        gap: 5px;
        overflow-y: auto;
    }
    .map-node {
        padding: 4px 4px;
        gap: 2px;
    }
    .node-circle {
        width: 26px;
        height: 26px;
        font-size: 11.5px;
    }
    .node-label {
        font-size: 10.5px;
        font-weight: 800;
    }
    .node-stars {
        font-size: 10px;
    }
    /* Docked Bottom Bar: Full-Width Level Title & Difficulty Banner ON TOP of Action Buttons! */
    .map-bottom-dock {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        gap: 5px;
        background: rgba(8, 11, 26, 0.96);
        border: 1.5px solid rgba(0, 242, 254, 0.45);
        border-radius: 12px;
        padding: 6px 12px;
        flex-shrink: 0;
    }
    .level-preview-card {
        flex: none;
        width: 100%;
        min-width: 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        background: linear-gradient(90deg, rgba(16, 24, 56, 0.92), rgba(28, 18, 60, 0.88));
        border: 1px solid rgba(0, 242, 254, 0.35);
        border-radius: 9px;
        padding: 5px 12px;
        text-align: left;
    }
    .preview-header {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    .world-tag {
        font-size: 10px;
        padding: 2px 8px;
        flex-shrink: 0;
    }
    .level-preview-card h3 {
        font-size: 13.5px;
        font-weight: 900;
        color: #ffffff;
        white-space: nowrap;
    }
    .level-preview-card p {
        flex: 1 1 auto;
        font-size: 11.5px;
        color: #ffd166;
        font-weight: 600;
        margin-bottom: 0;
        text-align: right;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .mechanics-list,
    .controls-hint {
        display: none;
    }
    .map-actions {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        gap: 8px;
        padding-bottom: 0;
        flex-wrap: nowrap;
    }
    #btn-play-level {
        padding: 8px 20px;
        font-size: 13.5px;
        font-weight: 900;
        white-space: nowrap;
    }
    #btn-character-main,
    #btn-customize-main,
    #btn-open-shop {
        padding: 7px 12px;
        font-size: 11.5px;
        white-space: nowrap;
    }

    /* Spacious Profile Modal on Phone Landscape (Since 30 Avatars are now in a Dedicated Popup) */
    .profile-modal-card {
        max-height: calc(100vh - 10px);
        max-height: calc(100dvh - 10px);
        padding: 12px 16px;
        gap: 8px;
    }
    .profile-compact-top-row {
        gap: 10px;
        padding-right: 40px;
    }
    .profile-hero-square {
        width: 48px;
        height: 48px;
        font-size: 24px;
        border-radius: 10px;
    }
    .profile-avatar-title-badge {
        font-size: 11px;
        padding: 2px 8px;
    }
    .profile-name-label {
        font-size: 10px;
    }
    .profile-name-input {
        padding: 6px 12px;
        font-size: 13.5px;
    }
    .profile-save-top-btn {
        padding: 8px 14px !important;
        font-size: 12px !important;
    }
    .profile-attributes-box,
    .profile-picker-box {
        padding: 8px 12px;
        border-radius: 10px;
    }
    .profile-section-title {
        font-size: 11px;
        margin-bottom: 5px;
    }
    .profile-stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }
    .profile-stat-item {
        padding: 6px 8px;
        gap: 2px;
    }
    .profile-stat-item span {
        font-size: 9.5px;
    }
    .profile-stat-item strong {
        font-size: 11.5px;
    }
    .profile-avatars-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 6px;
    }
    .avatar-option-card {
        height: 46px;
        padding: 3px 2px;
        border-radius: 8px;
    }
    .avatar-option-icon {
        font-size: 19px;
        width: 22px;
        height: 22px;
    }
    .avatar-option-label {
        font-size: 8.5px;
        margin-top: 2px;
    }

    #screen-modal {
        align-items: center;
    }
    #screen-modal .modal-card {
        max-width: 520px;
        padding: 12px 18px;
    }
    #screen-modal .modal-card h2 {
        font-size: 19px;
        margin-bottom: 3px;
    }
    #screen-modal .modal-card p {
        font-size: 12px;
        margin-bottom: 8px;
    }
    #screen-modal .modal-stats {
        padding: 7px 10px;
        margin-bottom: 10px;
        font-size: 12px;
    }
    #screen-modal .modal-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    #screen-modal .modal-buttons button {
        padding: 8px 10px;
        font-size: 12px;
        min-height: 38px;
        line-height: 1.2;
    }
}

/* Tablet Touch Controls Enlargement (Phones stay 72px/78px; Tablets get larger 98px/108px buttons) */
@media (min-width: 768px) and (min-height: 561px) {
    #touch-controls {
        bottom: 28px;
        left: 34px;
        right: 34px;
    }
    .dpad-group, .action-group {
        gap: 22px;
    }
    .touch-btn {
        width: 98px;
        height: 98px;
        font-size: 38px;
        border-width: 3px;
    }
    .btn-jump {
        width: 108px;
        height: 108px;
        font-size: 42px;
    }
}

/* =========================================================================
   🏆 HYBRID LEADERBOARD & GOOGLE PLAY GAMES RANKINGS MODAL STYLES
   ========================================================================= */
.lb-category-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 10px;
}

.lb-cat-tab {
    background: rgba(15, 23, 42, 0.85);
    border: 1.5px solid rgba(148, 163, 184, 0.3);
    color: #cbd5e1;
    padding: 8px 6px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-cat-tab:hover {
    border-color: #ffd166;
    color: #ffffff;
}

.lb-cat-tab.active {
    background: linear-gradient(135deg, rgba(255, 209, 102, 0.24), rgba(245, 158, 11, 0.34));
    border-color: #ffd166;
    color: #ffd166;
    box-shadow: 0 0 14px rgba(255, 209, 102, 0.3);
}

.lb-scope-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.lb-scope-pill {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #94a3b8;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.lb-scope-pill.active {
    background: rgba(0, 242, 254, 0.18);
    border-color: #00f2fe;
    color: #00f2fe;
}

.lb-podium-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.lb-podium-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 27, 75, 0.85));
    border: 1.5px solid rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.lb-podium-card.rank-1 {
    border-color: #ffd166;
    background: linear-gradient(145deg, rgba(66, 32, 6, 0.82), rgba(15, 23, 42, 0.95));
    box-shadow: 0 0 18px rgba(255, 209, 102, 0.24);
}

.lb-podium-card.rank-2 {
    border-color: #cbd5e1;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
}

.lb-podium-card.rank-3 {
    border-color: #f59e0b;
    background: linear-gradient(145deg, rgba(69, 26, 3, 0.72), rgba(15, 23, 42, 0.95));
}

.lb-table-wrapper {
    max-height: 195px;
    overflow-y: auto;
    background: rgba(8, 11, 24, 0.88);
    border: 1px solid rgba(0, 242, 254, 0.22);
    border-radius: 12px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
}

.lb-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-radius: 9px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 12.5px;
}

.lb-row.is-me {
    background: linear-gradient(90deg, rgba(0, 242, 254, 0.2), rgba(6, 214, 160, 0.18));
    border: 1.5px solid #00f2fe;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.22);
}

.lb-rank-badge {
    min-width: 34px;
    height: 26px;
    border-radius: 7px;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
    font-weight: 900;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-rank-badge.player-rank {
    background: linear-gradient(135deg, #ffd166, #f59e0b);
    color: #0f172a;
    border-color: #fef08a;
}

.lb-avatar-box {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(0, 242, 254, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.lb-player-footer {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(8, 47, 73, 0.88));
    border: 1.5px solid #00f2fe;
    border-radius: 12px;
    padding: 9px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 680px) {
    .lb-category-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .lb-podium-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-height: 560px) {
    .lb-table-wrapper {
        max-height: 125px;
    }
    .lb-podium-card {
        padding: 5px 8px;
    }
}

/* =========================================================================
   🚀 ASPECT-RATIO-SAFE STARTUP SPLASH SCREEN & GUIDING PLAY BUTTON PULSE
   ========================================================================= */
.splash-intro-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    max-width: 520px;
    width: 92%;
    padding: 20px 24px;
    border-radius: 24px;
    background: rgba(10, 14, 34, 0.88);
    border: 2px solid rgba(0, 242, 254, 0.45);
    box-shadow: 0 0 60px rgba(0, 242, 254, 0.25), inset 0 0 30px rgba(181, 55, 242, 0.15);
}

.splash-emblem-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 2px;
}

.splash-emblem-img {
    width: 108px;
    height: 108px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 22px;
    border: 2.5px solid #ffd166;
    box-shadow: 0 0 28px rgba(255, 209, 102, 0.5);
    flex-shrink: 0;
}

.splash-hero-canvas {
    width: 150px;
    height: 116px;
    aspect-ratio: 150 / 116;
    object-fit: contain;
    border-radius: 16px;
    background: radial-gradient(circle at center, rgba(0, 242, 254, 0.16), rgba(6, 8, 22, 0.9));
    border: 1.5px solid rgba(6, 214, 160, 0.45);
    flex-shrink: 0;
}

.splash-badge-pill {
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: 1.2px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(6, 214, 160, 0.18);
    border: 1px solid #06d6a0;
    color: #06d6a0;
}

.splash-main-title {
    font-size: clamp(24px, 4vw, 34px);
    font-weight: 900;
    letter-spacing: 2.5px;
    background: linear-gradient(90deg, #00f2fe, #ffd166, #ff2a85);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.splash-sub-text {
    font-size: 12.5px;
    color: #cbd5e1;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.splash-progress-track {
    width: 100%;
    max-width: 340px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.4);
    overflow: hidden;
}

.splash-progress-fill {
    width: 15%;
    height: 100%;
    background: linear-gradient(90deg, #06d6a0, #00f2fe, #ffd166);
    box-shadow: 0 0 14px #00f2fe;
    transition: width 0.25s ease;
}

.splash-status-label {
    font-size: 11.5px;
    font-weight: 800;
    color: #ffd166;
}

@media (max-height: 500px) {
    .splash-intro-card {
        padding: 12px 18px;
        gap: 5px;
    }
    .splash-emblem-img {
        width: 82px;
        height: 82px;
    }
    .splash-hero-canvas {
        width: 120px;
        height: 92px;
    }
}

@keyframes guidingPlayPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 18px rgba(0, 242, 254, 0.65), 0 0 0 0 rgba(255, 209, 102, 0.75);
        border-color: #ffd166;
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 0 32px rgba(6, 214, 160, 0.95), 0 0 0 7px rgba(255, 209, 102, 0);
        border-color: #06d6a0;
    }
}

.play-btn-guiding {
    border: 2.5px solid #ffd166 !important;
    background: linear-gradient(90deg, #06d6a0, #00b4d8, #b537f2) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
    animation: guidingPlayPulse 1.25s infinite ease-in-out;
}

.char-status-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.4px;
}

.char-status-badge.badge-equipped {
    background: rgba(255, 209, 102, 0.22);
    border: 1px solid #ffd166;
    color: #ffd166;
}

.char-status-badge.badge-owned {
    background: rgba(6, 214, 160, 0.2);
    border: 1px solid #06d6a0;
    color: #06d6a0;
}

.char-status-badge.badge-locked {
    background: rgba(255, 42, 133, 0.16);
    border: 1px solid rgba(255, 42, 133, 0.55);
    color: #ff85a1;
}

.item-perk-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 3px 8px;
    border-radius: 7px;
    background: rgba(0, 242, 254, 0.13);
    border: 1px solid rgba(0, 242, 254, 0.4);
    color: #00f2fe;
    font-size: 10.5px;
    font-weight: 800;
}


/* ============================================================================
   VIP PASS & LIFETIME REMOVE ADS STORE (RESPECTFUL CYBERPUNK UI)
   ============================================================================ */
.vip-top-pill-btn {
    background: linear-gradient(135deg, rgba(255, 209, 102, 0.18), rgba(245, 158, 11, 0.14));
    border: 1.5px solid rgba(255, 209, 102, 0.65);
    color: #ffd166;
    font-weight: 800;
    font-size: 12px;
    padding: 7px 12px;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.vip-top-pill-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 14px rgba(255, 209, 102, 0.35);
    background: linear-gradient(135deg, rgba(255, 209, 102, 0.28), rgba(245, 158, 11, 0.22));
}

.vip-top-pill-btn.vip-state-vip {
    background: linear-gradient(135deg, #ffd166, #f59e0b);
    color: #070812;
    border-color: #fef08a;
}

.vip-top-pill-btn.vip-state-lifetime {
    background: linear-gradient(135deg, rgba(6, 214, 160, 0.24), rgba(0, 242, 254, 0.18));
    border-color: #06d6a0;
    color: #6ee7b7;
}

.btn-vip-row {
    border-color: rgba(255, 209, 102, 0.5) !important;
    color: #ffd166 !important;
    background: rgba(255, 209, 102, 0.08) !important;
}

.btn-vip-row:hover {
    background: rgba(255, 209, 102, 0.16) !important;
}

.vip-shop-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 209, 102, 0.12), rgba(0, 242, 254, 0.08));
    border: 1px solid rgba(255, 209, 102, 0.4);
}

.vip-shop-banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
    min-width: 0;
}

.vip-shop-banner-text strong {
    color: #ffd166;
    font-size: 13px;
}

.vip-shop-banner-text span {
    color: #cbd5e1;
    font-size: 11.5px;
    line-height: 1.35;
}

.vip-shop-banner-btn {
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 9px;
    border: 1px solid #ffd166;
    background: rgba(255, 209, 102, 0.18);
    color: #ffd166;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.18s ease;
}

.vip-shop-banner-btn:hover {
    background: rgba(255, 209, 102, 0.3);
}

.vip-soft-link-btn {
    margin-top: 2px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 209, 102, 0.35);
    background: rgba(255, 209, 102, 0.07);
    color: #fde68a;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    align-self: center;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.vip-soft-link-btn:hover {
    background: rgba(255, 209, 102, 0.15);
    border-color: rgba(255, 209, 102, 0.7);
}

.vip-modal-card {
    position: relative;
    width: 95%;
    max-width: 940px;
    max-height: 92vh;
    overflow-y: auto;
    margin: auto;
    padding: 18px 22px 16px;
    border-radius: 18px;
    background: linear-gradient(165deg, rgba(12, 16, 38, 0.98) 0%, rgba(7, 8, 18, 0.99) 100%);
    border: 1.5px solid rgba(255, 209, 102, 0.55);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.72), 0 0 34px rgba(0, 242, 254, 0.14);
    text-align: left;
}

.vip-modal-header {
    padding-right: 44px;
    margin-bottom: 10px;
}

.vip-modal-header h2 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 900;
    color: #ffd166;
    letter-spacing: 0.4px;
}

.vip-modal-sub {
    margin: 0;
    font-size: 12.5px;
    color: #cbd5e1;
    line-height: 1.45;
}

.vip-active-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 13px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(6, 214, 160, 0.16), rgba(0, 242, 254, 0.1));
    border: 1px solid rgba(6, 214, 160, 0.55);
    color: #a7f3d0;
    font-size: 12.5px;
    font-weight: 700;
}

.vip-perks-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 12px;
}

.vip-perk-chip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 11px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(0, 242, 254, 0.24);
}

.vip-perk-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}

.vip-perk-chip strong {
    display: block;
    color: #00f2fe;
    font-size: 12px;
    margin-bottom: 2px;
}

.vip-perk-chip span {
    display: block;
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.35;
}

.vip-plans-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 11px;
}

.vip-plan-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.88);
    border: 1.5px solid rgba(148, 163, 184, 0.28);
    transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.vip-plan-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 242, 254, 0.65);
}

.vip-plan-card.plan-yearly {
    background: linear-gradient(165deg, rgba(30, 27, 75, 0.92), rgba(15, 23, 42, 0.95));
    border-color: rgba(255, 209, 102, 0.85);
    box-shadow: 0 0 22px rgba(255, 209, 102, 0.16);
}

.vip-plan-card.plan-lifetime {
    background: linear-gradient(165deg, rgba(6, 55, 50, 0.72), rgba(15, 23, 42, 0.95));
    border-color: rgba(6, 214, 160, 0.75);
}

.vip-plan-card.plan-owned {
    border-color: #06d6a0;
    box-shadow: 0 0 18px rgba(6, 214, 160, 0.22);
}

.vip-plan-tag {
    display: inline-block;
    align-self: flex-start;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 9.5px;
    font-weight: 900;
    letter-spacing: 0.4px;
    margin-bottom: 7px;
    background: rgba(0, 242, 254, 0.15);
    color: #67e8f9;
    border: 1px solid rgba(0, 242, 254, 0.35);
}

.plan-yearly .vip-plan-tag {
    background: rgba(255, 209, 102, 0.2);
    color: #ffd166;
    border-color: rgba(255, 209, 102, 0.65);
}

.plan-lifetime .vip-plan-tag {
    background: rgba(6, 214, 160, 0.2);
    color: #6ee7b7;
    border-color: rgba(6, 214, 160, 0.6);
}

.vip-plan-title {
    margin: 0 0 6px 0;
    font-size: 14.5px;
    font-weight: 900;
    color: #f8fafc;
}

.vip-plan-price-row {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 7px;
}

.vip-plan-price {
    font-size: 20px;
    font-weight: 900;
    color: #ffd166;
}

.plan-lifetime .vip-plan-price {
    color: #06d6a0;
}

.vip-plan-period {
    font-size: 11.5px;
    color: #94a3b8;
    font-weight: 700;
}

.vip-plan-desc {
    margin: 0 0 11px 0;
    font-size: 11.5px;
    color: #cbd5e1;
    line-height: 1.42;
    flex: 1;
}

.vip-plan-cta {
    width: 100%;
    padding: 9px 10px;
    border-radius: 10px;
    border: none;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    background: linear-gradient(135deg, #00f2fe, #38bdf8);
    color: #041418;
    transition: opacity 0.16s ease, transform 0.15s ease;
}

.plan-yearly .vip-plan-cta {
    background: linear-gradient(135deg, #ffd166, #f59e0b);
    color: #070812;
}

.plan-lifetime .vip-plan-cta {
    background: linear-gradient(135deg, #06d6a0, #10b981);
    color: #041418;
}

.vip-plan-cta:hover:not(:disabled) {
    transform: translateY(-1px);
}

.vip-plan-cta:disabled {
    opacity: 0.72;
    cursor: default;
}

.vip-legal-note {
    margin: 0 0 10px 0;
    padding: 8px 11px;
    border-radius: 9px;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    font-size: 10.5px;
    line-height: 1.42;
}

.vip-footer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.vip-footer-btn {
    padding: 7px 12px;
    border-radius: 9px;
    border: 1px solid rgba(0, 242, 254, 0.38);
    background: rgba(0, 242, 254, 0.08);
    color: #67e8f9;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
}

.vip-footer-link {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    padding: 5px 6px;
}

.vip-footer-link:hover {
    color: #e2e8f0;
}

@media (max-width: 780px) {
    .vip-perks-row {
        grid-template-columns: 1fr;
    }
    .vip-plans-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 460px) {
    .vip-plans-grid {
        grid-template-columns: 1fr;
    }
    .vip-shop-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* VIP 3-Tier Exclusive Heroes, Early Access & Prestige Workshop Styling */
.shop-card.vip-exclusive-card {
    background: linear-gradient(155deg, rgba(46, 16, 101, 0.92) 0%, rgba(17, 24, 39, 0.96) 100%);
    border-color: rgba(255, 209, 102, 0.65);
    box-shadow: 0 0 18px rgba(255, 209, 102, 0.16);
}
.shop-card.vip-exclusive-card.vip-ready {
    border-color: #ffd166;
    box-shadow: 0 0 22px rgba(255, 209, 102, 0.34);
}
.shop-card.vip-exclusive-card.vip-locked {
    border-color: rgba(168, 85, 247, 0.72);
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.22);
}
.char-status-badge.vip-exclusive {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.28), rgba(255, 209, 102, 0.22));
    color: #ffd166;
    border: 1px solid rgba(255, 209, 102, 0.55);
}
.char-status-badge.vip-included {
    background: rgba(6, 214, 160, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(6, 214, 160, 0.5);
}
.vip-early-hint {
    margin: 6px 0 4px;
    padding: 4px 8px;
    border-radius: 7px;
    background: rgba(147, 51, 234, 0.2);
    border: 1px dashed rgba(255, 209, 102, 0.5);
    color: #fde68a;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.12s ease;
}
.vip-early-hint:hover {
    background: rgba(147, 51, 234, 0.36);
    transform: translateY(-1px);
}
.shop-buy-btn.vip-unlock-btn {
    background: linear-gradient(135deg, #ffd166 0%, #f59e0b 52%, #a855f7 100%);
    color: #090d16;
    font-weight: 900;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.shop-buy-btn.vip-unlock-btn:hover {
    filter: brightness(1.08);
}

.shop-footer {
    flex-shrink: 0;
}

.cust-tab.vip-filter-tab {
    border-color: rgba(255, 209, 102, 0.55);
    color: #fde68a;
    background: linear-gradient(135deg, rgba(46, 16, 101, 0.72), rgba(15, 23, 42, 0.9));
}
.cust-tab.vip-filter-tab.active {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.48), rgba(245, 158, 11, 0.42));
    border-color: #ffd166;
    color: #fff;
    box-shadow: 0 0 16px rgba(255, 209, 102, 0.35);
}

.scroll-more-hint {
    position: absolute;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%);
    z-index: 4;
    padding: 5px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(46, 16, 101, 0.95));
    border: 1px solid rgba(255, 209, 102, 0.7);
    color: #fde68a;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.72);
    animation: scrollHintBob 1.7s ease-in-out infinite;
}
@keyframes scrollHintBob {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-3px); }
}

.vip-action-cta {
    background: linear-gradient(135deg, #b45309 0%, #d97706 45%, #9333ea 100%) !important;
    border: 1.5px solid #ffd166 !important;
    color: #fff !important;
    font-weight: 800 !important;
    box-shadow: 0 0 20px rgba(255, 209, 102, 0.4) !important;
}

.vip-action-cta:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.upgrade-tiers-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 6px 0 8px;
}

.tier-row-lv1,
.tier-row-lv2 {
    font-size: 11px;
    line-height: 1.3;
    font-weight: 700;
    padding: 5px 8px;
    border-radius: 8px;
    text-align: left;
}

.tier-row-lv1 {
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.28);
    color: #bae6fd;
}

.tier-row-lv2 {
    border: 1px solid rgba(255, 209, 102, 0.55);
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.16), rgba(245, 158, 11, 0.14));
    color: #fde68a;
    transition: border-color 0.16s ease, filter 0.16s ease;
}

.tier-row-lv2.locked {
    cursor: pointer;
}

.tier-row-lv2.locked:hover {
    border-color: #ffd166;
    filter: brightness(1.1);
}

.tier-row-lv2.active {
    background: linear-gradient(135deg, rgba(6, 214, 160, 0.18), rgba(255, 209, 102, 0.18));
    border-color: #ffd166;
    color: #fef08a;
    box-shadow: 0 0 12px rgba(255, 209, 102, 0.22);
}

@media (max-height: 600px) {
    .hud-portal-quota {
        padding: 2px 8px;
        font-size: 10px;
    }
}
