/* =========================================
   1. GLOBAL RESET & VARS
   ========================================= */
:root {
    /* Core Colors */
    --glow: #96d2ff;
    --text: #ffffff;
    --muted: rgba(255,255,255,0.6);
    --accent-red: #ff4b4b;
    --accent-orange: #ffa500;
    --gap: 18px;

    /* New Functional Colors */
    --online-green: #4bffb4;
    --offline-red: #ff4b4b;
    --security-blue: #3d85c6;
    --warning-orange: #ffa500;
    --bg-panel: rgba(255, 255, 255, 0.03);
    --light-on: #fff7d1;    /* New: Pale Yellow (Lightbulb ON) */
    --sensor-blue: #3d85c6;
    --app-blue: #007aff;  /* New: iOS-style Blue */
    --app-green: #34c759; /* New: iOS-style Green */
    --app-red: #ff3b30;   /* New: iOS-style Red */
}

* { box-sizing: border-box; }

body { 
    overflow-y: hidden; 
    background: #070a18; 
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: var(--text);
}

/* --- Premium Scrollbars --- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 12px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.4); }

/* =========================================
   2. LAYOUT & SIDEBAR
   ========================================= */
#manual-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.doc-sidebar {
    width: 350px;
    min-width: 300px;
    background: rgba(10, 10, 15, 0.95);
    border-right: 1px solid rgba(255,255,255,.08);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10;
}

.brand { margin-bottom: 20px; }
.sidebar-header { padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.05); margin-bottom: 20px; }
.tvCodeLine { font-size: 12px; color: var(--muted); letter-spacing: 1px; margin-top: 5px; }

/* --- Sidebar Ad Area --- */
.sidebarAd {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: auto;
}

/* =========================================
   3. SEARCH BAR
   ========================================= */
.search-wrapper { position: relative; margin-bottom: 20px; }

.search-wrapper input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text);
    padding: 10px 10px 10px 40px;
    border-radius: 8px;
    width: 100%;
    outline: none;
    font-size: 14px;
    transition: 0.3s all;
}

.search-wrapper input:focus {
    border-color: var(--glow);
    box-shadow: 0 0 15px rgba(150, 210, 255, 0.2);
}

.search-wrapper i {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    color: var(--muted); font-size: 12px; pointer-events: none;
}

/* =========================================
   4. MENU ITEMS
   ========================================= */
.menu {
    display: flex; flex-direction: column; gap: 8px;
    padding-top: 6px; overflow-y: auto;
}

.menuItem {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 18px; border-radius: 10px;
    border: 1px solid transparent;
    transition: 0.3s all ease;
    text-decoration: none;
    color: var(--muted);
    background: rgba(0,0,0,.14);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.menuItem i {
    font-size: 14px; width: 18px; text-align: center;
    opacity: 0.7; transition: color 0.3s ease;
}

.menuItem:hover:not(.active) {
    background: rgba(255,255,255,.12);
    color: var(--text);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.2), 0 8px 20px rgba(0,0,0,.3);
}

.menuItem.active {
    background: rgba(150, 210, 255, 0.08) !important;
    border: 1px solid var(--glow);
    color: var(--text) !important;
    box-shadow: 0 0 15px rgba(150, 210, 255, 0.15);
}

.menuItem.active i { color: var(--glow); opacity: 1; }

/* =========================================
   5. CONTENT AREA
   ========================================= */
.doc-content {
    flex: 1; padding: 0;
    overflow-y: auto; scroll-behavior: smooth;
}

.content-wrapper {
    padding: 60px;
    max-width: 90%; width: 1400px; margin: 0 auto;
}

.brandLogo {
    width: 100%; height: 60px;
    background-image: url('images/StudioOneTVPro_Logo.png');
    background-size: contain; background-repeat: no-repeat;
    background-position: center left;
    margin-bottom: 20px; cursor: pointer;
}

.doc-section { margin-bottom: 80px; animation: fadeIn 0.5s ease-in; }

/* Typography */
h1, h2, h3 { color: var(--text); letter-spacing: .2px; }
h1 { font-size: 48px; font-weight: 900; margin-bottom: 10px; margin-top: 0; }
h2 { font-size: 28px; border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: 10px; margin-bottom: 20px; }
p, li { color: var(--muted); line-height: 1.8; font-size: 16px; }

/* =========================================
   6. UI COMPONENTS (Boxes, Videos, Pills)
   ========================================= */

/* --- Tables & Specs (NEW) --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--bg-panel);
    border-radius: 12px;
    overflow: hidden;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

th { 
    background: rgba(255,255,255,0.05); 
    color: var(--glow); 
    text-transform: uppercase; 
    font-size: 13px; 
    letter-spacing: 1px; 
}

/* --- Info Cards & Alerts (NEW) --- */
.spec-card {
    background: var(--bg-panel);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.pro-tip {
    background: rgba(75, 255, 180, 0.05);
    border-left: 4px solid #4bffb4;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.alert-box {
    padding: 25px; 
    border-radius: 18px; 
    margin-bottom: 30px; 
    border: 1px solid rgba(255,255,255,0.1);
}

.code-badge {
    display: inline-block; padding: 4px 12px; border-radius: 6px; font-weight: bold;
    font-size: 13px; text-transform: uppercase; margin-bottom: 10px;
}

/* --- FAQ Item (Standard) --- */
.faq-item {
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

/* --- Images & Diagrams (NEW) --- */
.diagram-img {
    max-width: 100%; 
    border-radius: 12px; 
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
    margin: 20px 0;
}

.diagram-small {
    max-width: 70%;
    width: auto;
}

/* --- Video Wrapper (16:9) --- */
.videoWrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    background: #000;
}
.videoWrapper iframe {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
}

/* --- Buttons & Pills --- */
.social-pill {
    border: 1px solid var(--glow);
    color: var(--text) !important;
    background: rgba(150, 210, 255, 0.05); /* Updated Tint */
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none !important;
    font-weight: bold;
    font-size: 14px;
    display: inline-flex; align-items: center; gap: 10px;
    transition: all 0.3s ease;
    margin: 5px; /* Added spacing */
}

.social-pill:hover {
    background: var(--glow);
    color: #000 !important;
    box-shadow: 0 0 15px var(--glow);
    transform: translateY(-2px);
}
.social-pill:hover i { color: #000 !important; }

.home-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px;
    background: rgba(150, 210, 255, 0.05);
    border: 1px solid rgba(150, 210, 255, 0.2);
    border-radius: 12px;
    color: var(--glow) !important;
    text-decoration: none !important;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.home-btn:hover {
    background: rgba(150, 210, 255, 0.15);
    border-color: var(--glow);
    box-shadow: 0 0 15px rgba(150, 210, 255, 0.1);
    transform: translateY(-2px);
}
.home-btn i { font-size: 14px; }

/* Highlight & Gradient Text */
.gradText {
    background: linear-gradient(90deg, #96d2ff, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

mark {
    background: rgba(150, 210, 255, 0.2);
    color: var(--glow);
    font-weight: bold;
    border-radius: 4px;
    padding: 0 2px;
}

.err.show { display: block; padding: 15px; border-radius: 8px; }

/* =========================================
   7. ANIMATIONS
   ========================================= */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(0, 255, 0, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 0, 0); }
}

.live-dot {
    height: 8px; width: 8px; 
    background: #00ff00; border-radius: 50%; 
    display: inline-block;
    animation: pulse 2s infinite;
}