/* ==========================================================================
   CANVASCLASH - 3-COLUMN GLASSMORPHIC ARCHITECTURE
   ========================================================================== */

:root {
    --bg-dark: #070b14;
    --bg-surface: rgba(15, 23, 42, 0.85);
    --bg-card: rgba(15, 23, 42, 0.88);
    --bg-glass: rgba(255, 255, 255, 0.04);
    --border-glass: rgba(255, 255, 255, 0.1);
    
    --primary: #6366f1;
    --accent-cyan: #00d2ff;
    --accent-pink: #ec4899;
    --accent-amber: #f59e0b;
    --accent-emerald: #10b981;

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

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: radial-gradient(circle at 50% 10%, #1e1b4b 0%, #070b14 60%, #03060a 100%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
.game-header {
    width: 100%;
    padding: 0.85rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(10, 14, 26, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-glass);
    z-index: 100;
    gap: 1rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #fff;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

.header-logo-img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 8px;
    filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.65));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.brand-logo:hover .header-logo-img {
    transform: scale(1.12) rotate(-3deg);
    filter: drop-shadow(0 0 16px rgba(236, 72, 153, 0.85));
}

.footer-logo-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
    filter: drop-shadow(0 0 8px rgba(0, 210, 255, 0.5));
}

.brand-logo .logo-icon {
    font-size: 1.6rem;
    filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.6));
}

.brand-logo .clash-text {
    background: linear-gradient(135deg, #00d2ff, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-center-auth {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 650px;
}

.btn-chip-auth {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: var(--radius-full);
    padding: 0.4rem 1.1rem;
    color: #cbd5e1;
    font-size: 0.82rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.btn-chip-auth:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: var(--accent-cyan);
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
}

.user-hero-chip {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-full);
    padding: 0.4rem 1.1rem;
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-score-badge {
    background: rgba(0, 210, 255, 0.2);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-weight: 700;
    font-size: 0.76rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
}

.btn-nav {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: #fff;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.btn-nav:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.3);
}

.btn-smurf-hub {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(0, 210, 255, 0.3));
    border-color: rgba(0, 210, 255, 0.4);
    font-weight: 700;
}

.btn-auth-pill {
    background: linear-gradient(135deg, #6366f1, #00d2ff);
    color: #fff;
    border: none;
    font-weight: 700;
}

/* Page Layout with 100% Wide Center & Left/Right AdSense Gutters */
.clash-page-layout {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
    flex: 1;
}

.adsense-skyscraper-col {
    width: 160px;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: sticky;
    top: 80px;
    z-index: 10;
}

.skyscraper-inner {
    width: 160px;
    min-height: 600px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    border: 1px dashed rgba(99, 102, 241, 0.35);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.ad-meta-badge {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.ad-placeholder-skyscraper {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: var(--text-dim);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.25);
    padding: 1rem 0.5rem;
}

.ad-ph-icon {
    font-size: 1.6rem;
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 8px rgba(0, 210, 255, 0.5));
}

.ad-ph-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

.ad-ph-sub {
    font-size: 0.7rem;
    color: var(--text-dim);
}

@media (max-width: 1360px) {
    .adsense-skyscraper-col {
        display: none;
    }
    .clash-page-layout {
        padding: 1rem 0.75rem;
    }
}

/* Main Layout (100% Wide) */
.main-wrapper {
    flex: 1;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}

/* 3-Column Grid (100% Spanning) */
.setup-grid-3col {
    display: grid;
    grid-template-columns: 1.65fr 1.15fr 1.2fr;
    gap: 1.25rem;
    width: 100%;
    align-items: stretch;
}

@media (max-width: 1100px) {
    .setup-grid-3col {
        grid-template-columns: 1fr 1fr;
    }
    .leaderboard-col-card {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .setup-grid-3col {
        grid-template-columns: 1fr;
    }
    .leaderboard-col-card {
        grid-column: span 1;
    }
    .header-center-auth {
        display: none;
    }
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* COLUMN 1: Tree Gallery */
.gallery-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.75rem;
}

.gallery-search-input {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    padding: 0.35rem 0.9rem;
    color: #fff;
    font-size: 0.82rem;
    outline: none;
    width: 170px;
    transition: all 0.2s ease;
}

.gallery-search-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
    width: 200px;
}

.gallery-col-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.tree-gallery-container {
    display: grid;
    grid-template-columns: 195px 1fr;
    gap: 1.1rem;
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
}

@media (max-width: 600px) {
    .tree-gallery-container {
        grid-template-columns: 1fr;
    }
}

.gallery-tree-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding-right: 0.75rem;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.2);
}

