/* =====================================================
   STARLINK NAVIGATION - GLOBAL STYLES v3
   Mobile-first responsive design
   ===================================================== */

/* =====================================================
   1. RESET & BOX MODEL
   ===================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    background: #020615;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

html, body {
    width: 100%;
    min-height: 100%;
    background: #020615;
}

body {
    width: 100%;
    min-width: 0;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: #020615;
    color: #ffffff;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img, svg, video, canvas {
    display: block;
    max-width: 100%;
}

button, input, textarea, select {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

img { max-width: 100%; }

/* =====================================================
   2. CSS VARIABLES
   ===================================================== */
:root {
    --app-bg: #020615;
    --surface-1: rgba(6, 16, 42, 0.92);
    --surface-2: rgba(10, 24, 59, 0.92);
    --surface-3: rgba(13, 28, 68, 0.88);

    --line-blue: rgba(47, 112, 255, 0.42);
    --line-cyan: rgba(18, 211, 255, 0.42);
    --line-purple: rgba(126, 75, 255, 0.45);

    --text-main: #f7f9ff;
    --text-secondary: #9aa9c7;
    --text-muted: #657493;

    --cyan: #18d6ff;
    --blue: #347cff;
    --purple: #7d4dff;
    --pink: #ef3acb;
    --green: #1ee6a7;
    --gold: #ffb51b;
    --danger: #ff4b73;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;

    --shadow-blue: 0 0 24px rgba(36, 108, 255, 0.18);
    --shadow-purple: 0 0 30px rgba(124, 73, 255, 0.28);
    --shadow-cyan: 0 0 24px rgba(24, 214, 255, 0.22);
    --shadow-card: 0 10px 35px rgba(0, 0, 0, 0.18);

    /* Page dimensions */
    --page-padding-x: 16px;
    --nav-height: 68px;
    --content-bottom: calc(68px + env(safe-area-inset-bottom));
}

/* =====================================================
   3. MOBILE APP CONTAINER
   ===================================================== */
.mobile-app {
    position: relative;
    width: 100%;
    max-width: 430px;
    min-width: 0;
    min-height: 100dvh;
    margin: 0 auto;
    padding-bottom: var(--content-bottom);
    overflow-x: clip;
    transition: max-width 0.3s ease;
}

