:root {
    --primary-color: #00ffff; /* Neon Mavi */
    --secondary-color: #ffaa00; /* Neon Turuncu */
    --bg-main: #141414; /* Ana Koyu Arka Plan */
    --bg-secondary: #1e1e1e; /* Kart ve Ayrıntı Arka Planı */
    --text-light: #f0f0f0; /* Açık Metin Rengi */
    --transition-speed: 0.3s;
}

/* -------------------------------------------------------------------------- */
/* TÜM SAYFA ARKA PLANI (logo.png) VE HAFİF BULANIKLIK */
/* -------------------------------------------------------------------------- */
body {
    background-image: url('logo.png'); 
    background-size: cover; 
    background-position: center;
    background-attachment: fixed; 
    
    color: var(--text-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;

    position: relative;
}

/* Bulanıklık ve Karartma Katmanı */
body::before {
    content: '';
    position: fixed; 
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    
    backdrop-filter: blur(2px); 
    background-color: rgba(0, 0, 0, 0.6); 
    z-index: -1; 
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}
a:hover {
    color: #80ffff;
}

.container {
    width: 95%; 
    max-width: 1200px;
    margin: auto;
    padding-top: 20px;
    position: relative; 
    z-index: 10;
}

/* -------------------------------------------------------------------------- */
/* HEADER VE GÜÇLENDİRİLMİŞ ANİMASYONLAR */
/* -------------------------------------------------------------------------- */
header {
    background: transparent; 
    padding: 100px 10px; 
    text-align: center;
    border-bottom: 2px solid var(--primary-color); 
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 255, 255, 0.3); 
}

/* Header İçeriği (Yazılar) */
.header-content {
    position: relative;
    z-index: 2; 
    text-align: center;
    padding: 20px;
    max-width: 800px;
}

/* Ana Başlık Stili ve Güçlendirilmiş Neon Parlama Animasyonu */
header h1 {
    font-size: 4.5em; 
    color: var(--text-light);
    margin: 0 0 15px 0;
    font-weight: 800;
    animation: neon-flicker 1.5s ease-in-out infinite alternate;
}

@keyframes neon-flicker {
    0% { 
        text-shadow: 0 0 5px var(--primary-color), 0 0 15px var(--primary-color), 0 0 30px rgba(0, 255, 255, 0.4); 
        opacity: 1;
    }
    100% { 
        text-shadow: 0 0 10px var(--primary-color), 0 0 25px #00ffff, 0 0 45px #00ffff; 
        opacity: 0.95;
    }
}

header p {
    font-size: 1.6em;
    color: var(--text-light);
    margin-top: 0;
    text-shadow: 0 0 8px var(--secondary-color);
}

/* -------------------------------------------------------------------------- */
/* PROFİL VE YENİ AUTH BUTONLARI (Kapsayıcı Stil) */
/* -------------------------------------------------------------------------- */
.user-profile, .auth-buttons {
    position: absolute;
    top: 30px; 
    right: 30px; 
    display: flex;
    align-items: center;
    gap: 15px; 
    z-index: 20;
    background: rgba(30, 30, 30, 0.8);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--secondary-color);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 8px var(--primary-color);
}

#profile-name {
    font-weight: bold;
    color: var(--secondary-color);
    white-space: nowrap; 
}

/* ÇIKIŞ BUTONU (Mevcut) */
.logout-btn {
    background-color: var(--secondary-color);
    color: var(--bg-main);
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
}

.logout-btn:hover {
    background-color: #ffc44d;
    transform: scale(1.05);
}

/* YENİ GİRİŞ/KAYIT BUTONLARI STİLİ */
.auth-buttons a {
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s;
    white-space: nowrap;
    text-align: center;
}

.login-btn {
    background-color: var(--primary-color); /* Neon Mavi */
    color: var(--bg-main);
    border: 1px solid var(--primary-color);
}
.login-btn:hover {
    background-color: #80ffff;
    color: #000;
    box-shadow: 0 0 10px var(--primary-color);
}

.signup-btn {
    background-color: var(--secondary-color); /* Neon Turuncu (SENDE ARAMIZA KATIL) */
    color: var(--bg-main);
    border: 1px solid var(--secondary-color);
}
.signup-btn:hover {
    background-color: #ffc44d;
    color: #000;
    box-shadow: 0 0 10px var(--secondary-color);
}
/* -------------------------------------------------------------------------- */
/* NAVİGASYON */
/* -------------------------------------------------------------------------- */
.main-nav {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--secondary-color);
    text-align: center;
    padding: 10px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav a {
    display: inline-block;
    padding: 10px 15px;
    color: var(--text-light);
    font-weight: bold;
    transition: background-color 0.3s;
    border-bottom: 2px solid transparent; 
}

.main-nav a:hover,
.main-nav a.active {
    background-color: rgba(0, 255, 255, 0.1);
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}


/* -------------------------------------------------------------------------- */
/* KARTLAR VE DETAYLAR (OYUNLAR.HTML FIX DAHİL) */
/* -------------------------------------------------------------------------- */

/* BU KURAL GEREKLİ: TÜM KART KONTEYNERLERİNİ HEDEFLİYORUZ */
#categories-summary, #languages, #tools, #oyunlar, section {
    display: grid;
    /* Küçük ekranlarda her zaman tek sütun, tablet/orta ekranlarda 2, büyük ekranlarda 3 */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px; 
    padding: 20px 0;
}

