/* =============================================
   Veamcast Landing — Master Stylesheet
   ============================================= */

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0; padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    overflow: hidden;
    color: white;
    background: #050508;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* ===== Universal lighthouse background ===== */
#backdrop {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: #050508 url('/Images/lighthouse-dark.jpg') center center no-repeat;
    background-size: cover;
    z-index: 0;
}
#backdrop::after {
    content: '';
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(5,5,8,0.25) 0%,
        rgba(5,5,8,0.1) 25%,
        rgba(5,5,8,0.2) 50%,
        rgba(5,5,8,0.6) 80%,
        rgba(5,5,8,0.9) 100%
    );
}

/* ===== Animations ===== */
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes beam-scale {
    0%   { transform: scaleX(0) scaleY(1); }
    25%  { transform: scaleX(1) scaleY(1); }
    50%  { transform: scaleX(0) scaleY(4); }
    75%  { transform: scaleX(-1) scaleY(1); }
    100% { transform: scaleX(0) scaleY(1); }
}
@keyframes glow-pulse {
    0%   { opacity: 0; }
    40%  { opacity: 0; }
    45%  { opacity: 0.25; }
    50%  { opacity: 1; }
    55%  { opacity: 0.25; }
    60%  { opacity: 0; }
    100% { opacity: 0; }
}
@keyframes btn-shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes featureSlideIn {
    0%   { opacity: 0; transform: translateX(-80px) scale(0.85); }
    60%  { opacity: 1; }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes fc-shimmer {
    0%   { background-position: 200% center; }
    100% { background-position: -200% center; }
}
@keyframes fc-pulse {
    0%   { box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 0 rgba(255,255,255,0.3); }
    50%  { box-shadow: 0 8px 30px rgba(0,0,0,0.3), 0 0 18px 4px rgba(255,255,255,0.15); }
    100% { box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 0 rgba(255,255,255,0.3); }
}
@keyframes nl-cloud-r { 0% { transform: translateX(-90vw); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translateX(100vw); opacity: 0; } }
@keyframes nl-cloud-l { 0% { transform: translateX(100vw); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translateX(-90vw); opacity: 0; } }

/* ===== Top Navigation Bar ===== */
#topNav {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 56px;
    background: linear-gradient(to bottom, rgba(5,5,8,0.85) 0%, rgba(5,5,8,0.4) 70%, transparent 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
#topNav .nav-logo {
    width: 160px;
    height: auto;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.2s;
    flex-shrink: 0;
}
#topNav .nav-logo:hover { opacity: 1; }
#topNav .nav-links {
    display: flex;
    gap: 6px;
    margin-left: 24px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}
#topNav .nav-links::-webkit-scrollbar { display: none; }
#topNav .nav-link {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 400;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    border-radius: 4px;
    white-space: nowrap;
    transition: all 0.2s;
    cursor: pointer;
}
#topNav .nav-link:hover { color: white; background: rgba(255,255,255,0.08); }
#topNav .nav-link.active { color: white; background: rgba(255,255,255,0.12); font-weight: 500; }
#topNav .nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

/* Notification bell */
.nav-bell {
    position: relative;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}
.nav-bell:hover { background: rgba(255,255,255,0.1); }
.nav-bell svg { width: 20px; height: 20px; fill: rgba(255,255,255,0.7); }
.nav-bell .bell-badge {
    position: absolute;
    top: 4px; right: 4px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #e53935;
    border: 2px solid #050508;
    display: none;
}
.nav-bell .bell-badge.active { display: block; }

/* User avatar in nav */
.nav-user {
    height: 26px;
    padding: 0 36px;
    border-radius: 10px;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    transition: box-shadow 0.2s;
    font-size: 14px; font-weight: 600;
    color: rgba(255,255,255,0.5);
}
.nav-user:hover { box-shadow: 0 0 0 2px rgba(255,255,255,0.3); }
.nav-user img { width: 22px; height: 22px; object-fit: cover; border-radius: 6px; }

/* ===== Auth button (docked under logo, inline in stage flow) ===== */
.auth-button {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 44px;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.5px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-shrink: 0;
}
.auth-button:hover {
    color: white;
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.35);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.auth-button .auth-icon { opacity: 0.6; flex-shrink: 0; }
.auth-button:hover .auth-icon { opacity: 1; }
.auth-button .auth-divider { opacity: 0.4; flex-shrink: 0; }
.auth-button .auth-context {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.5;
    font-style: italic;
}
.auth-button .auth-context:empty { display: none; }

/* Auth button — logged-in avatar state */
.auth-button.auth-logged-in {
    padding: 6px 32px 6px 10px;
    gap: 10px;
    border-radius: 22px;
}
.auth-button.auth-logged-in .auth-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600;
    color: rgba(255,255,255,0.7);
    flex-shrink: 0;
}
.auth-button.auth-logged-in .auth-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.auth-button.auth-logged-in .auth-name {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.auth-button.auth-logged-in:hover .auth-name { color: white; }

/* ===== Page container ===== */
#pageContainer {
    position: relative; z-index: 6;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding-top: 56px; /* nav bar height */
    scroll-behavior: smooth;
}
#pageContainer::-webkit-scrollbar { width: 6px; }
#pageContainer::-webkit-scrollbar-track { background: transparent; }
#pageContainer::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
#pageContainer::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ===== Centered stage (home page) ===== */
#stage {
    position: relative; z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 30px 20px;
    text-align: center;
}