@media (min-width: 768px) {
    .mobile-app {
        max-width: 600px;
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (min-width: 1024px) {
    .mobile-app {
        max-width: 700px;
        padding-left: 40px;
        padding-right: 40px;
    }
}
    background:
        radial-gradient(circle at 20% 12%, rgba(38, 87, 230, 0.14), transparent 31%),
        radial-gradient(circle at 85% 40%, rgba(119, 48, 225, 0.12), transparent 32%),
        #020615;
}

/* =====================================================
   4. PAGE STRUCTURE
   ===================================================== */
.page-header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    padding:
        calc(12px + env(safe-area-inset-top))
        var(--page-padding-x)
        0;
    background: linear-gradient(180deg, rgba(2, 7, 20, 0.95) 0%, rgba(2, 7, 20, 0.85) 80%, transparent 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.page-content {
    width: 100%;
    min-width: 0;
    padding:
        12px
        var(--page-padding-x)
        calc(64px + env(safe-area-inset-bottom));
    min-height: calc(100dvh - 64px);
}

/* =====================================================
   5. HEADER
   ===================================================== */
.header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    background: linear-gradient(145deg, rgba(10, 25, 61, 0.94), rgba(5, 13, 36, 0.96));
    border: 1px solid var(--line-blue);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-blue), inset 0 1px 0 rgba(255,255,255,0.025);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.header-logo {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.header-info {
    min-width: 0;
}

.header-info h1 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-info p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1;
    margin-top: 4px;
}

.header-right {
    flex-shrink: 0;
}

.btn-cs {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 34px;
    padding: 0 12px;
    background: rgba(24, 214, 255, 0.1);
    border: 1px solid var(--line-cyan);
    border-radius: 20px;
    color: var(--cyan);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.btn-cs:hover {
    background: rgba(24, 214, 255, 0.18);
    border-color: var(--cyan);
}

.btn-cs svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* =====================================================
   6. CARD BASE
   ===================================================== */
.card {
    background: linear-gradient(145deg, rgba(10, 25, 61, 0.94), rgba(5, 13, 36, 0.96));
    border: 1px solid var(--line-blue);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,0.025);
}

/* =====================================================
   7. BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 50%, var(--pink) 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(124, 73, 255, 0.35);
}

.btn-primary:hover {
    filter: brightness(1.08);
}

.btn-secondary {
    background: var(--surface-1);
    border: 1px solid var(--line-blue);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--cyan);
    background: rgba(24, 214, 255, 0.08);
}

.btn-sm {
    padding: 0 12px;
    font-size: 12px;
    min-height: 30px;
}

.btn-lg {
    padding: 14px 24px;
    font-size: 15px;
    border-radius: var(--radius-md);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), #ff8c00);
    color: #1a0f00;
    box-shadow: 0 4px 16px rgba(255, 181, 27, 0.35);
}

/* =====================================================
   8. TAGS & BADGES
   ===================================================== */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

.tag-cyan {
    background: rgba(24, 214, 255, 0.15);
    color: var(--cyan);
    border: 1px solid rgba(24, 214, 255, 0.3);
}

.tag-blue {
    background: rgba(52, 124, 255, 0.15);
    color: var(--blue);
    border: 1px solid rgba(52, 124, 255, 0.3);
}

.tag-purple {
    background: rgba(125, 77, 255, 0.15);
    color: var(--purple);
    border: 1px solid rgba(125, 77, 255, 0.3);
}

.tag-gold {
    background: rgba(255, 181, 27, 0.15);
    color: var(--gold);
    border: 1px solid rgba(255, 181, 27, 0.3);
}

.tag-green {
    background: rgba(30, 230, 167, 0.15);
    color: var(--green);
    border: 1px solid rgba(30, 230, 167, 0.3);
}

.badge-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
    flex-shrink: 0;
}

.badge-dot.offline {
    background: var(--danger);
    box-shadow: 0 0 6px var(--danger);
}

/* =====================================================
   9. FILTER TABS
   ===================================================== */
.filter-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    overflow-y: visible;
}

.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab {
    flex-shrink: 0;
    height: 32px;
    padding: 0 12px;
    background: var(--surface-2);
    border: 1px solid var(--line-blue);
    border-radius: 16px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    white-space: nowrap;
    touch-action: manipulation;
}

.filter-tab:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

.filter-tab.active {
    background: linear-gradient(135deg, var(--blue), var(--purple));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 10px rgba(52, 124, 255, 0.3);
}

/* =====================================================
   10. SECTION
   ===================================================== */
.section {
    width: 100%;
    min-width: 0;
    padding: 14px var(--page-padding-x);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    width: 100%;
    min-width: 0;
}

.section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-title svg {
    width: 16px;
    height: 16px;
    color: var(--cyan);
    flex-shrink: 0;
}

/* =====================================================
   11. HERO CARD (首页主视觉)
   ===================================================== */
.hero-card {
    position: relative;
    width: calc(100% - var(--page-padding-x) * 2);
    min-width: 0;
    margin: 10px var(--page-padding-x) 14px;
    min-height: 190px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(20, 40, 95, 0.95), rgba(60, 30, 130, 0.92), rgba(140, 50, 200, 0.85));
    border: 1px solid rgba(125, 77, 255, 0.5);
    box-shadow: 0 8px 30px rgba(124, 73, 255, 0.4), inset 0 1px 0 rgba(255,255,255,0.06);
}

.hero-bg-orb {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(120, 80, 255, 0.35), transparent 70%);
    top: -40px;
    right: -20px;
    pointer-events: none;
}

