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

body {
    font-family: Arial, sans-serif;
    background: #f6f8fa;
    color: #24292f;
}


/* =========================
   HEADER
========================= */

.header {
    background: #161b22;
    color: white;

    padding: 25px 8%;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.header p {
    color: #8b949e;
}

.repo-btn {
    text-decoration: none;

    color: white;

    border: 1px solid #30363d;

    padding: 10px 16px;

    border-radius: 6px;

    transition: 0.2s;
}

.repo-btn:hover {
    background: #30363d;
}


/* =========================
   MAIN
========================= */

.container {
    width: 90%;
    max-width: 1100px;

    margin: 40px auto;
}


/* =========================
   LEADERBOARD
========================= */

.leaderboard-section {
    margin-bottom: 50px;
}

.section-title {
    margin-bottom: 20px;
}

.section-title h2 {
    margin-bottom: 5px;
}

.section-title p {
    color: #57606a;
}


.leaderboard {
    display: flex;

    flex-direction: column;

    gap: 10px;
}


.leaderboard-card {
    background: white;

    border: 1px solid #d0d7de;

    border-radius: 8px;

    padding: 15px 20px;

    display: flex;

    align-items: center;

    gap: 20px;
}


.rank {
    width: 40px;

    font-size: 20px;

    font-weight: bold;

    text-align: center;
}


.leader-user {
    display: flex;

    align-items: center;

    gap: 12px;

    flex: 1;
}


.leader-avatar {
    width: 42px;
    height: 42px;

    border-radius: 50%;
}


.username {
    color: #24292f;

    text-decoration: none;

    font-weight: 600;

    font-size: 16px;
}

.username:hover {
    color: #0969da;
}


.stats {
    display: flex;

    gap: 20px;

    color: #57606a;

    font-size: 14px;
}


.stat {
    min-width: 80px;

    text-align: center;
}


.stat-number {
    display: block;

    color: #24292f;

    font-size: 18px;

    font-weight: bold;

    margin-bottom: 2px;
}


/* Top 3 */

.leaderboard-card:nth-child(1) {
    border-left: 5px solid #f1c40f;
}

.leaderboard-card:nth-child(2) {
    border-left: 5px solid #95a5a6;
}

.leaderboard-card:nth-child(3) {
    border-left: 5px solid #cd7f32;
}


/* =========================
   PULL REQUESTS
========================= */

.top-section {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 25px;
}

.top-section h2 {
    margin-bottom: 5px;
}

#pr-count {
    color: #57606a;
}


.filters {
    display: flex;

    gap: 8px;
}


.filter-btn {
    border: 1px solid #d0d7de;

    background: white;

    padding: 8px 15px;

    border-radius: 6px;

    cursor: pointer;

    font-size: 14px;
}


.filter-btn:hover {
    background: #f3f4f6;
}


.filter-btn.active {
    background: #24292f;

    color: white;

    border-color: #24292f;
}


/* =========================
   PR CARD
========================= */

.pr-card {
    background: white;

    border: 1px solid #d0d7de;

    border-radius: 10px;

    margin-bottom: 20px;

    overflow: hidden;
}


.pr-header {
    padding: 20px;

    border-bottom: 1px solid #d8dee4;
}


.pr-title-row {
    display: flex;

    justify-content: space-between;

    gap: 15px;
}


.pr-title {
    font-size: 20px;

    color: #24292f;

    text-decoration: none;

    font-weight: 600;
}


.pr-title:hover {
    color: #0969da;
}


.pr-number {
    color: #57606a;
}


.status {
    padding: 5px 10px;

    border-radius: 20px;

    font-size: 13px;

    font-weight: bold;

    white-space: nowrap;
}


.status.open {
    color: #1a7f37;

    background: #dafbe1;
}


.status.closed {
    color: #cf222e;

    background: #ffebe9;
}


.pr-info {
    display: flex;

    align-items: center;

    gap: 10px;

    margin-top: 15px;

    color: #57606a;

    font-size: 14px;
}


.avatar {
    width: 32px;
    height: 32px;

    border-radius: 50%;
}


.pr-body {
    padding: 20px;
}


.commit-heading {
    font-size: 16px;

    margin-bottom: 15px;
}


.commit {
    display: flex;

    gap: 12px;

    padding: 12px;

    margin-bottom: 8px;

    background: #f6f8fa;

    border-radius: 6px;

    border: 1px solid #eaeef2;
}


.commit-icon {
    font-size: 18px;
}


.commit-content {
    min-width: 0;
}


.commit-message {
    color: #24292f;

    text-decoration: none;

    font-weight: 500;

    display: block;

    margin-bottom: 5px;
}


.commit-message:hover {
    color: #0969da;
}


.commit-meta {
    color: #57606a;

    font-size: 12px;
}


.sha {
    font-family: monospace;

    background: #eaeef2;

    padding: 2px 5px;

    border-radius: 4px;
}


/* =========================
   STATES
========================= */

.loading {
    text-align: center;

    padding: 30px;

    color: #57606a;
}


.error {
    background: #ffebe9;

    color: #cf222e;

    padding: 15px;

    border-radius: 6px;

    margin-bottom: 20px;
}


.hidden {
    display: none;
}


.no-pr {
    text-align: center;

    background: white;

    border: 1px solid #d0d7de;

    border-radius: 10px;

    padding: 50px;

    color: #57606a;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {

    .header {
        flex-direction: column;

        align-items: flex-start;
    }

    .top-section {
        flex-direction: column;

        align-items: flex-start;

        gap: 15px;
    }

    .filters {
        width: 100%;
    }

    .filter-btn {
        flex: 1;
    }

    .pr-title-row {
        flex-direction: column;
    }

    .pr-info {
        flex-wrap: wrap;
    }

    .leaderboard-card {
        padding: 12px;

        gap: 10px;
    }

    .stats {
        gap: 8px;
    }

    .stat {
        min-width: 55px;
    }

    .stat-number {
        font-size: 16px;
    }

    .container {
        width: 94%;
    }

}