/* ===== Animated Veamcast Logo ===== */
.logo {
    width: 260px;
    height: auto;
    margin-top: 18px;
    flex-shrink: 0;
}
.logo-beam {
    transform-box: fill-box;
    transform-origin: -3.3% 0%;
    animation: beam-scale 4s linear infinite;
}
.logo-glow { animation: glow-pulse 4s linear infinite; }
.logo.stopped .logo-beam { animation: none; opacity: 0.5; }
.logo.stopped .logo-glow { animation: none; opacity: 0; }

/* ===== Panels ===== */
.panel { display: none; width: 100%; max-width: 540px; }
.panel.visible { display: block; animation: slideUp 0.6s ease-out both; }

/* ===== HOME PANEL ===== */
#homePanel { margin-top: 36px; }
.home-tagline {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.9;
    margin: 0 0 16px 0;
}
.home-desc {
    font-size: 15px;
    font-weight: 300;
    line-height: 1.7;
    opacity: 0.65;
    margin: 0 0 32px 0;
}
.home-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.25);
}
.btn:hover { transform: translateY(-2px); }

/* Large hero buttons — glass morphism */
.btn-hero {
    padding: 28px 64px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 8px 32px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.15),
        inset 0 -1px 0 rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.btn-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.12), transparent);
    border-radius: 16px 16px 0 0;
    pointer-events: none;
}
.btn-hero:hover {
    transform: translateY(-5px) scale(1.04);
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.45);
    box-shadow:
        0 14px 44px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.2),
        0 0 30px rgba(255,255,255,0.08);
}
.btn-hero:active {
    transform: translateY(0px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.btn-download {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 28px 58px 26px;
    min-width: 210px;
}
.store-logo { width: 68px; height: 68px; opacity: 0.9; }
#btnLearnMore .store-logo, #btnDiscover .store-logo { width: 121px; height: 121px; }
.btn-hero-accent {
    background: rgba(24,52,136,0.35);
    border-color: rgba(100,130,220,0.4);
    box-shadow:
        0 8px 32px rgba(24,52,136,0.3),
        inset 0 1px 0 rgba(255,255,255,0.12),
        inset 0 -1px 0 rgba(255,255,255,0.04);
}
.btn-hero-accent:hover {
    background: rgba(30,60,170,0.55);
    border-color: rgba(130,160,255,0.7);
    transform: translateY(-5px) scale(1.04);
    box-shadow:
        0 14px 44px rgba(24,52,136,0.5),
        inset 0 1px 0 rgba(255,255,255,0.22),
        0 0 30px rgba(100,130,220,0.25),
        0 0 60px rgba(80,120,255,0.12);
}
.btn-primary {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.4);
}
.btn-primary:hover { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.6); }
.btn-secondary {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.18);
}
.btn-secondary:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.35); }
.btn-accent {
    background: rgba(24,52,136,0.7);
    border-color: rgba(24,52,136,0.9);
}
.btn-accent:hover { background: rgba(24,52,136,0.9); border-color: rgba(100,130,220,0.8); }

/* ===== LOADING STATE — buttons disabled with gradient shimmer ===== */
.btn.loading {
    pointer-events: none;
    cursor: default;
    opacity: 0.35;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 0%,
        rgba(24,52,136,0.3) 25%,
        rgba(255,255,255,0.12) 50%,
        rgba(24,52,136,0.3) 75%,
        rgba(255,255,255,0.04) 100%) !important;
    background-size: 200% 100% !important;
    animation: btn-shimmer 2.5s linear infinite;
    border-color: rgba(255,255,255,0.08);
    transform: scale(0.95);
}

/* ===== FEATURE STRIP (4 image buttons) ===== */
.feature-strip {
    display: none;
    grid-template-columns: repeat(2, 150px);
    gap: 14px;
    justify-content: center;
    margin-top: 26px;
    opacity: 0;
    pointer-events: none;
}
.feature-strip.visible { display: none; }
.feature-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    transform: translateX(-80px) scale(0.85);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-decoration: none;
    display: block;
}
.feature-card.slide-in { animation: featureSlideIn 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.feature-card:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 12px 36px rgba(0,0,0,0.5), 0 0 20px rgba(255,255,255,0.06);
}
.feature-card img { width: 100%; display: block; }
.feature-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.45);
    transition: background 0.3s ease;
}
.feature-card:hover .feature-overlay { background: rgba(0, 0, 0, 0.05); }
.feature-card:active .feature-overlay { background: rgba(0, 0, 0, 0); }
.feature-card.fc-loading { pointer-events: none; animation: fc-pulse 1.2s ease-in-out infinite; }
.feature-card.fc-loading .feature-overlay { background: rgba(0, 0, 0, 0); }
.feature-card.fc-loading::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 14px;
    z-index: 2;
    background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
    background-size: 250% 100%;
    animation: fc-shimmer 1.4s ease-in-out infinite;
}

/* ===== Full-size player iframe ===== */
#playerFrame {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
#playerFrame.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
}

/* ===== NAV GRID (button tabs below hero) ===== */
.nav-grid {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 18px;
}
.nav-grid .btn {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 400;
}