.hero-bg-orb2 {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(24, 214, 255, 0.25), transparent 70%);
    bottom: 40px;
    left: -10px;
    pointer-events: none;
}

.hero-copy {
    position: relative;
    z-index: 2;
    width: 64%;
    min-width: 0;
    padding: 14px 14px 58px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(24, 214, 255, 0.15);
    border: 1px solid var(--line-cyan);
    border-radius: 14px;
    font-size: 10px;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 0.5px;
    width: fit-content;
    margin-bottom: 8px;
}

.hero-badge svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

.hero-title {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin: 8px 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.65;
}

.hero-rocket-wrap {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    width: 100px;
    pointer-events: none;
    z-index: 1;
}

.hero-rocket {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.hero-connect-btn {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 44px;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 50%, var(--pink) 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 -2px 18px rgba(124, 73, 255, 0.4);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    z-index: 3;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.hero-connect-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.hero-connect-btn:hover {
    filter: brightness(1.08);
}

/* =====================================================
   12. DUAL CARDS (公告+图集)
   ===================================================== */
.dual-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: calc(100% - var(--page-padding-x) * 2);
    min-width: 0;
    margin: 0 var(--page-padding-x);
}

.mini-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 12px;
    background: linear-gradient(145deg, rgba(10, 25, 61, 0.94), rgba(5, 13, 36, 0.96));
    border: 1px solid var(--line-blue);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.mini-card:hover {
    border-color: var(--cyan);
}

.mini-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    min-width: 0;
}

.mini-card-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mini-card-icon svg { width: 14px; height: 14px; color: #fff; }
.mini-card-icon.blue { background: linear-gradient(135deg, var(--blue), var(--purple)); }
.mini-card-icon.pink { background: linear-gradient(135deg, var(--pink), var(--purple)); }

.mini-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

.mini-card-counter {
    font-size: 10px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.mini-card-preview {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.mini-card-thumb {
    width: 100%;
    height: 60px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    object-fit: cover;
    background: var(--surface-2);
    flex-shrink: 0;
}

.mini-card-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--cyan);
    text-decoration: none;
}

.mini-card-link svg { width: 12px; height: 12px; }

/* =====================================================
   13. CHANNEL GRID (首页通道)
   ===================================================== */
.channel-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    width: 100%;
    min-width: 0;
}

