/* ============================================================
   BZPHost Remote Support - Dark Theme
   ============================================================ */

:root {
    --bzp-bg:        #090d18;
    --bzp-card:      #111827;
    --bzp-border:    #1e2d45;
    --bzp-primary:   #3b82f6;
    --bzp-primary-h: #2563eb;
    --bzp-text:      #e2e8f0;
    --bzp-muted:     #64748b;
    --bzp-success:   #22c55e;
    --bzp-radius:    .875rem;
    --bzp-shadow:    0 20px 60px rgba(0,0,0,.55);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--bzp-bg);
    color: var(--bzp-text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
}

.bzp-muted { color: var(--bzp-muted) !important; }

.bzp-logo {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--bzp-primary);
    letter-spacing: -.5px;
    text-decoration: none;
}

.bzp-card {
    background: var(--bzp-card);
    border: 1px solid var(--bzp-border);
    border-radius: var(--bzp-radius);
    box-shadow: var(--bzp-shadow);
}

.bzp-input {
    background: #0d1424 !important;
    border-color: var(--bzp-border) !important;
    color: var(--bzp-text) !important;
    border-radius: .6rem !important;
    transition: border-color .2s, box-shadow .2s;
}
.bzp-input:focus {
    border-color: var(--bzp-primary) !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,.2) !important;
    background: #0d1424 !important;
}
.bzp-input::placeholder { color: var(--bzp-muted) !important; }

.bzp-btn-primary {
    background: var(--bzp-primary);
    border: none;
    border-radius: .6rem;
    font-weight: 600;
    transition: background .2s, transform .1s, box-shadow .2s;
    box-shadow: 0 4px 15px rgba(59,130,246,.3);
}
.bzp-btn-primary:hover {
    background: var(--bzp-primary-h);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59,130,246,.4);
}
.bzp-btn-primary:active { transform: translateY(0); }

.bzp-badge {
    background: rgba(59,130,246,.15);
    color: var(--bzp-primary);
    border: 1px solid rgba(59,130,246,.25);
    border-radius: 2rem;
    font-weight: 600;
    font-size: .78rem;
}

.bzp-alert-info {
    background: rgba(59,130,246,.1) !important;
    color: #93c5fd;
}

/* Navbar */
.bzp-navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    display: flex; align-items: center; justify-content: space-between;
    padding: .85rem 1.5rem;
    background: rgba(9,13,24,.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--bzp-border);
}

