:root {
    --bg-dark: #0d0d12;
    --bg-panel: #14141b;
    --bg-card: #1c1c26;
    --accent: #ff6b35;
    --accent-secondary: #3b82f6;
    --accent-green: #10b981;
    --accent-yellow: #fbbf24;
    --text-primary: #f5f5f7;
    --text-secondary: #71717a;
    --border: #27272a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
}

/* Scrollbars Globales */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: rgba(13, 13, 18, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-mark {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--accent), #ff8f6b);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.logo-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.header-actions {
    display: flex;
    gap: 8px;
}

/* Estructura Principal */
.main {
    display: flex;
    height: calc(100vh - 52px);
    margin-top: 52px;
}

.viewer-wrap {
    flex: 1;
    position: relative;
    background: #000;
}

#container {
    width: 100%;
    height: 100%;
}

/* Panel Lateral */
.panel {
    width: 300px;
    background: var(--bg-panel);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-inner {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.panel-inner::-webkit-scrollbar {
    width: 6px;
}

.panel-inner::-webkit-scrollbar-track {
    background: transparent;
}

.panel-inner::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.panel-inner::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.panel-section {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.panel-section.scrollable {
    max-height: none;
    overflow: visible;
}

.panel-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* ==================== COLLAPSIBLE SECTIONS ==================== */
.collapsible-section {
    margin-bottom: 8px;
}

.collapsible-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 0;
    transition: all 0.2s;
    user-select: none;
}

.collapsible-header:hover {
    background: rgba(255, 255, 255, 0.06);
}

.collapse-icon {
    font-size: 12px;
    transition: transform 0.3s;
    opacity: 0.6;
}

.collapsible-header.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.collapsible-content {
    padding: 16px 12px 12px 12px;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s;
}

.collapsible-content.hidden {
    max-height: 0 !important;
    opacity: 0;
    padding: 0 12px;
}

/* ==================== HORIZONTAL SCROLL TABS ==================== */
.panel-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.panel-tabs::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.panel-tab {
    flex-shrink: 0; /* Evitar que los tabs se compriman */
    white-space: nowrap; /* Evitar wrap del texto */
}