/* ── Viewport & Sliding Strip ── */
.launcher-viewport {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(rgba(5, 8, 15, 0.15), rgba(5, 8, 15, 0.25)), url('/assets_lobby/models/BG_model.png') center center / cover no-repeat;
    overscroll-behavior: none;
    overscroll-behavior-x: none;
    overscroll-behavior-y: none;
    touch-action: pan-y;
    z-index: 90; /* Sit above entry animation but below modal sheets */
}

.launcher-viewport::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: 
        linear-gradient(to top, #05080f 0%, transparent 40%),
        linear-gradient(to bottom, rgba(5, 8, 15, 0.85) 0%, transparent 35%);
}

.launcher-strip {
    display: flex;
    width: 300%;
    height: 100%;
    will-change: transform;
    transform: translate3d(-33.3333%, 0, 0); /* Default to Center Slide (Glasshub) */
    transition: transform 0.28s cubic-bezier(0.25, 0.8, 0.25, 1);
    overscroll-behavior: none;
}

.launcher-page {
    width: 33.3333%;
    height: 100%;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    flex-shrink: 0;
    overscroll-behavior: none;
}

/* ── iOS-Style App Library Aesthetics (4-Column Grid) ── */
.app-library-view {
    width: 100%;
    height: 100%;
    position: relative;
    background: transparent;
    color: #f3f4f6;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
    padding: env(safe-area-inset-top, 44px) 16px calc(90px + env(safe-area-inset-bottom, 0px)) 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.app-library-view::before {
    display: none; /* Suppress the viewport's gradient overlay on this panel */
}

.app-library-view::-webkit-scrollbar {
    display: none;
}

/* Back-navigation row — tap to return to Glass Hub */
.app-library-back-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0 2px 2px;
    cursor: pointer;
    flex-shrink: 0;
    width: fit-content;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

.app-library-back-row:hover,
.app-library-back-row:active {
    color: rgba(255, 255, 255, 0.95);
}

.app-library-back-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.18s ease, transform 0.18s ease;
    flex-shrink: 0;
}

.app-library-back-row:hover .app-library-back-chevron,
.app-library-back-row:active .app-library-back-chevron {
    background: rgba(255, 255, 255, 0.16);
    transform: translateX(-3px);
}

.app-library-back-label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* Left-edge swipe hint — a faint gradient stripe that pulses once on entry */
.app-library-view::after {
    content: '';
    position: fixed;
    left: 0;
    top: 0;
    width: 22px;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0.12), transparent);
    pointer-events: none;
    animation: swipeHintPulse 1.8s ease-out 0.4s 2 forwards;
    z-index: 10;
}

@keyframes swipeHintPulse {
    0%   { opacity: 0; transform: translateX(-4px); }
    30%  { opacity: 1; transform: translateX(0); }
    70%  { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(-4px); }
}

/* Search bar row — search input + view-toggle button side by side */
.app-library-header {
    width: 100%;
    margin-top: 12px;
    margin-bottom: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.app-library-search {
    width: 100%;
    max-width: 440px;
    position: relative;
}

.app-library-search input {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 12px;
    padding: 6px 34px 6px 14px;
    box-sizing: border-box;
    color: #ffffff;
    font-size: 14px;
    height: 36px;
    font-weight: 400;
    outline: none;
    text-align: left;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    transition: all 0.2s ease;
}

.app-library-search input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.app-library-search-icon {
    position: absolute;
    right: 12px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
}

/* View-toggle pill button */
.app-view-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    padding: 5px 8px;
    height: 36px;
    box-sizing: border-box;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.app-view-toggle:hover {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.28);
    color: rgba(255, 255, 255, 0.85);
}

.app-view-toggle:active {
    transform: scale(0.95);
}

/* Active = currently in compact mode */
.app-view-toggle.active {
    background: rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.4);
    color: #60a5fa;
}

.app-view-toggle.active:hover {
    background: rgba(96, 165, 250, 0.25);
    border-color: rgba(96, 165, 250, 0.6);
}

.app-view-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* App Tutorial Button (strictly follows app-styling-rules) */
.app-tutorial-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px !important;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    font-family: 'Oswald', sans-serif;
    font-weight: 800;
    font-size: 11.5px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, color 0.2s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.app-tutorial-btn:hover {
    background: rgba(56, 189, 248, 0.25);
    border-color: rgba(56, 189, 248, 0.7);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.45);
    transform: translateY(-1px);
}

