/* ===== CSS Variables ===== */
:root {
    --primary-50: #f0fdf4;
    --primary-100: #dcfce7;
    --primary-200: #bbf7d0;
    --primary-300: #86efac;
    --primary-400: #4ade80;
    --primary-500: #22c55e;
    --primary-600: #16a34a;
    --primary-700: #15803d;
    --primary-800: #166534;
    --primary-900: #14532d;

    --glow-primary: rgba(74, 222, 128, 0.4);
    --glow-secondary: rgba(134, 239, 172, 0.3);
    --glow-intense: rgba(34, 197, 94, 0.6);

    --healthy-color: #22c55e;
    --warning-color: #f59e0b;
    --critical-color: #ef4444;

    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    --bg-primary: #0a0f0d;
    --bg-secondary: #0f1512;
    --bg-card: rgba(15, 25, 20, 0.8);

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;

    --container-max: 1400px;
    --section-padding: 100px;

    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* ===== Brand Popup ===== */
.brand-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.brand-modal.active {
    display: flex;
}

.brand-card {
    background: var(--bg-card);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 0 50px var(--glow-primary);
    animation: modalPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.brand-logo-large {
    font-size: 64px;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 20px var(--primary-400));
}

.brand-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--gray-400);
    margin-bottom: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 30px;
    background: linear-gradient(135deg, var(--primary-300), var(--primary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-close {
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    color: var(--bg-primary);
    padding: 12px 32px;
    border-radius: var(--radius-full);
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
}

.brand-close:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--glow-intense);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--gray-300);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Demo Body ===== */
.demo-body {
    overflow: hidden;
    height: 100vh;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition-base);
}

.navbar.scrolled {
    background: rgba(10, 15, 13, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
    padding: 10px 0;
}

.demo-nav {
    background: rgba(10, 15, 13, 0.95);
    backdrop-filter: blur(20px);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    box-shadow: 0 0 30px var(--glow-primary);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.5px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 20px;
    color: var(--gray-400);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-full);
    transition: var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-400);
}

.nav-link.active {
    background: rgba(74, 222, 128, 0.1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--primary-400);
    border-radius: 2px;
    transition: var(--transition-base);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    color: var(--bg-primary);
    box-shadow: 0 4px 30px var(--glow-primary);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 40px var(--glow-intense);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(74, 222, 128, 0.5);
}

.btn-secondary:hover {
    background: rgba(74, 222, 128, 0.1);
    border-color: var(--primary-400);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.875rem;
}

.btn-start {
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    color: var(--bg-primary);
    box-shadow: 0 4px 20px var(--glow-primary);
}

.btn-stop {
    background: linear-gradient(135deg, var(--critical-color), #dc2626);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--critical-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== Demo Container ===== */
.demo-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding-top: 70px;
}

/* ===== Session Controls Bar ===== */
.session-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: rgba(10, 15, 13, 0.95);
    border-bottom: 1px solid rgba(74, 222, 128, 0.2);
    flex-shrink: 0;
}

.session-info {
    display: flex;
    align-items: center;
    gap: 24px;
}

.session-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-full);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.online {
    background: var(--healthy-color);
    box-shadow: 0 0 10px var(--healthy-color);
    animation: pulse-dot 2s infinite;
}

.status-dot.offline {
    background: var(--gray-500);
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.status-text {
    font-weight: 500;
    color: var(--white);
    font-size: 0.9rem;
}

.session-timer {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-400);
    font-variant-numeric: tabular-nums;
}

.control-buttons {
    display: flex;
    gap: 12px;
}

/* ===== Split View ===== */
.split-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    flex: 1;
    min-height: 0;
    background: rgba(74, 222, 128, 0.1);
}

.view-panel {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    overflow: hidden;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
    flex-shrink: 0;
}

.view-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
}

.view-controls-info {
    font-size: 0.75rem;
    color: var(--gray-500);
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.temp-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
}

.temp-cold {
    color: #3b82f6;
}

.temp-hot {
    color: #ef4444;
}

.temp-gradient {
    width: 60px;
    height: 6px;
    background: linear-gradient(to right, #3b82f6, #22c55e, #f59e0b, #ef4444);
    border-radius: 3px;
}

.view-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

.view-content canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* ===== 3D HUD ===== */
.hud-3d {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: none;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
    z-index: 10;
}

.hud-3d.active,
#hud3D[style*="block"] {
    display: flex;
}

.hud-compass {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--primary-400);
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-400);
}

.hud-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.6);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.hud-stat {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.hud-label {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.hud-value {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
}

/* ===== Inactive Overlay ===== */
.inactive-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 15, 13, 0.95);
    z-index: 20;
}

.inactive-content {
    text-align: center;
}

.inactive-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 20px;
    opacity: 0.6;
}

.inactive-content h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 12px;
}

.inactive-content p {
    color: var(--gray-400);
    margin-bottom: 8px;
}

.controls-hint {
    font-size: 0.85rem;
    color: var(--primary-400);
    background: rgba(74, 222, 128, 0.1);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    display: inline-block;
    margin-top: 12px;
}

/* ===== Thermal Footer ===== */
.thermal-footer {
    display: flex;
    justify-content: space-around;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(74, 222, 128, 0.1);
    font-size: 0.85rem;
    color: var(--gray-400);
    flex-shrink: 0;
}

.thermal-footer strong {
    color: var(--white);
}

/* ===== Live Stats Bar ===== */
.live-stats-bar {
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(74, 222, 128, 0.2);
    flex-shrink: 0;
}

