/* --- Neptierlist Modern Lacivert Theme & Reset --- */
:root {
    --bg-dark: #080c16;
    --bg-card: rgba(15, 23, 42, 0.7);
    --bg-card-hover: rgba(26, 38, 66, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    
    --primary-blue: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --accent-cyan: #06b6d4;
    
    --gold: #fbbf24;
    --gold-glow: rgba(251, 191, 36, 0.5);
    --silver: #cbd5e1;
    --silver-glow: rgba(203, 213, 225, 0.4);
    --bronze: #d97706;
    --bronze-glow: rgba(217, 119, 6, 0.4);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --font-family: 'Plus Jakarta Sans', sans-serif;
    --navbar-height: 76px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevent default browser native scrolling */
    background-color: var(--bg-dark);
    color: var(--text-main);
    position: relative;
}

/* --- Glowing Background Effects --- */
.bg-glow {
    position: fixed;
    top: -10vw;
    left: 50%;
    transform: translateX(-50%);
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(29, 78, 216, 0.25) 0%, rgba(6, 182, 212, 0.1) 40%, rgba(8, 12, 22, 0) 70%);
    z-index: -2;
    pointer-events: none;
    filter: blur(50px);
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    pointer-events: none;
}

/* --- Navbar (Şeffaf & Yuvarlak) --- */
.navbar-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1250px;
    z-index: 1000;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 99px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(59, 130, 246, 0.15);
    transition: all 0.3s ease;
}

.nav-left-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-discord-left {
    background: rgba(88, 101, 242, 0.15);
    border: 1px solid rgba(88, 101, 242, 0.4);
    color: #5865f2;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.btn-discord-left:hover {
    background: #5865f2;
    color: #fff;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 1px;
}

.brand-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.5));
}

.brand-name span {
    color: var(--primary-blue);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 12px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
    padding: 6px 12px;
    border-radius: 20px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
    background: rgba(59, 130, 246, 0.15);
}

.nav-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-discord-login {
    background: linear-gradient(135deg, #5865f2, #4752c4);
    color: #fff;
    border: none;
    cursor: pointer;
    padding: 9px 18px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
    transition: all 0.3s ease;
}

.btn-discord-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.6);
}

/* --- Main Viewport & Smooth Section Transition --- */
.main-content {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    padding: calc(var(--navbar-height) + 30px) 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.8s ease;
    will-change: transform, opacity;
}

/* Section 1: Hero */
.hero-section {
    transform: translateY(0);
    opacity: 1;
    z-index: 10;
}

.hero-section.slide-up {
    transform: translateY(-100vh);
    opacity: 0;
}

/* Section 2: Leaderboard */
.leaderboard-section {
    transform: translateY(100vh);
    opacity: 0;
    z-index: 5;
    justify-content: flex-start;
    max-width: 1150px;
    margin: 0 auto;
}

.leaderboard-section.slide-in {
    transform: translateY(0);
    opacity: 1;
    z-index: 10;
}

/* --- Hero Section Elements --- */
.hero-header {
    text-align: center;
    margin-bottom: 10px;
}

