/* ============================================================
           HUB v2 — Bento-Grid Design
           ============================================================ */

@property --mesh-1 {
    syntax: '<color>';
    inherits: true;
    initial-value: rgba(37, 99, 235, 0.06);
}

@property --mesh-2 {
    syntax: '<color>';
    inherits: true;
    initial-value: rgba(124, 58, 237, 0.05);
}

@property --mesh-3 {
    syntax: '<color>';
    inherits: true;
    initial-value: rgba(5, 150, 105, 0.04);
}

:root {
    --mesh-1: rgba(37, 99, 235, 0.06);
    --mesh-2: rgba(124, 58, 237, 0.05);
    --mesh-3: rgba(5, 150, 105, 0.04);
    --font-display: 'Outfit', sans-serif;
}

/* --- Hero --------------------------------------------------- */
.hub-hero {
    position: relative;
    padding: clamp(32px, 5vw, 64px) var(--sp-6) clamp(24px, 4vw, 48px);
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    border-radius: inherit;
    transition: --mesh-1 0.5s ease, --mesh-2 0.5s ease, --mesh-3 0.5s ease;
}

.hub-hero::before {
    content: '';
    position: absolute;
    inset: -80px;
    background:
        radial-gradient(circle at 30% 20%, var(--mesh-1), transparent 80%),
        radial-gradient(circle at 80% 40%, var(--mesh-2), transparent 80%),
        radial-gradient(circle at 40% 80%, var(--mesh-3), transparent 80%);
    z-index: 0;
    pointer-events: none;
    transition: background 0.8s ease;
}

.hub-hero>* {
    position: relative;
    z-index: 1;
}

h1,
h2,
h3,
.hub-footer-brand-name {
    font-family: var(--font-display);
}

.hub-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin-bottom: var(--sp-4);
}

.hub-hero .gradient-text {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-secondary) 60%, var(--color-emerald) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0 4px;
    border-radius: var(--radius-md);
}

.hub-hero .hero-sub {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: var(--leading-body);
}

.hero-line {
    display: block;
    width: 60px;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 2px;
    margin: var(--sp-6) auto var(--sp-4);
    animation: hero-line-grow 1s var(--ease) forwards;
}

@keyframes hero-line-grow {
    from {
        width: 0;
        opacity: 0;
    }

    to {
        width: 60px;
        opacity: 1;
    }
}

/* --- Hub Layout Grid --- */
.hub-row {
    display: grid;
    gap: var(--sp-6);
    margin-bottom: var(--sp-6);
    align-items: stretch;
}

.hub-row-top {
    grid-template-columns: 2fr 3fr;
}

.hub-row-bottom {
    grid-template-columns: 3fr 2fr;
    align-items: start;
}

.hub-col {
    display: flex;
    flex-direction: column;
    gap: var(--sp-6);
    min-width: 0;
}

@media (max-width: 1024px) {

    .hub-row-top,
    .hub-row-bottom {
        grid-template-columns: 1fr;
    }
}

/* --- Hub Frame --- */
.hub-frame {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--sp-8);
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.015);
}

.hub-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.03), transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(124, 58, 237, 0.03), transparent 50%);
    pointer-events: none;
}

.hub-hero-frame {
    padding: 0;
    border-radius: 24px;
}

/* --- Bento Grid --------------------------------------------- */
.bento {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
        "stories news"
        "stories walls"
        "game    game";
    gap: var(--sp-4);
    margin-bottom: 0;
}

.bento-cell {
    border-radius: var(--radius-xl);
    padding: var(--sp-4) var(--sp-5);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--sp-4);
    transition: box-shadow var(--duration-md) var(--ease);
    transform-style: preserve-3d;
}

/* area assignments */
.bento-stories {
    grid-area: stories;
}

.bento-news {
    grid-area: news;
}

.bento-walls {
    grid-area: walls;
}

.bento-game {
    grid-area: game;
}

/* colored backgrounds */
.bento-stories {
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.05) 0%, rgba(37, 99, 235, 0.02) 100%);
    border: 1px solid rgba(37, 99, 235, 0.12);
    align-items: flex-start;
}

.bento-stories .bento-content {
    justify-content: flex-start;
}

.bento-stories:hover {
    box-shadow: 0 16px 48px rgba(37, 99, 235, 0.12);
}

.bento-news {
    background: linear-gradient(145deg, rgba(124, 58, 237, 0.05) 0%, rgba(124, 58, 237, 0.02) 100%);
    border: 1px solid rgba(124, 58, 237, 0.12);
}

.bento-news:hover {
    box-shadow: 0 16px 48px rgba(124, 58, 237, 0.12);
}

.bento-walls {
    background: linear-gradient(145deg, rgba(5, 150, 105, 0.05) 0%, rgba(5, 150, 105, 0.02) 100%);
    border: 1px solid rgba(5, 150, 105, 0.12);
}

