* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #0c0e1a;
    color: #ffffff;
}

header {
    text-align: center;
    padding: 60px 0;
    background-color: #0c0e1a;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 30px;
}

nav {
    display: flex;
    justify-content: center;
    gap: 40px;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #3498db;
}

.divider {
    height: 4px;
    background: linear-gradient(to right, #2c3e50, #3498db, #2c3e50);
    margin: 0;
}

section {
    padding: 80px 20px;
}

.section-content {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
    color: #a8dadc;
}

/* About Section */
#about {
    background-color: #1a365d;
    border-radius: 20px;
    margin: 40px auto;
    max-width: 1200px;
    padding: 40px;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.typing-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #3498db;
}

/* Manga Viewer */
.enhanced-manga-viewer {
    background-color: #1a202c;
    border-radius: 10px;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

.manga-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #2d3748;
}

.manga-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 16px;
    cursor: pointer;
}

.manga-btn:hover {
    background-color: #2980b9;
}

.manga-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-counter {
    color: #a0aec0;
}

.zoom-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: #2d3748;
}

.zoom-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.zoom-btn:hover:not(:disabled) {
    background-color: #2980b9;
}

.zoom-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#zoom-level {
    color: #a0aec0;
    font-size: 0.9rem;
}
/* About Section Specific */
.about-content {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}

.typing-text {
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-card {
    background: rgba(255,255,255,0.1);
    padding: 2rem 1rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.05);
    background: rgba(255,255,255,0.2);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #a8edea;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Enhanced Manga Viewer */
.enhanced-manga-viewer {
    background: rgba(0,0,0,0.5);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
}

.manga-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.zoom-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.zoom-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: #fff;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 45px;
    position: relative;
    overflow: hidden;
}

.zoom-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.zoom-btn:hover::before {
    width: 300px;
    height: 300px;
}

.zoom-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.zoom-btn:active {
    transform: scale(0.95);
}

#zoom-level {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
    color: #fff;
}

.manga-container {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    overflow: hidden;
    background: rgba(0,0,0,0.3);
    cursor: grab;
}

.manga-container:active {
    cursor: grabbing;
}

.manga-wrapper {
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease;
    transform-origin: center center;
}

.manga-wrapper img {
    max-width: 500px;
    max-height: 600px;
    border-radius: 10px;
    display: block;
    transition: none;
    user-select: none;
    -webkit-user-drag: none;
}

.manga-container {
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #1a202c;
}

.manga-wrapper {
    position: relative;
    transition: transform 0.3s ease;
}

.manga-wrapper img {
    max-width: 100%;
    max-height: 500px;
    display: block;
}

.manga-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.manga-overlay:hover {
    opacity: 1;
}

.fullscreen-btn {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 8px;
    font-size: 1rem;
    cursor: pointer;
}

.manga-thumbnails {
    display: flex;
    gap: 10px;
    padding: 15px;
    background-color: #2d3748;
    overflow-x: auto;
}

.manga-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.manga-container:hover .manga-overlay {
    opacity: 1;
}

.fullscreen-btn {
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
}

.manga-thumbnails {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.thumbnail {
    width: 60px;
    height: 80px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 5px;
    overflow: hidden;
}

.thumbnail.active {
    border-color: #3498db;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail:hover {
    border-color: rgba(52, 152, 219, 0.5);
}

/* Galleries */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: #2d3748;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
}

.filter-btn.active, .filter-btn:hover {
    background-color: #3498db;
}

.interactive-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.category-btn {
    background-color: rgba(52, 152, 219, 0.1);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.category-btn:hover {
    background-color: rgba(52, 152, 219, 0.3);
}

.category-btn.active {
    background-color: rgba(52, 152, 219, 0.7);
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

/* Episode Tabs */
.episode-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.episode-btn {
    background-color: rgba(46, 204, 113, 0.1);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.episode-btn:hover {
    background-color: rgba(46, 204, 113, 0.3);
}

.episode-btn.active {
    background-color: rgba(46, 204, 113, 0.7);
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.5);
}

.episode-content {
    display: none;
}

.episode-content.active {
    display: block;
}

/* A5 Format for Koala Boys previews */
.koalaboys-gallery .art-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 420px; /* A5 ratio approximation (1:1.414) */
    width: 297px;
    margin: 0 auto;
}

.koalaboys-gallery .art-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.koalaboys-gallery .art-item img:hover {
    transform: scale(1.02);
}

/* A5 Format for The God of Violence previews */
.category-gallery#godofviolence-gallery .art-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 420px; /* A5 ratio approximation (1:1.414) */
    width: 297px;
    margin: 0 auto;
}