/* Hero */
.bzp-hero {
    min-height: 100vh;
    padding-top: 4.5rem;
    background: radial-gradient(ellipse 80% 60% at 50% -10%, #1a2e5a 0%, var(--bzp-bg) 65%);
}

.bzp-icon-wrap {
    width: 64px; height: 64px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(59,130,246,.12);
    border: 1px solid rgba(59,130,246,.2);
    border-radius: 1rem;
}

.feature-card {
    background: rgba(255,255,255,.03);
    border: 1px solid var(--bzp-border);
    border-radius: .75rem;
    transition: border-color .2s, background .2s;
}
.feature-card:hover {
    background: rgba(59,130,246,.06);
    border-color: rgba(59,130,246,.3);
}

/* Steps */
.bzp-steps { background: rgba(255,255,255,.015); }

.step-badge {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(59,130,246,.15);
    border: 2px solid rgba(59,130,246,.35);
    color: var(--bzp-primary);
    font-size: 1.1rem;
    font-weight: 700;
}

/* Footer */
.bzp-footer {
    padding: 2rem 0;
    border-top: 1px solid var(--bzp-border);
    margin-top: 2rem;
}

/* Support session page */
.support-page {
    min-height: 100vh;
    padding-top: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 2rem;
    background: radial-gradient(ellipse 80% 60% at 50% -10%, #132240 0%, var(--bzp-bg) 65%);
}
.support-card { max-width: 660px; width: 100%; }

.pulse-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px; height: 80px;
}
.pulse-ring {
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(59,130,246,.4);
    animation: pulse-anim 2s ease-out infinite;
}
@keyframes pulse-anim {
    0%   { transform: scale(.85); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.session-id-box {
    display: inline-block;
    background: rgba(59,130,246,.08);
    border: 1px solid rgba(59,130,246,.2);
    border-radius: .6rem;
    padding: .6rem 1.25rem;
}
.session-id-text {
    font-family: 'Courier New', monospace;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: .2em;
    color: var(--bzp-primary);
}

.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.status-dot-green {
    background: var(--bzp-success);
    box-shadow: 0 0 8px var(--bzp-success);
    animation: blink 2s infinite;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:.5; } }

.video-preview-wrap {
    position: relative;
    border-radius: .6rem;
    overflow: hidden;
    background: #000;
    max-height: 320px;
}
.video-preview-wrap video { display: block; width: 100%; max-height: 320px; object-fit: contain; }
.video-badge {
    position: absolute; bottom: .5rem; right: .5rem;
    background: rgba(0,0,0,.65);
    color: #aaa;
    font-size: .72rem;
    padding: .2rem .6rem;
    border-radius: 2rem;
    backdrop-filter: blur(4px);
}

/* Remote cursor shown on client side */
.remote-cursor {
    position: fixed;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(239,68,68,.75);
    border: 2px solid #fff;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: left .05s linear, top .05s linear;
    box-shadow: 0 0 10px rgba(239,68,68,.5);
}

/* Admin layout */
.admin-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.admin-sidebar {
    width: 280px;
    min-width: 280px;
    background: var(--bzp-card);
    border-right: 1px solid var(--bzp-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.sidebar-brand {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--bzp-border);
    flex-shrink: 0;
}
.sidebar-section { flex: 1; overflow-y: auto; padding: .5rem 0; }
.sidebar-section::-webkit-scrollbar { width: 4px; }
.sidebar-section::-webkit-scrollbar-thumb { background: var(--bzp-border); border-radius: 2px; }
.sidebar-section-title {
    padding: .6rem 1.25rem;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--bzp-muted);
}
.sidebar-footer {
    padding: .75rem 1rem;
    border-top: 1px solid var(--bzp-border);
    flex-shrink: 0;
}

.session-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1rem;
    cursor: pointer;
    transition: background .15s;
    border-left: 3px solid transparent;
}
.session-item:hover { background: rgba(59,130,246,.07); border-left-color: rgba(59,130,246,.4); }
.session-item-active { background: rgba(59,130,246,.12) !important; border-left-color: var(--bzp-primary) !important; }

.session-avatar {
    width: 36px; height: 36px; min-width: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bzp-primary), #6366f1);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .9rem; color: #fff;
}
.session-info { flex: 1; min-width: 0; }
.session-name { font-size: .875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-meta { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin-top: .15rem; }
.session-id-small { font-size: .65rem; color: var(--bzp-muted); background: rgba(255,255,255,.04); border-radius: .25rem; padding: .05rem .3rem; font-family: monospace; }
.session-time { font-size: .7rem; color: var(--bzp-muted); }
.session-btn { border-radius: .4rem; padding: .25rem .5rem; }
.empty-sessions { color: var(--bzp-muted); }

.admin-main {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--bzp-bg);
}
.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}
.session-viewer {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.viewer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem 1rem;
    background: var(--bzp-card);
    border-bottom: 1px solid var(--bzp-border);
    flex-shrink: 0;
    gap: .75rem;
}
.video-container {
    flex: 1;
    position: relative;
    background: #000;
    overflow: hidden;
    cursor: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.remote-video {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.admin-cursor {
    position: absolute;
    width: 20px; height: 20px;
    border: 2px solid #facc15;
    border-radius: 50%;
    pointer-events: none;
    display: none;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 6px rgba(250,204,21,.6);
    z-index: 10;
}
.admin-cursor::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 4px; height: 4px;
    background: #facc15;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.click-ripple {
    position: absolute;
    width: 30px; height: 30px;
    border: 2px solid rgba(250,204,21,.8);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    z-index: 11;
}
.click-ripple.ripple-active {
    animation: ripple-anim .45s ease-out forwards;
}
@keyframes ripple-anim {
    0%   { transform: translate(-50%,-50%) scale(0.2); opacity: 1; }
    100% { transform: translate(-50%,-50%) scale(2.5); opacity: 0; }
}
.viewer-statusbar {
    padding: .35rem 1rem;
    background: var(--bzp-card);
    border-top: 1px solid var(--bzp-border);
    display: flex;
    justify-content: space-between;
    flex-shrink: 0;
}

:fullscreen .viewer-toolbar  { background: #000; border-color: #111; }
:fullscreen .viewer-statusbar { background: #000; border-color: #111; }
:fullscreen .admin-cursor     { display: block; }

/* Toast */
.bzp-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--bzp-card);
    border: 1px solid var(--bzp-border);
    border-left: 3px solid var(--bzp-primary);
    color: var(--bzp-text);
    padding: .75rem 1.25rem;
    border-radius: .6rem;
    font-size: .875rem;
    box-shadow: var(--bzp-shadow);
    opacity: 0;
    transform: translateY(.5rem);
    transition: opacity .25s, transform .25s;
    z-index: 9000;
    max-width: 320px;
}
.bzp-toast-show { opacity: 1; transform: translateY(0); }

/* Scrollbar */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bzp-border); border-radius: 3px; }

/* Responsive */
@media (max-width: 768px) {
    .admin-sidebar { width: 240px; min-width: 240px; }
    .session-id-text { font-size: 1.2rem; }
}
@media (max-width: 575px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; min-width: unset; height: 220px; border-right: none; border-bottom: 1px solid var(--bzp-border); }
}
