/* ========================================
   Global Styles - Cross The Line
   ======================================== */

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

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.7;
    color: #2c3e50;
    background: #fdfbf7;
    min-height: 100vh;
}

/* ========================================
   Header & Navigation
   ======================================== */

.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #f0e6d2;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 600;
    color: #5d4e37;
    text-decoration: none;
    letter-spacing: 2px;
    font-family: 'Georgia', serif;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: #7d6d5d;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: #5d4e37;
}

.nav-links a.active {
    color: #8b7355;
    border-bottom: 2px solid #8b7355;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: url('../images/0.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 4rem 2rem;
    animation: fadeInUp 1.2s ease-out;
}

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

.hero h1 {
    font-size: 4rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    color: #5d4e37;
    letter-spacing: 3px;
    line-height: 1.2;
    font-family: 'Georgia', serif;
}

.hero .tagline {
    font-size: 1.4rem;
    color: #7d6d5d;
    margin-bottom: 3rem;
    font-weight: 300;
    line-height: 1.6;
    font-style: italic;
}

/* ========================================
   Main Content
   ======================================== */

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.content-header h2 {
    font-size: 2.5rem;
    font-weight: 300;
    color: #5d4e37;
    letter-spacing: 2px;
    font-family: 'Georgia', serif;
}

/* ========================================
   Category Filter Tabs
   ======================================== */

.category-filter {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 2px solid #f0e6d2;
    padding: 1.8rem 0;
    margin-bottom: 3rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.04);
}

.filter-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.8rem 2rem;
    background: transparent;
    border: 2px solid #d4c5b0;
    border-radius: 50px;
    color: #7d6d5d;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Georgia', serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-block;
    outline: none;
}

.filter-tab:focus {
    outline: 2px solid #8b7355;
    outline-offset: 2px;
}

.filter-tab:hover {
    border-color: #8b7355;
    color: #5d4e37;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.15);
}

.filter-tab.active {
    background: linear-gradient(135deg, #8b7355, #6d5d4b);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(139, 115, 85, 0.3);
}

/* ========================================
   Novel Cards Grid
   ======================================== */

.novels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.novel-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 1px solid #f0e6d2;
    display: flex;
    flex-direction: column;
    position: relative;
    text-decoration: none;
    color: inherit;
    opacity: 1;
    transform: scale(1);
}

.novel-card.hidden {
    display: none;
}

.novel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8b7355, #d4c5b0);
    opacity: 0;
    transition: opacity 0.3s;
}

.novel-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(139, 115, 85, 0.2);
    text-decoration: none;
    color: inherit;
}

.novel-card:hover::before {
    opacity: 1;
}

.novel-cover {
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.novel-cover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1), transparent 60%),
        linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.3));
}

.novel-category {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    z-index: 2;
    padding: 0.5rem 1.3rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #8b7355;
    letter-spacing: 1px;
    border: 2px solid rgba(139, 115, 85, 0.2);
}

.novel-info {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.novel-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
    line-height: 1.4;
    font-family: 'Georgia', serif;
}

.novel-excerpt {
    color: #5d5d5d;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.8;
    flex: 1;
}

.read-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #8b7355;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    letter-spacing: 0.5px;
    margin-top: auto;
}

.read-btn:hover {
    color: #6d5d4b;
    gap: 1rem;
}

/* ========================================
   Top Navigation (for novel pages)
   ======================================== */

.top-nav {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #f0e6d2;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #8b7355;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.back-btn:hover {
    background: #f5f0e8;
    color: #6d5d4b;
}

/* ========================================
   Novel Detail Page
   ======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.novel-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    border: 2px solid #f0e6d2;
}

.novel-header-cover {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.novel-header-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.novel-header-info h1 {
    font-size: 3rem;
    color: #2c3e50;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.novel-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    color: #7d6d5d;
    font-size: 0.95rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.novel-category-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, rgba(139, 115, 85, 0.1), rgba(212, 197, 176, 0.1));
    border: 2px solid #8b7355;
    border-radius: 50px;
    color: #8b7355;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.novel-description {
    color: #5d5d5d;
    font-size: 1.05rem;
    line-height: 1.8;
}

/* ========================================
   Chapter List
   ======================================== */

.chapter-section {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    border: 2px solid #f0e6d2;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0e6d2;
}

.section-header h2 {
    font-size: 2rem;
    color: #5d4e37;
    font-weight: 400;
    letter-spacing: 1px;
}