.topic-card {
    background: rgba(30, 30, 30, 0.9); 
    padding: 25px; 
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.7), 0 0 5px var(--primary-color) inset;
    border: 1px solid var(--bg-secondary);
    transition: all var(--transition-speed) ease-in-out;
    cursor: pointer;
}

.topic-card:hover {
    transform: scale(1.03) translateY(-5px); 
    box-shadow: 0 0 30px var(--primary-color), 0 15px 25px rgba(0, 0, 0, 0.8); 
    border: 2px solid var(--primary-color);
}

.topic-card h2, .topic-card h3 {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    margin-top: 0;
    font-size: 1.8em; 
}

/* İndir Butonu Stili */
.download-link {
    display: block; 
    width: 100%; 
    box-sizing: border-box; 
    background: var(--secondary-color); 
    color: var(--bg-main);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin: 5px 0; 
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    animation: pulse-border 1.5s ease-out infinite;
}

.download-link:hover {
    background: #ffc44d; 
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.6);
}

@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 var(--secondary-color); }
    70% { box-shadow: 0 0 0 10px rgba(255, 170, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 170, 0, 0); }
}

.button-group {
    margin: 15px 0;
}


/* -------------------------------------------------------------------------- */
/* DİĞER DETAY SAYFALARI VE FOOTER */
/* -------------------------------------------------------------------------- */
.back-link {
    position: static; 
    display: block;
    margin: 10px 0 20px 0;
    padding: 10px;
    text-align: center;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 5px;
}

.detail-section {
    background: rgba(30, 30, 30, 0.9); 
    padding: 20px; 
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
}

.detail-section h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 5px;
    margin-top: 0;
    font-size: 1.6em; 
}

pre {
    background: #0d0d29;
    padding: 15px;
    border-left: 5px solid var(--secondary-color);
    overflow-x: auto;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
    font-size: 0.9em; 
}
code {
    color: var(--primary-color);
}

footer {
    text-align: center;
    padding: 20px 10px;
    margin-top: 30px;
    border-top: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 0.8em; 
    background: rgba(30, 30, 30, 0.95); 
}

/* Footer Animasyonu */
.footer-animation {
    text-shadow: 0 0 5px var(--secondary-color);
    animation: pulse-shadow 2s infinite alternate;
}

@keyframes pulse-shadow {
    from { opacity: 0.8; text-shadow: 0 0 4px var(--secondary-color); }
    to { opacity: 1; text-shadow: 0 0 8px var(--secondary-color); }
}

/* Reklam Alanı Stili (Okunurluk için) */
.ad-container {
    background: rgba(30, 30, 53, 0.9);
    border: 1px dashed #00ffff;
    padding: 10px; 
    margin: 15px 0;
    text-align: center;
    min-height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

/* ========================================================================== */
/* RESPONSIVE AYARLAR (Mobile First Yaklaşım) */
/* ========================================================================== */

/* Tablet ve Masaüstü (768px üzeri) */
@media (min-width: 768px) {
    
    header {
        padding: 120px 0;
    }
    
    header h1 {
        font-size: 5.5em; 
    }

    header p {
        font-size: 1.8em;
    }

    /* NAVİGASYON KARTLARI */
    #categories-summary, #languages, #tools, #oyunlar, section {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 30px;
    }

    .topic-card {
        padding: 30px;
    }
    
    .topic-card h2, .topic-card h3 {
        font-size: 2em;
    }

    /* İndir Butonu Stili - Yatay düzeni getir */
    .download-link {
        display: inline-block;
        width: auto;
        margin: 5px 10px 5px 0;
    }
    
    /* Detay sayfalarında geri butonu için eski pozisyonu geri getir */
    .back-link {
        position: absolute;
        top: 25px;
        left: 20px;
        display: inline-block;
        background: transparent;
        padding: 0;
        margin: 0;
        border-radius: 0;
    }

    /* Mobil'den Masaüstüne geçişte profil ve auth butonları için sabit pozisyon */
    .user-profile, .auth-buttons {
        position: absolute;
        flex-direction: row; 
    }

    .detail-section {
        padding: 30px;
        margin-bottom: 30px;
    }
    
    .detail-section h2 {
        font-size: 2em;
    }
    
    footer {
        font-size: 0.9em;
    }
}

/* Mobil Ekranlar (767px altı) */
@media (max-width: 767px) {
    
    /* Profil ve Auth butonlarını header'ın içinde ortala */
    .user-profile, .auth-buttons {
        position: static; 
        margin-top: 15px;
        flex-direction: column; /* Mobil'de butonları alt alta getir */
        background: none;
        padding: 0;
        border: none;
        justify-content: center;
        width: 100%;
        gap: 10px; /* Butonlar arası boşluk */
    }

    .main-nav {
        display: flex;
        flex-wrap: wrap; 
        justify-content: center;
    }
    
    .logout-btn, .login-btn, .signup-btn {
        padding: 8px 15px; 
        font-size: 1em;
        width: 100%; /* Tam genişlik kapla */
        box-sizing: border-box;
    }
}