.app-tutorial-btn:active {
    transform: scale(0.96);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

/* Stage Wrapper — Strictly Clamped to GlassHub Container Width on mobile, expands adaptively on wider screens */
.app-library-stage-wrap {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* Applications Grid — 4 windows across by default on mobile phones (<430px) */
.apps-grid-view {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(4px, 0.8vh, 6px) clamp(4px, 1.2vw, 8px);
    padding: 0 0 16px 0;
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
}

/* 5 windows across on medium viewports (>= 430px) maintaining GlassHub ~80px card size */
@media (min-width: 430px) {
    .app-library-stage-wrap {
        max-width: 450px !important;
    }
    .apps-grid-view {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

/* 6 windows across on wider viewports (>= 530px, e.g. 688px screen) maintaining GlassHub ~80px card size */
@media (min-width: 530px) {
    .app-library-stage-wrap {
        max-width: 540px !important;
    }
    .apps-grid-view {
        grid-template-columns: repeat(6, 1fr) !important;
    }
}

/* Conversational Headers */
.app-category-header {
    grid-column: 1 / -1;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 12px;
    margin-bottom: 4px;
    padding: 0 4px 4px 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    background: transparent;
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.app-category-header:first-child {
    margin-top: 0;
}

/* Individual Grid App Item — Glassmorphism matching Quick Launch slots with adaptive row fit */
.grid-app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1.14 / 1;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-drag: none;
    min-width: 0;
    box-sizing: border-box;

    background: rgba(30, 41, 59, 0.42);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 5px 3px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

/* Per-category accent border colors — match Quick Launch slot borders */
.grid-app-item.gradient-match    { border-color: rgba(96,  165, 250, 0.30); }
.grid-app-item.gradient-blue     { border-color: rgba(56,  189, 248, 0.30); }
.grid-app-item.gradient-courts   { border-color: rgba(245, 158,  11, 0.30); }
.grid-app-item.gradient-coaching { border-color: rgba(236,  72, 153, 0.30); }
.grid-app-item.gradient-profile  { border-color: rgba(139,  92, 246, 0.30); }
.grid-app-item.gradient-guide    { border-color: rgba(167, 139, 250, 0.30); }
.grid-app-item.gradient-clubs    { border-color: rgba(16,  185, 129, 0.30); }
.grid-app-item.gradient-chat     { border-color: rgba(16,  185, 129, 0.30); }
.grid-app-item.gradient-missions { border-color: rgba(251, 191,  36, 0.30); }
.grid-app-item.gradient-settings { border-color: rgba(156, 163, 175, 0.30); }

@media (hover: hover) {
    .grid-app-item:hover {
        background: rgba(30, 41, 59, 0.65);
        border-color: rgba(255, 255, 255, 0.28);
        transform: translateY(-2px);
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.36);
    }

    .grid-app-item.gradient-match:hover    { border-color: rgba(96,  165, 250, 0.65); }
    .grid-app-item.gradient-blue:hover     { border-color: rgba(56,  189, 248, 0.65); }
    .grid-app-item.gradient-courts:hover   { border-color: rgba(245, 158,  11, 0.65); }
    .grid-app-item.gradient-coaching:hover { border-color: rgba(236,  72, 153, 0.65); }
    .grid-app-item.gradient-profile:hover  { border-color: rgba(139,  92, 246, 0.65); }
    .grid-app-item.gradient-guide:hover    { border-color: rgba(167, 139, 250, 0.65); }
    .grid-app-item.gradient-clubs:hover    { border-color: rgba(16,  185, 129, 0.65); }
    .grid-app-item.gradient-chat:hover     { border-color: rgba(16,  185, 129, 0.65); }
    .grid-app-item.gradient-missions:hover { border-color: rgba(251, 191,  36, 0.65); }
    .grid-app-item.gradient-settings:hover { border-color: rgba(156, 163, 175, 0.65); }

    .grid-app-item:hover .grid-app-icon svg {
        transform: scale(1.1);
        filter: drop-shadow(0 0 10px currentColor);
    }
}

.grid-app-item:active {
    transform: scale(0.95) translateY(0);
    background: rgba(30, 41, 59, 0.55);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Icon Container */
.grid-app-icon {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
    position: relative;
    flex-shrink: 0;
}

.grid-app-icon svg {
    color: currentColor;
    width: 17px;
    height: 17px;
    filter: drop-shadow(0 0 6px currentColor);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* App Label — Oswald font matching GlassHub Quick Launch slots */
.grid-app-label {
    margin-top: 0;
    font-size: clamp(7px, 2.2vw, 8.5px);
    font-weight: 900;
    text-align: center;
    letter-spacing: 0.5px;
    width: 100%;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    line-height: 1.1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* Squircles gradients - iOS home screen style */
/* Squircles glowing icons - Premium Glass Hub style */
.gradient-match    { color: #60a5fa; }   /* Blue — Play & Practice */
.gradient-chat     { color: #10b981; }   /* Green */
.gradient-blue     { color: #38bdf8; }   /* Sky cyan — Find Friends */
.gradient-courts   { color: #f59e0b; }   /* Orange */
.gradient-coaching { color: #ec4899; }   /* Pink */
.gradient-profile  { color: #8b5cf6; }   /* Purple */
.gradient-guide    { color: #a78bfa; }   /* Light violet — Picklepath Guide */
.gradient-clubs    { color: #10b981; }   /* Emerald Green */
.gradient-missions { color: #fbbf24; }   /* Amber-gold — Complete Missions */
.gradient-settings { color: #9ca3af; }   /* Gray */

/* Drag and Drop Dragging State */
.grid-app-item.dragging {
    opacity: 0.5;
    transform: scale(1.18);
    z-index: 10000;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    pointer-events: none; /* Crucial so document.elementFromPoint hits target underneath */
}

/* ── Quick Launch Favourites ── */
@keyframes qlSlotPulse {
    0%, 100% { border-color: rgba(255, 255, 255, 0.12); box-shadow: none; }
    50%       { border-color: rgba(255, 255, 255, 0.35); box-shadow: 0 0 10px rgba(255,255,255,0.12); }
}

.gh-ql-slot-empty {
    animation: qlSlotPulse 2.2s ease-in-out infinite;
}

@keyframes qlPickerSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
@keyframes qlPickerFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#gh-ql-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(2, 6, 23, 0.85);
    animation: qlPickerFadeIn 0.22s ease-out forwards;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px 12px calc(64px + env(safe-area-inset-bottom, 0px)) 12px;
    box-sizing: border-box;
}

#gh-ql-picker-sheet {
    width: 100%;
    max-width: 420px;
    max-height: 100%;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: qlPickerSlideUp 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.gh-ql-picker-handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 auto 4px;
    flex-shrink: 0;
}

.gh-ql-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px 16px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gh-ql-picker-title {
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ffffff;
    text-transform: uppercase;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.gh-ql-picker-subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
}

.gh-ql-picker-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    line-height: 1;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.gh-ql-picker-close:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: scale(1.05);
}

.gh-ql-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px 14px 16px 14px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-height: 0;
}
.gh-ql-picker-grid::-webkit-scrollbar { width: 4px; }
.gh-ql-picker-grid::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }

.gh-ql-picker-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.gh-ql-picker-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}
.gh-ql-picker-item:active {
    transform: scale(0.95);
}

.gh-ql-picker-item-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}
.gh-ql-picker-item:hover .gh-ql-picker-item-icon {
    transform: scale(1.1);
}

.gh-ql-picker-item-label {
    font-family: 'Oswald', sans-serif;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    line-height: 1.15;
    word-break: break-word;
}

.gh-ql-picker-item.ql-selected {
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(56, 189, 248, 0.12);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.2), inset 0 0 10px rgba(56, 189, 248, 0.08);
}

.gh-ql-check-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    line-height: 1;
    color: #020617;
    font-weight: 900;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.gh-ql-all-programs-btn {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 4px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 52px;
    width: 52px;
}
.gh-ql-all-programs-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}
.gh-ql-all-programs-btn:active {
    transform: scale(0.93);
}

/* Remove badge — now only used inside the picker tray, not on the strip */
.gh-ql-remove-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    border: 1px solid rgba(255,255,255,0.3);
    display: none; /* shown programmatically in picker tray only */
    align-items: center;
    justify-content: center;
    font-size: 9px;
    line-height: 1;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    z-index: 10;
}

/* ── Picker Slot Tray ── */
#gh-ql-tray {
    flex-shrink: 0;
}

.gh-ql-tray-slot.filled {
    user-select: none;
    -webkit-user-select: none;
}

.gh-ql-tray-slot.filled[draggable='true']:active {
    cursor: grabbing;
}

.gh-ql-tray-slot.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 300;
    color: rgba(255,255,255,0.2);
}

/* ── iOS-Style Discover Players Feed (Slide 0) ── */
.page-feed-view {
    width: 100%;
    height: 100%;
    position: relative;
    background: transparent;
    color: #f3f4f6;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
    padding: env(safe-area-inset-top, 44px) 16px calc(90px + env(safe-area-inset-bottom, 0px)) 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.page-feed-view::before {
    display: none;
}

.page-feed-view::-webkit-scrollbar {
    display: none;
}

/* Search Header */
.feed-header {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 20px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.feed-search {
    width: 100%;
    max-width: 440px;
    position: relative;
    display: flex;
    gap: 10px;
    align-items: center;
}

.feed-search input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 10px 12px 10px 38px;
    box-sizing: border-box;
    color: #ffffff;
    font-size: 16px;
    font-weight: 400;
    outline: none;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    transition: all 0.2s ease;
}

.feed-search input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
}

.feed-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
}

.feed-filter-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.feed-filter-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.15);
}

/* Scrollable Feed List */
.feed-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
    padding-bottom: 20px;
}

/* Player Card */
.player-card {
    background: rgba(20, 24, 33, 0.55);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, background 0.2s ease;
}

.player-card:active {
    background: rgba(20, 24, 33, 0.7);
}

.player-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    overflow: hidden;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.player-name {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.1px;
}

.player-level {
    font-size: 12px;
    font-weight: 500;
    color: #a3e635; /* lime color matching dupr theme */
}

/* Details row */
.player-details-row {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 2px;
}

.player-detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.player-detail-item svg {
    color: rgba(255, 255, 255, 0.45);
}

/* Bio description */
.player-bio {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
    margin-top: 2px;
}

/* ── Sticky Bottom Tab Bar ── */
.feed-tab-bar {
    position: absolute;
    bottom: 14px;
    left: 16px;
    right: 16px;
    height: 64px;
    background: rgba(15, 20, 30, 0.85);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 10px;
    box-sizing: border-box;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.feed-tab-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.feed-tab-btn:active {
    transform: scale(0.9);
}

.feed-tab-btn svg {
    transition: color 0.2s ease;
}

.feed-tab-btn:hover svg {
    color: #ffffff;
}

/* Lime-Green Active Pill tab styling matching mockup */
.feed-tab-btn.active-pill {
    background: #d4fc34; /* Mockup lime-green */
    color: #05080f;
    padding: 8px 16px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(212, 252, 52, 0.3);
}

.feed-tab-btn.active-pill svg {
    color: #05080f;
}

/* Force hide the legacy lobby layer wrapper containing the old header */
#lobby-layer {
    display: none !important;
}

/* Responsive App Library Scaling for Narrow Screen Widths */
@media (max-width: 380px) {
    .apps-grid-view {
        gap: 6px 4px;
        padding: 0px 0px 40px 0px;
    }
    .grid-app-icon svg {
        width: 16px;
        height: 16px;
    }
    .grid-app-label {
        font-size: 8px;
    }
}

@media (max-width: 320px) {
    .apps-grid-view {
        gap: 4px 3px;
        padding: 0px 0px 40px 0px;
    }
    .grid-app-icon svg {
        width: 14px;
        height: 14px;
    }
    .grid-app-label {
        font-size: 7.5px;
    }
}

/* ── Unified GlassHub Headers (Action Portal & App Library) ── */
#ap-roll-mixer, #lib-roll-mixer { overflow: hidden; position: relative; }
#ap-roll-mixer .mixer-item, #lib-roll-mixer .mixer-item {
    position: absolute; top: 50%; left: 0; right: 0;
    transform: translateY(calc(-50% + 18px)); opacity: 0;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    font-family: 'Oswald', sans-serif; font-size: clamp(10px, 2.6vw, 13px);
    font-weight: 700; letter-spacing: 1px; color: rgba(255,255,255,0.85);
    text-transform: uppercase; white-space: nowrap;
    padding: 0 4px; pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.34,1.1,0.64,1), opacity 0.4s ease;
}
#ap-roll-mixer .mixer-item.active, #lib-roll-mixer .mixer-item.active {
    transform: translateY(-50%); opacity: 1; pointer-events: auto;
}
#ap-roll-mixer .mixer-item.exit, #lib-roll-mixer .mixer-item.exit {
    transform: translateY(calc(-50% - 18px)); opacity: 0; pointer-events: none;
}
#ap-roll-mixer .mixer-item.mixer-locked, #lib-roll-mixer .mixer-item.mixer-locked { color: #ef4444; }
#ap-roll-mixer .mixer-icon, #lib-roll-mixer .mixer-icon { font-size: 13px; flex-shrink: 0; }
#ap-roll-mixer .mixer-text, #lib-roll-mixer .mixer-text {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
@media (max-width: 360px) {
    #ap-roll-mixer .mixer-item, #lib-roll-mixer .mixer-item { font-size: 9px; letter-spacing: 0.5px; }
    #ap-header-av, #lib-header-av { width: 34px !important; height: 34px !important; }
    #ap-header-name, #lib-header-name { font-size: 12px !important; }
    #ap-header-loc, #lib-header-loc { font-size: 8px !important; }
}