.tree-section-header {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.5rem;
}

.tree-node {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.tree-node:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.tree-node.active {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.5);
    color: #fff;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.tree-label {
    flex: 1;
    margin: 0 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tree-count-badge {
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.1rem 0.35rem;
    border-radius: var(--radius-full);
    color: var(--text-dim);
}

.gallery-grid-area {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
}

.gallery-active-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.active-category-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
}

.active-category-badge {
    font-size: 0.72rem;
    color: var(--accent-cyan);
    background: rgba(0, 210, 255, 0.12);
    border: 1px solid rgba(0, 210, 255, 0.25);
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-full);
}

/* Gallery Pictures Area & Non-Overlapping Grid */
.gallery-grid-area .preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding: 0.25rem 0.5rem 2.5rem 0.25rem;
    width: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.2);
}

.gallery-grid-area .preset-grid::-webkit-scrollbar {
    width: 6px;
}

.gallery-grid-area .preset-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.gallery-grid-area .preset-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.gallery-grid-area .preset-grid::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

.preset-card {
    position: relative;
    height: 110px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    background: #0f172a;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.preset-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.preset-card:hover img {
    transform: scale(1.08);
}

.preset-card.selected,
.preset-card.active {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.6);
}

.preset-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.2) 55%, transparent 85%);
    padding: 0.45rem 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
    box-sizing: border-box;
}

.preset-title {
    font-size: 0.74rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
}

.preset-tag {
    font-size: 0.64rem;
    color: var(--accent-cyan);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
}

@media (max-width: 1100px) {
    .gallery-grid-area .preset-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 650px) {
    .gallery-grid-area .preset-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* COLUMN 2: Battle Setup */
.setup-col-card {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.preview-box {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    background: #000;
}

.preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preview-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.6rem 0.8rem;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.preview-title-badge {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}

.preview-aspect-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-cyan);
    background: rgba(0, 210, 255, 0.2);
    border: 1px solid var(--accent-cyan);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
}

.stage-select-box {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.stage-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stage-label {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-muted);
}

.stage-dropdown {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 0.86rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.stage-dropdown:focus {
    border-color: var(--accent-cyan);
}

.setup-best-record-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.setup-best-record-badge strong {
    color: #f59e0b;
}

/* Picture Statistics in Battle Setup */
.pic-stats-container {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-md);
    padding: 0.85rem;
}

.pic-stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pic-stats-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
}

.pic-stats-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.pic-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pic-stat-card.full-width {
    grid-column: span 2;
}

.pic-stat-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.pic-stat-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    flex: 1;
}

.pic-stat-row {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.pic-stat-val {
    font-size: 0.92rem;
    font-weight: 800;
    color: #fff;
    font-family: monospace;
}

.pic-stat-champ {
    font-size: 0.72rem;
    color: var(--accent-cyan);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pic-stat-lbl {
    font-size: 0.68rem;
    color: var(--text-dim);
    font-weight: 600;
    text-transform: uppercase;
}

.pic-diff-records-section {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 0.5rem;
}

.pic-diff-records-lbl {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
}

.pic-diff-badges-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.35rem;
}

.diff-badge-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    transition: all 0.2s ease;
}

.diff-badge-item.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.diff-badge-lvl {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--accent-cyan);
}

.diff-badge-score {
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    font-family: monospace;
}

.preset-plays-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-full);
    backdrop-filter: blur(6px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    z-index: 2;
}

.btn-start-game {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    justify-content: center;
}

/* COLUMN 3: Hall of Fame */
.leaderboard-col-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.leaderboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.75rem;
}

.leaderboard-metric-dropdown {
    position: relative;
}

