body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    background-image: url('/images/Slider-1.jpg');
    background-size: cover;
    background-position: center;
    text-align: center;
}


.magazine-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


.magazine-controls {
    position: fixed;
    top: 50%;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10000;
    transform: translateY(-50%);
    /* Dikey ortalama */
}

.magazine-controls button {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.magazine-controls button:hover {
    background: #fff;
}

#magazine-viewport {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#magazine {
    margin: 0 auto;
}

#magazine .page {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    position: relative; /* Zoom butonu konumlandırması için */
}

#magazine .page img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
}

#magazine .even img {
    float: right;
}

#magazine .odd img {
    float: left;
}

#magazine-viewport {
    transition: transform 0.5s ease, top 0.5s ease, left 0.5s ease;
    /* Geçiş süresi ve eğrisi */
    will-change: transform;
    /* Performansı artırmak için */
}

.zoomer {
    display: flex;
    justify-content: center;
    /* Yatay merkezleme */
    align-items: center;
    /* Dikey merkezleme */
    background-color: rgba(255, 255, 255, 0.95);
    /* Koyu bir arka plan */
    transition: background-color 0.3s ease;
    /* Geçiş efekti */
    overflow: hidden;
    /* Taşan içerikleri gizle */
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
}


.magazine-list {
    max-width: 1200px;
    margin: 30px auto;
    background-color: rgba(255, 255, 255, 0.85);
    display: inline-block;
    width: 100%;
    float: none;
}

.magazine-list h2 {
    margin: 20px auto;
    float: none;
    color: #000;
    text-align: center;
}

.magazine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.magazine-preview {
    border: 1px solid #ddd;
    padding: 10px;
    transition: transform 0.2s;
    background: rgba(255, 255, 255, 0.85);
    cursor: pointer;
}

.magazine-preview:hover {
    transform: translateY(-5px);
}

.magazine-preview img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.magazine-preview h3 {
    margin: 10px 0;
}

#close {
    position: fixed;
    top: 10px;
    right: 10px;
    cursor: pointer;
    z-index: 10003;
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

button#prev,
button#next,
button#close {
    position: absolute;
}

.magazine-controls button#prev {
    left: 10px;
}

.magazine-controls button#next {
    right: 10px;
}



select {
    padding: 8px;
    box-sizing: border-box;
    border-radius: 5px;
}
.page.p-temporal {
    background: white;
}

/* Zoom Butonu Stilleri */
.zoom-icon-btn {
    position: absolute;
    bottom: 20px;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 100;
    border: 2px solid white;
    transition: opacity 0.3s, transform 0.2s;
    outline: none;
}

.zoom-icon-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Sol Sayfalar (Çift numaralı) - Buton Sağda (Cilt Tarafı) */
.zoom-btn-inner-right {
    right: 20px;
    left: auto;
}

/* Sağ Sayfalar (Tek numaralı) - Buton Solda (Cilt Tarafı) */
.zoom-btn-inner-left {
    left: 20px;
    right: auto;
}


/* Desktop Page Selector - Kompakt dikey düzen sağ tarafta */
#page-selector-desktop {
    display: none;
}

@media (min-width: 769px) {
    #page-selector-desktop {
        display: flex;
        flex-direction: column;
        gap: 8px;
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 10001;
        background: rgba(255, 255, 255, 0.95);
        padding: 12px;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        backdrop-filter: blur(10px);
        max-width: 160px;
    }

    #page-selector-mobile {
        display: none;
    }

    #mobile-settings-popup {
        display: none !important;
    }

    /* Masaüstünde varsayılan olarak gizle, hover ile göster */
    .zoom-icon-btn {
        opacity: 0;
    }

    #magazine div:hover > .zoom-icon-btn {
        opacity: 1;
    }
}

/* Mobile Page Selector - Üstte ortalı, kompakt */
@media (max-width: 768px) {
    #page-selector-desktop {
        display: none !important;
    }

    #page-selector-mobile {
        display: flex;
        align-items: center;
        gap: 6px;
        position: absolute;
        top: 15px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10001;
        background: rgba(255, 255, 255, 0.95);
        padding: 8px 12px;
        border-radius: 10px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
        backdrop-filter: blur(10px);
    }
}