/* Responsive Dock Nav Spacing for Compact Viewports */
#launcher-bottom-nav {
    display: none !important;
}

.gh-chat-ticker #launcher-bottom-nav,
.lh-chat-ticker #launcher-bottom-nav {
    display: flex !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
}

@media (max-width: 360px) {
    #launcher-bottom-nav {
        gap: 8px !important;
    }
    #launcher-bottom-nav > div {
        width: 30px !important;
        height: 30px !important;
    }
}

/* ── Responsive: Compact Phones (height <= 740px) — Strictly Matches GlassHub ── */
@media (max-height: 740px) {
    #hud-pulse-array {
        gap: 10px !important;
        padding: 10px 14px calc(75px + env(safe-area-inset-bottom, 0px)) 14px !important;
    }
    @media (max-width: 429px) {
        .app-library-stage-wrap {
            max-width: 330px !important;
        }
    }
    .app-library-body-scroll {
        padding: 6px 14px calc(52px + env(safe-area-inset-bottom, 0px)) 14px !important;
    }
    .app-library-content-controls {
        gap: 6px !important;
        margin-bottom: 6px !important;
    }
    .apps-grid-view {
        gap: 4px !important;
        padding: 0 0 16px 0 !important;
    }
    .grid-app-item {
        aspect-ratio: 1.18 / 1 !important;
        padding: 4px 2px !important;
        border-radius: 9px !important;
    }
    .grid-app-icon {
        margin-bottom: 1px !important;
    }
    .grid-app-icon svg {
        width: 15px !important;
        height: 15px !important;
    }
    .grid-app-label {
        font-size: clamp(7px, 2vw, 8px) !important;
        line-height: 1.05 !important;
    }
}