.leaderboard-metric-btn {
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #fff;
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.leaderboard-metric-menu {
    position: absolute;
    top: 110%;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    padding: 0.4rem;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 50;
    min-width: 190px;
}

.leaderboard-metric-menu.active {
    display: flex;
}

.metric-menu-item {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
}

.metric-menu-item:hover, .metric-menu-item.active {
    background: rgba(99, 102, 241, 0.25);
    color: #fff;
}

.metric-item-title {
    font-size: 0.82rem;
    font-weight: 700;
    display: block;
}

.metric-item-desc {
    font-size: 0.7rem;
    color: var(--text-dim);
    display: block;
}

.leaderboard-subtitle {
    font-size: 0.76rem;
    color: var(--text-dim);
}

.leaderboard-list-scroll {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1;
    height: 100%;
    min-height: 540px;
    max-height: 740px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.2);
    padding-bottom: 1.5rem;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
}

.leaderboard-row:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

.rank-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 900;
    color: var(--text-muted);
}

.rank-1 { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #000; box-shadow: 0 0 10px rgba(245, 158, 11, 0.5); }
.rank-2 { background: linear-gradient(135deg, #94a3b8, #cbd5e1); color: #000; }
.rank-3 { background: linear-gradient(135deg, #b45309, #d97706); color: #fff; }

.player-info {
    flex: 1;
    margin: 0 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.player-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: #fff;
}

.player-score-val {
    font-size: 0.88rem;
    font-weight: 900;
    color: var(--accent-cyan);
    font-family: monospace;
}

/* GAMEPLAY VIEW */
.gameplay-screen {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.45rem;
    padding-bottom: 0.25rem;
}

.game-hud {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 1.2rem;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    gap: 0.85rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.hud-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.hud-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    font-weight: 700;
    text-transform: uppercase;
}

.hud-value {
    font-size: 1.05rem;
    font-weight: 900;
    color: #fff;
    font-family: monospace;
}

.hud-value.claimed {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

.hud-progress-wrap {
    flex: 1;
    min-width: 100px;
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hud-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #00d2ff);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.8);
    transition: width 0.3s ease;
}

.canvas-container {
    width: auto;
    height: auto;
    max-width: 100%;
    background: #000;
    border: 2px solid rgba(99, 102, 241, 0.45);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0 auto;
}

/* BOOSTER ACTION DOCK */
.booster-dock {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.8rem;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
}

.booster-actions-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    flex-wrap: wrap;
}

.btn-booster-item {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 0.35rem 0.75rem;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    user-select: none;
}

.btn-booster-item:hover:not(.disabled) {
    transform: translateY(-2px) scale(1.03);
    background: rgba(99, 102, 241, 0.25);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
}

.btn-booster-item:active:not(.disabled) {
    transform: scale(0.97);
}

.btn-booster-item.disabled {
    opacity: 0.4;
    filter: grayscale(0.85);
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.05);
}

.booster-icon {
    font-size: 1.25rem;
    filter: drop-shadow(0 0 5px rgba(0, 210, 255, 0.6));
}

.booster-meta {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.15;
}

.booster-name {
    font-size: 0.8rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.hotkey-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #fde047;
    font-size: 0.65rem;
    padding: 0.05rem 0.3rem;
    border-radius: 3px;
    font-family: monospace;
    font-weight: 900;
}

.booster-cost {
    font-size: 0.68rem;
    font-weight: 700;
    color: #ef4444;
}

.booster-badge {
    background: linear-gradient(135deg, #00d2ff, #6366f1);
    color: #000;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-full);
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.5);
    margin-left: 0.2rem;
}

.btn-booster-item.disabled .booster-badge {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-dim);
    box-shadow: none;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* BOOSTER POPUP BANNER MODAL */
.booster-popup-banner {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-35px) scale(0.95);
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.booster-popup-banner.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
}

.booster-popup-card {
    background: rgba(15, 23, 42, 0.96);
    border: 2px solid var(--accent-cyan);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(0, 210, 255, 0.45);
    padding: 0.85rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 480px;
    backdrop-filter: blur(16px);
    animation: boosterGlow 2s infinite alternate ease-in-out;
}

@keyframes boosterGlow {
    from {
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85), 0 0 20px rgba(0, 210, 255, 0.4);
    }
    to {
        box-shadow: 0 14px 45px rgba(0, 0, 0, 0.9), 0 0 35px rgba(236, 72, 153, 0.6);
        border-color: var(--accent-pink);
    }
}

.booster-popup-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.8));
    animation: boosterBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes boosterBounce {
    0% { transform: scale(0.4) rotate(-15deg); }
    70% { transform: scale(1.25) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.booster-popup-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.booster-popup-title {
    font-size: 1.05rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.01em;
    margin: 0;
}

.booster-popup-desc {
    font-size: 0.86rem;
    color: #cbd5e1;
    line-height: 1.35;
    margin: 0;
}

/* Touch Controls */
.touch-controls {
    display: none;
    width: 100%;
    max-width: 900px;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
}

@media (max-width: 768px) {
    .touch-controls {
        display: flex;
    }
}

.virtual-dpad {
    display: grid;
    grid-template-columns: repeat(3, 50px);
    grid-template-rows: repeat(3, 50px);
    gap: 4px;
}

.vpad-btn {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.vpad-btn:active {
    background: var(--primary);
    box-shadow: 0 0 15px var(--accent-cyan);
}

.vpad-up { grid-column: 2; grid-row: 1; }
.vpad-left { grid-column: 1; grid-row: 2; }
.vpad-right { grid-column: 3; grid-row: 2; }
.vpad-down { grid-column: 2; grid-row: 3; }

.touch-actions {
    display: flex;
    gap: 1rem;
}

.touch-act-btn {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    border: 2px solid;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
}

.touch-btn-slow {
    background: rgba(245, 158, 11, 0.2);
    border-color: var(--accent-amber);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

.touch-btn-fast {
    background: rgba(0, 210, 255, 0.2);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
}

/* Modals */
/* Modals Backdrop & Base Glass Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 29, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

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

.glass-modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85), 0 0 25px rgba(99, 102, 241, 0.25);
    overflow: hidden;
    animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

@keyframes modalPop {
    0% { transform: scale(0.92) translateY(10px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.02);
}

.modal-tabs {
    display: flex;
    gap: 0.5rem;
}

.modal-tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-tab-btn:hover {
    color: #fff;
}

.modal-tab-btn.active {
    color: #fff;
    background: rgba(99, 102, 241, 0.25);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
}

.modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
}

.modal-close-btn, .modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem 0.5rem;
    transition: color 0.15s ease;
}

.modal-close-btn:hover, .modal-close:hover {
    color: #fff;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 1.25rem;
}

/* Auth Modal Forms */
.auth-form {
    display: none;
    flex-direction: column;
    gap: 1.1rem;
    padding: 1.5rem 1.5rem 1.75rem;
    text-align: left;
}

.auth-form.active {
    display: flex;
}

.auth-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

.auth-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: -0.5rem;
    margin-bottom: 0.25rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.input-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auth-input {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    outline: none;
    transition: all 0.2s ease;
    width: 100%;
}

.auth-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.35);
}

.input-hint {
    font-size: 0.72rem;
    color: var(--text-dim);
    line-height: 1.3;
}

.auth-alert {
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    line-height: 1.4;
    font-weight: 500;
}

.auth-alert.error {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.4);
    color: #fda4af;
}

.auth-alert.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

.auth-alert.hidden {
    display: none;
}

/* Modal Call-To-Action (CTA) & Secondary Buttons (Jigsaw Master Clone) */
.btn-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.95rem 1.25rem;
    background: linear-gradient(135deg, var(--primary, #6366f1) 0%, #4f46e5 100%);
    border: none;
    border-radius: var(--radius-md, 8px);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 0.5rem;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(99, 102, 241, 0.65), 0 0 20px rgba(6, 182, 212, 0.4);
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    color: #fff;
}

.btn-cta:active {
    transform: translateY(1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.12));
    border-radius: var(--radius-sm, 6px);
    color: #cbd5e1;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

/* Stage Clear & Game Over Modals */
#modal-stage-clear .glass-modal,
#modal-game-over .glass-modal {
    padding: 1.75rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

#modal-stage-clear {
    background: rgba(3, 7, 18, 0.5);
    backdrop-filter: blur(4px);
}

#modal-stage-clear .glass-modal {
    background: rgba(15, 23, 42, 0.92);
    border: 2px solid rgba(16, 185, 129, 0.6);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(16, 185, 129, 0.35);
}

