/* Custom CSS for Remanga */

* {
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: #f8f9fa;
    direction: rtl;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 400px;
    display: flex;
    align-items: center;
}

.bg-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Navbar */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
}

/* Cards */
.manga-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
}

.manga-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.manga-card .card-img-top {
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.manga-card:hover .card-img-top {
    transform: scale(1.05);
}

.manga-card .card-body {
    padding: 1.25rem;
}

.manga-card .card-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.manga-card .card-text {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Chapter Card */
.chapter-card {
    transition: background-color 0.3s ease;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.chapter-card:hover {
    background-color: #f8f9fa;
}

.chapter-card .card-body {
    padding: 1rem;
}

/* Reading Modes */
.reading-controls {
    position: fixed;
    top: 80px;
    left: 20px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    padding: 10px;
}

.reading-controls .btn {
    margin: 2px;
    font-size: 0.8rem;
}

/* Chapter Reader */
.chapter-reader {
    background-color: #000;
    min-height: 100vh;
    padding: 0;
}

.chapter-reader img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.chapter-navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 10px 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.chapter-navigation.hidden {
    transform: translateY(-100%);
}

.chapter-progress {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 1000;
}

.chapter-progress-bar {
    height: 100%;
    background: #007bff;
    transition: width 0.3s ease;
}

/* Single Page Mode */
.single-page-mode {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.single-page-mode img {
    max-height: 90vh;
    max-width: 90vw;
    object-fit: contain;
}

/* Double Page Mode */
.double-page-mode {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.double-page-mode .page-container {
    display: flex;
    gap: 10px;
}

.double-page-mode img {
    max-height: 90vh;
    max-width: 45vw;
    object-fit: contain;
}

/* Vertical Scroll Mode */
.vertical-scroll-mode {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.vertical-scroll-mode img {
    width: 100%;
    margin-bottom: 5px;
}

/* Search */
.search-result-card {
    transition: transform 0.2s ease;
}

.search-result-card:hover {
    transform: translateY(-2px);
}

/* Admin Panel */
.admin-stats .card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-stats .card-body {
    padding: 2rem;
}

.admin-stats .display-4 {
    font-weight: 700;
    color: #495057;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.upload-area.dragover {
    border-color: #007bff;
    background-color: #e3f2fd;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        min-height: 300px;
        padding: 2rem 0;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .manga-card .card-img-top {
        height: 250px;
    }
    
    .reading-controls {
        position: relative;
        top: auto;
        left: auto;
        margin-bottom: 1rem;
        background: #fff;
        border: 1px solid #dee2e6;
    }
    
    .reading-controls .btn {
        color: #495057;
    }
    
    .double-page-mode .page-container {
        flex-direction: column;
    }
    
    .double-page-mode img {
        max-width: 90vw;
    }
}

/* Loading Animation */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

/* Status Badges */
.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.status-ongoing {
    background-color: #28a745;
}

.status-completed {
    background-color: #007bff;
}

.status-hiatus {
    background-color: #ffc107;
    color: #212529;
}

/* Comments */
.comment-card {
    border-left: 3px solid #007bff;
    margin-bottom: 1rem;
}

.comment-reply {
    margin-right: 2rem;
    border-left: 2px solid #dee2e6;
}

/* Bookmarks */
.bookmark-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.bookmark-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.bookmark-btn.bookmarked {
    color: #ffc107;
}

/* Smooth Transitions */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