.channel-card-home {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    background: linear-gradient(145deg, rgba(10, 25, 61, 0.94), rgba(5, 13, 36, 0.96));
    border: 1px solid var(--line-blue);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.channel-card-home:hover {
    border-color: var(--line-cyan);
}

.channel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.channel-info-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.channel-icon-box {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.channel-icon-box svg { width: 16px; height: 16px; }

.channel-name-sm {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

.channel-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.channel-status-row {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.channel-latency-big {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 0 10px rgba(24, 214, 255, 0.4);
    flex-shrink: 0;
}

.channel-latency-big .ms-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 1px;
}

.channel-connect-btn {
    height: 26px;
    padding: 0 6px;
    background: transparent;
    border: 1px solid var(--line-cyan);
    border-radius: var(--radius-sm);
    color: var(--cyan);
    font-size: 10px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
    touch-action: manipulation;
    white-space: nowrap;
}

.channel-connect-btn:hover {
    background: rgba(24, 214, 255, 0.1);
}

/* =====================================================
   14. SECURITY BAR
   ===================================================== */
.security-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: calc(100% - var(--page-padding-x) * 2);
    min-width: 0;
    margin: 6px var(--page-padding-x) 0;
    padding: 10px 12px;
    background: rgba(30, 230, 167, 0.06);
    border: 1px solid rgba(30, 230, 167, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.security-bar-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--green), var(--cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.security-bar-icon svg { width: 16px; height: 16px; color: #0a1a10; }

.security-bar-text {
    flex: 1;
    min-width: 0;
}

.security-bar-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--green);
    line-height: 1.2;
}

.security-bar-desc {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.3;
    margin-top: 2px;
}

.security-bar-link {
    font-size: 11px;
    color: var(--green);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

/* =====================================================
   15. STATS ROW
   ===================================================== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
    min-width: 0;
}

.stat-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding: 10px 4px;
    background: linear-gradient(145deg, rgba(10, 25, 61, 0.94), rgba(5, 13, 36, 0.96));
    border: 1px solid var(--line-blue);
    border-radius: var(--radius-md);
    text-align: center;
}

.stat-mini-icon {
    width: 22px;
    height: 22px;
    margin-bottom: 4px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-mini-icon svg { width: 12px; height: 12px; }
.stat-mini-icon.blue { background: rgba(52, 124, 255, 0.2); color: var(--blue); }
.stat-mini-icon.cyan { background: rgba(24, 214, 255, 0.2); color: var(--cyan); }
.stat-mini-icon.green { background: rgba(30, 230, 167, 0.2); color: var(--green); }
.stat-mini-icon.purple { background: rgba(125, 77, 255, 0.2); color: var(--purple); }

.stat-mini-val {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.stat-mini-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 3px;
    line-height: 1.2;
}

/* =====================================================
   16. NODES PAGE
   ===================================================== */
.nodes-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 12px var(--page-padding-x) 10px;
}

.nodes-page-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.nodes-page-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* =====================================================
   17. NODE CARD
   ===================================================== */
.node-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: calc(100% - var(--page-padding-x) * 2);
    min-width: 0;
    margin: 0 var(--page-padding-x) 10px;
    padding: 14px;
    background: linear-gradient(145deg, rgba(10, 25, 61, 0.94), rgba(5, 13, 36, 0.96));
    border: 1px solid var(--line-blue);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.node-card:hover {
    border-color: var(--line-cyan);
}

.node-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.node-icon-wrap svg { width: 22px; height: 22px; color: #fff; }

.node-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.node-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    min-width: 0;
}

.node-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.node-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

.node-meta-row svg { width: 11px; height: 11px; }

.node-latency-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    margin-right: 8px;
}

.node-latency-val {
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.node-latency-unit {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.latency-good { color: var(--cyan); text-shadow: 0 0 8px rgba(24, 214, 255, 0.4); }
.latency-ok { color: var(--green); }
.latency-high { color: var(--gold); }
.latency-bad { color: var(--danger); }

.node-connect-btn {
    width: 60px;
    height: 32px;
    padding: 0;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(52, 124, 255, 0.3);
    cursor: pointer;
    touch-action: manipulation;
}

.signal-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 1px;
    height: 10px;
}

.signal-bar {
    width: 2px;
    background: var(--text-muted);
    border-radius: 1px;
}

.signal-bars.good .signal-bar { background: var(--green); }
.signal-bars.ok .signal-bar:nth-child(-n+3) { background: var(--green); }
.signal-bars.weak .signal-bar:nth-child(-n+2) { background: var(--green); }

/* =====================================================
   18. GALLERY PAGE
   ===================================================== */
.gallery-header {
    width: 100%;
    min-width: 0;
    padding: 12px var(--page-padding-x) 12px;
}

.gallery-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
}

.gallery-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.gallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 0 var(--page-padding-x) 12px;
}

.gallery-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-width: 0;
}

.gallery-tabs::-webkit-scrollbar { display: none; }

.gallery-view-toggle {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.view-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    border: 1px solid var(--line-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.view-btn svg { width: 16px; height: 16px; color: var(--text-muted); }
.view-btn:hover, .view-btn.active { border-color: var(--cyan); background: rgba(24, 214, 255, 0.1); }
.view-btn:hover svg, .view-btn.active svg { color: var(--cyan); }

.gallery-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    width: calc(100% - var(--page-padding-x) * 2);
    min-width: 0;
    margin: 0 var(--page-padding-x);
}

.gallery-thumb-card {
    position: relative;
    min-width: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface-1);
    border: 1px solid var(--line-blue);
    transition: all 0.2s ease;
    cursor: pointer;
    touch-action: manipulation;
}