/* ===================================================
   USER PROFILE & CREDENTIALS MODAL (JIGSAW MASTER CLONE)
   =================================================== */
.profile-modal-card {
    width: 80vw !important;
    max-width: 960px !important;
    min-width: 320px !important;
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 0 !important;
}

@media (max-width: 900px) {
    .profile-modal-card {
        width: 95vw !important;
        max-width: 95vw !important;
    }
}

.profile-modal-card .modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-glass);
}

.profile-modal-card .profile-content {
    overflow-y: auto !important;
    max-height: calc(90vh - 65px) !important;
    padding: 1.4rem 1.8rem !important;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.profile-modal-card .profile-content::-webkit-scrollbar {
    width: 7px;
}

.profile-modal-card .profile-content::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 8px;
}

.profile-modal-card .profile-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-top-header-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    margin-bottom: 0.25rem;
}

.avatar-circular-container {
    width: 95px;
    height: 95px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.avatar-circular-container:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.6);
    transform: scale(1.03);
}

.avatar-circular-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-fallback-initial {
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
}

.avatar-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.avatar-circular-container:hover .avatar-hover-overlay {
    opacity: 1;
}

.avatar-hover-overlay span {
    color: #fff;
    font-size: 1.1rem;
}

.avatar-overlay-text {
    font-size: 0.68rem !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.profile-tier-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.account-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all 0.25s ease;
}

