@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Exo+2:wght@400;700;900&display=swap');

:root {

    --primary: #ff3e3e;
    --secondary: #3498db;
    --dark: #111;
    --light: #f5f5f5;
    --accent: #9b59b6;
    --zero: #ff5252;
    --gold: #FFD700;
    --silver: #C0C0C0;
    --bronze: #CD7F32;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Exo 2', 'Microsoft JhengHei', sans-serif;
    background-color: #1a1a2e;
    color: white;
    margin: 0;
    padding: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 62, 62, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 30% 80%, rgba(155, 89, 182, 0.1) 0%, transparent 30%);
    background-attachment: fixed;
    overflow-x: hidden;
}

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

header {
    text-align: center;
    padding: 150px 0;
    position: relative;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8), rgba(26, 26, 46, 0.9));
    border-bottom: 3px solid var(--primary);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-attachment: fixed;
}

.nav-container {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 26, 46, 0.95);
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    padding: 10px 0;
}

.navbar {
    display: flex;
    justify-content: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

.navbar li {
    margin: 0 15px;
}

.navbar a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.navbar a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.navbar a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.navbar a:hover::after {
    width: 50%;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin: 0 30px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: bold;
    letter-spacing: 1px;
}

.scroll-indicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: white;
    animation: bounce 2s infinite;
    cursor: pointer;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-20px) translateX(-50%); }
    60% { transform: translateY(-10px) translateX(-50%); }
}

h1 {
    font-family: 'Cinzel', serif;
    font-size: 4.5rem;
    margin: 0;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    position: relative;
}

header p {
    font-size: 1.5rem;
    margin-top: 20px;
    opacity: 0.9;
    max-width: 600px;
}

section {
    min-height: 100vh;
    padding: 100px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

section:nth-child(odd) {
    background-color: rgba(30, 30, 60, 0.3);
}

h2 {
    font-size: 2.5rem;
    margin-top: 0;
    display: inline-block;
    padding: 5px 15px;
    position: relative;
    color: white;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h2::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
}

.card {
    background: rgba(30, 30, 60, 0.8);
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    padding: 30px;
    margin-bottom: 50px;
    border-top: 5px solid var(--accent);
    position: relative;
    overflow: hidden;
    transition: transform 0.5s, box-shadow 0.5s;
    opacity: 0;
    transform: translateY(30px);
}

.card.visible {
    opacity: 1;
    transform: translateY(0);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 62, 62, 0.05), rgba(59, 130, 246, 0.05));
    pointer-events: none;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: rgba(20, 20, 40, 0.5);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

th, td {
    padding: 18px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    background-color: rgba(59, 130, 246, 0.2);
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--secondary);
}

tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05);
}

tr:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

tr.zero-contribution {
    background-color: rgba(255, 82, 82, 0.15);
    position: relative;
}

tr.zero-contribution:hover {
    background-color: rgba(255, 82, 82, 0.25);
}

tr.zero-contribution td {
    font-style: italic;
    color: #ff7b7b;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: bold;
    margin-right: 5px;
    color: white;
}

.badge-add {
    background: linear-gradient(to right, #27ae60, #2ecc71);
    box-shadow: 0 2px 5px rgba(46, 204, 113, 0.3);
}

.badge-del {
    background: linear-gradient(to right, #c0392b, #e74c3c);
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.3);
}

.repo-path {
    font-weight: bold;
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 5px solid var(--secondary);
    display: block;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.repo-path:hover {
    background: rgba(52, 152, 219, 0.2);
    transform: translateX(10px);
}

.branch-list {
    columns: 3;
}

.author-list {
    columns: 4;
}

.branch-list li, .author-list li {
    margin-bottom: 12px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.branch-list li:hover, .author-list li:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.author-list li.zero-author {
    background-color: rgba(255, 82, 82, 0.15);
    color: #ff7b7b;
    font-style: italic;
}

.author-list li.zero-author:hover {
    background-color: rgba(255, 82, 82, 0.25);
}

.author-rank {
    margin-right: 8px;
    display: inline-block;
    font-size: 1.2em;
}

.author-score {
    float: right;
    opacity: 0.7;
    font-size: 0.9em;
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    transition: opacity 0.3s;
}

.author-list li:hover .author-score {
    opacity: 1;
}

.rank-1 {
    text-shadow: 0 0 15px var(--gold);
}

.rank-2 {
    text-shadow: 0 0 15px var(--silver);
}

.rank-3 {
    text-shadow: 0 0 15px var(--bronze);
}

.timestamp {
    text-align: right;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-top: 50px;
    font-style: italic;
}

@keyframes glow {
    0% { text-shadow: 0 0 10px rgba(255, 62, 62, 0.5); }
    50% { text-shadow: 0 0 20px rgba(59, 130, 246, 0.5); }
    100% { text-shadow: 0 0 10px rgba(255, 62, 62, 0.5); }
}

footer {
    text-align: center;
    padding: 80px 0;
    background: rgba(20, 20, 40, 0.8);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary), var(--accent));
}

.summary-stat {
    font-size: 5rem;
    font-weight: bold;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    margin-bottom: 20px;
    animation: glow 3s infinite;
}

.stat-label {
    display: block;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 10px;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    display: inline-block;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .branch-list, .author-list {
        columns: 1;
    }

    h1 {
        font-size: 3rem;
    }

    .navbar {
        flex-wrap: wrap;
    }

    .navbar li {
        margin: 5px;
    }
}