.gallery-thumb-card:hover {
    border-color: var(--cyan);
}

.gallery-thumb-img {
    width: 100%;
    aspect-ratio: 1 / 0.85;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, rgba(20, 14, 0, 0.9), rgba(50, 25, 0, 0.9));
}

.gallery-thumb-tag {
    position: absolute;
    top: 5px;
    left: 5px;
    padding: 1px 6px;
    background: linear-gradient(135deg, var(--gold), #ff8c00);
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    color: #1a0f00;
    line-height: 1.4;
}

.gallery-thumb-title {
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    background: var(--surface-1);
}

/* =====================================================
   19. PROFILE / MY PAGE
   ===================================================== */
.profile-user-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: calc(100% - var(--page-padding-x) * 2);
    min-width: 0;
    margin: 12px var(--page-padding-x) 12px;
    padding: 14px;
    min-height: 96px;
    background: linear-gradient(145deg, rgba(15, 30, 80, 0.92), rgba(8, 18, 55, 0.96));
    border: 1px solid var(--line-purple);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-purple);
}

.profile-avatar {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 50%;
    border: 2px solid var(--cyan);
    box-shadow: 0 0 14px rgba(24, 214, 255, 0.4);
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

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

.profile-username {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
    line-height: 1.3;
}

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

.profile-user-id {
    font-size: 11px;
    color: var(--text-muted);
}

/* VIP Card */
.vip-banner-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: calc(100% - var(--page-padding-x) * 2);
    min-width: 0;
    margin: 0 var(--page-padding-x) 14px;
    padding: 11px 12px;
    min-height: 64px;
    background: linear-gradient(135deg, rgba(80, 45, 5, 0.92), rgba(45, 25, 5, 0.96));
    border: 1px solid rgba(255, 181, 27, 0.45);
    border-radius: var(--radius-xl);
    box-shadow: 0 0 22px rgba(255, 181, 27, 0.15);
    text-decoration: none;
    color: inherit;
    gap: 12px;
    overflow: hidden;
    touch-action: manipulation;
}

.vip-bg-text {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 38px;
    font-weight: 900;
    color: rgba(255, 181, 27, 0.18);
    letter-spacing: 2px;
    line-height: 1;
    pointer-events: none;
    z-index: 0;
    background: linear-gradient(135deg, rgba(255, 181, 27, 0.4), rgba(255, 181, 27, 0.05));
    -webkit-background-clip: text;
    background-clip: text;
}

.vip-content {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.vip-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--gold), #ff8c00);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vip-icon svg { width: 22px; height: 22px; color: #1a0f00; }

.vip-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold);
    line-height: 1.2;
}

.vip-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Tools Grid 3x2 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
    min-height: 80px;
    padding: 10px 5px;
    background: linear-gradient(145deg, rgba(10, 25, 61, 0.94), rgba(5, 13, 36, 0.96));
    border: 1px solid var(--line-blue);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    touch-action: manipulation;
}

.tool-item:hover {
    border-color: var(--cyan);
}

.tool-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tool-icon svg { width: 18px; height: 18px; }

.tool-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    margin-top: 7px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.tool-desc {
    font-size: 9px;
    color: var(--text-muted);
    line-height: 1.2;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* CS Grid 4-col */
.cs-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
    min-width: 0;
}

.cs-card-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
    min-height: 88px;
    padding: 10px 3px;
    background: linear-gradient(145deg, rgba(10, 25, 61, 0.94), rgba(5, 13, 36, 0.96));
    border: 1px solid var(--line-blue);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.cs-card-mini:hover {
    border-color: var(--cyan);
}

