@import 'root.css';

/* ==================== */
/* MAIN CONTENT LAYOUT  */
/* ==================== */
.novel-info-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.novel-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--accent-color);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.5rem;
}

.novel-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* ==================== */
/* NOVEL HERO SECTION   */
/* ==================== */
.novel-hero {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin: 3rem 0;
}

.novel-cover-container {
    position: relative;
    flex: 0 0 400px;
    max-width: 400px;
    margin: 0 auto;
}

.novel-cover {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border: 5px solid var(--header-bg);
    transition: all 0.4s ease;
}

.novel-cover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.novel-cover-container::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    background: var(--accent-color);
    opacity: 0.1;
    border-radius: 20px;
    z-index: -1;
}

.novel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ==================== */
/* NOVEL DETAILS        */
/* ==================== */
.novel-details {
    background: var(--header-bg);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.novel-description {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 2rem;
    font-family: 'Playfair Display', serif;
    flex-grow: 1;
}

.novel-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(var(--text-color-rgb), 0.05);
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meta-label {
    font-size: 0.9rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.meta-value {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
}

/* ==================== */
/* GENRES STYLES        */
/* ==================== */
.novel-genres-section {
    margin: 2rem 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(var(--text-color-rgb), 0.1);
}

.novel-genres-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    color: var(--accent-color);
    font-weight: 600;
}

.genre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.genre-tag {
    background: linear-gradient(135deg, var(--accent-color), #ff4500);
    color: white;
    padding: 0.6rem 1.4rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: default;
}

.genre-tag:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 99, 71, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ==================== */
/* ACTION BUTTONS       */
/* ==================== */
.novel-actions {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(var(--text-color-rgb), 0.1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.read-novel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-color), #ff4500);
    color: white;
    padding: 1.2rem 3rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    border: none;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(255, 99, 71, 0.3);
    gap: 0.8rem;
}

.read-novel-button::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: 0.6s;
}

.read-novel-button:hover::before {
    left: 100%;
}

.read-novel-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 99, 71, 0.4);
}

.read-novel-button:active {
    transform: translateY(-1px);
}

.read-novel-button i {
    font-size: 1.2rem;
}

.no-chapters-message {
    padding: 1.5rem;
    background: rgba(var(--text-color-rgb), 0.05);
    border-radius: 12px;
    text-align: center;
    font-style: italic;
    color: var(--text-color);
    border: 2px dashed rgba(var(--text-color-rgb), 0.2);
    font-size: 1.1rem;
}

/* ==================== */
/* SIMILAR NOVELS SECTION */
/* ==================== */
.similar-novels-section {
    margin-top: 5rem;
    text-align: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(var(--text-color-rgb), 0.1);
}

.similar-novels-section h2 {
    font-size: 2.2rem;
    margin-bottom: 3rem;
    color: var(--accent-color);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-bottom: 0.8rem;
}

.similar-novels-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

.similar-novels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    padding: 1rem;
}

.similar-novel-card {
    background: var(--header-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.similar-novel-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.similar-novel-cover {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    border-bottom: 3px solid var(--accent-color);
    transition: transform 0.6s ease;
}

.similar-novel-card:hover .similar-novel-cover {
    transform: scale(1.08);
}

.similar-novel-content {
    padding: 1.8rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.similar-novel-card h3 {
    font-size: 1.4rem;
    color: var(--text-color);
    font-weight: 600;
    margin: 0 0 1rem 0;
    line-height: 1.3;
    flex-grow: 1;
}

.similar-novel-button {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 0.9rem 1.8rem;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 0.95rem;
}

.similar-novel-button:hover {
    background: transparent;
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

/* ==================== */
/* ERROR STATES         */
/* ==================== */
.error-message {
    background: rgba(255, 0, 0, 0.08);
    border-left: 4px solid #ff4757;
    padding: 2rem;
    border-radius: 12px;
    margin: 3rem 0;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.error-message p {
    margin: 0.5rem 0;
    color: var(--text-color);
}

.error-message a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--accent-color);
    border-radius: 25px;
    transition: all 0.3s ease;
}

.error-message a:hover {
    background: var(--accent-color);
    color: white;
}

/* ==================== */
/* RESPONSIVE DESIGN    */
/* ==================== */

/* Mobile View (Default) */
@media screen and (max-width: 767px) {
    .novel-info-container {
        padding: 1.5rem;
    }

    .novel-title {
        font-size: 2rem;
        margin-top: 6rem;
        margin-bottom: 1.5rem;
    }

    .novel-hero {
        flex-direction: column;
        gap: 2rem;
        margin: 2rem 0;
    }

    .novel-cover-container {
        flex: 0 0 auto;
        max-width: 100%;
    }

    .novel-cover {
        height: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .novel-cover-container::before {
        top: 15px;
        left: 15px;
        right: -15px;
        bottom: -15px;
    }

    .novel-details {
        padding: 1.8rem;
    }

    .novel-meta-grid {
        grid-template-columns: 1fr;
        padding: 1.2rem;
    }

    .similar-novels-section {
        margin-top: 3rem;
        padding-top: 2rem;
    }

    .similar-novels-section h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

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

    .similar-novel-cover {
        height: 200px;
    }

    .similar-novel-content {
        padding: 1.5rem;
    }
}

/* Tablet View (768px and above) */
@media screen and (min-width: 768px) {
    .novel-title {
        font-size: 2.5rem;
        margin-top: 7rem;
    }

    .novel-hero {
        flex-direction: row;
        align-items: flex-start;
    }

    .novel-cover-container {
        flex: 0 0 350px;
        max-width: 350px;
        margin: 0;
    }

    .novel-cover {
        height: 100%;
    }

    .novel-content {
        margin-left: 2.5rem;
    }

    .novel-details {
        padding: 2.5rem;
    }

    .novel-meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .similar-novels-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop View (1024px and above) */
@media screen and (min-width: 1024px) {
    .novel-info-container {
        padding: 3rem 2rem;
    }

    .novel-title {
        font-size: 3rem;
        margin-top: 6rem;
    }

    .novel-cover-container {
        flex: 0 0 400px;
        max-width: 400px;
    }

    .novel-cover {
        height: 100%;
    }

    .novel-content {
        margin-left: 3rem;
    }

    .novel-details {
        padding: 3rem;
    }

    .similar-novels-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }

    .similar-novel-cover {
        height: 220px;
    }
}

/* Large Desktop View (1440px and above) */
@media screen and (min-width: 1440px) {
    .novel-info-container {
        padding: 4rem;
    }

    .novel-hero {
        max-width: 1200px;
        margin: 4rem auto;
    }

    .novel-cover-container {
        flex: 0 0 450px;
    }

    .novel-cover {
        height: 100%;
    }

    .similar-novels-grid {
        max-width: 1200px;
        margin: 0 auto;
    }
}