/* Manga Section Styles */
.manga-section {
    padding: 20px 40px;
    animation: fadeIn 0.5s ease;
}

.manga-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.manga-controls-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.manga-source-selector {
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.source-btn {
    padding: 8px 20px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.source-btn.active {
    background: #8b5cf6;
    color: #fff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.manga-controls-bottom {
    display: flex;
    gap: 15px;
    align-items: center;
}

.genre-select-container {
    position: relative;
    display: none; /* Only for Comix */
}

#mangaGenreSelect {
    padding: 10px 35px 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.genre-select-container::after {
    content: '▼';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #8b5cf6;
    pointer-events: none;
}

/* Reusing grid and card styles from comics with slight modifications if needed */
.manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

.manga-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.manga-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(139, 92, 246, 0.4);
}

.manga-poster {
    position: relative;
    width: 100%;
    height: 270px;
    overflow: hidden;
}

.manga-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.manga-card:hover .manga-poster img {
    transform: scale(1.1);
}

.manga-info {
    padding: 15px;
}

.manga-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.manga-loader {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

/* Modal and Reader should reuse comics styles, but if needed, we define them here */
.manga-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-actions {
    display: flex;
    gap: 15px;
}

.modal-actions .action-btn {
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    width: auto;
    height: auto;
}

.modal-actions .action-btn.primary {
    background: #8b5cf6;
    color: #fff;
}

.modal-actions .action-btn.primary:hover {
    background: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
}

.modal-actions .action-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-actions .action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Custom Dropdown Styles */
.custom-dropdown {
    position: relative;
    width: 250px;
    z-index: 100;
}

.custom-dropdown-selection {
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-dropdown-selection::after {
    content: '▼';
    font-size: 10px;
    color: #8b5cf6;
    transition: transform 0.3s ease;
}

.custom-dropdown.active .custom-dropdown-selection::after {
    transform: rotate(180deg);
}

.custom-dropdown-selection:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #8b5cf6;
}

.custom-dropdown-list {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    background: rgba(18, 18, 24, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    max-height: 350px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.custom-dropdown.active .custom-dropdown-list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-dropdown-item {
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.custom-dropdown-item:hover {
    background: rgba(139, 92, 246, 0.15);
    color: #fff;
    padding-left: 25px;
}

.custom-dropdown-item.active {
    background: rgba(139, 92, 246, 0.25);
    color: #fff;
    border-left: 3px solid #8b5cf6;
}

.custom-dropdown-list::-webkit-scrollbar {
    width: 4px;
}

.custom-dropdown-list::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 10px;
}

/* Warning Modal Styles */
.warning-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(25px);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease;
}

.warning-modal.active {
    display: flex;
}

.warning-content {
    background: #121218;
    width: 90%;
    max-width: 500px;
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

.warning-icon {
    font-size: 50px;
    margin-bottom: 20px;
    color: #fbbf24;
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.3));
}

.warning-content h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #fff;
    font-weight: 700;
}

.warning-content p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 30px;
    font-size: 1.05rem;
}

.warning-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.warning-btn {
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.warning-btn.primary {
    background: #8b5cf6;
    color: #fff;
}

.warning-btn.primary:hover {
    background: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

.warning-btn.secondary {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.warning-btn.secondary:hover {
    color: #fff;
}