.stats-ticker {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.ticker-item {
    text-align: center;
}

.ticker-label {
    display: block;
    font-size: 0.7rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.ticker-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

.ticker-value.healthy {
    color: var(--healthy-color);
}

.ticker-value.warning {
    color: var(--warning-color);
}

.ticker-value.critical {
    color: var(--critical-color);
}

.ticker-divider {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, rgba(74, 222, 128, 0.3), transparent);
}

/* ===== Notifications ===== */
.notifications-container {
    position: fixed;
    top: 100px;
    right: 24px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
}

.notification {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification.fade-out {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

.notification-success {
    border-left: 4px solid var(--healthy-color);
}

.notification-danger {
    border-left: 4px solid var(--critical-color);
}

.notification-info {
    border-left: 4px solid #3b82f6;
}

.notification-icon {
    font-size: 1.5rem;
}

.notification-content {
    flex: 1;
}

.notification-content strong {
    display: block;
    color: var(--white);
    margin-bottom: 4px;
}

.notification-content p {
    font-size: 0.875rem;
    color: var(--gray-400);
    margin: 0;
}

.notification-close {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* ===== Page Header ===== */
.page-header {
    padding: 140px 0 60px;
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary);
}

.hero-glow {
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--glow-primary) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
}

.page-header-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.section-tag {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--primary-400);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--gray-400);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Dashboard Section ===== */
.dashboard-section {
    padding: 40px 0 100px;
    background: var(--bg-primary);
}

.session-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
}

.session-banner.active {
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.3);
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.banner-icon {
    font-size: 1.5rem;
}

.banner-text {
    color: var(--gray-300);
}

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.dash-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid rgba(74, 222, 128, 0.1);
    border-radius: var(--radius-lg);
}

.dash-stat-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 1.5rem;
}

.dash-stat-icon.green {
    background: rgba(74, 222, 128, 0.2);
}

.dash-stat-icon.blue {
    background: rgba(59, 130, 246, 0.2);
}

.dash-stat-icon.orange {
    background: rgba(249, 115, 22, 0.2);
}

.dash-stat-icon.red {
    background: rgba(239, 68, 68, 0.2);
}

.dash-stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--white);
}

.dash-stat-label {
    font-size: 0.875rem;
    color: var(--gray-400);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.dash-card {
    background: var(--bg-card);
    border: 1px solid rgba(74, 222, 128, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.dash-card.full-width {
    grid-column: 1 / -1;
}

.dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
}

.dash-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.live-indicator.active {
    color: var(--critical-color);
}

.live-indicator.active .live-dot {
    background: var(--critical-color);
    animation: pulse-dot 1s infinite;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-500);
}

.dash-card-content {
    padding: 20px;
}

/* Health Distribution */
.health-bar-container {
    display: flex;
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 16px;
}

.health-bar {
    height: 100%;
    transition: width 0.5s ease;
}

.health-bar.healthy {
    background: var(--healthy-color);
}

.health-bar.warning {
    background: var(--warning-color);
}

.health-bar.critical {
    background: var(--critical-color);
}

.health-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--gray-400);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-color.healthy {
    background: var(--healthy-color);
}

.legend-color.warning {
    background: var(--warning-color);
}

.legend-color.critical {
    background: var(--critical-color);
}

.legend-item strong {
    color: var(--white);
}

/* Temperature Gauge */
.temp-gauge-container {
    text-align: center;
}

.temp-gauge {
    position: relative;
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 8px;
}

.gauge-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, var(--healthy-color), var(--warning-color), var(--critical-color));
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.temp-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Alerts Table */
.alerts-table-container {
    max-height: 300px;
    overflow-y: auto;
}

.alerts-table {
    width: 100%;
    border-collapse: collapse;
}

.alerts-table th,
.alerts-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
}

.alerts-table th {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
}

.alerts-table td {
    font-size: 0.85rem;
    color: var(--gray-300);
}

.alerts-table .no-data td {
    text-align: center;
    color: var(--gray-500);
    padding: 40px;
}

.alert-row.warning {
    border-left: 3px solid var(--warning-color);
}

.alert-row.critical {
    border-left: 3px solid var(--critical-color);
}

.session-badge {
    background: rgba(74, 222, 128, 0.1);
    color: var(--primary-400);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.alert-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.alert-type-badge.warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

.alert-type-badge.critical {
    background: rgba(239, 68, 68, 0.2);
    color: var(--critical-color);
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.active {
    background: rgba(239, 68, 68, 0.2);
    color: var(--critical-color);
}

/* ===== Sessions Section ===== */
.sessions-section {
    padding: 40px 0 100px;
    background: var(--bg-primary);
}

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

.sessions-count {
    font-size: 1.25rem;
    color: var(--gray-300);
}

.sessions-count span {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--primary-400);
}

.sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
}

.session-card {
    background: var(--bg-card);
    border: 1px solid rgba(74, 222, 128, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
}

.session-card:hover {
    border-color: rgba(74, 222, 128, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(74, 222, 128, 0.1);
}

.session-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
}

.session-card-id {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--primary-400);
}

.session-icon {
    font-size: 1.25rem;
}

.session-date {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.session-card-body {
    display: flex;
    gap: 20px;
    padding: 20px;
}

.session-card-preview {
    width: 100px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(20, 83, 45, 0.3), rgba(10, 15, 13, 0.8));
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.preview-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.preview-frames {
    font-size: 0.7rem;
    color: var(--gray-400);
}

.session-card-info {
    flex: 1;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row span {
    color: var(--gray-500);
}

.info-row strong {
    color: var(--white);
}

.info-row strong.healthy {
    color: var(--healthy-color);
}

.info-row strong.warning {
    color: var(--warning-color);
}

.info-row strong.critical {
    color: var(--critical-color);
}

.session-card-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(74, 222, 128, 0.1);
}

.session-card-footer .btn {
    flex: 1;
    justify-content: center;
}

.session-card-footer .btn-danger {
    flex: 0;
    padding: 10px 14px;
}

/* Empty State */
.empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
}

.empty-icon {
    font-size: 64px;
    opacity: 0.5;
    margin-bottom: 24px;
}

.empty-state h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--gray-400);
    margin-bottom: 24px;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    padding: 20px;
}

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

.modal {
    width: 100%;
    max-width: 1200px;
    max-height: 95vh;
    background: var(--bg-secondary);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.session-modal {
    max-width: 1100px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
    flex-shrink: 0;
}

.modal-header h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--white);
}