.category-gallery#godofviolence-gallery .art-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.category-gallery#godofviolence-gallery .art-item img:hover {
    transform: scale(1.02);
}

/* Episode Navigation */
.episode-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 10px;
}

.episode-nav-btn {
    background-color: rgba(46, 204, 113, 0.3);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.episode-nav-btn:hover:not(:disabled) {
    background-color: rgba(46, 204, 113, 0.6);
    transform: translateY(-2px);
}

.episode-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-indicator {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

/* Single page view for episode navigation */
.episode-single-page {
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
}

.episode-single-page.active {
    display: flex;
}

.gallery-container {
    position: relative;
    min-height: 300px;
}

.category-gallery {
    display: none;
}

.category-gallery.active {
    display: block;
}

.art-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.category-gallery.active .art-grid,
.category-gallery.active .art-item {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.art-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 300px;
}

.art-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.art-item:hover img {
    transform: scale(1.05);
}

.art-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    color: white;
}

.art-item:hover .art-overlay {
    transform: translateY(0);
}

.art-overlay h3 {
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.art-overlay p {
    opacity: 0.8;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.view-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

.close-modal:hover {
    color: #3498db;
}

.modal-content {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    cursor: grab;
}

.modal-content.zoomed {
    cursor: grab;
    /* Keep the same max-width and max-height when zoomed */
}

.modal-content.dragging {
    cursor: grabbing;
}

.modal-zoom-controls {
    position: absolute;
    top: 20px;
    right: 80px;
    display: flex;
    gap: 10px;
    z-index: 1002;
}

.modal-zoom-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
    pointer-events: auto;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-zoom-btn:hover {
    background: rgba(52, 152, 219, 0.8);
    transform: scale(1.1);
}

.modal-caption {
    text-align: center;
    color: white;
    padding: 10px;
    font-size: 1.2rem;
}

.modal-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 1001;
}

.modal-nav-btn {
    background-color: rgba(52, 152, 219, 0.8);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    pointer-events: all;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-nav-btn:hover {
    background-color: rgba(52, 152, 219, 1);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.5);
}

.modal-nav-btn:active {
    transform: scale(0.95);
    background-color: rgba(52, 152, 219, 1);
}

.modal-nav-btn:disabled {
    background-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    transform: none;
}

.modal-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 1001;
}

.modal-page-indicator {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-top: 5px;
}

.modal-help {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 0.8rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 1002;
}

.modal-help:hover {
    opacity: 1;
}

.modal-help-content span {
    color: #3498db;
    font-weight: 600;
}

/* Masonry Gallery */
.masonry-gallery {
    columns: 3;
    column-gap: 2rem;
}

.art-card {
    break-inside: avoid;
    margin-bottom: 2rem;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.art-card:hover {
    transform: scale(1.02);
    background: rgba(255,255,255,0.2);
}

.art-card img {
    width: 100%;
    height: auto;
    display: block;
}

.art-info {
    padding: 1.5rem;
}

.art-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.art-info p {
    opacity: 0.8;
    margin-bottom: 1rem;
}

.art-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(255,255,255,0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}
/* Footer */
footer {
    background-color: #0c0e1a;
    color: #fff;
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
    margin-bottom: 20px;
    opacity: 0.8;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-link {
    color: #fff;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
    background-color: rgba(52, 152, 219, 0.2);
}

.social-link:hover {
    background-color: rgba(52, 152, 219, 0.5);
}

.social-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.social-btn:hover::before {
    left: 100%;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: translate(-50%, -50%) scale(0.3); }
    to { transform: translate(-50%, -50%) scale(1); }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
}

.close-modal:hover {
    color: #ff6b6b;
}

.modal-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    text-align: center;
    background: rgba(0,0,0,0.7);
    padding: 1rem 2rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

/* Animations */
.fade-in {
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .glitch-text {
        font-size: 2rem;
    }
    
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .section-content {
        padding: 2rem 1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .manga-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .manga-container img {
        max-width: 100%;
    }
    
    .interactive-gallery {
        grid-template-columns: 1fr;
    }
    
    .masonry-gallery {
        columns: 1;
    }
    
    .filter-tabs {
        flex-wrap: wrap;
    }
    
    .social-links {
        flex-direction: column;
        align-items: center;
    }
}
