/*
Theme Name: World Class Manga Theme
Author: Gemini
Description: A world-class UI/UX theme for manga affiliate sites. Features advanced animations and a high-density grid layout.
Version: 1.0.0
*/

/* 1. CSS Reset & Base Styling */
:root {
    --bg-color: #121212;
    --card-bg-color: #1e1e1e;
    --text-color: #e0e0e0;
    --accent-color: #bb86fc;
    --border-color: #333;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-stack);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: white;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* 2. Archive Page Specific Styles */
.archive-header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.archive-title {
    color: white;
    font-size: 2rem;
    font-weight: 300;
}

.view-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-options label {
    font-size: 0.9rem;
}

.view-options select {
    background-color: var(--card-bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
}

/* 3. Manga Grid Layout */
.manga-grid {
    display: grid;
    gap: 15px;
    /* Mobile First: 3 columns as requested */
    grid-template-columns: repeat(3, 1fr);
}

.manga-card {
    background-color: var(--card-bg-color);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

.manga-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}

.manga-card a {
    display: block;
    width: 100%;
    height: 100%;
}

.manga-card__image {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 0.7; /* Typical manga cover aspect ratio */
    object-fit: cover;
}

.manga-card__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    padding: 20px 10px 10px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.manga-card__title {
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
    /* Limit title to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

/* 4. Pagination */
.pagination {
    margin-top: 40px;
    text-align: center;
}
.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 5px;
}
.pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg-color);
    color: var(--text-color);
    border-radius: 4px;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background-color: var(--accent-color);
    color: black;
    border-color: var(--accent-color);
}

/* 5. Responsive Breakpoints */
/* For Tablets */
@media (min-width: 600px) {
    .manga-grid { grid-template-columns: repeat(4, 1fr); }
    .manga-card__title { font-size: 0.9rem; }
}

/* For Small Desktops */
@media (min-width: 900px) {
    .manga-grid { grid-template-columns: repeat(6, 1fr); }
}

/* For Large Desktops */
@media (min-width: 1200px) {
    .manga-grid { grid-template-columns: repeat(8, 1fr); }
}

/* For Extra Large Desktops */
@media (min-width: 1600px) {
    .manga-grid { grid-template-columns: repeat(10, 1fr); gap: 20px; }
}

/* 6. Header Ad Banner Styles */
.header-ad-banner {
    padding: 15px 0;
    text-align: center;
    background-color: #000;
}
.header-ad-banner img {
    max-width: 100%;
    height: auto;
    max-height: 100px; /* Adjust as needed */
    display: inline-block;
}

/* 7. Single Manga Page Styles */
.single-manga-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 20px 0;
}

@media (min-width: 768px) {
    .single-manga-container {
        grid-template-columns: 300px 1fr;
        gap: 40px;
    }
}

.manga-artwork {
    text-align: center;
}

.manga-cover-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.manga-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    line-height: 1.2;
}

.warning-section {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--accent-color);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 4px;
    max-height: 200px; /* Hide overflow until animated */
    overflow: hidden;
    color: #ccc;
    font-size: 0.9rem;
    position: relative;
}

.warning-section p {
    margin-bottom: 0.8em;
}

.cta-button-container {
    text-align: center;
}

.affiliate-button {
    display: inline-block;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    padding: 20px 40px;
    border-radius: 50px;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    text-transform: uppercase;
    box-shadow: 0 4px 15px 0 rgba(220, 39, 67, 0.75);
    transition: all 0.3s ease;
}

.affiliate-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px 0 rgba(220, 39, 67, 0.85);
    color: white;
}

.affiliate-button span {
    display: block;
}

.affiliate-button small {
    font-size: 0.7rem;
    opacity: 0.8;
    text-transform: none;
    font-weight: normal;
    display: block;
    margin-top: 4px;
}

/* 8. Animation Initial States */

/* Hide manga cards initially, JS will fade them in */
.manga-card {
    opacity: 0;
}

/* Set initial state for warning text paragraphs */
.warning-section p {
    /* The split text utility will create divs for chars, so we target them */
    /* This prevents a flash of un-styled text before GSAP takes over */
    opacity: 1; /* Keep it visible for non-JS users, GSAP will handle it */
}