.cs-card-mini-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cs-card-mini-icon svg { width: 18px; height: 18px; color: #fff; }

.cs-card-mini-name {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    margin-top: 7px;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cs-card-mini-desc {
    font-size: 8px;
    color: var(--text-muted);
    line-height: 1.2;
    margin-top: 3px;
}

/* Menu Grid 2-col */
.menu-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.menu-card-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    background: linear-gradient(145deg, rgba(10, 25, 61, 0.94), rgba(5, 13, 36, 0.96));
    border: 1px solid var(--line-blue);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.menu-card-row:hover {
    border-color: var(--cyan);
}

.menu-card-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu-card-icon svg { width: 16px; height: 16px; color: var(--cyan); }

.menu-card-text {
    flex: 1;
    min-width: 0;
}

.menu-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.menu-card-desc {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.2;
}

.menu-card-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
}

.menu-card-arrow svg { width: 14px; height: 14px; }

/* =====================================================
   20. BOTTOM NAVIGATION
   ===================================================== */
.bottom-nav {
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(100%, 430px);
    height: calc(64px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(3, 11, 31, 0.96);
    border-top: 1px solid rgba(52, 124, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.bottom-nav-inner {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-evenly;
    width: 100%;
    height: 64px;
    padding: 0 4px 6px;
}

.nav-left, .nav-right {
    display: none;
}

.nav-item {
    min-width: 0;
    width: 52px;
    height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-item svg {
    width: 18px;
    height: 18px;
}

.nav-item span {
    font-size: 9px;
    font-weight: 500;
    line-height: 1;
}

.nav-item:hover, .nav-item.active {
    color: var(--cyan);
}

.nav-item.active svg {
    filter: drop-shadow(0 0 6px var(--cyan));
}

.nav-center-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 44px;
    height: 64px;
    flex-shrink: 0;
}

.nav-center-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 50%, var(--pink) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 14px rgba(124, 73, 255, 0.6), 0 3px 8px rgba(0,0,0,0.3);
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.2);
    transition: all 0.2s ease;
    touch-action: manipulation;
    z-index: 2;
}

.nav-center-btn:hover {
    box-shadow: 0 0 20px rgba(124, 73, 255, 0.8), 0 4px 12px rgba(0,0,0,0.35);
    transform: scale(1.08);
}

.nav-center-btn:active {
    transform: scale(0.95);
}

.nav-center-btn svg { width: 16px; height: 16px; color: #fff; }

.nav-center-label {
    position: absolute;
    bottom: 2px;
    font-size: 9px;
    font-weight: 600;
    color: var(--cyan);
    line-height: 1;
    white-space: nowrap;
    z-index: 1;
}

/* =====================================================
   21. MODAL
   ===================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-connect {
    width: 100%;
    max-width: 430px;
    background: linear-gradient(180deg, rgba(10, 25, 61, 0.98), rgba(5, 13, 36, 0.99));
    border: 1px solid var(--line-purple);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-connect {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

.modal-title-row svg { width: 18px; height: 18px; color: var(--cyan); }

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    border: 1px solid var(--line-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.modal-close:hover { color: var(--cyan); border-color: var(--cyan); }
.modal-close svg { width: 16px; height: 16px; }

.connect-checking {
    text-align: center;
    padding: 24px 0;
}

.connect-animation {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
}

.connect-ring {
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 1.4s linear infinite;
}

.connect-ring:nth-child(2) {
    inset: 10px;
    border-top-color: var(--blue);
    animation-duration: 1.1s;
    animation-direction: reverse;
}

.connect-ring:nth-child(3) {
    inset: 20px;
    border-top-color: var(--purple);
    animation-duration: 0.8s;
}

@keyframes spin { to { transform: rotate(360deg); } }

.connect-center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
}

.connect-center-dot svg { width: 20px; height: 20px; color: #fff; animation: spin 1s linear infinite; }

.connect-text { font-size: 15px; font-weight: 600; color: var(--text-main); margin-bottom: 4px; }
.connect-subtext { font-size: 12px; color: var(--text-muted); }

.connect-result {
    text-align: center;
    padding: 8px 0 20px;
}

.connect-result-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(30, 230, 167, 0.15);
    border: 2px solid var(--green);
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.connect-result-icon svg { width: 28px; height: 28px; color: var(--green); }

.connect-result-name { font-size: 17px; font-weight: 800; color: var(--text-main); margin-bottom: 4px; }
.connect-result-info { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }

.connect-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 20px;
}

.connect-stat-box {
    padding: 10px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    text-align: center;
}

.connect-stat-val { font-size: 20px; font-weight: 800; color: var(--cyan); }
.connect-stat-label { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

.modal-actions {
    display: flex;
    gap: 10px;
}

.modal-actions .btn { flex: 1; min-height: 44px; }

/* =====================================================
   22. PAGINATION
   ===================================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 18px var(--page-padding-x);
    flex-wrap: wrap;
}

.pagination-item {
    min-width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--surface-1);
    border: 1px solid var(--line-blue);
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 0 10px;
    touch-action: manipulation;
}

.pagination-item:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

.pagination-item.active {
    background: linear-gradient(135deg, var(--blue), var(--purple));
    border-color: transparent;
    color: #fff;
    font-weight: 700;
}

.pagination-item.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.pagination-item svg { width: 14px; height: 14px; }

/* =====================================================
   23. TOAST
   ===================================================== */
#toast, .toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-120px);
    padding: 10px 20px;
    background: rgba(10, 25, 61, 0.96);
    border: 1px solid var(--line-blue);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 14px;
    z-index: 9999;
    transition: transform 0.3s ease;
    backdrop-filter: blur(10px);
    pointer-events: none;
}

#toast.show, .toast.show {
    transform: translateX(-50%) translateY(0);
}

#toast.success, .toast.success { border-color: var(--green); }
#toast.error, .toast.error { border-color: var(--danger); }

/* =====================================================
   24. EMPTY STATE
   ===================================================== */
.empty-state {
    text-align: center;
    padding: 32px 16px;
}

.empty-state svg {
    width: 56px;
    height: 56px;
    color: var(--text-muted);
    margin: 0 auto 12px;
    opacity: 0.5;
    display: block;
}

.empty-state h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-muted);
}