.bento-walls:hover {
    box-shadow: 0 16px 48px rgba(5, 150, 105, 0.12);
}

.bento-game {
    background: linear-gradient(145deg, rgba(234, 88, 12, 0.05) 0%, rgba(234, 88, 12, 0.02) 100%);
    border: 1px solid rgba(234, 88, 12, 0.12);
}

.bento-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.bento-icon img {
    width: 28px;
    height: 28px;
    display: block;
}

.bento-stories .bento-icon {
    background: rgba(37, 99, 235, 0.1);
}

.bento-news .bento-icon {
    background: rgba(124, 58, 237, 0.1);
}

.bento-walls .bento-icon {
    background: rgba(5, 150, 105, 0.1);
}

.bento-game .bento-icon {
    background: rgba(234, 88, 12, 0.1);
    margin-bottom: 0;
}

.bento-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex: 1;
}

.bento-cell h3 {
    font-size: var(--text-base);
    font-weight: 700;
    margin-bottom: 2px;
}

.bento-cell .bento-desc {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: var(--leading-tight);
    margin-bottom: var(--sp-2);
}

.bento-stat {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-1);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-text-muted);
    background: rgba(0, 0, 0, 0.03);
    padding: 3px var(--sp-3);
    border-radius: var(--radius-pill);
    width: fit-content;
}

/* --- Wallpapers Grid Dashboard --- */
#latest-wallpapers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-4);
    align-items: start;
}

#latest-wallpapers .gallery-item {
    aspect-ratio: auto;
    height: auto;
}

#latest-wallpapers .gallery-item img {
    height: auto;
    width: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

#latest-wallpapers .gallery-item-category {
    position: relative;
}

.wall-cat-chip {
    position: absolute;
    left: var(--sp-2);
    right: var(--sp-2);
    bottom: var(--sp-2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    max-width: calc(100% - (var(--sp-2) * 2));
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.64);
    color: #f8fafc;
    font-size: var(--text-xs);
    font-weight: 600;
    line-height: 1.3;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.wall-cat-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.wall-cat-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Horizontal scroll carousel ----------------------------- */
.hub-scroll-section {
    margin-bottom: var(--sp-12);
}

.hub-scroll-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    flex-wrap: wrap;
    margin-bottom: var(--sp-5);
    position: relative;
    z-index: 50;
}

.hub-scroll-header-controls {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--sp-3);
    margin-left: auto;
    min-width: 0;
    position: relative;
    z-index: 60;
}

.hub-scroll-header-filters .hub-filter-dropdown {
    margin-bottom: 0;
    width: min(320px, 100%);
    flex: 0 1 320px;
    z-index: 70;
}

.hub-scroll-header h2 {
    font-size: var(--text-2xl);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

.live-pulse {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--color-emerald, #10b981);
    position: relative;
}

.live-pulse::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--color-emerald, #10b981);
    animation: live-pulse-anim 2s infinite cubic-bezier(0.25, 1, 0.5, 1);
    opacity: 0;
}

@keyframes live-pulse-anim {
    0% {
        transform: scale(0.5);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.hub-scroll-header h2::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gradient-accent);
    flex-shrink: 0;
}

.hub-scroll-header a {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-accent);
    text-decoration: none;
}

.hub-scroll-header a:hover {
    color: var(--color-accent-hover);
}

.carousel-wrap {
    position: relative;
}

.hub-carousel {
    display: flex;
    gap: var(--sp-5);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--sp-3);
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
    cursor: grab;
}

.hub-carousel.dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
    user-select: none;
}

.hub-carousel::-webkit-scrollbar {
    height: 6px;
}

.hub-carousel::-webkit-scrollbar-track {
    background: transparent;
}

.hub-carousel::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

.hub-carousel .card {
    flex: 0 0 320px;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 1;
    transition: transform var(--duration-md) var(--ease),
        box-shadow var(--duration-md) var(--ease);
}

.hub-carousel .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

/* Hub cards (stories/news) */
.hub-carousel .card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.card-img-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--color-surface-alt);
    line-height: 0;
}

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

.card-genre {
    position: absolute;
    left: var(--sp-3);
    right: var(--sp-3);
    bottom: var(--sp-3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    max-width: calc(100% - (var(--sp-3) * 2));
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.64);
    color: #f8fafc;
    font-size: var(--text-xs);
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.card-genre-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.card-genre-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hub-carousel .card .card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: var(--sp-4);
}

.hub-carousel .card .card-title {
    margin-bottom: var(--sp-2);
    line-height: var(--leading-tight);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hub-carousel .card .card-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--sp-3);
}

.hub-carousel .card .card-meta {
    margin-top: auto;
    padding-left: 0;
    padding-right: 0;
}