.modal-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    color: var(--critical-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-base);
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* ===== Playback Container ===== */
.playback-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.playback-view {
    background: var(--bg-card);
    border: 1px solid rgba(74, 222, 128, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.playback-view-header {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
}

.playback-view-header h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
}

.playback-canvas-container {
    height: 280px;
    background: linear-gradient(135deg, rgba(20, 83, 45, 0.2), rgba(10, 15, 13, 0.8));
}

.playback-canvas-container canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ===== Playback Controls ===== */
.playback-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid rgba(74, 222, 128, 0.1);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.playback-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-sm);
    color: var(--primary-400);
    cursor: pointer;
    transition: var(--transition-base);
}

.playback-btn:hover {
    background: rgba(74, 222, 128, 0.2);
    border-color: var(--primary-400);
}

.playback-btn.play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    color: var(--bg-primary);
    border: none;
}

.playback-btn.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--glow-primary);
}

.playback-timeline {
    flex: 1;
}

.playback-timeline input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    height: 8px;
    background: rgba(74, 222, 128, 0.2);
    border-radius: 4px;
    outline: none;
}

.playback-timeline input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-400);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--glow-primary);
    transition: var(--transition-base);
}

.playback-timeline input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.playback-timeline input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-400);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.playback-time {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--gray-400);
    font-variant-numeric: tabular-nums;
    min-width: 100px;
    text-align: center;
}

.playback-speed {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--gray-400);
}

.playback-speed select {
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 0.85rem;
    cursor: pointer;
}

.playback-speed select option {
    background: var(--bg-primary);
}

/* ===== Playback Dashboard ===== */
.playback-dashboard {
    background: var(--bg-card);
    border: 1px solid rgba(74, 222, 128, 0.1);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.playback-dashboard h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
}

.playback-stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.playback-stat {
    text-align: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
}

.playback-stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.playback-stat-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

.playback-stat-value.healthy {
    color: var(--healthy-color);
}

.playback-stat-value.warning {
    color: var(--warning-color);
}

.playback-stat-value.critical {
    color: var(--critical-color);
}

/* Playback Alerts */
.playback-alerts h5 {
    font-size: 0.9rem;
    color: var(--gray-300);
    margin-bottom: 12px;
}

.playback-alerts-list {
    max-height: 150px;
    overflow-y: auto;
}

.no-alerts {
    color: var(--gray-500);
    font-size: 0.9rem;
    text-align: center;
    padding: 20px;
}

.playback-alert {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.playback-alert.warning {
    border-left: 3px solid var(--warning-color);
}

.playback-alert.critical {
    border-left: 3px solid var(--critical-color);
}

.alert-time {
    color: var(--gray-500);
    min-width: 80px;
}

.alert-bird {
    color: var(--white);
    font-weight: 600;
    min-width: 70px;
}

.alert-type {
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.playback-alert.warning .alert-type {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

.playback-alert.critical .alert-type {
    background: rgba(239, 68, 68, 0.2);
    color: var(--critical-color);
}

.alert-temp {
    color: var(--gray-300);
    margin-left: auto;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-glow-2 {
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--glow-secondary) 0%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--primary-400);
    margin-bottom: 24px;
}

.badge-icon {
    font-size: 1rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 24px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-300), var(--primary-500), var(--primary-300));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--gray-400);
    margin-bottom: 32px;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-400);
    text-shadow: 0 0 30px var(--glow-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--primary-500), transparent);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.robot-card {
    position: relative;
    z-index: 2;
}

.robot-screen {
    width: 320px;
    background: var(--bg-card);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 0 40px var(--glow-primary);
}

.screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(74, 222, 128, 0.2);
}

.screen-dots {
    display: flex;
    gap: 6px;
}

.screen-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.screen-dots span:first-child {
    background: #ef4444;
}

.screen-dots span:nth-child(2) {
    background: #f59e0b;
}

.screen-dots span:last-child {
    background: var(--primary-500);
}

.screen-title {
    font-size: 0.75rem;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.screen-content {
    position: relative;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(20, 83, 45, 0.3), rgba(10, 15, 13, 0.8));
}

.chicken-icon {
    font-size: 80px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.scan-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-400), transparent);
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0% {
        top: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

.data-overlay {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
}

.data-point {
    font-size: 0.75rem;
    color: var(--primary-400);
    font-family: monospace;
    opacity: 0.8;
}

.robot-base {
    display: flex;
    justify-content: center;
    gap: 120px;
    margin-top: -10px;
}

.robot-wheel {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gray-700), var(--gray-800));
    border-radius: 50%;
    border: 3px solid var(--primary-600);
    box-shadow: 0 0 20px var(--glow-primary);
}

.floating-cards {
    position: absolute;
    inset: -40px;
    pointer-events: none;
}

.float-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: float-card 4s ease-in-out infinite;
}

.card-1 {
    top: 20px;
    right: -20px;
    animation-delay: 0s;
}

.card-2 {
    bottom: 80px;
    left: -40px;
    animation-delay: 1s;
}

.card-3 {
    top: 60%;
    right: -30px;
    animation-delay: 2s;
}

@keyframes float-card {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.card-icon {
    font-size: 1.25rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--gray-500);
    font-size: 0.75rem;
    animation: bounce 2s ease-in-out infinite;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--primary-400);
    border-bottom: 2px solid var(--primary-400);
    transform: rotate(45deg);
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* ===== Features Section ===== */
.features {
    padding: var(--section-padding) 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-400);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid rgba(74, 222, 128, 0.1);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(74, 222, 128, 0.3);
    box-shadow: 0 20px 60px rgba(74, 222, 128, 0.15);
}

.feature-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 222, 128, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    color: var(--primary-400);
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--gray-400);
    line-height: 1.7;
}

/* ===== Hackathon Section ===== */
.hackathon {
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
}

.hackathon-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 60px;
    align-items: center;
    padding: 60px;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(20, 83, 45, 0.2));
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.hackathon-content {
    position: relative;
    z-index: 1;
}

.hackathon-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(74, 222, 128, 0.2);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--primary-300);
    margin-bottom: 20px;
}