.account-type-badge.tier-free {
    background: rgba(148, 163, 184, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #cbd5e1;
    box-shadow: 0 0 10px rgba(148, 163, 184, 0.15);
}

.account-type-badge.tier-master {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.25) 0%, rgba(245, 158, 11, 0.35) 100%);
    border: 1px solid rgba(251, 191, 36, 0.7);
    color: #fef08a;
    box-shadow: 0 0 16px rgba(234, 179, 8, 0.45);
}

.account-type-badge.tier-admin {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(220, 38, 38, 0.35) 100%);
    border: 1px solid rgba(248, 113, 113, 0.7);
    color: #fca5a5;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.45);
}

.btn-master-upgrade {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 9999px !important;
    padding: 0.5rem 1.05rem !important;
    font-size: 0.84rem !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.45) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    white-space: nowrap !important;
}

.btn-master-upgrade:hover {
    transform: scale(1.04) translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.65) !important;
}

.profile-master-perks-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fde68a;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.85rem;
    margin-top: 0.25rem;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.1);
}

.profile-master-perks-strip .perk-dot {
    color: rgba(245, 158, 11, 0.6);
    font-size: 0.85rem;
}

.profile-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: stretch;
    width: 100%;
}

.profile-dashboard-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

@media (max-width: 768px) {
    .profile-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.profile-efficiency-card {
    width: 100%;
    padding: 1rem 1.15rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.12) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.efficiency-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.efficiency-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.efficiency-tier-badge {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #eab308 0%, #f97316 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(234, 179, 8, 0.3);
}

.ppm-main-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.15rem;
    padding: 0.25rem 0;
}

.ppm-number-wrapper {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.ppm-number {
    font-size: 2.35rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    background: linear-gradient(135deg, #ffffff 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ppm-unit {
    font-size: 1rem;
    font-weight: 800;
    color: var(--accent-cyan);
}

.ppm-desc-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0.25rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pstat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pstat-val {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}

.pstat-lbl {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.profile-credentials-box {
    width: 100%;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.cred-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.cred-label {
    color: var(--text-muted);
    font-weight: 500;
}

.cred-val {
    color: #fff;
    font-weight: 600;
}

.cred-val-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.badge-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-full);
    line-height: 1;
    user-select: none;
    letter-spacing: 0.02em;
}

.badge-verified.verified {
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #34d399;
}

.badge-verified.unverified {
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fbbf24;
}

.profile-storage-card {
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 1.15rem;
}

.profile-storage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-storage-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
}

.profile-storage-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.storage-item-box {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.9rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
}

.storage-item-icon {
    font-size: 1.5rem;
}

.storage-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.storage-item-label {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.storage-item-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.profile-actions {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.profile-actions button {
    flex: 1;
}

/* CTA & Secondary */
.btn-cta {
    background: linear-gradient(135deg, #0066ff, #00d2ff);
    color: #fff;
    border: none;
    padding: 0.85rem 1.8rem;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 102, 255, 0.5);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 210, 255, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: #fff;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.w-100 { width: 100%; justify-content: center; }

.badge-pill {
    background: rgba(99, 102, 241, 0.25);
    border: 1px solid rgba(99, 102, 241, 0.5);
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
}

/* Footer */
.canvasclash-footer {
    width: 100%;
    margin-top: 3rem;
    padding: 2.5rem 1.5rem 1.5rem;
    background: rgba(10, 14, 26, 0.88);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-glass);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.footer-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid rgba(99, 102, 241, 0.3);
    padding-bottom: 0.4rem;
    display: inline-block;
}

.footer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-list a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.86rem;
    transition: color 0.2s ease;
}

.footer-list a:hover {
    color: var(--accent-cyan);
}

.footer-bottom {
    width: 100%;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.82rem;
    color: var(--text-dim);
    text-align: center;
    flex-wrap: wrap;
}

/* ===================================================
   BOOSTER ACTIVATION POPUP BANNER (AUTO-DISMISS 3S)
   =================================================== */
.booster-popup-banner {
    position: fixed;
    top: 75px;
    left: 50%;
    transform: translateX(-50%) translateY(-30px);
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.booster-popup-banner.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.booster-popup-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1.4rem;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    border: 2px solid var(--accent-cyan);
    border-radius: var(--radius-full);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 25px rgba(6, 182, 212, 0.5);
    color: #fff;
    min-width: 280px;
}

.booster-popup-icon {
    font-size: 1.8rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
    animation: boosterPulse 1.2s infinite alternate ease-in-out;
}

@keyframes boosterPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.22); }
}

