/* --- TEMEL AYARLAR (TAMİR EDİLDİ) --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    margin: 0;
    padding: 2rem 1rem;
    box-sizing: border-box;

    /* --- DÜZELTME BURADA: Sayfayı (header ve main) merkezlemek için --- */
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 90vh; /* Sayfanın en azından ekran boyunda olmasını sağla */
}

/* --- 1. BÖLÜM: ÜST BAR (Logo + Dil Menüsü) (Değişmedi) --- */
/* --- 1. BÖLÜM: ÜST BAR (Logo + Dil Menüsü) (TAMİR EDİLDİ) --- */
.main-header {
    width: 100%;
    max-width: 1000px;
    display: flex;
    justify-content: center; /* "space-between" (iki uca yasla) DEĞİL, "center" (ortala) */
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
    box-sizing: border-box;
    position: relative; /* Dil menüsünü havaya kaldırmak için bu "relative" olmalı */
}
.logo-link { 
    display: inline-block; 
    /* Logo artık otomatik olarak ortalandı */
}
.logo {
    width: 100%;
    max-width: 250px;
    height: auto;
}

/* Yeni Dil Menüsü (TAMİR EDİLDİ) */
.language-switcher {
    position: absolute; /* "Havaya kaldır" (artık logoyu itemez) */
    right: 1rem; /* Sağ kenardan 1rem boşluk bırak */
    top: 50%; /* Dikey olarak ortala (başlangıç) */
    transform: translateY(-50%); /* Dikey olarak tam ortala (bitiş) */
}

#langSelect {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 2px solid #eee;
    border-radius: 8px;
    background-color: #fff;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http://www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M5%208l5%205%205-5z%22%20fill%3D%22%23555%22/%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.2em;
}
#langSelect:hover { border-color: #ddd; }
#langSelect:focus { outline: none; border-color: #007bff; }

/* Mobil düzeltmesi (TAMİR EDİLDİ) */
@media (max-width: 500px) {
    .main-header {
        flex-direction: column; /* Mobil için alt alta koy (bu doğruydu) */
        gap: 1.5rem;
        position: static; /* Mobilde "havaya kaldırma", normal aksın */
    }
    .language-switcher {
        position: static; /* "Havadan" indir */
        transform: none; /* Merkezlemeyi iptal et */
    }
}

/* --- 2. BÖLÜM: ANA İÇERİK (TAMİR EDİLDİ) --- */
main {
    width: 100%;
    /* --- DÜZELTME BURADA: İçerik kutularını (dönüştürücü ve formatlar) merkezlemek için --- */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.converter-container {
    background-color: #ffffff;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
    width: 100%;
    max-width: 600px;
    text-align: center;
    box-sizing: border-box;
}

/* ... (Geri kalan tüm CSS kodları aynı, onları silmene gerek yok, 
       ama bu tam kod, bir önceki 'style.css' (162.md) kodunun
       TAMAMEN yerine geçmeli) ... */

/* Başlıklar */
h2 { font-weight: 600; color: #444; margin-top: 0; margin-bottom: 1.5rem; }
#page-title { font-weight: 300; color: #e74c3c; }

/* Sürükle-Bırak Alanı */
.upload-area {
    border: 2px dashed #dce4ec;
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    margin: 1.5rem 0;
    transition: all 0.3s ease;
    background-color: #fdfdfd;
}
.upload-area.dragover { border-color: #c0392b; background-color: #fff8f7; }
.upload-label { font-weight: 500; color: #007bff; cursor: pointer; font-size: 1.1rem; }
.upload-label:hover { text-decoration: underline; }
#file-name { margin-top: 1rem; font-style: italic; color: #555; }
#fileInput { display: none; }

/* Format Seçim Alanı */
#formatSelection { margin: 1.5rem 0; text-align: left; }
#formatSelection label { display: block; font-weight: bold; margin-bottom: 0.5rem; color: #333; }
#targetFormatSelect {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http://www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M5%208l5%205%205-5z%22%20fill%3D%22%23555%22/%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.2em;
    cursor: pointer;
}

/* Ana Butonlar */
#uploadButton, #downloadLink {
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    display: block;
    text-decoration: none;
    box-sizing: border-box;
}
#uploadButton { background-color: #ced4da; cursor: not-allowed; }
#uploadButton.ready { background-color: #e74c3c; cursor: pointer; }
#uploadButton.ready:hover { background-color: #c0392b; }
#downloadLink { background-color: #2ecc71; }
#downloadLink:hover { background-color: #27ae60; }

/* Durum Mesajları */
#statusMessages { margin-top: 1.5rem; }
#statusText { font-size: 0.95rem; color: #555; }
.status-error { color: #e74c3c; font-weight: bold; }
.status-processing { color: #007bff; font-weight: bold; }
.status-success { color: #27ae60; font-weight: bold; }

/* --- 3. BÖLÜM: DESTEKLENEN FORMATLAR GRİD'i --- */
.formats-section {
    width: 100%;
    max-width: 1000px;
    margin-top: 4rem;
    text-align: center;
}
.formats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}
.format-box {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}
.format-box h3 { margin: 0 0 1rem 0; color: #e74c3c; font-size: 1.1rem; }
.format-box span { font-size: 0.9rem; color: #777; line-height: 1.5; }
.format-box.disabled { opacity: 0.5; }

/* RTL Desteği (Değişmedi) */
body.rtl { direction: rtl; text-align: right; }
body.rtl #langSelect, body.rtl #targetFormatSelect {
    background-position: left 0.75rem center;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
}
body.rtl #formatSelection { text-align: right; }

/* Mobil (Responsive) Ayarları (Değişmedi) */
@media (max-width: 900px) {
    .formats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
    .formats-grid { grid-template-columns: 1fr; }
    .converter-container { padding: 1.5rem; }
    .main-header { flex-direction: column; gap: 1.5rem; }
}