.hackathon-content h2 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
}

.hackathon-content p {
    font-size: 1.1rem;
    color: var(--gray-300);
    max-width: 600px;
    margin-bottom: 32px;
    line-height: 1.7;
}

.hackathon-logos {
    display: flex;
    align-items: center;
    gap: 24px;
}

.partner-logo {
    padding: 16px 32px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-md);
}

.logo-placeholder {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--white);
}

.logo-divider {
    font-size: 1.5rem;
    color: var(--primary-400);
}

.hackathon-visual {
    position: relative;
    z-index: 1;
}

.trophy-icon {
    font-size: 120px;
    filter: drop-shadow(0 0 30px var(--glow-primary));
}

.particles {
    position: absolute;
    inset: -40px;
    pointer-events: none;
}

.particles span {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary-400);
    border-radius: 50%;
    animation: particle 3s ease-in-out infinite;
}

.particles span:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.particles span:nth-child(2) {
    top: 10%;
    right: 20%;
    animation-delay: 0.5s;
}

.particles span:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: 1s;
}

.particles span:nth-child(4) {
    bottom: 10%;
    right: 10%;
    animation-delay: 1.5s;
}

.particles span:nth-child(5) {
    top: 50%;
    right: 5%;
    animation-delay: 2s;
}

@keyframes particle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== Footer ===== */
.footer {
    padding: 60px 0 30px;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(74, 222, 128, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 400px;
}

.footer-brand .logo {
    margin-bottom: 20px;
}

.footer-brand p {
    color: var(--gray-400);
    line-height: 1.7;
}

.footer-links {
    display: flex;
    gap: 60px;
    justify-content: flex-end;
}

.footer-column h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 20px;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: var(--gray-400);
    font-size: 0.95rem;
}

.footer-column ul li a:hover {
    color: var(--primary-400);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid rgba(74, 222, 128, 0.1);
}

.footer-bottom p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-700);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-600);
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .dashboard-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .playback-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        order: 1;
    }

    .hero-visual {
        order: 0;
        margin-bottom: 40px;
    }

    .hero-subtitle {
        margin: 0 auto 32px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .split-view {
        grid-template-columns: 1fr;
    }

    .hackathon-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hackathon-logos {
        justify-content: center;
    }

    .hackathon-visual {
        display: none;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .playback-container {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 100px 40px 40px;
        gap: 8px;
        transition: var(--transition-base);
        border-left: 1px solid rgba(74, 222, 128, 0.2);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .logo-icon {
        width: 44px;
        height: 44px;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-divider {
        width: 60px;
        height: 1px;
    }

    .robot-screen {
        width: 280px;
    }

    .floating-cards,
    .scroll-indicator {
        display: none;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .session-controls-bar {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .session-info {
        justify-content: space-between;
    }

    .control-buttons {
        flex-direction: column;
    }

    .stats-ticker {
        gap: 20px;
    }

    .ticker-divider {
        display: none;
    }

    .ticker-value {
        font-size: 1.25rem;
    }

    .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }

    .session-banner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .sessions-grid {
        grid-template-columns: 1fr;
    }

    .session-card-body {
        flex-direction: column;
    }

    .session-card-preview {
        width: 100%;
        height: 80px;
        flex-direction: row;
        gap: 16px;
    }

    .playback-controls {
        flex-wrap: wrap;
        gap: 12px;
    }

    .playback-timeline {
        width: 100%;
        order: 10;
    }

    .playback-time {
        order: 11;
        width: 100%;
    }

    .playback-speed {
        order: 12;
    }

    .playback-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .notifications-container {
        left: 16px;
        right: 16px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .session-timer {
        font-size: 1.25rem;
    }

    .playback-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .playback-stat {
        padding: 12px;
    }

    .playback-stat-value {
        font-size: 1.25rem;
    }

    .playback-canvas-container {
        height: 200px;
    }

    .playback-alert {
        flex-wrap: wrap;
        gap: 8px;
    }

    .modal-body {
        padding: 16px;
    }
}

/* ===== Print ===== */
@media print {

    .navbar,
    .notifications-container,
    .modal-overlay {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}

/* ============================================
   NEW STYLES - APPEND BELOW YOUR EXISTING CSS
   ============================================ */

/* ===== Quarantine Color Variable ===== */
/* Add this to your existing :root if not present */
/* --quarantine-color: #a855f7; */

/* ===== Recording Indicator ===== */
.recording-indicator {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--critical-color);
}

.recording-indicator.active {
    display: flex;
}

.rec-dot {
    width: 8px;
    height: 8px;
    background: var(--critical-color);
    border-radius: 50%;
    animation: rec-pulse 1s ease-in-out infinite;
}

@keyframes rec-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* ===== Robot Log Panel ===== */
.robot-log {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    max-height: 300px;
    background: var(--bg-card);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.robot-log.collapsed .robot-log-content {
    display: none;
}

.robot-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
    font-weight: 600;
    color: var(--white);
    font-size: 0.9rem;
}

.log-toggle {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-sm);
    color: var(--primary-400);
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.log-toggle:hover {
    background: rgba(74, 222, 128, 0.2);
}

.robot-log-content {
    max-height: 220px;
    overflow-y: auto;
    padding: 12px;
}

.log-entry {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    color: var(--gray-300);
}

.log-entry:last-child {
    border-bottom: none;
}

.log-time {
    color: var(--gray-500);
    margin-right: 8px;
}

.log-empty {
    color: var(--gray-500);
    text-align: center;
    padding: 20px;
    font-size: 0.85rem;
}

/* ===== Session Card Preview ===== */
.session-preview {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.preview-thumbnail {
    width: 80px;
    height: 60px;
    background: linear-gradient(135deg, rgba(20, 83, 45, 0.4), rgba(10, 15, 13, 0.8));
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-play {
    font-size: 24px;
    color: var(--primary-400);
    opacity: 0.8;
}

.preview-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-duration {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
}

.preview-frames {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.session-stats-mini {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.mini-stat {
    text-align: center;
}

.mini-label {
    display: block;
    font-size: 0.7rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.mini-value {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
}

.mini-value.healthy {
    color: var(--healthy-color);
}

.mini-value.warning {
    color: var(--warning-color);
}

.mini-value.critical {
    color: var(--critical-color);
}

/* ===== Video Playback Modal ===== */
.playback-modal {
    max-width: 1300px;
    width: 95%;
}

.modal-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-subtitle {
    font-size: 0.85rem;
    color: var(--gray-400);
    font-weight: 400;
}

.playback-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.playback-video-container {
    background: var(--bg-card);
    border: 1px solid rgba(74, 222, 128, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.video-label {
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.4);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
}

.video-canvas-wrapper {
    position: relative;
    height: 280px;
}

.video-canvas-wrapper canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.play-big-btn {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    border-radius: 50%;
    color: var(--bg-primary);
    box-shadow: 0 0 40px var(--glow-primary);
    transition: var(--transition-base);
}

.play-big-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 60px var(--glow-intense);
}

.video-time-display {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--white);
    font-variant-numeric: tabular-nums;
}

/* ===== Playback Controls Bar ===== */
.playback-controls-bar {
    background: var(--bg-card);
    border: 1px solid rgba(74, 222, 128, 0.1);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.progress-bar-container {
    margin-bottom: 16px;
}

.progress-bar {
    position: relative;
    height: 8px;
    background: rgba(74, 222, 128, 0.2);
    border-radius: 4px;
    cursor: pointer;
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
    border-radius: 4px;
    transition: width 0.1s linear;
}

.progress-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: var(--primary-400);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--glow-primary);
    cursor: grab;
}

.progress-timestamps {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--gray-500);
    font-variant-numeric: tabular-nums;
}

.playback-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.control-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-sm);
    color: var(--primary-400);
    cursor: pointer;
    transition: var(--transition-base);
}

.control-btn:hover {
    background: rgba(74, 222, 128, 0.2);
    border-color: var(--primary-400);
}

.control-btn.play-pause-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    color: var(--bg-primary);
    border: none;
}

.control-btn.play-pause-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--glow-primary);
}

.control-divider {
    width: 1px;
    height: 30px;
    background: rgba(74, 222, 128, 0.2);
    margin: 0 8px;
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--gray-400);
}

.speed-control select {
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-sm);
    color: var(--white);
    cursor: pointer;
}