.booster-popup-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.booster-popup-title {
    font-size: 0.95rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.booster-popup-desc {
    font-size: 0.78rem;
    color: var(--accent-cyan);
    font-weight: 600;
}

/* Picture View Mode (Stage Clear - Full Artwork Inspection) */
.picture-view-overlay {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.picture-view-overlay.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.btn-floating-return {
    padding: 0.85rem 1.8rem;
    font-size: 1rem;
    font-weight: 800;
    border-radius: var(--radius-full);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 210, 255, 0.6);
    border: 2px solid var(--accent-cyan);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
}

/* ==========================================
   PERSONAL PICTURE UPLOAD SYSTEM & DROPZONE
   ========================================== */
.btn-upload-cta {
    padding: 0.4rem 0.9rem;
    font-size: 0.82rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: all 0.25s ease;
}

.btn-upload-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.6);
}

.upload-modal-card {
    max-width: 520px;
    width: 92%;
    padding: 1.5rem;
}

.upload-zone {
    border: 2px dashed rgba(99, 102, 241, 0.45);
    background: rgba(15, 23, 42, 0.6);
    border-radius: var(--radius-md);
    padding: 1.25rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.upload-zone:hover, .upload-zone.drag-over {
    border-color: var(--accent-cyan);
    background: rgba(99, 102, 241, 0.15);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.25);
}

.upload-zone .upload-icon {
    font-size: 2rem;
    line-height: 1;
}

.upload-zone .upload-text {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
}

.upload-zone .upload-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.modal-or-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 0.75rem 0;
    color: var(--text-dim);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.modal-or-divider::before, .modal-or-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-or-divider span {
    padding: 0 0.75rem;
}

.url-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.url-input-row .auth-input {
    flex: 1;
}

.personal-preview-box {
    margin-top: 0.65rem;
    max-height: 180px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--accent-cyan);
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

.personal-preview-box img {
    max-height: 180px;
    width: 100%;
    object-fit: contain;
}

.quota-info-bar {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.8rem;
    font-size: 0.82rem;
    color: var(--accent-cyan);
    text-align: center;
    margin: 0.5rem 0;
}

.share-checkbox-row {
    margin: 0.65rem 0 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: rgba(15, 23, 42, 0.45);
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* User Uploads Card Actions (Delete & Share) */
.preset-card .card-user-actions {
    position: absolute;
    top: 6px;
    left: 6px;
    display: flex;
    gap: 0.35rem;
    z-index: 5;
}

.btn-card-action {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.75rem;
    padding: 0.25rem 0.45rem;
    border-radius: 4px;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: all 0.2s ease;
}

.btn-card-action:hover {
    background: #ef4444;
    border-color: #ef4444;
    transform: scale(1.08);
}

.btn-card-action.btn-share:hover {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: #000;
}

.btn-card-action.is-shared {
    background: rgba(16, 185, 129, 0.85);
    border-color: #10b981;
}

/* ==========================================================================
   BOOSTER INVENTORY & DOCK STYLES
   ========================================================================== */

/* 1. Setup Screen Booster Inventory Card */
.setup-booster-inventory-box {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.95rem;
    margin-bottom: 0.85rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.setup-booster-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.setup-booster-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: #fde047;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.setup-booster-tier-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
}

.setup-booster-pills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.setup-booster-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.65rem;
    font-size: 0.78rem;
    color: #e2e8f0;
    transition: all 0.2s ease;
}

