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

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --surface-light: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --success-color: #10b981;
    --warning-color: #f59e0b;
}

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(30, 41, 59, 0.8);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-brand img {
    border-radius: 8px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

/* Hero Section */
.hero {
    padding: 4rem 0 3rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-bottom: 1px solid var(--border-color);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 2rem;
}

.hero-badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.hero-badges img {
    height: 28px;
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 61px;
    width: 250px;
    height: calc(100vh - 61px);
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    z-index: 900;
    padding: 1.5rem 0;
}

.sidebar-header {
    padding: 0 1.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-link {
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.sidebar-link.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

/* Main Content Area */
.main-content {
    margin-left: 250px;
    min-height: calc(100vh - 61px);
}

/* Content Section */
.content-section {
    padding: 3rem 0;
}

.category-section {
    margin-bottom: 4rem;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.category-header h2 {
    font-size: 2rem;
    color: var(--text-primary);
}

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

.resource-grid {
    display: grid;
    gap: 1.5rem;
}

.resource-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
    position: relative;
}

.resource-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.resource-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.resource-card h3 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.resource-card h3 a:hover {
    color: var(--secondary-color);
}

.resource-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.resource-meta {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.resource-tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* Table Styles */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
}

.content-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
}

.content-table thead {
    background: var(--surface-light);
}

.content-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    white-space: nowrap;
}

.content-table th:last-child {
    border-right: none;
}

.content-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    color: var(--text-secondary);
    vertical-align: top;
}

.content-table td:last-child {
    border-right: none;
}

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

.content-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.content-table a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

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

/* First column (Name) styling */
.content-table td:first-child {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 200px;
}

/* Second column (Description) styling */
.content-table td:nth-child(2) {
    max-width: 500px;
}

/* Third column (URL) styling */
.content-table td:nth-child(3) {
    min-width: 120px;
    text-align: center;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* About Page Styles */
.about-hero {
    padding: 4rem 0 3rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-bottom: 1px solid var(--border-color);
}

.about-hero h1 {
    font-size: 2rem;
    margin: 1.5rem 0 1rem;
    color: var(--text-primary);
}

.about-content {
    padding: 3rem 0;
}

.about-section,
.projects-section,
.community-section {
    margin-bottom: 4rem;
}

.about-section h2,
.projects-section h2,
.community-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.about-section p,
.projects-section p,
.community-section p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

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

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

.project-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.project-card.highlight {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.05) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.project-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.project-card h3 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.project-card h3 a:hover {
    color: var(--secondary-color);
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.project-card .stars {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.community-section a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.community-section a:hover {
    color: var(--secondary-color);
}

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

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer p {
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

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

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

/* Loading State */
.loading {
    text-align: center;
    padding: 4rem 2rem;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }

    .main-content {
        margin-left: 220px;
    }

    footer {
        margin-left: 220px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .nav-links {
        gap: 0.5rem;
        font-size: 0.9rem;
    }

    .nav-links a {
        padding: 0.4rem 0.8rem;
    }

    /* Hide sidebar on mobile, show as top bar */
    .sidebar {
        position: fixed;
        top: 61px;
        left: 0;
        width: 100%;
        height: auto;
        max-height: 0;
        overflow: hidden;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        transition: max-height 0.3s ease;
    }

    .sidebar.open {
        max-height: 400px;
        overflow-y: auto;
    }

    .sidebar-nav {
        padding: 0.5rem 0;
    }

    .sidebar-link {
        padding: 0.75rem 1rem;
        border-left: none;
        border-bottom: 1px solid var(--border-color);
    }

    .main-content {
        margin-left: 0;
    }

    footer {
        margin-left: 0;
    }

    footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

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

    .category-header h2 {
        font-size: 1.5rem;
    }

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

    .table-container {
        font-size: 0.85rem;
    }

    .content-table th,
    .content-table td {
        padding: 0.75rem 0.5rem;
    }

    .content-table td:first-child {
        min-width: 150px;
    }

    .content-table td:nth-child(2) {
        max-width: none;
    }
}

/* Dark mode toggle (optional for future) */
@media (prefers-color-scheme: light) {
    /* Light mode styles can be added here if needed */
}