.speed-control select option {
    background: var(--bg-primary);
}

.frame-counter {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--gray-400);
    font-variant-numeric: tabular-nums;
}

/* ===== Playback Dashboard Panel ===== */
.playback-dashboard {
    background: var(--bg-card);
    border: 1px solid rgba(74, 222, 128, 0.1);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.dashboard-section {
    margin-bottom: 20px;
}

.dashboard-section:last-child {
    margin-bottom: 0;
}

.dashboard-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.stat-box {
    text-align: center;
    padding: 14px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
}

.stat-box .stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.stat-box .stat-value {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
}

.stat-box.healthy .stat-value {
    color: var(--healthy-color);
}

.stat-box.warning .stat-value {
    color: var(--warning-color);
}

.stat-box.critical .stat-value {
    color: var(--critical-color);
}

.stat-box.quarantine .stat-value {
    color: #a855f7;
}

.robot-status-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
}

.robot-status-label {
    color: var(--gray-400);
    font-size: 0.9rem;
}

.robot-status-value {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--primary-400);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
}

.summary-label {
    color: var(--gray-500);
    font-size: 0.85rem;
}

.summary-value {
    color: var(--white);
    font-weight: 600;
    font-size: 0.85rem;
}

/* ===== Dashboard Banner Updates ===== */
.banner-status {
    display: flex;
    align-items: center;
    gap: 16px;
}

.banner-text-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.banner-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
}

.banner-subtitle {
    font-size: 0.85rem;
    color: var(--gray-400);
}

.dash-stat-trend {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--gray-400);
}

.dash-stat-trend.healthy {
    color: var(--healthy-color);
    background: rgba(34, 197, 94, 0.1);
}

.dash-stat-trend.warning {
    color: var(--warning-color);
    background: rgba(245, 158, 11, 0.1);
}

/* ===== Live Badge ===== */
.live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.live-badge.active {
    color: var(--critical-color);
}

.live-badge.active .live-dot {
    background: var(--critical-color);
    animation: pulse-dot 1s infinite;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-500);
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* ===== Quarantine Health Bar ===== */
.health-bar.quarantine {
    background: #a855f7;
}

.legend-color.quarantine {
    background: #a855f7;
}

/* ===== Temperature Gauge Vertical ===== */
.temp-display {
    display: flex;
    gap: 30px;
    align-items: center;
}

.temp-gauge-vertical {
    display: flex;
    gap: 10px;
    height: 150px;
}

.gauge-track {
    position: relative;
    width: 20px;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

.gauge-fill-vertical {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, #3b82f6, var(--healthy-color), var(--warning-color), var(--critical-color));
    border-radius: 10px;
    transition: height 0.3s ease;
}

.gauge-marker {
    position: absolute;
    left: -5px;
    width: 30px;
    height: 4px;
    background: var(--white);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: bottom 0.3s ease;
}

.gauge-labels {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--gray-500);
}

.temp-stats-vertical {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ===== Robot Status Card ===== */
.robot-status-card {
    display: flex;
    gap: 24px;
    align-items: center;
}

.robot-visual {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-lg);
}

.robot-icon {
    font-size: 40px;
}

.robot-status-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gray-500);
    border: 2px solid var(--bg-card);
}

.robot-status-indicator.idle {
    background: var(--warning-color);
}

.robot-status-indicator.active {
    background: var(--healthy-color);
    animation: pulse-dot 1s infinite;
}

.robot-info {
    flex: 1;
}

.robot-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.robot-info-row:last-child {
    border-bottom: none;
}

.robot-info-row .info-label {
    color: var(--gray-500);
    font-size: 0.85rem;
}

.robot-info-row .info-value {
    color: var(--white);
    font-weight: 600;
    font-size: 0.85rem;
}