.badge {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 5px 14px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.hero-title span {
    background: linear-gradient(135deg, #60a5fa, #3b82f6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* --- Top 3 Cards & Podium --- */
.top3-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 24px;
    width: 100%;
    max-width: 1000px;
    margin: 15px 0;
}

.top3-card {
    position: relative;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 270px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.top3-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.card-glow {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.top3-card:hover .card-glow {
    opacity: 1;
}

/* Rank Specific Cards */
.gold-rank {
    width: 310px;
    order: 2;
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 10px 40px rgba(251, 191, 36, 0.15);
}

.gold-rank .card-glow {
    box-shadow: 0 0 50px var(--gold-glow);
}

.silver-rank {
    order: 1;
    border-color: rgba(203, 213, 225, 0.3);
    box-shadow: 0 10px 30px rgba(203, 213, 225, 0.1);
}

.silver-rank .card-glow {
    box-shadow: 0 0 40px var(--silver-glow);
}

.bronze-rank {
    order: 3;
    border-color: rgba(217, 119, 6, 0.3);
    box-shadow: 0 10px 30px rgba(217, 119, 6, 0.1);
}

.bronze-rank .card-glow {
    box-shadow: 0 0 40px var(--bronze-glow);
}

/* Badges & Icons */
.crown-icon {
    position: absolute;
    top: -24px;
    font-size: 2rem;
    color: var(--gold);
    filter: drop-shadow(0 0 10px var(--gold));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.rank-badge {
    position: absolute;
    top: 14px;
    left: 16px;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 99px;
}

.rank-badge.gold {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #000;
}

.rank-badge.silver {
    background: linear-gradient(135deg, #f1f5f9, #94a3b8);
    color: #000;
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #f59e0b, #b45309);
    color: #fff;
}

/* Skin Wrapper & Interactive Head Tilt Effect */
.skin-wrapper {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    perspective: 800px;
}

.gold-rank .skin-wrapper {
    height: 230px;
}

.minecraft-skin {
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 15px 15px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center bottom;
}

/* Card Hover animation */
.top3-card:hover .minecraft-skin {
    transform: scale(1.08) rotateY(15deg);
}

.silver-rank:hover .minecraft-skin {
    transform: scale(1.08) rotateY(20deg) rotateZ(3deg);
}

.bronze-rank:hover .minecraft-skin {
    transform: scale(1.08) rotateY(-20deg) rotateZ(-3deg);
}

.gold-rank:hover .minecraft-skin {
    transform: scale(1.1) rotateX(10deg);
}

/* Player Info */
.player-info {
    width: 100%;
    margin-top: 8px;
}

.player-name {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.tier-tag {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.tier-god {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(217, 119, 6, 0.3));
    color: var(--gold);
    border: 1px solid var(--gold);
}

.tier-s {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.player-stats {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Scroll Hint Indicator */
.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 10px;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.scroll-hint:hover {
    opacity: 1;
    color: var(--primary-blue);
}

.bounce {
    animation: bounce 2s infinite;
}

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

/* --- Section 2: Leaderboard Table --- */
.leaderboard-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.leaderboard-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
}

.leaderboard-header h2 i {
    color: var(--primary-blue);
}

.search-box {
    position: relative;
    width: 280px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 99px;
    color: var(--text-main);
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

/* Table Styling */
.table-container {
    width: 100%;
    max-height: calc(100vh - 240px);
    overflow-y: auto;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Custom Scrollbar inside table */
.table-container::-webkit-scrollbar {
    width: 6px;
}
.table-container::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 99px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.leaderboard-table th {
    position: sticky;
    top: 0;
    background: rgba(15, 23, 42, 0.95);
    padding: 16px 24px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-color);
    z-index: 5;
}

.leaderboard-table td {
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.leaderboard-table tbody tr {
    transition: background 0.3s ease;
}

.leaderboard-table tbody tr:hover {
    background: var(--bg-card-hover);
}

/* Player Column in Table */
.player-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.player-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #1e293b;
    border: 1px solid var(--border-color);
}

/* Row Highlights for Top 3 in Table */
.row-gold {
    background: rgba(251, 191, 36, 0.05);
}

.row-gold td:first-child {
    color: var(--gold);
    font-weight: 800;
}

.row-silver {
    background: rgba(203, 213, 225, 0.04);
}

.row-silver td:first-child {
    color: var(--silver);
    font-weight: 800;
}

.row-bronze {
    background: rgba(217, 119, 6, 0.04);
}

.row-bronze td:first-child {
    color: var(--bronze);
    font-weight: 800;
}

/* Responsive Design */
@media (max-width: 990px) {
    .navbar {
        flex-direction: column;
        gap: 10px;
        border-radius: 20px;
    }
    .top3-container {
        flex-direction: column;
        align-items: center;
    }
}
