/* Ownaudio Documentation - Shared Styles */

:root {
    --primary-color: #4a9eff;
    --primary-dark: #3d86db;
    --secondary-color: #7c3aed;
    --core-color: #06b6d4;
    --net-color: #10b981;
    --background: #0f1419;
    --surface: #1a1f2e;
    --surface-light: #252d3d;
    --text-primary: #e8edf4;
    --text-secondary: #9ca8b8;
    --accent: #06b6d4;
    --success: #10b981;
    --info: #3b82f6;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: #2d3748;
    --border-light: #4a5568;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
.nav {
    background: rgba(26, 31, 46, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Main Layout */
.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 2rem 2rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.sidebar h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.sidebar h3:first-child {
    margin-top: 0;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.25rem;
}

.sidebar-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.sidebar-nav a:hover {
    color: var(--primary-color);
    background: var(--surface);
}

.sidebar-nav a.active {
    color: var(--primary-color);
    background: var(--surface);
}

/* Content Area */
.content {
    max-width: 900px;
}

.content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.content h2 {
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-primary);
    font-weight: 600;
}

.content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.content h4 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
}

.content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.content ul,
.content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
    color: var(--text-secondary);
}

.content li {
    margin-bottom: 0.5rem;
}

.content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.content a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.content code {
    background: var(--surface);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-family: 'Fira Code', 'Consolas', monospace;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.badge-core {
    background: rgba(6, 182, 212, 0.2);
    color: var(--core-color);
}

.badge-net {
    background: rgba(16, 185, 129, 0.2);
    color: var(--net-color);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.alert strong {
    display: block;
    margin-bottom: 0.5rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
    color: var(--text-primary);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--info);
    color: var(--text-primary);
}

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

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--text-primary);
}

/* Code Blocks */
.code-block {
    background: var(--surface-light);
    border-radius: 8px;
    overflow: hidden;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
}

.code-header {
    background: var(--surface);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.code-block pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
}

.code-block pre::-webkit-scrollbar {
    height: 8px;
}

.code-block pre::-webkit-scrollbar-track {
    background: var(--surface);
}

.code-block pre::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

.code-block pre::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.code-block code {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    background: transparent;
    padding: 0;
}

/* Tables */
.api-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
}

.api-table th {
    background: var(--surface-light);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border);
    color: var(--text-primary);
}

.api-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.api-table tr:last-child td {
    border-bottom: none;
}

.api-table code {
    background: var(--background);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--primary-color);
}

/* Tabs */
.api-tabs {
    display: flex;
    gap: 1rem;
    margin: 2rem 0 1rem;
    border-bottom: 2px solid var(--border);
}

.api-tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.api-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.api-tab:hover:not(.active) {
    color: var(--text-primary);
}

.api-content {
    display: none;
}

.api-content.active {
    display: block;
}

/* Feature Cards */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(74, 158, 255, 0.2);
}

.feature-card h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 12px rgba(74, 158, 255, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 20px rgba(74, 158, 255, 0.45);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(74, 158, 255, 0.05);
}

/* Footer */
.footer {
    padding: 40px 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

    .sidebar {
        position: static;
        max-height: none;
    }

    .nav-links {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }

    .nav-links {
        display: none;
    }

    .main {
        padding: 80px 1rem 1rem;
    }

    .content h1 {
        font-size: 2rem;
    }

    .content h2 {
        font-size: 1.5rem;
    }

    .content h3 {
        font-size: 1.25rem;
    }

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

    .api-tabs {
        overflow-x: auto;
    }

    .api-tab {
        white-space: nowrap;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.pt-1 { padding-top: 0.5rem; }
.pt-2 { padding-top: 1rem; }
.pt-3 { padding-top: 1.5rem; }
.pt-4 { padding-top: 2rem; }

.pb-1 { padding-bottom: 0.5rem; }
.pb-2 { padding-bottom: 1rem; }
.pb-3 { padding-bottom: 1.5rem; }
.pb-4 { padding-bottom: 2rem; }

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Print Styles */
@media print {
    .nav,
    .sidebar,
    .footer {
        display: none;
    }

    .main {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .content {
        max-width: 100%;
    }

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