/* Mobil görünüm için */
@media (max-width: 1024px) {
    /* Sayfa çevrilirken arkanın şeffaf olmasını engellemek için beyaz arkaplan */
    .page.p-temporal {
        background: white !important;
    }

    .magazine-controls {
        top: 92%
    }
    
    /* Mobilde buton sürekli görünür ve alt orta */
    .zoom-icon-btn {
        opacity: 1;
        bottom: 15px;
        left: 50%;
        transform: translateX(-50%);
        right: auto; /* Önceki sağ/sol ayarlarını ezer */
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    /* Mobilde (tek sayfa modu) buton her zaman sağ altta olsun, iç/dış mantığı yok */
    .zoom-btn-inner-left,
    .zoom-btn-inner-right {
        right: auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }

}

/* Desktop Inputs & Buttons */
#page-input-desktop,
#page-input-mobile {
    width: 50px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    text-align: center;
    -moz-appearance: textfield;
    font-size: 14px;
}

#page-input-desktop::-webkit-outer-spin-button,
#page-input-desktop::-webkit-inner-spin-button,
#page-input-mobile::-webkit-outer-spin-button,
#page-input-mobile::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#goto-page-btn-desktop,
#goto-page-btn-mobile {
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-left: none;
    background-color: #f0f0f0;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    font-size: 14px;
}

#goto-page-btn-desktop:hover,
#goto-page-btn-mobile:hover {
    background-color: #e0e0e0;
}

.page-input-group-desktop {
    display: flex;
    width: 100%;
}

#goto-index-btn-desktop,
#goto-index-btn-mobile {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    background-color: #2196F3;
    color: white;
    cursor: pointer;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

#goto-index-btn-desktop:hover,
#goto-index-btn-mobile:hover {
    background-color: #1976D2;
}

.align-pages-label-desktop,
.align-pages-label-mobile {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    color: #333;
    font-weight: 500;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    width: 100%;
    justify-content: flex-start;
}

.align-pages-label-desktop:hover,
.align-pages-label-mobile:hover {
    background-color: rgba(33, 150, 243, 0.08);
}

.align-pages-label-desktop input[type="checkbox"],
.align-pages-label-mobile input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #2196F3;
}

.align-pages-label-desktop span,
.align-pages-label-mobile span {
    user-select: none;
    color: #555;
}

#total-pages-display-desktop,
#total-pages-display-mobile {
    color: #333;
    background-color: #f0f0f0;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
    border: 1px solid #ccc;
    text-align: center;
}

/* Mobile Settings Button */
#settings-btn-mobile {
    background: white;
    color: black;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#settings-btn-mobile:hover {
    background: #1976D2;
}

/* Mobile Settings Popup */
#mobile-settings-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-settings-content {
    background: white;
    border-radius: 12px;
    padding: 0;
    width: 90%;
    max-width: 320px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.mobile-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.mobile-settings-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

#close-settings-popup {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

#close-settings-popup:hover {
    background: #f0f0f0;
}

.mobile-settings-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* --- YENİ ZOOM MODAL STİLLERİ (GÜNCELLENDİ) --- */
.zoom-modal {
    display: none;
    position: fixed;
    z-index: 20000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Scroll container içinde olacak */
    background-color: rgba(15, 15, 15, 0.96); /* Çok koyu, neredeyse siyah arka plan (Ayrım için) */
}

