:root {
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --accent-blue: #2563eb;
    --accent-blue-light: #eff6ff;
    --accent-red: #dc2626;
    --accent-green: #16a34a;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --radius-md: 12px;
    --radius-sm: 8px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    animation: fadeInDown 0.5s ease-out;
}

.app-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-main);
    margin-bottom: 4px;
}

.app-header .subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

/* Metric Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.metric-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    opacity: 0; /* JS Fade-In */
    transform: translateY(10px);
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.metric-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.metric-value {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-main);
    margin-bottom: 8px;
}

.text-blue { color: var(--accent-blue); }
.text-red { color: var(--accent-red); }

.metric-trend {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.metric-trend.positive { color: var(--accent-green); }

/* Main Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

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

/* Cards */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
}

.badge {
    background: var(--accent-blue-light);
    color: var(--accent-blue);
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

.mt-4 { margin-top: 24px; }

/* Timeline */
.timeline {
    list-style: none;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0; left: 15px;
    height: 100%;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 45px;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.timeline-item.show {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-icon {
    position: absolute;
    left: 0; top: 2px;
    width: 32px; height: 32px;
    background: var(--card-bg);
    border: 2px solid var(--accent-blue);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.timeline-icon.create { border-color: var(--accent-green); }
.timeline-icon.delete { border-color: var(--accent-red); }

.timeline-time {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: block;
}

.timeline-content {
    font-size: 0.95rem;
    color: var(--text-main);
}

.timeline-repo {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.875rem;
    color: var(--accent-blue);
    background: var(--accent-blue-light);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

/* Projects & History */
.project-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 500;
}

.project-item::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--border-color);
    border-radius: 50%;
}

.history-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-color);
}
.history-stat:last-child { border-bottom: none; padding-bottom: 0; }

.history-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.history-value {
    font-weight: 600;
    font-size: 1.1rem;
}

.text-muted { color: var(--text-muted); }

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