/* Carousel arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-60%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    z-index: 5;
    opacity: 0;
    transition: opacity var(--duration-md), background var(--duration);
}

.carousel-wrap:hover .carousel-arrow {
    opacity: 1;
}

.carousel-arrow:hover {
    background: var(--color-surface-alt);
}

.carousel-arrow.disabled {
    opacity: 0.3 !important;
    pointer-events: none;
}

.carousel-arrow-left {
    left: -16px;
}

.carousel-arrow-right {
    right: -16px;
}

/* --- Vertical grid section ---------------------------------- */
.hub-grid-section {
    margin-bottom: var(--sp-6);
}

/* --- Hub Grid Layout (Dashboard) --- */
.hub-row {
    display: grid;
    gap: var(--sp-6);
    margin-bottom: var(--sp-6);
    align-items: stretch;
}

.hub-row>* {
    min-width: 0;
}

.hub-row-top {
    grid-template-columns: 2fr 3fr;
}

.hub-row-bottom {
    grid-template-columns: 3fr 2fr;
    align-items: start;
}

.hub-col {
    display: flex;
    flex-direction: column;
    gap: var(--sp-6);
    min-width: 0;
}

.hub-row .hub-frame {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.hub-row-top .hub-frame {
    height: 100%;
}

.hub-row-bottom .hub-scroll-section.hub-frame {
    margin-bottom: var(--sp-4);
}

.hub-hero-frame {
    justify-content: center;
    padding: 0;
    border-radius: 24px;
}

.hub-hero-frame .hub-hero {
    height: 100%;
    padding: var(--sp-6);
}

/* --- Hub Frames --------------------------------------------- */
.hub-frame {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--sp-6) var(--sp-6);
    margin-bottom: var(--sp-6);
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.015);
}

.hub-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.03), transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(124, 58, 237, 0.03), transparent 50%);
    pointer-events: none;
}

.hub-frame>* {
    position: relative;
    z-index: 1;
}

.hub-frame.dropdown-open {
    overflow: visible;
    z-index: 100;
}

/* --- Footer grid ------------------------------------------- */
.hub-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--sp-8);
    padding: var(--sp-10) 0 var(--sp-6);
}

.hub-footer-brand-name {
    font-size: var(--text-xl);
    font-weight: 800;
    margin-bottom: var(--sp-2);
}

.hub-footer-brand-name span {
    color: var(--color-accent);
}

.hub-footer-brand-desc {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    line-height: var(--leading-body);
    max-width: 300px;
}

.hub-footer-col-title {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: var(--sp-3);
}

.hub-footer-col a {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    text-decoration: none;
    padding: var(--sp-1) 0;
    transition: color var(--duration);
}

.hub-footer-col a:hover {
    color: var(--color-accent);
}

.hub-footer-copy {
    border-top: 1px solid var(--color-border);
    padding-top: var(--sp-5);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-align: center;
}

/* --- Skeleton improvements ---------------------------------- */
.skel-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex: 0 0 320px;
}

.skel-img {
    height: 180px;
    background: linear-gradient(90deg, var(--color-surface-alt) 25%, rgba(255, 255, 255, .6) 37%, var(--color-surface-alt) 63%);
    background-size: 800px 100%;
    animation: shimmer 1.8s ease infinite;
}

/* --- Compact Dropdown Filters --- */
.hub-filter-dropdown {
    position: relative;
    margin-bottom: var(--sp-4);
    max-width: 320px;
    z-index: 100;
}

.hub-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
    width: 100%;
    min-height: 40px;
    padding: 0 var(--sp-4);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease);
}

.hub-filter-toggle:hover {
    background: var(--color-surface-alt);
    border-color: color-mix(in srgb, var(--color-accent) 35%, var(--color-border));
}

.hub-filter-current {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-filter-chevron {
    flex: 0 0 14px;
    transition: transform var(--duration) var(--ease);
}

.hub-filter-dropdown.open .hub-filter-chevron {
    transform: rotate(180deg);
}

.hub-filter-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    min-width: max(220px, 100%);
    width: max-content;
    max-width: min(420px, calc(100vw - 24px));
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    background: color-mix(in srgb, var(--color-surface) 88%, #ffffff 12%);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    z-index: 80;
}

.hub-filter-dropdown.open .hub-filter-menu {
    display: block;
}

.hub-filter-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-text-secondary);
    text-align: left;
    padding: 8px 10px;
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
}

.hub-filter-item:hover {
    background: var(--color-surface-alt);
    color: var(--color-text);
}

.hub-filter-item.active {
    background: var(--color-accent);
    color: #fff;
}