.zoom-status-label {
    position: fixed;
    top: 20px;
    left: 20px;
    color: white;
    background: rgba(200, 0, 0, 0.8); /* Kırmızı Etiket */
    padding: 8px 15px;
    border-radius: 5px;
    z-index: 20002;
    pointer-events: none;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.zoom-modal-container {
    width: 100%;
    height: 100%;
    overflow: auto; /* Scrollbarlar burada çıkacak */
    display: flex;
    /* justify-content ve align-items kaldırıldı, margin: auto kullanılacak */
    cursor: grab; /* Varsayılan cursor */
}

.zoom-modal-container:active {
    cursor: grabbing; /* Tıklayıp sürüklerken cursor */
}

.zoom-modal-content {
    margin: auto; /* Flex container içinde güvenli ortalama sağlar */
    display: block;
    /* Varsayılan: Ekrana sığdır */
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
    transition: width 0.3s ease, max-width 0.3s ease; /* Boyut değişimi animasyonu */
    border: 1px solid rgba(255,255,255,0.2); /* Hafif çerçeve */
    box-shadow: 0 0 50px rgba(0,0,0,0.8); /* Derinlik gölgesi */
    flex-shrink: 0; /* Görselin küçülmesini engelle */
    
    /* Sürükleme ve seçme engelleme */
    user-select: none;
    -webkit-user-drag: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

/* Zoom yapıldığında */
.zoom-modal-content.zoomed {
    /* Transform yerine boyut değiştirme kullanıyoruz */
    max-width: none; 
    max-height: none;
    width: 200%; /* Resim genişliği container'ın 2 katı olsun */
    height: auto;
    cursor: zoom-out;
}

.close-zoom-modal {
    position: fixed; /* Container scroll olsa bile sabit kalsın */
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 20001;
    background: rgba(0,0,0,0.5); /* Okunabilirlik için */
    width: 50px;
    height: 50px;
    text-align: center;
    line-height: 50px;
    border-radius: 5px;
}

.close-zoom-modal:hover,
.close-zoom-modal:focus {
    color: #fff;
    background: rgba(200,0,0,0.8); /* Hover'da kırmızı */
    text-decoration: none;
    cursor: pointer;
}

@media only screen and (max-width: 700px) {
    .zoom-modal-content.zoomed {
        width: 250%; /* Mobilde daha fazla zoom gerekebilir */
    }
}

/* Modern Modal Dialog Stilleri */
.custom-modal-overlay {
    display: none;
    position: fixed;
    z-index: 30000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.custom-modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    width: 400px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: slideIn 0.3s ease;
}

.custom-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-modal-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-modal-icon.warning {
    background-color: #fff3cd;
    color: #856404;
}

.custom-modal-icon.info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.custom-modal-icon.error {
    background-color: #f8d7da;
    color: #721c24;
}

.custom-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.custom-modal-body {
    padding: 20px 24px;
    color: #555;
    font-size: 15px;
    line-height: 1.6;
}

.custom-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.custom-modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.custom-modal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.custom-modal-btn:active {
    transform: translateY(0);
}

.custom-modal-btn.primary {
    background-color: #2196F3;
    color: white;
}

.custom-modal-btn.primary:hover {
    background-color: #1976D2;
}

.custom-modal-btn.danger {
    background-color: #f44336;
    color: white;
}

.custom-modal-btn.danger:hover {
    background-color: #d32f2f;
}

.custom-modal-btn.secondary {
    background-color: #f0f0f0;
    color: #333;
}

.custom-modal-btn.secondary:hover {
    background-color: #e0e0e0;
}

/* Modern Bildirim Stilleri */
.modern-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 40000;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 500px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 20px);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.modern-notification.success {
    border-left: 4px solid #4caf50;
}

.modern-notification.error {
    border-left: 4px solid #f44336;
}

.modern-notification.info {
    border-left: 4px solid #2196F3;
}

.modern-notification.warning {
    border-left: 4px solid #ff9800;
}

.notification-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.notification-message {
    flex: 1;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

/* Delete Button Styling */
.delete-offline-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-top: 10px;
    width: 100%;
}

.delete-offline-btn:hover {
    background-color: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.delete-offline-btn:active {
    transform: translateY(0);
}

/* Offline Magazine Preview Styling */
.offline-magazine {
    position: relative;
}

.offline-magazine::before {
    content: '✓ Çevrimdışı';
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #4caf50;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

/* Main Header Styles */
.main-header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px 0;
    margin-bottom: 30px;
    position: relative;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header h1 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

/* Notification Button Styles */
.notification-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(33, 150, 243, 0.3);
}

.notification-btn:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.4);
}

.notification-btn .icon {
    font-size: 18px;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-header h1 {
        font-size: 20px;
    }
}
.notification-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}