/* ===== Alert Badges ===== */
.alert-count-badge {
    padding: 4px 12px;
    background: rgba(239, 68, 68, 0.2);
    color: var(--critical-color);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
}

.empty-alerts {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px;
    color: var(--gray-500);
}

.empty-alerts .empty-icon {
    font-size: 1.5rem;
}

.action-badge {
    padding: 4px 10px;
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

/* ===== NEW Responsive Updates ===== */
@media (max-width: 1024px) {
    .playback-main {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .robot-log {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
    }

    .playback-buttons {
        justify-content: center;
    }

    .frame-counter {
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .session-stats-mini {
        grid-template-columns: repeat(2, 1fr);
    }

    .temp-display {
        flex-direction: column;
    }

    .robot-status-card {
        flex-direction: column;
        text-align: center;
    }

    .video-canvas-wrapper {
        height: 200px;
    }

    .control-btn.play-pause-btn {
        width: 50px;
        height: 50px;
    }

    .control-btn {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .playback-controls-bar {
        padding: 12px 16px;
    }

    .stat-box {
        padding: 10px;
    }

    .stat-box .stat-value {
        font-size: 1rem;
    }

    .robot-log {
        bottom: 10px;
        max-height: 250px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   KEYPOINT VISUALIZATION SYSTEM STYLES
   ═══════════════════════════════════════════════════════════════ */

/* ===== View Controls Toggle ===== */
.view-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
}

.toggle-label:hover {
    background: rgba(74, 222, 128, 0.1);
    color: var(--primary-400);
}

.toggle-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--primary-400);
    cursor: pointer;
}

/* ===== Keypoint Legend Panel ===== */
.keypoint-legend {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    min-width: 160px;
    z-index: 20;
}

.legend-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-400);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(74, 222, 128, 0.2);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--gray-300);
    padding: 4px 0;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.legend-dot.healthy {
    background: #00FF00;
    box-shadow: 0 0 6px #00FF00;
}

.legend-dot.monitoring {
    background: #FFFF00;
    box-shadow: 0 0 6px #FFFF00;
}

.legend-dot.elevated {
    background: #FF8800;
    box-shadow: 0 0 6px #FF8800;
}

.legend-dot.high-risk {
    background: #FF0000;
    box-shadow: 0 0 6px #FF0000;
}

.legend-dot.isolated {
    background: #00CCFF;
    box-shadow: 0 0 6px #00CCFF;
}

.legend-divider {
    height: 1px;
    background: rgba(74, 222, 128, 0.2);
    margin: 10px 0;
}

.legend-stats {
    font-size: 0.7rem;
    color: var(--gray-400);
}

.legend-stats div {
    padding: 3px 0;
}

.legend-stats strong {
    color: var(--white);
    font-family: var(--font-display);
}

/* ===== Bird Detail Panel (Slide-in) ===== */
.bird-detail-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid rgba(74, 222, 128, 0.2);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    z-index: 1100;
    transition: right 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.bird-detail-panel.open {
    right: 0;
}

.bird-detail-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(74, 222, 128, 0.2);
    flex-shrink: 0;
}

.bird-detail-panel .panel-header h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--white);
}

.panel-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    color: var(--critical-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-base);
}

.panel-close:hover {
    background: rgba(239, 68, 68, 0.2);
}

.bird-detail-panel .panel-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.bird-id-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.bird-icon {
    font-size: 2rem;
}

.bird-id {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
}

.bird-status-badge {
    margin-left: auto;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.bird-status-badge.healthy {
    background: rgba(34, 197, 94, 0.2);
    color: var(--healthy-color);
}

.bird-status-badge.warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

.bird-status-badge.critical {
    background: rgba(239, 68, 68, 0.2);
    color: var(--critical-color);
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-300);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
}

/* Risk Gauge */
.risk-gauge {
    display: flex;
    align-items: center;
    gap: 16px;
}

.risk-bar {
    flex: 1;
    height: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    overflow: hidden;
}

.risk-fill {
    height: 100%;
    background: linear-gradient(90deg, #00FF00, #FFFF00, #FF8800, #FF0000);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.risk-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    min-width: 60px;
    text-align: right;
}

/* Posture Grid */
.posture-grid,
.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.posture-item,
.metric-item {
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    text-align: center;
}

.posture-label,
.metric-label {
    display: block;
    font-size: 0.7rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.posture-value,
.metric-value {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
}

/* Symptoms List */
.symptoms-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.symptom-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
}

.symptom-name {
    color: var(--white);
    font-size: 0.85rem;
    text-transform: capitalize;
}

.symptom-confidence {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--critical-color);
}

.no-symptoms {
    text-align: center;
    color: var(--gray-500);
    font-size: 0.85rem;
    padding: 20px;
}

/* Temperature Display */
.temp-display-large {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
}

.temp-display-large .temp-value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
}

.temp-display-large .temp-unit {
    font-size: 1.25rem;
    color: var(--gray-400);
}

.temp-status {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px;
    border-radius: var(--radius-sm);
}

.temp-status.normal {
    background: rgba(34, 197, 94, 0.1);
    color: var(--healthy-color);
}

.temp-status.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.temp-status.critical {
    background: rgba(239, 68, 68, 0.1);
    color: var(--critical-color);
}

/* Detail Actions */
.detail-actions {
    display: flex;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid rgba(74, 222, 128, 0.1);
    margin-top: auto;
}

.detail-actions .btn {
    flex: 1;
    justify-content: center;
}

/* ===== Alert History Panel ===== */
.alert-history-panel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 320px;
    max-height: 350px;
    background: var(--bg-card);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: max-height 0.3s ease;
}

.alert-history-panel.collapsed {
    max-height: 50px;
}

.alert-history-panel.collapsed .panel-content {
    display: none;
}

.alert-history-panel .panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
}

.alert-history-panel .panel-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
    flex: 1;
}

.alert-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: var(--critical-color);
    color: var(--white);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
}

