:root {
    /* Brand Colors */
    --brand-orange: #EA580C;
    --brand-orange-hover: #C2410C;
    --brand-orange-light: rgba(234, 88, 12, 0.1);
    
    /* Dark Theme Core */
    --bg-darkest: #09090b;
    --bg-dark: #18181b;
    --bg-surface: #27272a;
    --bg-surface-hover: #3f3f46;
    
    /* Typography */
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    /* Borders */
    --border-color: #3f3f46;
    --border-light: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-darkest);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--bg-dark);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    margin-left: 2.25rem;
}

.nav-menu {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.mt-6 { margin-top: 1.5rem; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background-color: var(--bg-surface);
    color: var(--text-primary);
}

.nav-item.active {
    background-color: var(--brand-orange-light);
    color: var(--brand-orange);
}

.nav-item.active svg {
    stroke: var(--brand-orange);
}

.nav-item.external::after {
    content: "↗";
    margin-left: auto;
    font-size: 1.1rem;
    opacity: 0.5;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 70px;
    padding: 0 3rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 5;
}

.topbar h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.content-container {
    padding: 3rem;
    max-width: 1200px;
}

.view-section {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero-section {
    margin-bottom: 4rem;
}

.hero-section h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.hero-section p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Cards & Lists */
.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.primary-card {
    position: relative;
    overflow: hidden;
}

.primary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--brand-orange);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.badge {
    background-color: var(--brand-orange-light);
    color: var(--brand-orange);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.version-tag {
    font-size: 1.25rem;
    font-weight: 600;
}

.notes {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--brand-orange);
    color: white;
}

.btn-primary:hover {
    background-color: var(--brand-orange-hover);
}

.btn-secondary {
    background-color: var(--bg-darkest);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-surface-hover);
    border-color: var(--text-muted);
}

/* Grids */
.list-section h4 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

.grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.list-item {
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.list-item:hover {
    transform: translateY(-2px);
    border-color: var(--text-muted);
}

.item-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.item-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    word-break: break-all;
}

/* SDK Categories */
.sdk-category {
    margin-bottom: 3rem;
}

.sdk-category h4 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

.sdk-category h4::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--brand-orange);
}

.sdk-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.docs-link {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.docs-link:hover {
    color: var(--text-primary);
}

.hidden { display: none !important; }

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top-color: var(--brand-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
    .sidebar { width: 220px; }
    .main-content { margin-left: 220px; }
}

@media (max-width: 768px) {
    .layout { flex-direction: column; }
    .sidebar { position: static; width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--border-color); }
    .main-content { margin-left: 0; }
    .topbar { display: none; }
    .content-container { padding: 2rem 1.5rem; }
}
