:root {
    --primary: #3B82F6;
    --secondary: #93C5FD;
    --accent: #10B981;
    --background: #0B1426;
    --glass-bg: rgba(11, 20, 38, 0.7);
    --glass-border: rgba(59, 130, 246, 0.2);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --success: #10B981;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    min-height: 100vh;
}

.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.1), transparent 50%);
}

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

.search-container {
    text-align: center;
    padding: 4rem 2rem 2rem;
}

.search-container h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.search-container p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 1rem;
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.primary-btn {
    background: var(--primary);
    color: #fff;
}

.primary-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

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

.outline-btn:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.hidden {
    display: none !important;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--primary);
}

.profile-text h2 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.profile-text a {
    color: var(--secondary);
    text-decoration: none;
    font-size: 1.1rem;
}

.profile-text a:hover {
    text-decoration: underline;
}

.profile-text p {
    color: var(--text-muted);
    margin-top: 0.5rem;
    line-height: 1.4;
    max-width: 500px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-value.highlight {
    color: var(--accent);
}

.text-sm {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.75rem;
}

.canvas-wrapper {
    position: relative;
    width: 100%;
}

.pie-wrapper {
    height: 300px;
    display: flex;
    justify-content: center;
}

.bar-wrapper {
    height: 300px;
}

.repo-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.repo-list::-webkit-scrollbar {
    width: 6px;
}

.repo-list::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 3px;
}

.repo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.repo-item:last-child {
    border-bottom: none;
}

.repo-name {
    font-weight: 600;
    color: var(--secondary);
    text-decoration: none;
    display: block;
    margin-bottom: 0.25rem;
}

.repo-name:hover {
    text-decoration: underline;
}

.repo-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.repo-stat-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Loading & Alert */
#loading {
    text-align: center;
    padding: 3rem;
    color: var(--secondary);
}

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

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

.alert {
    max-width: 600px;
    margin: 2rem auto;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: #fca5a5;
    text-align: center;
}

@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .search-box {
        flex-direction: column;
    }

    .dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .profile-info {
        flex-direction: column;
    }
}