/* ===== CSS Variables - Venom Theme ===== */
:root {
    --primary-color: #cc0000;
    --secondary-color: #990000;
    --accent-color: #ff2222;
    --text-color: #e8e8e8;
    --text-light: #999999;
    --bg-color: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #141414;
    --border-color: #2a2a2a;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.8);
    --shadow-red: 0 0 20px rgba(204, 0, 0, 0.4);
    --transition: all 0.3s ease;
    --venom-glow: 0 0 15px rgba(204, 0, 0, 0.5), 0 0 30px rgba(204, 0, 0, 0.2);
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(ellipse at 20% 50%, rgba(204, 0, 0, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(100, 0, 0, 0.05) 0%, transparent 40%);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header ===== */
.site-header {
    background: rgba(5, 5, 5, 0.97);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(204, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(204, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: var(--venom-glow);
    letter-spacing: 1px;
}

.logo-image {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 10px rgba(204, 0, 0, 0.5);
}

.logo i {
    font-size: 1.8rem;
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #cccccc;
    font-weight: 500;
    padding: 0.5rem 0;
    letter-spacing: 0.5px;
}

.nav-link:hover {
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(204, 0, 0, 0.6);
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: #cccccc;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #080808;
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.9), -1px 0 0 rgba(204, 0, 0, 0.2);
    transition: right 0.3s ease;
    z-index: 2000;
    border-left: 1px solid rgba(204, 0, 0, 0.15);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(204, 0, 0, 0.2);
    font-weight: bold;
    font-size: 1.2rem;
    color: #ffffff;
}

.mobile-menu-close {
    font-size: 1.5rem;
    color: #cccccc;
}

.mobile-nav-menu {
    list-style: none;
    padding: 1rem 0;
}

.mobile-nav-menu li a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: #cccccc;
    transition: var(--transition);
}

.mobile-nav-menu li a:hover {
    background: rgba(204, 0, 0, 0.1);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
    padding-left: calc(1.5rem - 3px);
}

/* ===== Filter Section ===== */
.filter-section {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-secondary);
    color: var(--text-color);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.15), var(--venom-glow);
}

.search-input::placeholder {
    color: #555555;
}

.search-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 0 10px rgba(204, 0, 0, 0.3);
}

.search-btn:hover {
    background: var(--accent-color);
    box-shadow: var(--venom-glow);
}

.genre-filter {
    min-width: 200px;
}

.genre-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.genre-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.15);
}

.genre-select option {
    background: var(--bg-secondary);
    color: var(--text-color);
}

/* ===== Comics Grid ===== */
.comics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.comic-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.comic-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(204, 0, 0, 0.2);
    border-color: rgba(204, 0, 0, 0.4);
}

.comic-image {
    position: relative;
    padding-top: 140%;
    overflow: hidden;
    background: #0d0d0d;
}

.comic-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(204, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.85) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.comic-card:hover .comic-overlay {
    opacity: 1;
}

.comic-overlay i {
    font-size: 3rem;
    color: white;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.comic-info {
    padding: 1rem;
    background: var(--bg-card);
}

.comic-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #e0e0e0;
}

.comic-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* ===== No Results ===== */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    color: var(--primary-color);
}

