/* Google Font Tanımı */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700&display=swap');

/* Genel Sayfa Stilleri */
body {
    font-family: 'Montserrat', sans-serif; /* Yeni font ailesi */
    background: linear-gradient(to bottom, #3f464f, #343a40); /* Hafif gradient arka plan */
    background-attachment: fixed; /* Gradientin kaymamasını sağlar */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    box-sizing: border-box;
    color: #e9ecef; /* Ana metin rengi */
}

h2 {
    color: #fff;
    margin-bottom: 35px;
    font-size: 26px;
    font-weight: 500;
    text-align: center;
}

/* Header Stilleri */
.site-header {
    background-color: #212529;
    color: #fff;
    padding: 0 20px;
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}
.header-title { font-size: 20px; font-weight: bold; }
.site-header a { color: inherit; text-decoration: none; }
.site-header a:hover { text-decoration: underline; }

/* Footer Stilleri */
.site-footer {
    background-color: #212529;
    color: #adb5bd;
    text-align: center;
    padding: 15px 20px;
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    font-size: 0.9em;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}
.site-footer a { color: #adb5bd; text-decoration: none; font-weight: bold; }
.site-footer a:hover { text-decoration: underline; }

/* Ana İçerik Alanı Stilleri */
.main-content-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 90px 20px;
    box-sizing: border-box;
}

/* Ortak Form ve Container Stilleri */
.login-container, .container {
    background-color: #212529;
    padding: 45px;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    color: #fff;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #495057;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSlideUp 0.7s 0.2s ease-out forwards;
}

/* Animasyon Keyframes */
@keyframes fadeInSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-container { /* index.php için özel */
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.container { /* yukle.php için özel */
    width: 90%;
    max-width: 700px;
}

form {
    display: flex;
    flex-direction: column;
    width: 100%;
}

label {
    margin-bottom: 8px;
    color: #adb5bd;
    text-align: left;
    font-weight: 500;
    font-size: 0.95em;
}

input[type="text"],
input[type="password"],
input[type="file"] {
    padding: 14px 15px;
    margin-bottom: 20px;
    border: 1px solid #495057;
    border-radius: 5px;
    background-color: #343a40;
    color: #fff;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Input Odaklanma Stili */
input[type="text"]:focus,
input[type="password"]:focus,
input[type="file"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    outline: none;
}

button[type="submit"],
input[type="submit"] {
    background-color: #007bff;
    background-image: linear-gradient(to bottom, #007bff, #0069d9);
    border: 1px solid #0069d9;
    color: white;
    padding: 14px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 500;
    font-family: inherit;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 15px;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

button[type="submit"]:hover,
input[type="submit"]:hover {
    background-color: #0069d9;
    background-image: none;
    border-color: #005cbf;
    box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}

/* Buton Tıklanma Stili */
button[type="submit"]:active,
input[type="submit"]:active {
    background-color: #005cbf;
    background-image: none;
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.error-message, .error { /* Hata mesajları için ortak stil */
    color: #f8d7da;
    background-color: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    padding: 12px 15px;
    border-radius: 5px;
    margin-top: 25px;
    font-size: 0.95em;
    text-align: center;
    position: relative; /* İkon için */
    padding-left: 35px; /* İkon için yer */
}

.success { /* yukle.php için başarı mesajı */
    color: #d4edda;
    background-color: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 0.95em;
    position: relative; /* İkon için */
    padding-left: 35px; /* İkon için yer */
}

/* index.php Özel Stilleri (Giriş Sayfası) */
.login-container .logo-container {
    margin-bottom: 25px;
}

.login-container .logo-container img {
    max-width: 130px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ------------------------------------------ */
/* --- yukle.php Stilleri Buradan Başlıyor --- */
/* ------------------------------------------ */

/* yukle.php Özel Stilleri (Yükleme Sayfası) */
.container form { margin-bottom: 25px; }

.logout { margin-top: 35px; width: 100%; text-align: center; }
.logout a { color: #d9534f; text-decoration: none; font-weight: 500; font-size: 15px; transition: color 0.3s ease; }
.logout a:hover { color: #c9302c; text-decoration: underline; }

/* Yükleme İlerleme Çubuğu */
.progress-container {
    width: 100%;
    background-color: #495057;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 20px;
    color: white;
    border-radius: 5px;
    text-align: center;
    line-height: 20px;
    font-size: 0.8em;
    font-weight: bold;
    transition: width 0.4s linear; /* Genişlik geçişi */

    /* Gradient ve Hareketli Şeritler */
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent),
                      linear-gradient(to bottom, #34c759, #28a745);
    background-size: 40px 40px; /* Şerit boyutu */
    animation: progress-bar-stripes 1s linear infinite; /* Şerit animasyonu */
}

/* Progress Bar Şerit Animasyonu */
@keyframes progress-bar-stripes {
  from { background-position: 40px 0; }
  to { background-position: 0 0; }
}


#upload-status { /* Bu ID hem success hem error durumunu kapsar */
    text-align: center;
    margin-bottom: 15px;
    min-height: 1.2em;
    font-weight: 500;
    font-size: 0.95em;
    /* İkon stilleri .success ve .error üzerinden verilecek */
}

/* Yüklenen Dosyalar Bölümü */
.yuklenen-dosyalar {
    margin-top: 35px;
    width: 100%;
    background-color: rgba(52, 58, 64, 0.5);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #495057;
}
.yuklenen-dosyalar h3 {
    color: #fff;
    text-align: center;
    margin-top: 0;
    margin-bottom: 25px;
    border-bottom: 1px solid #495057;
    padding-bottom: 15px;
    font-weight: 500;
}

/* Galeri Stilleri */
.galeri-container { display: flex; flex-wrap: wrap; gap: 20px; justify-content: flex-start; }
.galeri-item { background-color: #495057; border-radius: 8px; overflow: hidden; width: calc(33.333% - 14px); display: flex; flex-direction: column; box-shadow: 0 3px 7px rgba(0,0,0,0.3); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.galeri-item:hover { transform: translateY(-3px); box-shadow: 0 6px 12px rgba(0,0,0,0.35); }

/* Galeri Medya Öğeleri (Resim/Video/İkon) */
.galeri-img, .galeri-video, .galeri-dosya-ikon { display: block; width: 100%; height: 160px; object-fit: cover; background-color: #6c757d; border-bottom: 1px solid #343a40; }
.galeri-dosya-ikon { color: #fff; display: flex; justify-content: center; align-items: center; font-size: 3.5em; font-weight: bold; }

/* Galeri Bilgi ve Aksiyon Alanı */
.galeri-bilgi { padding: 12px 15px; padding-bottom: 40px; /* Butonlar için yer aç */ display: flex; justify-content: space-between; align-items: flex-start; /* İçerik yukarı yaslansın */ color: #e9ecef; flex-wrap: wrap; background-color: #495057; min-height: 65px; /* Yüksekliği artır */ position: relative; /* Butonları konumlandırmak için */ }
.galeri-baslik { margin: 0 0 2px 0; /* Alt boşluk */ font-size: 0.9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; /* Tam genişlik */ font-weight: 500; }
.galeri-actions { display: flex; align-items: center; flex-shrink: 0; position: absolute; /* Sağ alt köşeye */ bottom: 10px; right: 15px; }

.indirme-butonu, .sil-butonu { color: white; border: none; padding: 7px 12px; border-radius: 5px; cursor: pointer; font-size: 0.85em; margin-left: 6px; text-decoration: none; display: inline-block; transition: background-color 0.2s ease, transform 0.1s ease; font-weight: 500; }
.indirme-butonu { background-color: #007bff; }
.sil-butonu { background-color: #dc3545; }
.indirme-butonu:hover { background-color: #0056b3; }
.sil-butonu:hover { background-color: #c82333; }
.indirme-butonu:active, .sil-butonu:active { transform: translateY(1px); }

/* Duyarlılık (Responsive) Ayarları */
@media (max-width: 992px) {
    .galeri-item { width: calc(50% - 10px); }
    .container { width: 90%; max-width: 650px; }
}
@media (max-width: 768px) {
    .main-content-wrapper { padding: 80px 15px; }
    .login-container, .container { padding: 35px; }
    h2 { font-size: 24px; }
    .galeri-item { height: auto; }
    .galeri-img, .galeri-video, .galeri-dosya-ikon { height: 180px; }
}
@media (max-width: 576px) {
    .galeri-item { width: 100%; }
    .login-container, .container { padding: 25px; width: 95%; }
    h2 { font-size: 22px; }
    .galeri-bilgi { padding-bottom: 10px; min-height: auto; flex-direction: column; align-items: flex-start; } /* Mobil düzenleme */
    .galeri-baslik { max-width: 100%; margin-bottom: 5px; width: 100%; }
    .galeri-actions { position: static; width: 100%; margin-top: 10px; justify-content: flex-end; }
    .indirme-butonu, .sil-butonu { padding: 8px 14px; font-size: 0.9em; }
}

/* --- YENİ: yukle.php Ek Stiller --- */

/* Panel Açıklama Metni */
.panel-description {
    font-size: 0.9em;
    color: #adb5bd;
    text-align: center;
    margin-top: -15px; /* Başlıkla arasını ayarla */
    margin-bottom: 30px;
    max-width: 90%; /* Çok uzunsa sığdır */
    line-height: 1.5; /* Satır aralığı */
}

/* Ayırıcı Çizgi */
.section-divider {
    width: 80%;
    border: none;
    border-top: 1px solid #495057;
    margin: 30px auto; /* Üst/Alt boşluk ve ortalama */
}

/* Galeri İçindeki Dosya Boyutu */
.galeri-dosya-boyutu {
    display: block; /* Başlığın altına gelmesi için */
    font-size: 0.8em;
    color: #adb5bd;
    margin-top: 4px; /* Başlıkla arasına boşluk */
    width: 100%; /* Tam genişlik kaplasın */
    text-align: left; /* Sola yaslı kalsın */
}

/* Genel Dosya İkonu Stili (Font Awesome) */
.galeri-dosya-ikon i {
    font-size: 4em; /* İkon boyutunu ayarla */
    color: #adb5bd; /* Genel ikon rengi */
}

/* Özel Dosya Türü İkon Renkleri (İsteğe Bağlı) */
.galeri-dosya-ikon .fa-file-pdf { color: #e63946; }
.galeri-dosya-ikon .fa-file-word { color: #2b579a; }
.galeri-dosya-ikon .fa-file-excel { color: #1d6f42; }
.galeri-dosya-ikon .fa-file-zipper { color: #ffcb6b; }
.galeri-dosya-ikon .fa-file-alt { color: #ced4da; } /* TXT için */

/* Boş Galeri Mesajı Stili */
.no-files-message {
    color: #adb5bd;
    text-align: center;
    padding: 40px 20px;
    width: 100%;
    font-size: 1.1em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px; /* İçerik yokken de yer kaplasın */
}

.no-files-message i {
    font-size: 3em; /* İkon boyutu */
    margin-bottom: 15px; /* Metinle arasına boşluk */
    color: #6c757d; /* Daha soluk ikon rengi */
}

/* Durum Mesajları İçin İkonlar (Başarı/Hata) */
/* Not: .success ve .error için padding-left zaten yukarıda tanımlandı */
.success::before,
.error::before,
#upload-status.success::before, /* JS ile class eklenirse diye ID'ye de ekleyelim */
#upload-status.error::before {
    font-family: "Font Awesome 6 Free"; /* Font Awesome kullan */
    font-weight: 900; /* Solid ikonlar için */
    position: absolute;
    left: 15px; /* Soldan boşluk */
    top: 50%;
    transform: translateY(-50%); /* Dikey ortala */
    font-size: 1.1em; /* İkon boyutu */
}

.success::before,
#upload-status.success::before {
    content: "\f00c"; /* Font Awesome Check icon (Unicode) */
    color: #28a745; /* Yeşil */
}

.error::before,
#upload-status.error::before {
    content: "\f00d"; /* Font Awesome Times icon (Unicode) */
    color: #dc3545; /* Kırmızı */
}

/* Mobil için galeri bilgi düzenlemesi (Tekrar gözden geçirme) */
@media (max-width: 576px) {
    .galeri-bilgi {
        padding-bottom: 10px;
        min-height: auto;
        align-items: flex-start;
    }
     .galeri-actions {
        position: static; /* Statik yap */
        width: 100%;
        margin-top: 10px;
        justify-content: flex-end;
    }
     .galeri-dosya-boyutu {
        text-align: left;
        margin-top: 5px;
    }
}