/* ── Responsive: Ultra-Compact Phones (height <= 640px) — Strictly Matches GlassHub ── */
@media (max-height: 640px) {
    @media (max-width: 429px) {
        .app-library-stage-wrap {
            max-width: 310px !important;
        }
    }
    .app-library-body-scroll {
        padding: 4px 10px calc(48px + env(safe-area-inset-bottom, 0px)) 10px !important;
    }
    .apps-grid-view {
        gap: 3px !important;
        padding: 0 0 12px 0 !important;
    }
    .grid-app-item {
        aspect-ratio: 1.25 / 1 !important;
        padding: 2px !important;
    }
    .grid-app-icon {
        margin-bottom: 1px !important;
    }
    .grid-app-icon svg {
        width: 13px !important;
        height: 13px !important;
    }
    .grid-app-label {
        font-size: 7px !important;
    }
}

/* ── Responsive: Landscape Mobile (height <= 520px) ── */
@media (max-height: 520px) {
    .gh-profile-left,
    #lib-profile-left,
    #ap-profile-left {
        height: 88px !important;
        padding: 6px 12px !important;
        gap: 4px !important;
    }
    .pp-profile-tap-btn .pp-header-av,
    .gh-profile-left .pp-header-av,
    #ap-header-av, #lib-header-av {
        width: 32px !important;
        height: 32px !important;
    }
    .pp-notif-bell-btn,
    #ap-notif-bell-btn,
    #lib-notif-bell-btn {
        width: 28px !important;
        height: 28px !important;
    }
    .pp-roll-mixer,
    #ap-roll-mixer,
    #lib-roll-mixer {
        height: 26px !important;
    }

    .app-library-body-scroll {
        padding: 8px 10px calc(65px + env(safe-area-inset-bottom, 0px)) 10px !important;
    }
    .grid-app-icon svg {
        width: 13px !important;
        height: 13px !important;
    }
    .grid-app-label {
        font-size: 7px !important;
    }
}