.no-results p {
    font-size: 1.25rem;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.page-link {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #cccccc;
    font-weight: 500;
    transition: var(--transition);
    background: var(--bg-secondary);
}

.page-link:hover {
    background: rgba(204, 0, 0, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(204, 0, 0, 0.4);
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

/* ===== Comic Detail ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0 1rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--primary-color);
}

.breadcrumb a:hover {
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(204, 0, 0, 0.5);
}

.comic-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.comic-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comic-cover {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.comic-stats {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: var(--text-light);
}

.stat-item i {
    color: var(--primary-color);
}

.comic-genres h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.genre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.genre-tag {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 0.875rem;
    color: #cccccc;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.genre-tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(204, 0, 0, 0.4);
}

.comic-main .comic-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.comic-description {
    margin: 2rem 0;
}

.comic-description h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.comic-description p {
    color: var(--text-light);
    line-height: 1.8;
}

.comic-actions {
    margin: 2rem 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 15px rgba(204, 0, 0, 0.3);
}

.btn-primary:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--venom-glow);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: #cccccc;
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-back {
    background: transparent;
    color: #cccccc;
    padding: 0.5rem 1rem;
}

.btn-back:hover {
    color: var(--primary-color);
}

/* ===== Chapters List ===== */
.chapters-list {
    margin: 2rem 0;
}

.chapters-list h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.chapters {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chapter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    color: #cccccc;
}

.chapter-item:hover {
    background: rgba(204, 0, 0, 0.15);
    color: white;
    transform: translateX(5px);
    border-color: rgba(204, 0, 0, 0.4);
    box-shadow: 0 0 10px rgba(204, 0, 0, 0.2);
}

.chapter-number {
    font-weight: 600;
}

/* ===== Reader Mode ===== */
.reader-mode {
    background: #050505;
    color: #ffffff;
}

.reader-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 20px;
}

.reader-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(204, 0, 0, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(204, 0, 0, 0.15);
}

.reader-title {
    color: white;
    font-size: 1.25rem;
}

.reader-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.reader-page {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.reader-page img {
    width: 100%;
    height: auto;
}

.reader-navigation {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.no-pages {
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.4);
}

.no-pages i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: rgba(204, 0, 0, 0.5);
}

/* ===== Genres Page ===== */
.page-header {
    text-align: center;
    margin: 3rem 0;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: #ffffff;
}

.page-header h1 i {
    color: var(--primary-color);
    text-shadow: var(--venom-glow);
}

.page-header p {
    color: var(--text-light);
    font-size: 1.125rem;
}

.genres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.genre-card {
    background: var(--bg-secondary);
    padding: 2rem 1rem;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    color: #cccccc;
}

.genre-card:hover {
    background: rgba(204, 0, 0, 0.12);
    color: white;
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(204, 0, 0, 0.2);
    border-color: rgba(204, 0, 0, 0.5);
}

.genre-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.genre-card:hover .genre-icon {
    color: var(--accent-color);
    text-shadow: var(--venom-glow);
}

.genre-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.genre-count {
    font-size: 0.875rem;
    color: var(--text-light);
}

.genre-card:hover .genre-count {
    color: rgba(255, 255, 255, 0.7);
}

/* ===== Footer ===== */
.site-footer {
    background: #050505;
    color: white;
    margin-top: 4rem;
    border-top: 1px solid rgba(204, 0, 0, 0.2);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 3rem 0;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 0 12px rgba(204, 0, 0, 0.5);
    border-color: var(--primary-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
    text-shadow: 0 0 8px rgba(204, 0, 0, 0.5);
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid rgba(204, 0, 0, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.newsletter-form button {
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--accent-color);
    box-shadow: 0 0 12px rgba(204, 0, 0, 0.5);
}

.footer-bottom {
    border-top: 1px solid rgba(204, 0, 0, 0.15);
    padding: 2rem 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.disclaimer {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-lg), 0 0 15px rgba(204, 0, 0, 0.4);
    z-index: 999;
    border: 1px solid rgba(204, 0, 0, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: var(--venom-glow);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .comics-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .comic-content {
        grid-template-columns: 1fr;
    }
    
    .filter-section {
        flex-direction: column;
    }
    
    .search-box,
    .genre-filter {
        width: 100%;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .genres-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .comics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .comic-title {
        font-size: 0.875rem;
    }
    
    .comic-meta {
        font-size: 0.75rem;
    }
}

/* ===== Venom Theme - Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #cc0000;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff2222;
    box-shadow: 0 0 8px rgba(204, 0, 0, 0.6);
}

/* ===== Venom Theme - Selection ===== */
::selection {
    background: rgba(204, 0, 0, 0.4);
    color: #ffffff;
}

/* ===== Venom Theme - Headings ===== */
h1, h2, h3, h4, h5, h6 {
    color: #f0f0f0;
}

/* ===== Venom Theme - Overlay on mobile menu ===== */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1999;
    display: none;
}

.mobile-overlay.active {
    display: block;
}

/* ===== Venom Theme - Comic cover glow ===== */
.comic-cover img {
    border: 1px solid rgba(204, 0, 0, 0.2);
}

/* ===== Venom Theme - Comic main title ===== */
.comic-main .comic-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ===== Venom Theme - Status badge ===== */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(204, 0, 0, 0.2);
    color: var(--primary-color);
    border: 1px solid rgba(204, 0, 0, 0.3);
}
