html, body {
        overflow-y: auto;
        height: auto;
    }

    .breadcrumb {
        margin-bottom: 0.75rem;
    }

    .modes-layout {
        display: grid;
        grid-template-columns: 220px 1fr;
        grid-template-rows: auto auto;
        gap: 1rem;
        overflow: visible;
        width: 100%;
    }

    .modes-hero-wrapper {
        grid-column: 1;
        grid-row: 1;
    }

    .top-maps-wrapper {
        grid-column: 1;
        grid-row: 2;
        align-self: start;
    }

    .modes-grid-wrapper {
        grid-column: 2;
        grid-row: 1 / 3;
        align-self: stretch;
    }

    .modes-grid-wrapper .stats-section {
        height: 100%;
    }

    .modes-hero-card {
        background: var(--card);
        backdrop-filter: blur(10px);
        border-radius: 16px;
        padding: 0.75rem;
        border: 2px solid rgba(var(--primary-rgb), 0.25);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 80px;
    }

    .modes-hero-card h1 {
        font-size: 1.6rem;
        font-weight: 900;
        text-align: center;
        margin: 0;
        line-height: 1;
        color: var(--primary);
        letter-spacing: -0.3px;
        padding-bottom: 0.25rem;
    }

    .hero-desc {
        text-align: center;
        color: var(--text-dim);
        font-size: 0.85rem;
        line-height: 1.3;
    }

    /* Shared card styles */
    .stats-section {
        background: var(--card);
        backdrop-filter: blur(15px);
        border-radius: 16px;
        overflow: hidden;
        border: 2px solid rgba(var(--primary-rgb), 0.2);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        display: flex;
        flex-direction: column;
        transition: all 0.2s ease;
        min-height: 0;
    }

    .stats-section:hover {
        border-color: rgba(var(--primary-rgb), 0.4);
        box-shadow: 0 6px 28px rgba(var(--primary-rgb), 0.2);
    }

    .section-header,
    .stats-header {
        background: var(--dark);
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        font-weight: 800;
        border-bottom: 2px solid rgba(var(--primary-rgb), 0.4);
        text-transform: uppercase;
        letter-spacing: 1px;
        flex-shrink: 0;
        color: var(--text);
    }

    .stats-header {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    /* Most Played Maps */
    .top-maps-box {
        background: var(--card);
        backdrop-filter: blur(15px);
        border-radius: 16px;
        overflow: hidden;
        border: 2px solid rgba(var(--primary-rgb), 0.2);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        display: flex;
        flex-direction: column;
        transition: all 0.2s ease;
    }

    .top-maps-box:hover {
        border-color: rgba(var(--primary-rgb), 0.4);
        box-shadow: 0 6px 28px rgba(var(--primary-rgb), 0.2);
    }

    .top-maps-list {
        display: flex;
        flex-direction: column;
        padding: 0.35rem;
        gap: 0.25rem;
    }

    .top-map-item {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.35rem 0.4rem;
        background: var(--dark);
        border-radius: 8px;
        border: 1px solid rgba(255,255,255,0.04);
        text-decoration: none;
        color: inherit;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .top-map-item:hover {
        background: rgba(var(--primary-rgb), 0.08);
        border-color: rgba(var(--primary-rgb), 0.3);
    }

    .top-map-img {
        width: 40px;
        height: 40px;
        border-radius: 4px;
        object-fit: cover;
        flex-shrink: 0;
        border: 1px solid rgba(255,255,255,0.08);
    }

    .top-map-info {
        flex: 1;
        min-width: 0;
    }

    .top-map-name {
        font-size: 0.8rem;
        font-weight: 700;
        color: var(--text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .top-map-mode {
        font-size: 0.65rem;
        color: var(--text-dim);
    }

    .top-map-games {
        font-size: 0.65rem;
        font-weight: 800;
        color: var(--text);
        flex-shrink: 0;
    }

    /* Right Column: Modes Grid */
    .stats-content {
        padding: 0.35rem;
        background: var(--bg);
        overflow-y: auto;
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .modes-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 1fr;
        gap: 0.35rem;
        flex: 1;
    }

    .mode-card {
        background: var(--dark);
        border-radius: 8px;
        overflow: hidden;
        border: 1px solid rgba(255,255,255,0.06);
        transition: all 0.2s ease;
        text-decoration: none;
        color: inherit;
        display: flex;
        flex-direction: column;
    }

    .mode-card:hover {
        background: rgba(var(--primary-rgb), 0.08);
        border-color: rgba(var(--primary-rgb), 0.5);
    }

    .mode-card-header {
        background: rgba(255,255,255,0.03);
        padding: 0.4rem 0.6rem;
        border-bottom: 2px solid rgba(var(--primary-rgb), 0.3);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .mode-icon {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .mode-icon img {
        width: 40px;
        height: 40px;
        object-fit: contain;
    }

    .mode-info {
        flex: 1;
        min-width: 0;
    }

    .mode-name {
        font-size: 1.1rem;
        font-weight: 800;
        color: var(--text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

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

    .mode-card-body {
        padding: 0.3rem 0.6rem 0.35rem;
        display: flex;
        flex-direction: column;
        flex: 1;
        justify-content: space-evenly;
    }

    .mode-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.3rem;
        margin-bottom: 0.35rem;
    }

    .mode-stat {
        background: rgba(255,255,255,0.04);
        border-radius: 6px;
        padding: 0.35rem 0.3rem;
        text-align: center;
    }

    .mode-stat-value {
        font-size: 1rem;
        font-weight: 800;
        color: var(--text);
    }

    .mode-stat-label {
        font-size: 0.6rem;
        color: var(--text-dim);
        text-transform: uppercase;
        letter-spacing: 0.3px;
        margin-top: 0.1rem;
    }

    .mode-top-brawler {
        background: rgba(var(--primary-rgb), 0.08);
        padding: 0.3rem 0.45rem;
        border-radius: 8px;
        border: 1px solid rgba(var(--primary-rgb), 0.15);
        display: flex;
        align-items: center;
        gap: 0.6rem;
    }

    .mode-top-brawler-icon {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mode-top-brawler-icon img {
        width: 32px;
        height: 32px;
        object-fit: contain;
    }

    .mode-top-brawler-info {
        flex: 1;
        min-width: 0;
    }

    .mode-top-brawler-label {
        font-size: 0.55rem;
        color: var(--text-dim);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .mode-top-brawler-name {
        font-weight: 700;
        font-size: 0.9rem;
        color: var(--text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mode-top-brawler-wr {
        font-size: 1.1rem;
        font-weight: 800;
        flex-shrink: 0;
    }

    .mode-top-brawler-picks {
        font-size: 0.6rem;
        color: var(--text-dim);
        text-align: right;
    }

    /* Color-coded win rates */
    .wr-s { color: #10b981; }
    .wr-a { color: #84cc16; }
    .wr-b { color: #fbbf24; }
    .wr-c { color: #fb923c; }
    .wr-d { color: #f87171; }
    .wr-f { color: #dc2626; }

    .no-data {
        text-align: center;
        padding: 1.5rem 0.5rem;
        color: var(--text-dim);
        font-size: 0.8rem;
        grid-column: 1 / -1;
    }

    /* Custom scrollbar */
    .stats-content::-webkit-scrollbar {
        width: 4px;
    }

    .stats-content::-webkit-scrollbar-track {
        background: rgba(255,255,255,0.02);
    }

    .stats-content::-webkit-scrollbar-thumb {
        background: rgba(var(--primary-rgb), 0.4);
        border-radius: 2px;
    }

    .stats-content::-webkit-scrollbar-thumb:hover {
        background: rgba(var(--primary-rgb), 0.6);
    }

    /* Bottom Panel: Best Teams */
    .best-teams-panel {
        margin-top: 1rem;
        background: var(--card);
        backdrop-filter: blur(15px);
        border-radius: 16px;
        overflow: hidden;
        border: 2px solid rgba(var(--primary-rgb), 0.2);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        transition: all 0.2s ease;
    }

    .best-teams-panel:hover {
        border-color: rgba(var(--primary-rgb), 0.4);
        box-shadow: 0 6px 28px rgba(var(--primary-rgb), 0.2);
    }

    .best-teams-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 0.35rem;
        padding: 0.4rem;
    }

    .best-team-card {
        background: var(--dark);
        border-radius: 8px;
        padding: 0.5rem 0.6rem;
        border: 1px solid rgba(255,255,255,0.06);
        display: flex;
        align-items: center;
        gap: 0.5rem;
        text-decoration: none;
        color: inherit;
        transition: all 0.2s ease;
        cursor: pointer;
    }

    .best-team-card:hover {
        background: rgba(var(--primary-rgb), 0.08);
        border-color: rgba(var(--primary-rgb), 0.5);
    }

    .best-team-icons {
        display: flex;
        align-items: center;
        gap: 0.2rem;
        flex-shrink: 0;
    }

    .best-team-logo {
        width: 32px;
        height: 32px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .best-team-x {
        font-size: 0.55rem;
        font-weight: 700;
        color: var(--text-dim);
    }

    .best-team-mode-icon {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }

    .best-team-mode-icon img {
        width: 24px;
        height: 24px;
        object-fit: contain;
    }

    .best-team-info {
        flex: 1;
        min-width: 0;
    }

    .best-team-mode-name {
        font-size: 0.6rem;
        color: var(--text-dim);
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }

    .best-team-name {
        font-size: 0.85rem;
        font-weight: 800;
        color: var(--text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .best-team-wr-col {
        text-align: right;
        flex-shrink: 0;
    }

    .best-team-wr {
        font-size: 1rem;
        font-weight: 800;
    }

    .best-team-record {
        font-size: 0.55rem;
        color: var(--text-dim);
    }

    @media (max-width: 768px) {
        html, body { overflow-x: hidden !important; overflow-y: auto !important; height: auto !important; }

        .breadcrumb { font-size: 0.72rem; margin-bottom: 0.4rem; }

        /* Single column layout — modes grid first, then maps below it */
        .modes-layout {
            display: flex !important;
            flex-direction: column !important;
            gap: 0.5rem !important;
            width: 100% !important;
        }

        .modes-hero-wrapper, .top-maps-wrapper, .modes-grid-wrapper {
            grid-column: unset !important;
            grid-row: unset !important;
            width: 100% !important;
            box-sizing: border-box !important;
        }

        /* Force order: hero → modes grid → maps */
        .modes-hero-wrapper  { order: 1 !important; }
        .modes-grid-wrapper  { order: 2 !important; }
        .top-maps-wrapper    { order: 3 !important; }

        .modes-grid-wrapper .stats-section { height: auto !important; }

        /* Hero card: compact row */
        .modes-hero-card {
            flex-direction: row !important;
            justify-content: flex-start !important;
            align-items: center !important;
            gap: 0.6rem !important;
            padding: 0.6rem 0.75rem !important;
            border-radius: 10px !important;
            min-height: unset !important;
        }

        .modes-hero-card h1 { font-size: 1.1rem !important; padding-bottom: 0 !important; text-align: left !important; }
        .hero-desc { font-size: 0.62rem !important; text-align: right !important; margin-left: auto !important; }

        /* Most Played Maps: very compact — no image, single line */
        .top-maps-box { border-radius: 10px !important; }
        .section-header, .stats-header { padding: 0.3rem 0.6rem !important; font-size: 0.72rem !important; }
        .top-maps-list { padding: 0.25rem !important; gap: 0.15rem !important; display: grid !important; grid-template-columns: 1fr 1fr !important; }
        .top-map-item { padding: 0.25rem 0.35rem !important; gap: 0.3rem !important; border-radius: 6px !important; }
        .top-map-img { width: 24px !important; height: 24px !important; }
        .top-map-name { font-size: 0.68rem !important; }
        .top-map-mode { font-size: 0.55rem !important; }
        .top-map-games { font-size: 0.55rem !important; }

        /* Modes grid: 2 columns */
        .stats-section { border-radius: 10px !important; }
        .stats-content { overflow-y: visible !important; }
        .modes-grid {
            grid-template-columns: 1fr 1fr !important;
            gap: 0.3rem !important;
        }

        .mode-card-header { padding: 0.3rem 0.4rem !important; gap: 0.3rem !important; }
        .mode-icon { width: 32px !important; height: 32px !important; }
        .mode-icon img { width: 28px !important; height: 28px !important; }
        .mode-name { font-size: 0.82rem !important; }

        .mode-card-body { padding: 0.25rem 0.4rem 0.3rem !important; }
        .mode-stat-value { font-size: 0.78rem !important; }
        .mode-stat-label { font-size: 0.52rem !important; }
        .mode-top-brawler { padding: 0.25rem 0.35rem !important; gap: 0.35rem !important; border-radius: 6px !important; }
        .mode-top-brawler-icon { width: 28px !important; height: 28px !important; }
        .mode-top-brawler-icon img { width: 24px !important; height: 24px !important; }
        .mode-top-brawler-name { font-size: 0.72rem !important; }
        .mode-top-brawler-wr { font-size: 0.85rem !important; }
        .mode-top-brawler-picks { font-size: 0.52rem !important; }

        /* Best Teams panel: 1 column, fits all content */
        .best-teams-panel { border-radius: 10px !important; margin-top: 0.5rem !important; }
        .best-teams-grid {
            grid-template-columns: 1fr 1fr !important;
            gap: 0.25rem !important;
            padding: 0.3rem !important;
        }
        .best-team-card { padding: 0.3rem 0.4rem !important; gap: 0.3rem !important; border-radius: 6px !important; min-width: 0 !important; overflow: hidden !important; }
        .best-team-icons { gap: 0.15rem !important; flex-shrink: 0 !important; }
        .best-team-logo { width: 22px !important; height: 22px !important; }
        .best-team-mode-icon, .best-team-mode-icon img { width: 16px !important; height: 16px !important; }
        .best-team-x { font-size: 0.48rem !important; }
        .best-team-info { min-width: 0 !important; overflow: hidden !important; }
        .best-team-name { font-size: 0.65rem !important; }
        .best-team-mode-name { font-size: 0.5rem !important; }
        .best-team-wr { font-size: 0.78rem !important; }
        .best-team-record { font-size: 0.45rem !important; }
    }