.panel-toggle {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-sm);
    color: var(--primary-400);
    cursor: pointer;
    font-size: 1.2rem;
}

.alert-history-panel .panel-content {
    max-height: 280px;
    overflow-y: auto;
    padding: 10px;
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    border-left: 3px solid transparent;
}

.alert-item:last-child {
    margin-bottom: 0;
}

.alert-item.critical {
    border-left-color: var(--critical-color);
    background: rgba(239, 68, 68, 0.1);
}

.alert-item.warning {
    border-left-color: var(--warning-color);
    background: rgba(245, 158, 11, 0.1);
}

.alert-item.success {
    border-left-color: var(--healthy-color);
    background: rgba(34, 197, 94, 0.1);
}

.alert-item.info {
    border-left-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.alert-icon {
    font-size: 1.25rem;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    color: var(--white);
    font-size: 0.85rem;
}

.alert-detail {
    font-size: 0.75rem;
    color: var(--gray-400);
    text-transform: capitalize;
}

.alert-risk {
    font-size: 0.7rem;
    color: var(--critical-color);
    font-weight: 600;
    margin-top: 4px;
}

.alert-time {
    font-size: 0.7rem;
    color: var(--gray-500);
    white-space: nowrap;
}

.no-alerts {
    text-align: center;
    color: var(--gray-500);
    padding: 30px 20px;
    font-size: 0.85rem;
}

/* ===== Enhanced Robot Log ===== */
.robot-log.collapsed .robot-log-content {
    display: none;
}

/* ===== Canvas Cursor ===== */
#thermalCanvas {
    cursor: crosshair;
}

#thermalCanvas:hover {
    cursor: pointer;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 1024px) {
    .bird-detail-panel {
        width: 100%;
        right: -100%;
    }

    .alert-history-panel {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
    }

    .keypoint-legend {
        top: auto;
        bottom: 60px;
        right: 10px;
        left: 10px;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .legend-item {
        flex: 1 1 45%;
    }
}

@media (max-width: 768px) {
    .view-controls {
        display: none;
    }

    .bird-detail-panel .panel-content {
        padding: 16px;
    }

    .posture-grid,
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .detail-actions {
        flex-direction: column;
    }
}

/* ===== Animations ===== */
@keyframes pulse-alert {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.alert-item.critical {
    animation: pulse-alert 2s ease-in-out infinite;
}

/* ===== High Risk Pulsing Animation ===== */
@keyframes keypoint-pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 10px currentColor;
    }

    50% {
        transform: scale(1.2);
        box-shadow: 0 0 20px currentColor;
    }
}

/* ===== Quarantine Badge Color ===== */
.ticker-value.quarantine {
    color: #a855f7;
}

/* ═══════════════════════════════════════════════════════════════
   ANALYTICS DASHBOARD STYLES
   ═══════════════════════════════════════════════════════════════ */

/* ===== Analytics Section ===== */
.analytics-section {
    padding: 40px 0 100px;
    background: var(--bg-primary);
}

/* ===== Toolbar ===== */
.analytics-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.date-range-selector {
    display: flex;
    gap: 8px;
    background: var(--bg-card);
    padding: 6px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(74, 222, 128, 0.1);
}

.range-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: var(--gray-400);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-base);
}

.range-btn:hover {
    color: var(--white);
    background: rgba(74, 222, 128, 0.1);
}

.range-btn.active {
    background: var(--primary-500);
    color: var(--bg-primary);
}

.toolbar-actions {
    display: flex;
    gap: 12px;
}

/* ===== KPI Cards ===== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid rgba(74, 222, 128, 0.1);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
}

.kpi-card:hover {
    border-color: rgba(74, 222, 128, 0.3);
    transform: translateY(-2px);
}

.kpi-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 1.5rem;
}

.kpi-icon.green {
    background: rgba(74, 222, 128, 0.2);
}

.kpi-icon.blue {
    background: rgba(59, 130, 246, 0.2);
}

.kpi-icon.orange {
    background: rgba(249, 115, 22, 0.2);
}

.kpi-icon.purple {
    background: rgba(168, 85, 247, 0.2);
}

.kpi-content {
    flex: 1;
}

.kpi-value {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
}

.kpi-label {
    display: block;
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-top: 4px;
}

.kpi-trend {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    margin-top: 8px;
}

.kpi-trend.positive {
    background: rgba(34, 197, 94, 0.1);
    color: var(--healthy-color);
}

.kpi-trend.negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--critical-color);
}

/* ===== Charts Grid ===== */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid rgba(74, 222, 128, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.chart-card.large {
    grid-column: span 2;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
}

.chart-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
}

.chart-subtitle {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 4px;
}

.chart-legend {
    display: flex;
    gap: 16px;
}

.chart-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--gray-400);
}

.chart-legend .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.chart-legend .dot.green {
    background: #22c55e;
}

.chart-legend .dot.yellow {
    background: #f59e0b;
}

.chart-legend .dot.red {
    background: #ef4444;
}

.chart-body {
    padding: 20px;
    height: 300px;
}

.chart-body.heatmap-container {
    height: 350px;
    padding: 0;
}

/* ===== Analytics Table ===== */
.analytics-table-section {
    background: var(--bg-card);
    border: 1px solid rgba(74, 222, 128, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 40px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
    flex-wrap: wrap;
    gap: 16px;
}

.table-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
}

.table-actions {
    display: flex;
    gap: 12px;
}

.search-input {
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 0.85rem;
    min-width: 200px;
}

.search-input::placeholder {
    color: var(--gray-500);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-400);
}

.filter-select {
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 0.85rem;
    cursor: pointer;
}

.filter-select option {
    background: var(--bg-primary);
}

.table-container {
    overflow-x: auto;
}

.analytics-table {
    width: 100%;
    border-collapse: collapse;
}

.analytics-table th,
.analytics-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
}

.analytics-table th {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
}

.analytics-table td {
    font-size: 0.85rem;
    color: var(--gray-300);
}

.analytics-table tbody tr:hover {
    background: rgba(74, 222, 128, 0.05);
}