.setup-booster-pill:hover {
    border-color: var(--accent-cyan);
    background: rgba(30, 41, 59, 0.95);
}

.booster-pill-icon {
    font-size: 1.05rem;
    margin-right: 0.35rem;
}

.booster-pill-label {
    font-weight: 600;
    flex: 1;
}

.booster-pill-count {
    font-weight: 900;
    color: #38bdf8;
    background: rgba(14, 165, 233, 0.2);
    border: 1px solid rgba(14, 165, 233, 0.4);
    padding: 0.1rem 0.45rem;
    border-radius: 6px;
    font-size: 0.8rem;
}

.booster-pill-count.depleted {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.2);
}

/* 2. In-Game Booster Summon Dock */
.booster-dock {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.65rem;
    width: 100%;
    z-index: 10;
}

.booster-actions-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: var(--radius-md);
    padding: 0.45rem 0.85rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(99, 102, 241, 0.25);
}

.btn-booster-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.75rem;
    color: #f8fafc;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.btn-booster-item:hover:not(.disabled) {
    transform: translateY(-2px);
    border-color: var(--accent-cyan);
    box-shadow: 0 4px 18px rgba(0, 210, 255, 0.35);
    background: rgba(15, 23, 42, 0.98);
}

.btn-booster-item:active:not(.disabled) {
    transform: translateY(1px);
}

.btn-booster-item.disabled {
    opacity: 0.45;
    filter: grayscale(0.85);
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.05);
}

.booster-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.booster-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.booster-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.hotkey-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    font-size: 0.7rem;
    padding: 0.08rem 0.32rem;
    font-weight: 800;
    color: var(--accent-cyan);
}

.booster-cost {
    font-size: 0.68rem;
    color: #f87171;
    font-weight: 600;
}

.booster-badge {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    border: 1px solid rgba(56, 189, 248, 0.6);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 900;
    padding: 0.18rem 0.55rem;
    border-radius: 9999px;
    min-width: 32px;
    text-align: center;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}

.btn-booster-item.disabled .booster-badge {
    background: #334155;
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    box-shadow: none;
}

/* 3. In-Game HUD Booster Summary */
.hud-boosters-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hud-boosters-val {
    font-size: 0.88rem !important;
    letter-spacing: 2px;
    color: #38bdf8 !important;
    font-weight: 800;
}

/* 4. Booster Activated Notification Banner */
.booster-popup-banner {
    position: fixed;
    top: 75px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.booster-popup-banner.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.booster-popup-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(15, 23, 42, 0.95);
    border: 2px solid var(--accent-cyan);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.5rem;
    backdrop-filter: blur(16px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 210, 255, 0.35);
}

.booster-popup-icon {
    font-size: 2rem;
    line-height: 1;
    animation: pulseGlow 1.5s infinite alternate;
}

.booster-popup-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.booster-popup-title {
    font-size: 1rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.5px;
}

.booster-popup-desc {
    font-size: 0.82rem;
    color: #cbd5e1;
    margin-top: 0.15rem;
}

/* ==========================================================================
   5. BOOSTER PURCHASE SHOP MODAL (STRIPE POWERED)
   ========================================================================== */

.setup-booster-inventory-box {
    cursor: pointer;
    transition: all 0.25s ease;
}

.setup-booster-inventory-box:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.25);
    transform: translateY(-1px);
}

.booster-shop-modal-card {
    max-width: 480px !important;
    width: 95% !important;
    padding: 1.5rem !important;
    background: rgba(15, 23, 42, 0.96) !important;
    border: 2px solid var(--accent-cyan) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 210, 255, 0.35) !important;
    backdrop-filter: blur(20px) !important;
}

.booster-shop-body {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-top: 0.5rem;
}

.booster-shop-intro p {
    font-size: 0.86rem;
    color: #cbd5e1;
    line-height: 1.45;
    margin: 0;
}

.booster-shop-items {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.booster-shop-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    transition: all 0.2s ease;
}

.booster-shop-item:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(30, 41, 59, 0.95);
}