.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chapter-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    background: #fdfbf7;
    border-radius: 12px;
    border: 2px solid #f0e6d2;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}

.chapter-item:hover {
    background: white;
    border-color: #8b7355;
    transform: translateX(10px);
    box-shadow: 0 4px 20px rgba(139, 115, 85, 0.15);
    text-decoration: none;
    color: inherit;
}

.chapter-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: #8b7355;
    text-align: center;
}

.chapter-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chapter-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

.chapter-meta-info {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: #7d6d5d;
}

.chapter-meta-info span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.chapter-arrow {
    color: #8b7355;
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.chapter-item:hover .chapter-arrow {
    transform: translateX(5px);
}

/* ========================================
   Chapter Reading Page
   ======================================== */

.chapter-header {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
    text-align: center;
}

.chapter-number-badge {
    font-size: 1rem;
    color: #8b7355;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.chapter-title-page {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-weight: 400;
    line-height: 1.3;
}

.chapter-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 3rem;
}

.chapter-text {
    font-size: 1.1rem;
    line-height: 2;
    color: #2c3e50;
}

.chapter-text p {
    margin-bottom: 1.5rem;
    text-indent: 2em;
}

.chapter-text p:first-child {
    text-indent: 0;
}

.chapter-text p:first-child::first-letter {
    font-size: 3.5rem;
    font-weight: bold;
    float: left;
    line-height: 0.9;
    margin: 0.1em 0.1em 0 0;
    color: #8b7355;
}

.chapter-nav {
    max-width: 800px;
    margin: 0 auto 4rem;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.nav-btn {
    flex: 1;
    padding: 1.2rem 2rem;
    background: white;
    border: 2px solid #e8dcc8;
    border-radius: 12px;
    text-decoration: none;
    color: #5d4e37;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    background: #8b7355;
    color: white;
    border-color: #8b7355;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 115, 85, 0.3);
    text-decoration: none;
}

.nav-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nav-btn.disabled:hover {
    background: white;
    color: #5d4e37;
    transform: none;
    box-shadow: none;
}

.index-btn {
    flex: 1;
    padding: 1.2rem 2rem;
    background: linear-gradient(135deg, #8b7355, #6d5d4b);
    color: white;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.index-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 115, 85, 0.4);
    text-decoration: none;
    color: white;
}

/* ========================================
   Support Section
   ======================================== */

.reader-support {
    background: linear-gradient(135deg, rgba(139, 115, 85, 0.05), rgba(212, 197, 176, 0.05));
    padding: 5rem 0;
    margin-top: 4rem;
    border-top: 2px solid #f0e6d2;
    border-bottom: 2px solid #f0e6d2;
}

.support-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.support-container h2 {
    font-size: 2.8rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    color: #5d4e37;
    font-family: 'Georgia', serif;
    letter-spacing: 2px;
}

.support-subtitle {
    font-size: 1.2rem;
    color: #7d6d5d;
    margin-bottom: 3rem;
    line-height: 1.6;
    font-style: italic;
}

.support-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.support-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #f0e6d2;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: inherit;
}

.support-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(139, 115, 85, 0.2);
    border-color: #8b7355;
    text-decoration: none;
    color: inherit;
}

.support-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.support-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #5d4e37;
    font-family: 'Georgia', serif;
    font-weight: 600;
}

.support-card p {
    color: #7d6d5d;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ========================================
   Footer
   ======================================== */

footer {
    background: #5d4e37;
    color: #d4c5b0;
    padding: 3rem 2rem 2rem;
    margin-top: 5rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-content p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #d4c5b0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #f0e6d2;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 968px) {
    .novel-header {
        grid-template-columns: 1fr;
    }

    .novel-header-cover {
        height: 300px;
    }

    .novel-header-info h1 {
        font-size: 2.2rem;
    }

    .chapter-item {
        grid-template-columns: 60px 1fr;
        gap: 1rem;
    }

    .chapter-arrow {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .tagline {
        font-size: 1.1rem;
    }

    .novels-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .content-header {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .support-buttons {
        grid-template-columns: 1fr;
    }

    .chapter-nav {
        flex-direction: column;
    }

    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-container {
        justify-content: flex-start;
        padding: 0 1rem;
    }

    .filter-tab {
        font-size: 0.85rem;
        padding: 0.6rem 1.5rem;
    }
}

@media (max-width: 640px) {
    .chapter-item {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .chapter-number {
        font-size: 1.2rem;
    }
}