/* ===== CONTENT PANEL (preview card) ===== */
#contentPanel { margin-top: 32px; }
.preview-card {
    max-width: 420px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.preview-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    background: rgba(255,255,255,0.04);
}
.preview-thumb[src=""] { display: none; }
.preview-body { padding: 16px 20px; }
.preview-title {
    font-size: 17px; font-weight: 600;
    margin: 0 0 5px 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.preview-desc {
    font-size: 13px; font-weight: 300; opacity: 0.6;
    margin: 0 0 14px 0; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.preview-owner { display: flex; align-items: center; gap: 10px; }
.preview-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    object-fit: cover; background: rgba(255,255,255,0.1); flex-shrink: 0;
}
.preview-avatar-ph {
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(255,255,255,0.1); display: flex;
    align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; opacity: 0.5; flex-shrink: 0;
}
.preview-meta { display: flex; flex-direction: column; min-width: 0; }
.preview-owner-name {
    font-size: 13px; font-weight: 500; opacity: 0.85;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.preview-channel-name {
    font-size: 12px; font-weight: 300; opacity: 0.45;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.preview-status {
    margin-top: 14px;
    font-size: 12px; opacity: 0.4; font-weight: 300;
}

/* ===== CHANNEL PANEL ===== */
#channelPanel {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 8;
    display: none;
    flex-direction: column;
    overflow: hidden;
}
#channelPanel.visible {
    display: flex;
    animation: fadeIn 0.5s ease-out both;
}
.channel-header {
    flex-shrink: 0;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    background: linear-gradient(135deg,
        rgba(255,255,255,0.12) 0%,
        rgba(0,0,0,0.55) 34%,
        rgba(255,255,255,0.12) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.channel-avatar-wrap {
    width: 72px; height: 72px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255,255,255,0.08);
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.channel-avatar-wrap img { width: 100%; height: 100%; object-fit: cover; }
.channel-avatar-ph {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 600; opacity: 0.4;
}
.channel-info { flex: 1; min-width: 0; }
.channel-name {
    font-size: 22px; font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.channel-owner { font-size: 13px; opacity: 0.55; margin-top: 2px; }
.channel-stats { font-size: 12px; opacity: 0.4; margin-top: 4px; }
.channel-buttons { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ch-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 500;
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: lowercase;
    letter-spacing: 0.5px;
}
.ch-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.ch-btn:active { transform: translateY(0); }
.ch-btn-subscribe {
    background: linear-gradient(135deg, #183466 0%, #183488 100%);
    border-color: rgba(24,52,136,0.6);
    box-shadow: 0 2px 10px rgba(24,52,136,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}
.ch-btn-subscribe:hover {
    background: linear-gradient(135deg, #1e3f7a 0%, #1e42a0 100%);
    border-color: rgba(100,130,220,0.5);
}
.ch-btn-unsubscribe, .ch-btn-moderate {
    background: linear-gradient(135deg, #880000 0%, #000 34%, #880000 100%);
    border-color: rgba(136,0,0,0.6);
    box-shadow: 0 2px 10px rgba(136,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.08);
}
.ch-btn-unsubscribe:hover, .ch-btn-moderate:hover {
    background: linear-gradient(135deg, #aa0000 0%, #220000 34%, #aa0000 100%);
    border-color: rgba(200,60,60,0.5);
}
.ch-btn-back {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
}
.ch-btn-back:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.3); }

/* Package list */
.channel-packages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 20px 80px;
    scroll-behavior: smooth;
}
.channel-packages::-webkit-scrollbar { width: 6px; }
.channel-packages::-webkit-scrollbar-track { background: transparent; }
.channel-packages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
.channel-packages::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }
.pkg-card {
    display: flex;
    gap: 14px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    transition: all 0.2s ease;
}
.pkg-card:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.15);
    transform: translateX(4px);
}
.pkg-thumb {
    width: 120px; height: 68px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
}
.pkg-thumb-ph {
    width: 120px; height: 68px;
    border-radius: 6px;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(24,52,136,0.3) 0%, rgba(0,0,0,0.3) 100%);
    display: flex; align-items: center; justify-content: center;
}
.pkg-thumb-ph svg { width: 28px; height: 28px; opacity: 0.3; }
.pkg-info {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; justify-content: center;
}
.pkg-subject { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pkg-owner { font-size: 12px; opacity: 0.5; margin-top: 3px; }
.pkg-date { font-size: 11px; opacity: 0.35; margin-top: 2px; }

/* Package card skeletons */
.pkg-card-skeleton {
    display: flex; gap: 14px; padding: 12px 14px;
    margin-bottom: 8px; border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.04);
}
.pkg-skel-thumb {
    width: 120px; height: 68px; border-radius: 6px; flex-shrink: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 100%);
    background-size: 200% 100%; animation: btn-shimmer 1.8s linear infinite;
}
.pkg-skel-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.pkg-skel-line {
    height: 12px; border-radius: 4px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 100%);
    background-size: 200% 100%; animation: btn-shimmer 1.8s linear infinite;
}
.pkg-skel-line:first-child { width: 70%; }
.pkg-skel-line:nth-child(2) { width: 45%; }
.channel-loader { text-align: center; padding: 20px; font-size: 13px; opacity: 0.4; }
.channel-end { text-align: center; padding: 20px; font-size: 13px; opacity: 0.3; font-style: italic; }

/* ===== Navigation loading overlay ===== */
#navLoader {
    display: none;
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: #050508;
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in;
}
#navLoader.active { display: flex; }
#navLoader::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 800px; height: 400px;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 30%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}
#navLoader .nav-cloud {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    will-change: transform, opacity;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.08) 50%, transparent 80%);
}

