
/* General Settings */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 110px;
}

body {
    margin: 0;
    background: #0b1120;
    color: #e5e7eb;
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

/* Navigation */
.navbar {
    position: sticky;
    top: 12px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    margin: 12px 3%;
    padding: 14px 24px;
    border: 1px solid #253047;
    border-radius: 16px;
    background: rgba(11, 17, 32, 0.92);
    backdrop-filter: blur(12px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-logo {
    width: 42px;
    height: 42px;
    overflow: hidden;
    flex-shrink: 0;
}

.brand-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand h2 {
    margin: 0;
    font-size: 18px;
}

.brand p {
    margin: 4px 0 0;
    color: #94a3b8;
    font-size: 12px;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 14px;
}

.nav-links a {
    padding: 9px 10px;
    border-radius: 7px;
    color: #94a3b8;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    background: #1e293b;
    color: #ffffff;
}

.nav-links .signup-link {
    background: #6366f1;
    color: #ffffff;
}

.nav-links .signup-link:hover {
    background: #4f46e5;
}

/* Page Heading */
.page-heading {
    padding: 55px 0 35px;
}

.eyebrow {
    margin: 0 0 12px;
    color: #818cf8;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
}

.page-heading h1 {
    margin: 0;
    font-size: clamp(25px, 3vw, 35px);
    line-height: 1.3;
}

/* Ranking Period Dropdown */
.ranking-period {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding: 12px 16px;
    border: 1px solid #253047;
    border-radius: 10px;
    background: #111827;
}

.period-label {
    color: #94a3b8;
    font-size: 13px;
}

.period-select {
    padding: 8px 12px;
    border: 1px solid #253047;
    border-radius: 8px;
    outline: none;
    background: #0b1120;
    color: #f9fafb;
    font-size: 14px;
    cursor: pointer;
}

.period-select:focus {
    border-color: #818cf8;
}

/* Ranking Section */
.ranking-section {
    margin-bottom: 80px;
}

/* Ranking Table */
.table-container {
    overflow-x: auto;
    border: 1px solid #253047;
    border-radius: 14px;
    background: #111827;
}

.ranking-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    text-align: left;
}

.ranking-table th {
    padding: 18px 16px;
    border-bottom: 1px solid #334155;
    background: #151f31;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.ranking-table td {
    padding: 17px 16px;
    border-bottom: 1px solid #253047;
    font-size: 14px;
    white-space: nowrap;
}

.ranking-table tbody tr:last-child td {
    border-bottom: none;
}

.ranking-table tbody tr {
    transition: background 0.2s;
}

.ranking-table tbody tr:hover {
    background: #182337;
}

/* Member Information */
.member-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 180px;
}

.member-photo {
    display: block;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border: 2px solid #334155;
    border-radius: 50%;
    background: #1e293b;
    object-fit: cover;
}

.member-name {
    color: #f1f5f9;
    font-weight: 600;
}

.cf-handle {
    color: #a5b4fc;
    transition: color 0.2s;
}

.cf-handle:hover {
    color: #c7d2fe;
    text-decoration: underline;
}

.rating {
    color: #cbd5e1;
    font-weight: 600;
}

.points {
    color: #e0e7ff;
    font-size: 15px;
    font-weight: 700;
}

/* Ranking Positions */
.rank-badge,
.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-weight: 700;
}

.rank-number {
    color: #94a3b8;
}

/* First Place - Gold */
.rank-gold {
    background: rgba(234, 179, 8, 0.08);
}

.rank-gold .rank-badge {
    border: 1px solid #a98220;
    background: #8c6a16;
    color: #fff0b3;
}

.rank-gold .member-photo {
    border-color: #d4a72c;
}

.rank-gold .member-name,
.rank-gold .points {
    color: #f5d779;
}

.rank-gold .rating {
    color: #e7c76b;
}

/* Second Place - Silver */
.rank-silver {
    background: rgba(203, 213, 225, 0.06);
}

.rank-silver .rank-badge {
    border: 1px solid #94a3b8;
    background: #64748b;
    color: #f8fafc;
}

.rank-silver .member-photo {
    border-color: #94a3b8;
}

.rank-silver .member-name,
.rank-silver .points {
    color: #dbe4ef;
}

/* Third Place - Bronze */
.rank-bronze {
    background: rgba(180, 83, 9, 0.08);
}

.rank-bronze .rank-badge {
    border: 1px solid #a16235;
    background: #854d2d;
    color: #ffdfc0;
}

.rank-bronze .member-photo {
    border-color: #b77950;
}

.rank-bronze .member-name,
.rank-bronze .points {
    color: #e9b18a;
}

/* Table Note */
.table-note {
    margin: 16px 0 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.8;
}

/* Footer */
.footer {
    padding: 24px 5%;
    border-top: 1px solid #253047;
    color: #64748b;
    text-align: center;
    font-size: 12px;
    line-height: 1.8;
}

/* Responsive Layout */
@media (max-width: 1000px) {
    .navbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-links {
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .page-heading {
        padding-top: 38px;
    }

    .page-heading h1 {
        font-size: 30px;
    }

    .ranking-table th,
    .ranking-table td {
        padding: 14px 12px;
    }
}