.shop-item-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.shop-item-icon {
    font-size: 1.65rem;
    line-height: 1;
}

.shop-item-details {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    text-align: left;
}

.shop-item-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.shop-item-price {
    font-size: 0.76rem;
    color: #fde047;
    font-weight: 600;
}

.shop-qty-stepper {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    padding: 0.2rem 0.35rem;
}

.btn-qty-step {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-qty-step:hover {
    background: var(--accent-cyan);
    color: #000;
    border-color: var(--accent-cyan);
}

.shop-qty-input {
    width: 44px;
    text-align: center;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
    font-family: inherit;
    outline: none;
    -moz-appearance: textfield;
}

.shop-qty-input::-webkit-outer-spin-button,
.shop-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.booster-shop-total-card {
    background: rgba(15, 23, 42, 0.75);
    border: 1px dashed rgba(99, 102, 241, 0.45);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.shop-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.84rem;
    color: #94a3b8;
}

.shop-grand-total {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.4rem;
}

.shop-price-highlight {
    font-size: 1.15rem;
    color: #38bdf8;
    font-family: monospace;
}

.booster-shop-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.btn-stripe-buy {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    font-size: 0.98rem;
    font-weight: 800;
    padding: 0.75rem;
    background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: all 0.25s ease;
}

.btn-stripe-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.6);
}

.shop-secure-note {
    font-size: 0.72rem;
    color: #94a3b8;
    text-align: center;
    line-height: 1.4;
}

/* ===================================================
   IN-FRAME 5-SECOND PREROLL VIDEO AD OVERLAY
   =================================================== */
.game-preroll-overlay {
    position: absolute;
    inset: 0;
    z-index: 9999;
    background: rgba(3, 7, 18, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 1;
    transition: opacity 0.35s ease, transform 0.35s ease;
    animation: prerollFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.game-preroll-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.98);
}

@keyframes prerollFadeIn {
    from { opacity: 0; transform: scale(1.02); }
    to { opacity: 1; transform: scale(1); }
}

.preroll-card {
    width: 100%;
    max-width: 680px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 30px rgba(99, 102, 241, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.preroll-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    background: rgba(10, 15, 30, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.preroll-sponsor-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sponsor-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.sponsor-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #94a3b8;
    text-transform: uppercase;
}

.preroll-timer-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #e2e8f0;
    font-weight: 600;
}

.preroll-timer-box strong {
    color: #38bdf8;
    font-weight: 800;
    font-size: 0.95rem;
}

.btn-preroll-skip {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-preroll-skip:hover:not(.disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-preroll-skip.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.1);
}

.preroll-media-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preroll-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.google-h5-ad-slot {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: auto;
    display: none;
}

.preroll-video-controls {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-preroll-sound {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-preroll-sound:hover {
    background: rgba(15, 23, 42, 0.95);
    border-color: #38bdf8;
    transform: scale(1.08);
}

.preroll-learn-more {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0.35rem 0.65rem;
    color: #cbd5e1;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.preroll-learn-more:hover {
    color: #fff;
    border-color: #38bdf8;
}

.preroll-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    z-index: 6;
}

.preroll-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    transition: width 0.05s linear;
}

.preroll-footer {
    padding: 0.75rem 1.25rem;
    background: rgba(10, 15, 30, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preroll-upgrade-cta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #fbbf24;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.preroll-upgrade-cta:hover {
    color: #fef08a;
    background: rgba(251, 191, 36, 0.1);
    transform: translateY(-1px);
}

/* 100% Ad-Free suppression for Master & Admin accounts */
body.user-is-master .adsbygoogle,
body.user-is-master .game-preroll-overlay,
body.user-is-master .ad-banner-slot {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Artist Spotlight & Picture Credits */
.victory-artist-box {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
    text-align: left;
    backdrop-filter: blur(8px);
}
.artist-badge-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(0, 210, 255, 0.15);
    border-radius: 10px;
    flex-shrink: 0;
}
.artist-meta {
    flex: 1;
    min-width: 0;
}
.artist-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.artist-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.artist-sub {
    font-size: 0.78rem;
    color: #00d2ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.btn-artist-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    background: linear-gradient(135deg, #0284c7, #00d2ff);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.btn-artist-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 210, 255, 0.4);
    color: #fff;
}
.credits-dmca-box {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.5;
}






