/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --bg-dark: #050507;
    --card-bg: rgba(20, 20, 35, 0.4);
    --card-border: rgba(255, 255, 255, 0.05);
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --accent: #ec4899;
    --accent-glow: rgba(236, 72, 153, 0.4);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-shine: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 40%);
    background-attachment: fixed;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
    animation: slideDown 0.8s ease-out;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--primary-glow);
    font-size: 24px;
    color: white;
}

.title h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title p {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.stat-badge {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    color: var(--text-muted);
    backdrop-filter: blur(10px);
}

.api-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-2px);
}

/* Timeline */
.timeline-section {
    position: relative;
    padding-left: 30px;
}

.timeline-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom,
            rgba(99, 102, 241, 0) 0%,
            var(--primary) 15%,
            var(--accent) 85%,
            rgba(236, 72, 153, 0) 100%);
}

.date-group {
    margin-bottom: 50px;
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

.date-header {
    position: sticky;
    top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    margin-left: -39px;
    z-index: 10;
}

.date-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.date-label {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.commits-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.commit-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.commit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.commit-card:hover {
    transform: translateY(-4px) scale(1.01);
    background: rgba(30, 30, 50, 0.5);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
}

.commit-message {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-main);
}

.commit-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.sha-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
    text-decoration: none;
    transition: all 0.2s;
}

.sha-badge:hover {
    background: var(--primary);
    color: white;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--card-border);
}

.repo-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.repo-lang-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.repo-name {
    font-size: 13px;
    color: var(--text-muted);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.time-ago {
    font-size: 12px;
    color: var(--text-muted);
}

/* Animations */
@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Private Repo Styling */
.private-repo {
    border-color: rgba(234, 179, 8, 0.2);
}

.private-badge {
    color: #fbbf24;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Scroll Loading - Infinite Scroll */
.scroll-loading {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.scroll-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.scroll-loading.no-more::before {
    display: none;
}

.scroll-loading.no-more {
    color: var(--text-muted);
    opacity: 0.6;
}