:root {
    --primary-green: #2ecc71; /* Canlı Doğa Yeşili */
    --dark-green: #27ae60;
    --light-green: #eafaf1;
    --bg-white: #ffffff;
    --text-dark: #2c3e50;
    --text-muted: #7f8c8d;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }

body {
    background-color: var(--light-green); /* Arka plan açık yeşil */
    color: var(--text-dark);
    min-height: 100vh;
}

/* Navbar - Temiz Beyaz */
.navbar {
    position: fixed; top: 0; width: 100%; padding: 0 5%;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(46, 204, 113, 0.1);
    display: flex; align-items: center; z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

/* Logo Sol Köşede */
.logo { font-size: 1.8rem; font-weight: 700; letter-spacing: -1.5px; color: var(--text-dark); }
.logo span { color: var(--primary-green); }

/* Linkler Solda, Logo'dan hemen sonra */
.nav-links-container {
    display: flex; gap: 2rem; margin-left: 3rem; /* Logo'dan boşluk */
    list-style: none;
}
.nav-links-container a {
    text-decoration: none; color: var(--text-muted);
    font-size: 0.95rem; font-weight: 500;
    transition: 0.3s;
}
.nav-links-container a:hover { color: var(--primary-green); }

/* Auth & Profile - Tam Sağda */
.auth-section { margin-left: auto; /* Tüm boşluğu sol tarafa atar */ display: flex; align-items: center; }
.hidden { display: none !important; }

/* Kullanıcı Profili */
.user-profile {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 18px; background: var(--bg-white);
    border-radius: 50px; border: 1px solid rgba(46, 204, 113, 0.2);
    cursor: pointer; position: relative;
}

#user-avatar { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--primary-green); }
#user-name { font-size: 0.9rem; font-weight: 600; color: var(--text-dark); }

.dropdown {
    position: absolute; top: 55px; right: 0; width: 200px;
    background: white; border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    padding: 10px 0; display: none;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}
.user-profile:hover .dropdown { display: block; }
.dropdown a {
    display: block; padding: 12px 20px; color: var(--text-muted);
    text-decoration: none; font-size: 0.9rem; transition: 0.2s;
}
.dropdown a:hover { background: var(--light-green); color: var(--dark-green); }

/* Hero Bölümü - Yeşil Gradyan */
.hero {
    height: 100vh; display: flex; flex-direction: column;
    justify-content: center; align-items: center; text-align: center;
    padding: 0 10%;
    background: radial-gradient(circle at center, white 0%, var(--light-green) 100%);
}
.hero h1 { font-size: 4rem; font-weight: 800; line-height: 1.1; margin-bottom: 25px; color: var(--text-dark); }
.hero h1 span { color: var(--dark-green); position: relative; }
.hero h1 span::after {
    content: ''; position: absolute; bottom: 5px; left: 0;
    width: 100%; height: 8px; background: var(--primary-green);
    opacity: 0.3; border-radius: 4px; z-index: -1;
}
.hero p { color: var(--text-muted); font-size: 1.25rem; max-width: 700px; margin-bottom: 40px; font-weight: 300; }

.cta-btn {
    background: var(--primary-green); color: white; padding: 16px 40px;
    border-radius: 50px; border: none; font-weight: 600; cursor: pointer;
    transition: 0.3s; font-size: 1.1rem;
}
.cta-btn:hover { background: var(--dark-green); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(46, 204, 113, 0.3); }

/* --- MOBİL UYUMLULUK AYARLARI (768px ve altı) --- */
@media (max-width: 768px) {
    .navbar {
        height: auto;
        padding: 1rem 3%;
        flex-wrap: wrap; /* Elemanların sığmadığında alt satıra geçmesini sağlar */
    }

    .nav-links-container {
        order: 3; /* Linkleri en alta atar */
        width: 100%;
        justify-content: center;
        margin-left: 0;
        margin-top: 15px;
        gap: 1.2rem;
    }

    .nav-links-container a {
        font-size: 0.85rem;
    }

    .auth-section {
        order: 2; /* Giriş butonunu sağ üstte tutar */
    }

    .logo {
        order: 1; /* Logoyu sol üstte tutar */
        font-size: 1.4rem;
    }

    /* Hero Bölümü Düzenlemesi */
    .hero h1 {
        font-size: 2.5rem; /* Yazıyı mobilde küçültüyoruz */
        margin-top: 100px;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 10px;
    }

    /* Giriş Yapıldıysa Profil Alanı */
    .user-profile {
        padding: 5px 10px;
    }

    #user-name {
        display: none; /* Mobilde yer kaplamasın diye ismi gizleyip sadece fotoyu bırakabiliriz */
    }
    .dropdown {
        right: -10px; /* Mobilde biraz daha içeride dursun */
        width: 160px;
    }
}

#user-avatar, #info-avatar {
    object-fit: cover; /* Resmi ezmeden alanı doldurur */
}

.user-profile.open .dropdown {
    display: block;
}

/* --- DASHBOARD & LEADERBOARD ÖZEL STİLLERİ --- */

.dashboard-container {
    width: 90%;
    max-width: 1000px;
    margin: 100px auto 50px;
}

/* Üst Puan Kartı */
.points-banner {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: white;
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(46, 204, 113, 0.2);
    margin-bottom: 40px;
}

.points-banner p {
    opacity: 0.9;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}

.points-banner h1 {
    font-size: 3.5rem;
    margin: 10px 0;
    font-weight: 700;
}

/* Liderlik Tablosu Bölümü */
.leaderboard-section {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.leaderboard-section h2 {
    margin-bottom: 25px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
}

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

.leaderboard-table tr {
    border-bottom: 1px solid #f1f1f1;
    transition: 0.2s;
}

.leaderboard-table tr:last-child {
    border-bottom: none;
}

.leaderboard-table tr:hover {
    background: var(--light-green);
}

.leaderboard-table td {
    padding: 15px;
    color: var(--text-dark);
    font-weight: 500;
}

.rank {
    width: 60px;
    font-weight: 700;
    color: var(--primary-green);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--light-green);
}

.points-cell {
    text-align: right;
    font-weight: 700;
    color: var(--dark-green);
}

/* Sıralama Renkleri */
.rank-1 { color: #f1c40f !important; }
.rank-2 { color: #95a5a6 !important; }
.rank-3 { color: #d35400 !important; }

/* Kendi Satırın İçin Vurgu */
.user-row-highlight {
    background: var(--light-green) !important;
    border-left: 5px solid var(--primary-green);
}

/* --- GİRİŞ YAP BUTONU STİLLERİ --- */
.btn-login {
    background-color: var(--primary-green);
    color: var(--bg-white);
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 50px; /* Sitedeki profil kartı ve CTA butonları ile uyumlu oval yapı */
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.2);
    transition: all 0.3s ease; /* Yumuşak geçiş animasyonu */
}

/* Butonun üzerine gelindiğinde (Hover durumu) */
.btn-login:hover {
    background-color: var(--dark-green);
    transform: translateY(-2px); /* Hafif yukarı kalkma efekti */
    box-shadow: 0 6px 15px rgba(39, 174, 96, 0.3);
}

/* Butona tıklandığı an (Active durumu) */
.btn-login:active {
    transform: translateY(0); /* Tıklanınca eski konumuna geri oturur */
    box-shadow: 0 2px 5px rgba(39, 174, 96, 0.2);
}