/* ===== Static/Legal page content ===== */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    animation: slideUp 0.5s ease-out both;
}
.legal-page h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 1px;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.legal-page .legal-subtitle {
    font-size: 13px;
    opacity: 0.4;
    margin: 0 0 32px 0;
}
.legal-page h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 32px 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.legal-page h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 20px 0 8px 0;
}
.legal-page p {
    font-size: 14px;
    font-weight: 300;
    line-height: 1.8;
    opacity: 0.75;
    margin: 0 0 16px 0;
}
.legal-page ul, .legal-page ol {
    font-size: 14px;
    font-weight: 300;
    line-height: 1.8;
    opacity: 0.75;
    padding-left: 24px;
    margin: 0 0 16px 0;
}
.legal-page li { margin-bottom: 8px; }
.legal-page a {
    color: rgba(130,170,255,0.9);
    text-decoration: none;
}
.legal-page a:hover { text-decoration: underline; color: white; }
.legal-page .legal-contact {
    margin-top: 32px;
    padding: 20px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
}

/* ===== Contact page ===== */
.contact-card {
    max-width: 480px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.1);
}
.contact-card h2 { margin-top: 0; border: none; }
.contact-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.contact-row:last-child { border-bottom: none; }
.contact-row svg {
    width: 20px; height: 20px;
    fill: rgba(255,255,255,0.5);
    flex-shrink: 0;
}
.contact-row a {
    color: rgba(130,170,255,0.9);
    text-decoration: none;
    font-size: 15px;
}
.contact-row a:hover { text-decoration: underline; color: white; }

/* ===== Notification panel ===== */
#notificationPanel {
    position: fixed;
    top: 56px; right: 0;
    width: 380px;
    max-height: calc(100vh - 56px);
    z-index: 60;
    display: none;
    flex-direction: column;
    background: rgba(15,15,20,0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid rgba(255,255,255,0.08);
    box-shadow: -8px 0 32px rgba(0,0,0,0.5);
    animation: slideInRight 0.3s ease-out;
}
#notificationPanel.visible { display: flex; }
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.notif-header {
    flex-shrink: 0;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.notif-header h3 { margin: 0; font-size: 16px; font-weight: 600; }
.notif-close {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border-radius: 50%;
    transition: background 0.2s;
}
.notif-close:hover { background: rgba(255,255,255,0.1); }
.notif-close svg { width: 16px; height: 16px; fill: rgba(255,255,255,0.5); }
.notif-permission {
    padding: 16px 20px;
    background: rgba(24,52,136,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 13px;
    line-height: 1.5;
    opacity: 0.8;
}
.notif-permission .btn {
    margin-top: 10px;
    padding: 8px 20px;
    font-size: 13px;
}
.notif-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}
.notif-list::-webkit-scrollbar { width: 4px; }
.notif-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
.notif-item {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.notif-item:hover { background: rgba(255,255,255,0.05); }
.notif-item.unread { background: rgba(24,52,136,0.1); }
.notif-item.unread:hover { background: rgba(24,52,136,0.15); }
.notif-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.notif-avatar img { width: 100%; height: 100%; object-fit: cover; }
.notif-avatar svg { width: 18px; height: 18px; fill: rgba(255,255,255,0.4); }
.notif-body { flex: 1; min-width: 0; }
.notif-text {
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.85;
}
.notif-text strong { font-weight: 600; }
.notif-time {
    font-size: 11px;
    opacity: 0.4;
    margin-top: 3px;
}
.notif-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}
.notif-actions .btn {
    padding: 5px 14px;
    font-size: 12px;
    border-radius: 4px;
}
.notif-empty {
    text-align: center;
    padding: 40px 20px;
    font-size: 13px;
    opacity: 0.35;
}

/* ===== Chat panel (slide-out right) ===== */
#chatPanel {
    position: fixed;
    top: 0; right: 0;
    width: 380px;
    height: 100vh;
    z-index: 55;
    display: none;
    flex-direction: column;
    background: rgba(10,10,15,0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid rgba(255,255,255,0.08);
    box-shadow: -8px 0 32px rgba(0,0,0,0.5);
    animation: slideInRight 0.3s ease-out;
}
#chatPanel.visible { display: flex; }
.chat-header {
    flex-shrink: 0;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.chat-header h3 { margin: 0; font-size: 16px; font-weight: 600; flex: 1; }
.chat-back {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border-radius: 50%;
    transition: background 0.2s;
}
.chat-back:hover { background: rgba(255,255,255,0.1); }
.chat-back svg { width: 16px; height: 16px; fill: rgba(255,255,255,0.5); }
.chat-close {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border-radius: 50%;
    transition: background 0.2s;
}
.chat-close:hover { background: rgba(255,255,255,0.1); }
.chat-close svg { width: 16px; height: 16px; fill: rgba(255,255,255,0.5); }

/* Contact list — wrap panel layout */
.chat-contacts {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}
.chat-contacts-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
}
.chat-contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    padding: 12px 6px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    text-align: center;
}
.chat-contact-card:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.15);
}
.chat-contact-card .chat-contact-avatar {
    width: 44px; height: 44px;
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    font-size: 17px; font-weight: 600; opacity: 0.5;
    margin-bottom: 6px;
    flex-shrink: 0;
}
.chat-contact-card .chat-contact-avatar img {
    width: 100%; height: 100%; object-fit: cover;
    position: absolute;
}
.chat-contact-card .chat-contact-avatar {
    position: relative;
}
.chat-contact-card .chat-contact-name {
    font-size: 12px; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    width: 100%;
    margin-bottom: 6px;
}
.chat-contact-card .chat-contact-actions {
    display: flex; gap: 4px;
}
.chat-contact-card .chat-contact-actions button {
    width: 28px; height: 28px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.chat-contact-card .chat-btn-call {
    background: rgba(76,175,80,0.25);
}
.chat-contact-card .chat-btn-call:hover { background: rgba(76,175,80,0.45); }
.chat-contact-card .chat-btn-call svg { width: 14px; height: 14px; fill: #4caf50; }
.chat-contact-card .chat-btn-msg {
    background: rgba(24,52,136,0.3);
}
.chat-contact-card .chat-btn-msg:hover { background: rgba(24,52,136,0.5); }
.chat-contact-card .chat-btn-msg svg { width: 14px; height: 14px; fill: rgba(130,170,255,0.9); }

/* Contacts view toggle (tile/list) */
.contacts-view-toggle {
    display: flex;
    justify-content: flex-end;
    gap: 2px;
    padding: 6px 12px 2px;
}
.view-toggle-btn {
    width: 28px; height: 28px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}
.view-toggle-btn svg { fill: rgba(255,255,255,0.4); }
.view-toggle-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.2);
}
.view-toggle-btn.active {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.25);
}
.view-toggle-btn.active svg { fill: rgba(255,255,255,0.7); }