/* =====================================================
   25. LOADING SPINNER
   ===================================================== */
.spin {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--line-blue);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* =====================================================
   26. RESPONSIVE - NARROW SCREENS
   ===================================================== */

/* 360px and below */
@media (max-width: 374px) {
    :root {
        --page-padding-x: 12px;
    }

    .header-card {
        padding-left: 10px;
        padding-right: 10px;
    }

    .header-logo {
        width: 38px;
        height: 38px;
    }

    .header-info h1 {
        font-size: 14px;
    }

    .header-info p {
        font-size: 10px;
    }

    .btn-cs {
        height: 32px;
        padding: 0 9px;
        font-size: 11px;
    }

    .hero-title {
        font-size: 18px;
    }

    .hero-rocket-wrap {
        width: 78px;
        right: 8px;
    }

    .hero-copy {
        padding-left: 12px;
    }

    .stat-mini-val {
        font-size: 15px;
    }

    .stat-mini-label {
        font-size: 9px;
    }

    .tool-name {
        font-size: 11px;
    }

    .cs-card-mini-name {
        font-size: 9px;
    }

    .cs-card-mini-desc {
        font-size: 7px;
    }
}

/* 340px and below */
@media (max-width: 339px) {
    :root {
        --page-padding-x: 10px;
    }

    .btn-cs span {
        display: none;
    }

    .btn-cs {
        width: 34px;
        padding: 0;
        justify-content: center;
    }

    .hero-title {
        font-size: 16px;
    }

    .hero-rocket-wrap {
        width: 68px;
        right: 6px;
    }

    .hero-copy {
        padding-left: 10px;
    }

    .hero-connect-btn {
        font-size: 14px;
    }

    .channel-connect-btn {
        height: 24px;
        padding: 0 5px;
        font-size: 9px;
        border-radius: 4px;
    }

    .filter-tab {
        height: 28px;
        padding: 0 10px;
        font-size: 11px;
    }

    .channel-latency-big {
        font-size: 18px;
    }

    .stat-mini-val {
        font-size: 14px;
    }
}