.hub-filter-item-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.hub-filter-item-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .hub-scroll-header-filters {
        align-items: flex-start;
    }

    .hub-scroll-header-controls {
        width: 100%;
        margin-left: 0;
    }

    .hub-scroll-header-filters .hub-filter-dropdown {
        flex: 1 1 auto;
        max-width: none;
    }

    .hub-scroll-header-filters .hub-scroll-header-controls a {
        white-space: nowrap;
    }

    .hub-filter-dropdown {
        max-width: 100%;
    }

    .hub-filter-menu {
        left: 0;
        right: 0;
        width: auto;
        max-width: none;
        min-width: 100%;
    }

    .hub-filter-current {
        max-width: 75vw;
    }
}

.pill-filter-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.hub-scroll-section.hub-frame,
#latest-news-section.hub-frame,
#wallpapers-dashboard.hub-frame {
    overflow: visible;
}

.hub-scroll-section .carousel-wrap,
#latest-news-section .carousel-wrap,
#wallpapers-dashboard #latest-wallpapers {
    position: relative;
    z-index: 0;
}

/* --- Command Palette --- */
.cmd-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.cmd-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cmd-palette {
    background: rgba(24, 24, 27, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    color: #fff;
}

.cmd-overlay.active .cmd-palette {
    transform: scale(1);
}

.cmd-input-wrap {
    padding: var(--sp-4) var(--sp-5);
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cmd-input-wrap svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    flex-shrink: 0;
    color: #a1a1aa;
}

.cmd-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: var(--text-lg);
    outline: none;
    font-family: inherit;
}

.cmd-input::placeholder {
    color: #71717a;
}

.cmd-shortcut-hint {
    font-size: var(--text-xs);
    color: #71717a;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.cmd-results {
    max-height: 400px;
    overflow-y: auto;
    padding: var(--sp-2);
}

.cmd-results::-webkit-scrollbar {
    width: 6px;
}

.cmd-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.cmd-group {
    padding: var(--sp-2) var(--sp-3) 0;
}

.cmd-group-title {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a1a1aa;
    margin-bottom: var(--sp-2);
    font-weight: 700;
}

.cmd-item {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3);
    border-radius: var(--radius-lg);
    color: #e4e4e7;
    text-decoration: none;
    transition: background 0.15s;
    cursor: pointer;
}

.cmd-item:hover,
.cmd-item.selected {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.cmd-item-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.cmd-item-content {
    flex: 1;
    min-width: 0;
}

.cmd-item-title {
    font-weight: 600;
    font-size: var(--text-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cmd-item-meta {
    font-size: var(--text-xs);
    color: #a1a1aa;
    margin-top: 2px;
}

.cmd-loader {
    text-align: center;
    padding: var(--sp-6);
    color: #a1a1aa;
    font-size: var(--text-sm);
}

.cmd-empty {
    text-align: center;
    padding: var(--sp-8) var(--sp-4);
    color: #a1a1aa;
}

/* --- Header Search Trigger --- */
.header-search-btn {
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--duration);
    margin-right: var(--sp-4);
}

.header-search-btn:hover {
    background: var(--color-border);
    color: var(--color-text);
}

.header-kbd {
    font-size: 11px;
    background: var(--color-surface);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    opacity: 0.7;
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 900px) {
    .bento {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "stories news"
            "walls   game";
        gap: var(--sp-4);
    }

    .bento-stories {
        min-height: 200px;
    }

    .bento-cover-preview {
        display: none;
    }

    .bento-game {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 1024px) {

    .hub-row-top,
    .hub-row-bottom {
        grid-template-columns: 1fr;
    }

    .hub-row .hub-frame {
        height: auto;
        margin-bottom: var(--sp-6);
    }

    .hub-row {
        margin-bottom: 0;
        gap: 0;
    }

    .hub-hero-frame .hub-hero {
        padding: clamp(48px, 8vw, 96px) 0 clamp(32px, 5vw, 64px);
    }
}

@media (max-width: 900px) {
    .bento {
        grid-template-columns: 1fr;
        grid-template-areas:
            "stories"
            "news"
            "walls"
            "game";
    }

    .hub-carousel .card {
        flex: 0 0 280px;
    }

    .hub-frame {
        padding: var(--sp-6) var(--sp-4);
        border-radius: var(--radius-lg);
        margin-bottom: var(--sp-5);
    }

    .hub-footer-grid {
        grid-template-columns: 1fr;
        gap: var(--sp-6);
    }
}

@media (prefers-reduced-motion: reduce) {

    .bento-cell:hover,
    .hub-carousel .card:hover {
        transform: none;
    }

    .skel-img {
        animation: none;
    }

    .hero-line {
        animation: none;
        width: 60px;
        opacity: 1;
    }
}

/* --- Fix for dropdown overlapping --- */
.hub-frame>.hub-scroll-header {
    z-index: 50;
}