/* List view for contacts */
.chat-contacts-list {
    display: flex;
    flex-direction: column;
    padding: 4px 0;
}
.chat-contact-row-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.chat-contact-row-item:last-child { border-bottom: none; }
.chat-contact-row-item:hover { background: rgba(255,255,255,0.06); }
.chat-contact-row-item .chat-contact-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    font-size: 14px; font-weight: 600; opacity: 0.5;
    flex-shrink: 0;
    position: relative;
}
.chat-contact-row-item .chat-contact-avatar img {
    width: 100%; height: 100%; object-fit: cover;
    position: absolute;
}
.chat-contact-row-item .chat-contact-info {
    flex: 1;
    min-width: 0;
}
.chat-contact-row-item .chat-contact-name {
    font-size: 13px; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-contact-row-item .chat-contact-email {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-top: 1px;
}

/* Ship's wheel loading spinner */
.chat-wheel-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 48px 0;
}
.chat-wheel-loader {
    width: 80px; height: 80px;
    animation: chat-spin 6s linear infinite;
}
@keyframes chat-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Refresh button — small icon only */
.chat-refresh {
    width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border-radius: 50%;
    transition: background 0.2s;
    flex-shrink: 0;
    opacity: 0.4;
}
.chat-refresh:hover { background: rgba(255,255,255,0.1); opacity: 0.7; }
.chat-refresh svg { fill: rgba(255,255,255,0.7); }

