:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --highlight: #38bdf8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray: #6b7280;
    --border: #334155;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    transition: transform 0.3s ease;
}

.logo {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.logo i {
    font-size: 28px;
    color: var(--highlight);
}

.logo h1 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
}

.nav-menu {
    flex: 1;
    padding: 24px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item i {
    width: 20px;
    font-size: 18px;
}

.nav-item:hover {
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--text-primary);
}

.nav-item.active {
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--highlight);
    border-left-color: var(--highlight);
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--border);
}

.stats-mini {
    background-color: var(--bg-primary);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.stat-value {
    color: var(--highlight);
    font-weight: 600;
    font-size: 18px;
}

.footer-note {
    color: var(--text-secondary);
    font-size: 12px;
    text-align: center;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 24px;
}

.header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

.search-section {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 300px;
    display: flex;
    align-items: center;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 8px 16px;
    gap: 12px;
    border: 1px solid var(--border);
}

.search-box i {
    color: var(--text-secondary);
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.filter-badge {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-toggle-btn {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.filter-toggle-btn:hover {
    background-color: var(--border);
}

/* Filter Panel */
.filter-panel {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    display: none;
    border: 1px solid var(--border);
    animation: slideDown 0.3s ease;
}

.filter-panel.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group h3 {
    margin-bottom: 12px;
    font-size: 16px;
    color: var(--text-secondary);
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.filter-checkbox input[type="checkbox"] {
    cursor: pointer;
}

.filter-select {
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 6px;
    width: 200px;
    cursor: pointer;
    outline: none;
}

.filter-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--highlight);
    color: white;
}

.btn-primary:hover {
    background-color: #2c9bd1;
}

.btn-secondary {
    background-color: var(--border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: #4a5568;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card h3 {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-number {
    font-size: 32px;
    font-weight: 600;
    color: var(--highlight);
}

.stat-trend {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    border-color: var(--highlight);
}

.project-preview {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}

.project-info {
    padding: 20px;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.project-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-working {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.status-broken {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.status-in-progress {
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.status-deprecated {
    background-color: rgba(107, 114, 128, 0.2);
    color: var(--gray);
}

.project-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.project-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 13px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
}

.meta-item i {
    color: var(--highlight);
    font-size: 12px;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.btn-detail {
    background-color: var(--highlight);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-detail:hover {
    background-color: #2c9bd1;
}

.project-links {
    display: flex;
    gap: 8px;
}

.link-icon {
    color: var(--text-secondary);
    font-size: 18px;
    transition: color 0.2s;
}

.link-icon:hover {
    color: var(--highlight);
}

/* Project Detail Page */
.project-detail {
    background-color: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    animation: fadeIn 0.5s ease;
}

.detail-preview {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.detail-content {
    padding: 32px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.detail-title {
    font-size: 32px;
    font-weight: 600;
}

.detail-actions {
    display: flex;
    gap: 16px;
}

.detail-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-github {
    background-color: #24292e;
    color: white;
}

.btn-github:hover {
    background-color: #2c3e50;
}

.btn-download {
    background-color: var(--success);
    color: white;
}

.btn-download:hover {
    background-color: #0ca678;
}

.detail-section {
    margin-top: 32px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.detail-item {
    background-color: var(--bg-primary);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.detail-item-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.detail-item-value {
    font-size: 16px;
    font-weight: 500;
}

.detail-note {
    background-color: var(--bg-primary);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-top: 24px;
}

.detail-note h3 {
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 16px;
}

.detail-note p {
    color: var(--text-primary);
    line-height: 1.6;
}

.btn-back {
    background: none;
    border: none;
    color: var(--highlight);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.btn-back:hover {
    text-decoration: underline;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px;
    background-color: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.empty-state i {
    font-size: 48px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.empty-state h3 {
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .detail-actions {
        width: 100%;
    }
    
    .detail-action-btn {
        flex: 1;
        justify-content: center;
    }
}