/* =====================================================
   27. RESPONSIVE - WIDER SCREENS
   ===================================================== */

/* 430px exactly or very close */
@media (min-width: 430px) {
    .mobile-app {
        box-shadow:
            -2px 0 20px rgba(0,0,0,0.4),
            2px 0 20px rgba(0,0,0,0.4);
    }
}

/* =====================================================
   28. DESKTOP NAVIGATION (>768px)
   ===================================================== */
@media (min-width: 768px) {
    .bottom-nav {
        width: min(100%, 600px);
        height: calc(72px + env(safe-area-inset-bottom));
        border-top: 1px solid rgba(52, 124, 255, 0.5);
    }

    .bottom-nav-inner {
        justify-content: space-evenly;
        height: 72px;
        padding: 0 8px 8px;
    }

    .nav-item {
        height: 58px;
        width: 60px;
    }

    .nav-item svg {
        width: 22px;
        height: 22px;
    }

    .nav-item span {
        font-size: 11px;
    }

    .nav-center-wrap {
        width: 50px;
        height: 72px;
    }

    .nav-center-btn {
        width: 42px;
        height: 42px;
        box-shadow: 0 0 16px rgba(124, 73, 255, 0.65), 0 4px 10px rgba(0,0,0,0.3);
    }

    .nav-center-btn svg {
        width: 18px;
        height: 18px;
    }

    .nav-center-label {
        font-size: 10px;
        bottom: 4px;
    }

    /* Page header larger on desktop */
    .page-header {
        padding: 20px 20px 16px;
    }

    .page-header h1 {
        font-size: 22px;
    }

    .page-header p {
        font-size: 13px;
    }

    .page-header .header-actions {
        gap: 10px;
    }
}

/* =====================================================
   29. MOBILE OPTIMIZATION (<390px)
   ===================================================== */
@media (max-width: 389px) {
    .bottom-nav {
        width: 100%;
        height: calc(60px + env(safe-area-inset-bottom));
    }

    .bottom-nav-inner {
        justify-content: space-evenly;
        height: 60px;
        padding: 0 2px 4px;
    }

    .nav-item {
        height: 50px;
        width: 50px;
    }

    .nav-item svg {
        width: 16px;
        height: 16px;
    }

    .nav-item span {
        font-size: 8px;
    }

    .nav-center-wrap {
        width: 40px;
        height: 60px;
    }

    .nav-center-btn {
        width: 34px;
        height: 34px;
        box-shadow: 0 0 12px rgba(124, 73, 255, 0.5), 0 2px 6px rgba(0,0,0,0.25);
    }

    .nav-center-btn svg {
        width: 14px;
        height: 14px;
    }

    .nav-center-label {
        font-size: 8px;
        bottom: 2px;
    }
}

/* =====================================================
   30. LARGE DESKTOP (>1024px)
   ===================================================== */
@media (min-width: 1024px) {
    .bottom-nav {
        width: min(100%, 700px);
        height: calc(76px + env(safe-area-inset-bottom));
    }

    .bottom-nav-inner {
        justify-content: space-evenly;
        height: 76px;
        padding: 0 16px 10px;
    }

    .nav-item {
        height: 62px;
        width: 64px;
    }

    .nav-item svg {
        width: 24px;
        height: 24px;
    }

    .nav-item span {
        font-size: 12px;
    }

    .nav-center-wrap {
        width: 56px;
        height: 76px;
    }

    .nav-center-btn {
        width: 46px;
        height: 46px;
        box-shadow: 0 0 20px rgba(124, 73, 255, 0.7), 0 5px 12px rgba(0,0,0,0.35);
    }

    .nav-center-btn svg {
        width: 20px;
        height: 20px;
    }

    .nav-center-label {
        font-size: 11px;
        bottom: 6px;
    }
}