/* Chat messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
.chat-msg {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}
.chat-msg.sent {
    align-self: flex-end;
    background: rgba(24,52,136,0.6);
    border-bottom-right-radius: 4px;
}
.chat-msg.received {
    align-self: flex-start;
    background: rgba(255,255,255,0.08);
    border-bottom-left-radius: 4px;
}
.chat-msg-time {
    font-size: 10px;
    opacity: 0.35;
    margin-top: 4px;
}
.chat-input-area {
    flex-shrink: 0;
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.chat-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: white;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}
.chat-input::placeholder { color: rgba(255,255,255,0.3); }
.chat-input:focus { border-color: rgba(100,130,220,0.5); }
.chat-send {
    width: 40px; height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(24,52,136,0.6);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}
.chat-send:hover { background: rgba(24,52,136,0.85); }
.chat-send svg { width: 18px; height: 18px; fill: white; }

/* ===== Call overlay ===== */
#callOverlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 200;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(5,5,8,0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    animation: fadeIn 0.3s ease;
}
#callOverlay.visible { display: flex; }
.call-avatar {
    width: 100px; height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    font-size: 36px; font-weight: 600; opacity: 0.5;
    margin-bottom: 20px;
}
.call-avatar img { width: 100%; height: 100%; object-fit: cover; }
.call-name {
    font-size: 24px; font-weight: 600;
    margin-bottom: 8px;
}
.call-status {
    font-size: 14px;
    opacity: 0.5;
    margin-bottom: 40px;
}
.call-timer {
    font-size: 18px;
    font-weight: 300;
    opacity: 0.6;
    margin-bottom: 30px;
    font-variant-numeric: tabular-nums;
}
.call-controls {
    display: flex;
    gap: 20px;
}
.call-btn {
    width: 56px; height: 56px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.call-btn svg { width: 24px; height: 24px; fill: white; }
.call-btn-mute { background: rgba(255,255,255,0.12); }
.call-btn-mute:hover { background: rgba(255,255,255,0.2); }
.call-btn-mute.active { background: rgba(244,67,54,0.6); }
.call-btn-video { background: rgba(255,255,255,0.12); }
.call-btn-video:hover { background: rgba(255,255,255,0.2); }
.call-btn-video.active { background: rgba(24,52,136,0.6); }
.call-btn-hangup { background: #e53935; }
.call-btn-hangup:hover { background: #f44336; transform: scale(1.08); }
.call-btn-accept { background: #4caf50; }
.call-btn-accept:hover { background: #66bb6a; transform: scale(1.08); }

/* Call video areas */
.call-video-area {
    position: relative;
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16/9;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    display: none;
}
.call-video-area.active { display: block; }
.call-video-area video {
    width: 100%; height: 100%;
    object-fit: cover;
}
.call-video-local {
    position: absolute;
    bottom: 12px; right: 12px;
    width: 160px;
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0,0,0,0.5);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.call-video-local video {
    width: 100%; height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

/* ===== Incoming call toast ===== */
#incomingCallToast {
    position: fixed;
    top: 70px; right: 20px;
    width: 320px;
    z-index: 100;
    display: none;
    padding: 16px 20px;
    border-radius: 12px;
    background: rgba(15,15,20,0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    animation: slideInRight 0.3s ease-out;
}
#incomingCallToast.visible { display: block; }
.ict-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 12px;
}
.ict-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 600; opacity: 0.5;
}
.ict-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ict-info { flex: 1; }
.ict-name { font-size: 15px; font-weight: 600; }
.ict-label { font-size: 12px; opacity: 0.5; }
.ict-actions { display: flex; gap: 10px; }
.ict-actions .call-btn { width: 44px; height: 44px; }
.ict-actions .call-btn svg { width: 20px; height: 20px; }

/* ===== Login modal ===== */
#loginModal {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 150;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(5,5,8,0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}
#loginModal.active { display: flex; }
.login-box {
    width: 400px;
    max-width: 90vw;
    padding: 40px;
    border-radius: 16px;
    background: rgba(15,15,20,0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 16px 64px rgba(0,0,0,0.5);
    text-align: center;
}
.login-box h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 8px 0;
}
.login-box .login-subtitle {
    font-size: 13px;
    opacity: 0.5;
    margin: 0 0 28px 0;
}
.login-input {
    width: 100%;
    padding: 14px 18px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: white;
    font-size: 15px;
    outline: none;
    font-family: inherit;
    text-align: center;
    margin-bottom: 12px;
}
.login-input::placeholder { color: rgba(255,255,255,0.3); }
.login-input:focus { border-color: rgba(100,130,220,0.5); }
.login-box .btn { width: 100%; margin-bottom: 8px; text-align: center; }
.login-status {
    font-size: 13px;
    opacity: 0.5;
    margin-top: 8px;
    min-height: 20px;
}
.login-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}
.login-close:hover { background: rgba(255,255,255,0.1); }
.login-close svg { width: 18px; height: 18px; fill: rgba(255,255,255,0.5); }

/* ===== Footer ===== */
.site-footer {
    padding: 40px 20px 30px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 60px;
}
.footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.footer-links a {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover { color: white; }
.footer-copy {
    font-size: 12px;
    opacity: 0.25;
}

/* ===== Under Construction Banner ===== */
.under-construction {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(30, 25, 0, 0.85);
    border-top: 2px solid #e6c300;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    pointer-events: none;
    animation: fadeIn 1s ease-out;
}
.under-construction span {
    color: #ffd900;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1;
}
.under-construction .uc-icon { width: 22px; height: 22px; flex-shrink: 0; }

/* ===== Responsive (phone) ===== */
@media (max-width: 480px) {
    .logo { width: 120px; }
    #stage { justify-content: flex-start; padding-top: 40px; }
    .home-tagline { font-size: 18px; letter-spacing: 2px; }
    .home-desc { font-size: 13px; }
    .btn { padding: 10px 22px; font-size: 14px; }
    .btn-hero { padding: 20px 40px; font-size: 16px; border-radius: 12px; }
    .btn-download { padding: 22px 42px 20px; gap: 10px; }
    .store-logo { width: 52px; height: 52px; }
    #btnLearnMore .store-logo, #btnDiscover .store-logo { width: 92px; height: 92px; }
    .preview-card { max-width: 92vw; }
    .feature-strip { gap: 10px; grid-template-columns: repeat(2, 120px); }
    .feature-card { border-radius: 10px; }
    .feature-overlay { border-radius: 10px; }
    .feature-card.fc-loading::after { border-radius: 10px; }

    .channel-header { padding: 14px 16px; gap: 12px; }
    .channel-avatar-wrap { width: 52px; height: 52px; border-radius: 8px; }
    .channel-name { font-size: 17px; }
    .channel-packages { padding: 12px 12px 80px; }
    .pkg-thumb, .pkg-thumb-ph, .pkg-skel-thumb { width: 90px; height: 51px; }
    .pkg-subject { font-size: 13px; }

    #topNav .nav-links { margin-left: 12px; }
    #topNav .nav-link { padding: 6px 10px; font-size: 12px; }

    #notificationPanel, #chatPanel { width: 100%; }

    .legal-page { padding: 24px 16px 60px; }
    .legal-page h1 { font-size: 22px; }

    .login-box { padding: 28px 20px; }
    .auth-button { padding: 8px 32px; font-size: 12px; }
    .auth-button.auth-logged-in { padding: 4px 24px 4px 6px; }
}

@media (max-width: 768px) {
    #topNav .nav-links { display: none; }
    .nav-hamburger { display: flex !important; }
}

/* Mobile hamburger */
.nav-hamburger {
    display: none;
    width: 36px; height: 36px;
    align-items: center; justify-content: center;
    cursor: pointer; border-radius: 6px;
    margin-left: 12px;
    transition: background 0.2s;
}
.nav-hamburger:hover { background: rgba(255,255,255,0.1); }
.nav-hamburger svg { width: 20px; height: 20px; fill: rgba(255,255,255,0.7); }

/* Mobile nav menu */
#mobileMenu {
    position: fixed; top: 56px; left: 0;
    width: 100%; height: calc(100vh - 56px);
    z-index: 49;
    display: none;
    flex-direction: column;
    background: rgba(5,5,8,0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 20px;
    animation: fadeIn 0.2s ease;
}
#mobileMenu.visible { display: flex; }
#mobileMenu .nav-link {
    padding: 14px 16px;
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
}
#mobileMenu .nav-link.active { color: white; }

/* ===== Copyright link (homepage bottom-right) ===== */
.copyright-link {
    position: fixed;
    bottom: 20px; right: 24px;
    z-index: 8;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}
.copyright-link a {
    font-size: 18px;
    font-weight: 500;
    color: white;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s;
    cursor: pointer;
}
.copyright-link a:hover { opacity: 0.7; }
.copyright-link .copy-text {
    font-size: 16px;
    color: white;
    user-select: none;
}

/* ===== Info Page (unified tabbed view) ===== */
#pageContainer {
    display: none;
    position: relative;
    z-index: 6;
    height: 100vh;
    overflow-y: auto;
}
#pageContainer.active { display: block; }

.info-page {
    min-height: 100vh;
    padding: 40px 32px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.info-page .logo {
    width: 160px;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.3s;
}
.info-page .logo:hover { opacity: 1; }

.info-home-link {
    text-decoration: none;
    display: block;
    margin-bottom: 24px;
}

.info-sidebar {
    flex-shrink: 0;
    width: 160px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 40px;
}

.info-body {
    display: flex;
    gap: 32px;
    width: 100%;
    max-width: 960px;
    align-items: flex-start;
}

.info-content {
    flex: 1;
    min-width: 0;
    animation: slideUp 0.4s ease-out both;
}
/* Override legal-page margin inside info layout */
.info-content.legal-page {
    margin: 0;
    padding: 0 0 40px 0;
}

/* ===== Info Tabs (left sidebar) ===== */
.info-tabs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.info-tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.55);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: inherit;
}
.info-tab:hover {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
}
.info-tab.active {
    color: white;
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.25);
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

/* Arrow on Legal parent tab */
.info-tab-arrow {
    width: 12px; height: 12px;
    flex-shrink: 0;
    transition: transform 0.2s;
}
.info-tab-parent.expanded .info-tab-arrow {
    transform: rotate(180deg);
}

/* Legal sub-items */
.info-tab-children {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding-left: 12px;
}
.info-tab-children.visible { display: flex; }
.info-tab-child {
    padding: 10px 14px;
    font-size: 13px;
    border-radius: 8px;
}

/* Info page footer */
.info-footer {
    margin-top: auto;
    padding-top: 40px;
    font-size: 12px;
    opacity: 0.2;
    user-select: none;
}

/* ===== Info Page + copyright responsive ===== */
@media (max-width: 700px) {
    body { height: auto; min-height: 100vh; overflow-x: hidden; overflow-y: auto; }
    #stage { height: auto; min-height: 100vh; }

    .info-page { padding: 24px 16px 20px; }
    .info-page .logo { width: 120px; }

    .info-body {
        flex-direction: column;
        gap: 20px;
    }
    .info-sidebar {
        width: 100%;
        position: static;
    }
    .info-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }
    .info-tab {
        padding: 10px 14px;
        font-size: 13px;
        border-radius: 8px;
    }
    .info-tab-children {
        padding-left: 0;
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
    }
    .info-tab-child { flex: 1; min-width: 60px; text-align: center; }

    .info-content.legal-page { padding: 0 0 20px 0; }
    .copyright-link {
        position: static;
        align-items: center;
        padding: 32px 20px 24px;
    }
}

