/* Genel Stil */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    text-align: center;
}

/* Dil Seçenekleri */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    opacity: 0; /* Başlangıçta şeffaf */
    visibility: hidden; /* Başlangıçta gizli */
    transition: opacity 3s ease-out; /* Animasyon */
    width: fit-content;
}

.language-selector:not(.visible) {
    opacity: 0; /* Şeffaf yap */
    visibility: hidden; /* Görünmez yap */
    pointer-events: none; /* Tıklamaları devre dışı bırak */
}

.language-selector.visible {
    opacity: 1; /* Görünür yap */
    visibility: visible; /* Görünür yap */
}

.selected-language {
    display: flex;
    align-items: center;
    padding: 5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    gap: 5px; /* Resim ve yazı arasına SABİT boşluk */
}

.selected-language img {
    width: 24px;
    height: 16px;
    display: block;
}

.language-options {
    display: none;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.9); /* Hafif şeffaf beyaz */
    border-radius: 14px;
    margin-top: 12px;
    position: absolute;
    right: 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    min-width: 120px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 0;
    transform-origin: top right;
    animation: scaleUp 0.25s ease-out;
}

@keyframes scaleUp {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.language-options div {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: #2d3748;
    font-size: 16px;
    gap: 5px;
    position: relative;
    overflow: hidden;
}

/* Hover Efekti */
.language-options div:hover {
    background-color: transparent !important;
    transform: none !important;
}

.language-options div::after {
    content: none !important;
}

.language-options div:hover {
    background-color: #f4f4f4;
}

.language-options img {
    width: 24px;
    height: 16px;
    margin-right: 5px;
}

/* Arapça için flex yönü */
body[dir="rtl"] .language-options div {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

.language-options div:hover {
    background-color: rgba(0,0,0,0.05);
}

/* Seçili dilin görünümü */
.selected-language {
    padding: 10px 16px;
    font-weight: 600;
    letter-spacing: -0.3px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.selected-language img {
    width: 24px;
    height: 16px;
    margin-right: 8px;
}

body[dir="rtl"] .selected-language img {
    margin-right: 0;
    margin-left: 8px;
}

body[dir="rtl"] {
    direction: rtl;
    text-align: center !important; /* Metinleri ortala */
}

body[dir="rtl"] .categories button {
    margin: 10px auto;
    text-align: center; /* Buton metinlerini ortala */
}

body[dir="rtl"] .categories button {
    margin: 10px auto;
}

/* Dil seçici RTL düzeni */
body[dir="rtl"] .selected-language {
    flex-direction: row-reverse;
}

/* Dil seçiciyi başlangıçta gizle */
.language-selector {
    visibility: hidden;
}

/* JS yüklendikten sonra göster */
.language-selector.visible {
    visibility: visible;
}

/* Logo Container */
.logo-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 50px auto;
    opacity: 0; /* Başlangıçta görünmesin */
    animation: fadeInLogo 2s ease-out forwards; /* Logo netleşme animasyonu */
}

/* Logo Resmi */
.logo {
    width: 100%;
    height: 100%;
    background-image: url('images/logo.png'); /* Logo resmini buraya ekle */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0; /* Başlangıçta şeffaf */
    animation: fadeInLogo 2s ease-out forwards; /* Logo netleşme animasyonu */
}

/* Menü Başlığı */
.menu-title {
    margin-top: 20px;
    font-size: 3rem;
    color: #333;
    opacity: 0; /* Başlangıçta şeffaf */
    animation: fadeInLogo 2s ease-out 0.5s forwards; /* Menü başlığının netleşmesi, logo ile aynı animasyon */
}

/* Kategoriler Container */
.categories {
    margin-top: 50px;
    opacity: 0;
    animation: fadeInCategories 2s ease-out 0.5s forwards; /* Kategoriler menü yazısı ile aynı anda netleşecek */
}

/* Kategori Butonları */
.categories button {
    display: block;
    width: 80%;
    max-width: 400px;
    margin: 10px auto;
    padding: 15px;
    font-size: 1.2rem;
    color: #fff;
    background-color: #333;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0; /* Başlangıçta görünmesin */
    animation: fadeInButton 0.75s ease forwards 1s; /* Kategori butonları netleşme animasyonu */
}

/* Menü Başlığı ve Logo Fade In Animasyonu */
@keyframes fadeInLogo {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Kategoriler Netleşme Animasyonu */
@keyframes fadeInCategories {
    0% {
        opacity: 0;
        transform: translateY(30px); /* Başlangıçta aşağıda */
    }
    100% {
        opacity: 1;
        transform: translateY(0); /* Son durumda normal konumda */
    }
}

/* Kategori Butonları Netleşme Animasyonu */
@keyframes fadeInButton {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Kategori Butonları Hover ve Active Durumları */
.categories button:hover {
    background-color: #555; /* Butonun arka plan rengini değiştirir */
    color: #ff6347; /* Yazının rengini değiştirir (tomato rengi) */
}

.categories button:active {
    transform: scale(0.95);
}
