:root {
    --primary-color: #f39c12;
    --secondary-color: #8e44ad;
    --accent-color: #2980b9;
    --bg-dark: #0f0c29;
    --bg-gradient: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-light: #f5f6fa;
    --text-muted: #b2bec3;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Inter', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--secondary-color); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }

/* Typography */
h1, h2, h3 { color: var(--text-light); letter-spacing: 1px; }
span { color: var(--primary-color); }

/* Navbar */
header {
    background: rgba(15, 12, 41, 0.85);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
    width: auto;
    border-radius: 5px;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 800;
    text-decoration: none;
    color: white;
}

.corner-decoration {
    position: absolute;
    width: 60px;
    height: auto;
    z-index: 10;
    pointer-events: none;
    opacity: 0.6;
    transition: var(--transition);
}

.corner-decoration.top-left { top: 10px; left: 10px; }
.corner-decoration.top-right { top: 10px; right: 10px; transform: rotate(90deg); }
.corner-decoration.bottom-left { bottom: 10px; left: 10px; transform: rotate(-90deg); }
.corner-decoration.bottom-right { bottom: 10px; right: 10px; transform: rotate(180deg); }

.card-glow:hover .corner-decoration { opacity: 1; transform: scale(1.1); }

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.9rem;
}

.nav-links a:hover { color: var(--primary-color); }

.auth-btn {
    padding: 0.5rem 1.2rem;
    border-radius: 5px;
    transition: var(--transition);
}

.login-btn { border: 1px solid var(--primary-color); color: var(--primary-color) !important; }
.login-btn:hover { background: var(--primary-color); color: white !important; }

.register-btn { background: var(--secondary-color); color: white !important; }
.register-btn:hover { background: #9b59b6; transform: translateY(-2px); }

/* Hero Section */
.hero {
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.hero-content h1 { font-size: 4.5rem; margin-bottom: 1.5rem; text-shadow: 0 0 20px rgba(243, 156, 18, 0.5); }
.hero-content p { font-size: 1.3rem; max-width: 800px; color: var(--text-muted); margin: 0 auto 2rem; }

.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary { background: linear-gradient(to right, #f39c12, #e67e22); color: white; box-shadow: 0 10px 20px rgba(243, 156, 18, 0.3); }
.btn-primary:hover { transform: scale(1.05); box-shadow: 0 15px 30px rgba(243, 156, 18, 0.5); }

.btn-secondary { background: rgba(255, 255, 255, 0.1); color: white; backdrop-filter: blur(5px); margin-left: 1rem; border: 1px solid rgba(255, 255, 255, 0.2); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.2); }

/* Rankings */
.rankings-section { padding: 5rem 0; background: #0b091d; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 3rem; }

.rankings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); gap: 2rem; }

.ranking-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    transition: var(--transition);
}

.card-glow:hover {
    border-color: rgba(243, 156, 18, 0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    transform: translateY(-5px);
}

.ranking-card h3 { margin-bottom: 1.5rem; border-bottom: 2px solid var(--secondary-color); padding-bottom: 0.5rem; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--text-muted); padding: 1rem; font-size: 0.8rem; text-transform: uppercase; }
td { padding: 1rem; border-bottom: 1px solid rgba(255,255,255,0.05); }

.rank-num {
    width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; font-weight: bold; background: rgba(255,255,255,0.1);
}
.rank-1 { background: #f1c40f; color: #000; box-shadow: 0 0 10px #f1c40f; }
.rank-2 { background: #bdc3c7; color: #000; }
.rank-3 { background: #cd7f32; color: #000; }

.alz-val { color: #f1c40f; font-weight: bold; }
.honor-val { color: #3498db; font-weight: bold; }

/* Auth Forms */
.auth-section { height: 100vh; display: flex; align-items: center; justify-content: center; padding-top: 80px; }
.auth-container { background: var(--card-bg); padding: 3rem; border-radius: 20px; width: 450px; backdrop-filter: blur(20px); }
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-header h2 { font-size: 2rem; }
.auth-header p { color: var(--text-muted); }

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-muted); font-size: 0.9rem; }
.form-group input {
    width: 100%; padding: 1rem; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.3); color: white; transition: var(--transition);
}
.form-group input:focus { outline: none; border-color: var(--primary-color); background: rgba(0,0,0,0.5); }

.btn-full { width: 100%; border: none; cursor: pointer; }

.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; }
.auth-footer a { color: var(--primary-color); text-decoration: none; }

/* Flash Messages */
.flash-messages { position: fixed; top: 100px; right: 20px; z-index: 1001; }
.alert { padding: 1rem 2rem; border-radius: 10px; margin-bottom: 10px; animation: slideIn 0.5s ease; color: white; }
.alert-success { background: #27ae60; }
.alert-error { background: #c0392b; }

/* Animations */
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.animate-fade-in { animation: fadeIn 1s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.animate-slide-up { animation: slideUp 1s ease-out; }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Footer */
footer { padding: 3rem 0; background: #050510; text-align: center; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-content p { color: var(--text-muted); margin-bottom: 1rem; }
.social-links { display: flex; justify-content: center; gap: 1.5rem; }
.social-links a { color: var(--text-muted); font-size: 1.5rem; transition: var(--transition); }
.social-links a:hover { color: var(--primary-color); }

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 3rem; }
    .nav-links { display: none; }
    .auth-container { width: 90%; }
}