.session-id {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--primary-400);
}

.health-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.health-badge.healthy {
    background: rgba(34, 197, 94, 0.2);
    color: var(--healthy-color);
}

.health-badge.warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

.health-badge.critical {
    background: rgba(239, 68, 68, 0.2);
    color: var(--critical-color);
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-sm);
    color: var(--primary-400);
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-icon:hover {
    background: rgba(74, 222, 128, 0.2);
    border-color: var(--primary-400);
}

.empty-table {
    text-align: center;
    color: var(--gray-500);
    padding: 40px !important;
}

/* ===== AI Performance Section ===== */
.ai-performance-section {
    background: var(--bg-card);
    border: 1px solid rgba(74, 222, 128, 0.1);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.ai-performance-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
}

.performance-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.performance-card {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
}

.perf-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.perf-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--white);
}

.perf-label {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-top: 4px;
    margin-bottom: 12px;
}

.perf-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.perf-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-400), var(--primary-500));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.perf-fill.good {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.perf-fill.low {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

/* ===== Responsive Analytics ===== */
@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .performance-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-card.large {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .analytics-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .date-range-selector {
        flex-wrap: wrap;
        justify-content: center;
    }

    .toolbar-actions {
        justify-content: center;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .kpi-card {
        flex-direction: column;
        text-align: center;
    }

    .performance-grid {
        grid-template-columns: 1fr;
    }

    .table-header {
        flex-direction: column;
        align-items: stretch;
    }

    .table-actions {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════════
   CHICKEN TWIN - CSS OVERRIDE (Append to end of style.css)
   ═══════════════════════════════════════════════════════════════ */

/* Demo Container Full Height */
.demo-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #0a0f0d;
}

/* Split View */
.split-view {
    display: flex;
    flex: 1;
    gap: 4px;
    padding: 4px;
    background: #000;
}

.view-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
}

.view-header {
    background: rgba(0, 0, 0, 0.9);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(74, 222, 128, 0.2);
}

.view-header h3 {
    margin: 0;
    font-size: 14px;
    color: #00ffff;
    font-weight: 600;
}

.view-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* Ensure 3D Canvas fills container */
#canvas3D {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Session Controls Bar */
.session-controls-bar {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.95), rgba(10, 15, 13, 0.95));
    border-bottom: 1px solid rgba(74, 222, 128, 0.3);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

/* Live Stats Bar */
.live-stats-bar {
    background: linear-gradient(180deg, rgba(10, 15, 13, 0.95), rgba(0, 0, 0, 0.95));
    border-top: 1px solid rgba(74, 222, 128, 0.3);
    padding: 12px 20px;
    flex-shrink: 0;
}

/* Notifications */
.notifications-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.notifications-container>* {
    pointer-events: auto;
}

@keyframes slideIn {
    from {
        transform: translateX(100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Button Fixes */
.btn-start,
.btn-stop {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-start:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
}

.btn-stop:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* Canvas containers */
#canvas3DContainer,
#thermalContainer {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Robot Log Panel */
#robotLog {
    transition: all 0.3s ease;
}

#robotLog.collapsed #robotLogContent {
    display: none;
}

/* Keypoint Legend positioning */
.keypoint-legend {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
}

/* Inactive Overlay */
.inactive-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.inactive-overlay[style*="display: none"] {
    display: none !important;
}

/* HUD Styling */
#hud3D {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #00ffff;
    z-index: 20;
}

#hud3D[style*="display: none"] {
    display: none !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .split-view {
        flex-direction: column;
    }

    .view-panel {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .session-controls-bar {
        flex-direction: column;
        gap: 10px;
    }

    .session-info {
        flex-wrap: wrap;
        justify-content: center;
    }

    .stats-ticker {
        flex-wrap: wrap;
        gap: 15px;
    }

    .ticker-divider {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   CHICKEN TWIN - CSS OVERRIDE (Append to end of style.css)
   ═══════════════════════════════════════════════════════════════ */

/* Demo Container Full Height */
.demo-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #0a0f0d;
}

/* Split View */
.split-view {
    display: flex;
    flex: 1;
    gap: 4px;
    padding: 4px;
    background: #000;
}

.view-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
}

/* Ensure 3D Canvas fills container */
#canvas3D,
#aiViewCanvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Session Controls Bar */
.session-controls-bar {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.95), rgba(10, 15, 13, 0.95));
    border-bottom: 1px solid rgba(74, 222, 128, 0.3);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

/* Live Stats Bar */
.live-stats-bar {
    background: linear-gradient(180deg, rgba(10, 15, 10, 0.98), rgba(5, 10, 5, 0.98));
    border-top: 1px solid rgba(74, 222, 128, 0.3);
    padding: 10px 20px;
    flex-shrink: 0;
}

/* Notifications */
.notifications-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.notifications-container>* {
    pointer-events: auto;
}

/* Button Fixes */
.btn-start,
.btn-stop {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-start:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
}

.btn-stop:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* Canvas containers */
#canvas3DContainer,
#aiViewContainer {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Robot Log Panel */
#robotLog {
    transition: all 0.3s ease;
}

#robotLog.collapsed #robotLogContent {
    display: none;
}

/* Keypoint Legend positioning */
.keypoint-legend {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
}

/* Inactive Overlay */
.inactive-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.inactive-overlay[style*="display: none"] {
    display: none !important;
}

/* HUD Styling */
#hud3D {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
    display: none;
    justify-content: space-between;
    font-size: 12px;
    color: #00ffff;
    z-index: 20;
}

#hud3D.active {
    display: flex;
}

/* Responsive */
@media (max-width: 1024px) {
    .split-view {
        flex-direction: column;
    }

    .view-panel {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .session-controls-bar {
        flex-direction: column;
        gap: 10px;
    }

    .session-info {
        flex-wrap: wrap;
        justify-content: center;
    }

    .stats-ticker {
        flex-wrap: wrap;
        gap: 15px;
    }

    .ticker-divider {
        display: none;
    }

    .robot-log,
    .alert-panel {
        display: none;
    }
}