/* ===== Communication toolbar ===== */
.comm-toolbar {
    display: flex;
    gap: 4px;
    margin-top: 12px;
    z-index: 10;
}
.comm-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.comm-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
    color: white;
}
.comm-btn svg {
    width: 16px; height: 16px;
    fill: currentColor;
}
.comm-btn .bell-badge {
    position: absolute;
    top: 4px; right: 8px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #f44336;
    display: none;
}
.comm-btn .bell-badge.active { display: block; }


/* Call button in chat header */
.chat-call-btn {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border-radius: 50%;
    background: rgba(76,175,80,0.25);
    transition: all 0.2s;
}
.chat-call-btn:hover {
    background: rgba(76,175,80,0.45);
    transform: scale(1.1);
}
.chat-call-btn svg {
    width: 16px; height: 16px;
    fill: #4caf50;
}

/* ===== Contact detail — tabbed view ===== */
.contact-detail {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.contact-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.contact-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.45);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}
.contact-tab:hover {
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.03);
}
.contact-tab.active {
    color: white;
    border-bottom-color: rgba(100,130,220,0.7);
}
.contact-tab svg {
    fill: currentColor;
}
.contact-tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* Info tab */
.contact-info-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    gap: 8px;
}
.contact-info-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    font-size: 32px; font-weight: 600; opacity: 0.5;
    position: relative;
    margin-bottom: 8px;
}
.contact-info-avatar img {
    width: 100%; height: 100%; object-fit: cover;
    position: absolute;
}
.contact-info-name {
    font-size: 20px;
    font-weight: 600;
}
.contact-info-email {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    margin-bottom: 16px;
}
.contact-info-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}
.contact-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 24px;
    background: rgba(255,255,255,0.06);
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.contact-action-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
}
.contact-action-btn svg { fill: currentColor; }
.contact-action-call { color: #4caf50; border-color: rgba(76,175,80,0.3); }
.contact-action-call:hover { background: rgba(76,175,80,0.15); border-color: rgba(76,175,80,0.5); }
.contact-action-chat { color: rgba(130,170,255,0.9); border-color: rgba(100,130,220,0.3); }
.contact-action-chat:hover { background: rgba(24,52,136,0.25); border-color: rgba(100,130,220,0.5); }

/* Call tab */
.contact-call-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    gap: 8px;
}
.contact-call-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    font-size: 28px; font-weight: 600; opacity: 0.5;
    position: relative;
    margin-bottom: 8px;
}
.contact-call-avatar img {
    width: 100%; height: 100%; object-fit: cover;
    position: absolute;
}
.contact-call-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}
.contact-call-start {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    border: none;
    border-radius: 30px;
    background: rgba(76,175,80,0.3);
    color: #4caf50;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.contact-call-start:hover {
    background: rgba(76,175,80,0.5);
    transform: scale(1.05);
}
.contact-call-start svg { fill: #4caf50; }
.contact-call-hint {
    margin-top: 16px;
    font-size: 12px;
    color: rgba(255,255,255,0.3);
}

/* ===== Full-screen contact modal (user page) ===== */
@keyframes contactModalIn {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}
#contactModal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 60;
    display: none;
    flex-direction: column;
    background: rgba(5,5,8,0.98);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    animation: contactModalIn 0.25s ease-out;
}
#contactModal.active { display: flex; }

