:root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --accent-color: #00f2ff; /* Neon Mavi */
    --card-width: 120px;
    --card-height: 180px;
    --wall-radius: 800px; /* Duvarın kavis yarıçapı */
}

body.digital-library-page {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    background: radial-gradient(circle at 50% 50%, #1a1a20 0%, #000000 100%);
    color: var(--text-color);
    font-family: 'Montserrat', sans-serif;
    height: 100vh;
    overflow: hidden; /* Masaüstünde scrollbar olmamalı */
    perspective: 1200px; /* Derinlik hissi */
}

/* Sahne ve Duvar - Masaüstü */
.scene {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.panorama-wall {
    position: relative;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
    /* transition: transform 0.1s linear; -> JS yönetiyor */
}

/* Kitap Kartları */
.card {
    position: absolute;
    width: var(--card-width);
    height: var(--card-height);
    left: calc(-1 * var(--card-width) / 2);
    top: calc(-1 * var(--card-height) / 2);
    transform-origin: center center;
    transform-style: preserve-3d;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.1);
}

.card .glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 6px;
    box-shadow: 0 0 20px var(--accent-color);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
}

.card:hover .glow {
    opacity: 1;
}

.card:hover img {
    border-color: var(--accent-color);
}

.instruction {
    position: absolute;
    bottom: 30px;
    width: 100%;
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 0.8rem;
    letter-spacing: 1px;
    pointer-events: none;
    z-index: 50;
}

/* Header - Filtreler Eklenmiş Hali */
.top-bar {
    position: absolute; /* Mobilde fixed override ediliyor scriptte */
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.95), rgba(0,0,0,0.8));
    z-index: 100;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
    margin-right: 20px;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

.logo .highlight {
    color: var(--accent-color);
}

.filter-container {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1;
}

/* Select ve Input Ortak Stilleri */
select, .search-container input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #eee;
    padding: 10px 15px;
    border-radius: 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    outline: none;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    cursor: pointer;
}

select:hover, .search-container input:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

select:focus, .search-container input:focus {
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

/* Dropdown oklarını düzenle */
select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 35px;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2300f2ff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    background-size: 10px auto;
}

select option {
    background-color: #1a1a20;
    color: white;
}

.search-container {
    width: auto;
}

.search-container input {
    width: 200px;
}

/* Mobile Responsive - Hybrid Mode */
@media (max-width: 768px) {
    body.digital-library-page {
        overflow-y: auto !important;
        height: auto !important;
        background: #050505;
        transform: none !important; 
        filter: none !important;
        perspective: none !important; /* KRİTİK: Fixed pozisyon hatasını çözer */
    }

    .top-bar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background: rgba(5, 5, 5, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: stretch; /* Yay */
        gap: 15px;
        padding: 15px 20px;
        height: auto;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        z-index: 50; /* Modal (999999) için 1000'den 50'ye düşürdüm */
    }

    .logo {
        text-align: center;
        margin: 0 0 5px 0;
        font-size: 1.6rem;
    }

    .filter-container {
        flex-direction: column; /* Mobilde alt alta */
        width: 100%;
        gap: 10px;
    }

    select,
    .search-container input { /* Sadece select ve input, container değil */
        width: 100%;
        box-sizing: border-box; /* Kritik: Padding ve border'ı genişliğe dahil et */
    }
    
    .search-container { /* Arama konteynerinin de tam genişlikte olduğundan emin ol */
        width: 100%;
    }

    .scene {
        display: block !important;
        width: 100%;
        height: auto !important;
        padding-top: 280px; /* Filtre altına girmemesi için artırıldı */
        padding-bottom: 40px;
        perspective: none !important;
        overflow: visible !important;
    }

    .panorama-wall {
        width: 100% !important;
        height: auto !important;
        transform: none !important;
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 15px;
        box-sizing: border-box;
        left: auto !important;
        top: auto !important;
        margin: 0 !important;
    }

    .card {
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 2 / 3;
        transform: none !important;
        margin: 0 !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.5);
        z-index: 5; /* Tıklanabilir olması için katman sırasını artır */
    }

    .card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 6px;
    }

    .instruction {
        display: none;
    }
}