.contact-modal-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.contact-modal-logo {
    height: 32px;
    width: auto;
    opacity: 0.85;
}
.contact-modal-logo path { fill: white; }
.contact-modal-close {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}
.contact-modal-close:hover { background: rgba(255,255,255,0.1); }
.contact-modal-close svg {
    width: 20px; height: 20px;
    fill: rgba(255,255,255,0.6);
}

#contactModalBody {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* User page content inside the modal */
.contact-modal-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px 40px;
    gap: 8px;
    flex: 1;
}
.contact-modal-avatar {
    width: 120px; height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    font-size: 48px; font-weight: 600; opacity: 0.5;
    position: relative;
    margin-bottom: 12px;
}
.contact-modal-avatar img {
    width: 100%; height: 100%; object-fit: cover;
    position: absolute;
}
.contact-modal-name {
    font-size: 28px;
    font-weight: 600;
}
.contact-modal-email {
    font-size: 15px;
    color: rgba(255,255,255,0.45);
    margin-bottom: 24px;
}
.contact-modal-actions {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}
.contact-modal-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 36px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
    color: white;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
}
.contact-modal-action:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}
.contact-modal-action svg { fill: currentColor; width: 28px; height: 28px; }
.contact-modal-action-call { color: #4caf50; border-color: rgba(76,175,80,0.3); }
.contact-modal-action-call:hover { background: rgba(76,175,80,0.15); border-color: rgba(76,175,80,0.5); }
.contact-modal-action-chat { color: rgba(130,170,255,0.9); border-color: rgba(100,130,220,0.3); }
.contact-modal-action-chat:hover { background: rgba(24,52,136,0.25); border-color: rgba(100,130,220,0.5); }

/* Chat area inside modal (shown when Chat is clicked) */
.contact-modal-chat {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px 20px;
}
.contact-modal-chat .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.contact-modal-chat .chat-input-area {
    display: flex;
    gap: 8px;
    padding: 12px 0 0;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.contact-modal-chat .chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px;
    background: rgba(255,255,255,0.06);
    color: white;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}
.contact-modal-chat .chat-input:focus {
    border-color: rgba(100,130,220,0.5);
    background: rgba(255,255,255,0.08);
}
.contact-modal-chat .chat-send {
    width: 44px; height: 44px;
    border: none; border-radius: 50%;
    background: rgba(24,52,136,0.5);
    color: white; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.contact-modal-chat .chat-send:hover { background: rgba(24,52,136,0.8); }
.contact-modal-chat .chat-send svg { width: 18px; height: 18px; fill: currentColor; }

/* Back link in modal (when showing chat) */
.contact-modal-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    cursor: pointer;
    padding: 8px 16px;
    margin: 8px 0 0 20px;
    transition: color 0.2s;
    max-width: 700px;
    align-self: center;
    width: 100%;
}
.contact-modal-back:hover { color: rgba(255,255,255,0.8); }
.contact-modal-back svg { width: 16px; height: 16px; fill: currentColor; }

@media (max-width: 480px) {
    .comm-toolbar { gap: 2px; }
    .comm-btn { padding: 6px 10px; font-size: 11px; }
    .comm-btn span:not(.bell-badge) { display: none; }
    .contact-modal-avatar { width: 80px; height: 80px; font-size: 32px; }
    .contact-modal-name { font-size: 22px; }
    .contact-modal-actions { gap: 10px; }
    .contact-modal-action { padding: 16px 24px; min-width: 100px; font-size: 13px; }
    .contact-modal-user { padding: 40px 16px 24px; }
}
