:root {
    --bg-primary: #0B0F19;
    --bg-secondary: #111827;
    --text-main: #F3F4F6;
    --text-muted: #9CA3AF;
    --accent: #A78BFA;
    --accent-hover: #8B5CF6;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-image: url('../images/backgrounds/young-lit-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: #4A4A55;
    background-blend-mode: multiply;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.nick-search-bg {
    background-image: url('../images/backgrounds/nick-search-bg.png');
    background-blend-mode: normal;
}

.muneca-bg {
    background-image: url('../images/backgrounds/muneca-bg.png');
    background-blend-mode: normal;
}

.nick-search-bg .hero, .muneca-bg .hero {
    background: transparent;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Typography & Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    color: #fff;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    padding: 120px 0 60px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('../images/story/cul-de-sac.jpg') no-repeat center center/cover;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(11, 15, 25, 0.7), rgba(11, 15, 25, 1));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 5rem;
    letter-spacing: 2px;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 300;
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.summary-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    margin-bottom: 40px;
}

.synopsis-content {
    overflow: hidden;
    max-height: 1500px;
    transition: max-height 0.5s ease-in-out;
    position: relative;
    text-align: left;
}

.synopsis-content.collapsed {
    max-height: 120px;
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.toggle-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

.toggle-btn:hover {
    color: var(--accent-hover);
}

.summary-card p {
    font-size: 1.1rem;
    color: #D1D5DB;
    margin-bottom: 24px;
    line-height: 1.8;
}

.summary-card p:last-child {
    margin-bottom: 0;
}

.synopsis-content p:first-child::first-letter {
    font-family: 'Outfit', sans-serif;
    font-size: 4rem;
    float: left;
    margin-right: 12px;
    margin-top: -8px;
    color: var(--accent);
    line-height: 1;
}

.scroll-down {
    display: inline-block;
    color: var(--text-main);
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: transform 0.3s ease;
}
.scroll-down:hover {
    transform: translateY(5px);
}

/* Creators Section */
#creators {
    background-color: var(--bg-primary);
}

.creators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.creator-card {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 16px;
    border-top: 4px solid var(--accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.author-card {
    display: flex;
    align-items: center;
    gap: 30px;
}

.creator-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .author-card {
        flex-direction: column;
        text-align: center;
    }
}

.creator-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #fff;
}

/* Characters Grid */
#characters {
    background: linear-gradient(to bottom, var(--bg-primary), var(--bg-secondary));
}

.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

.character-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
    cursor: pointer; /* Suggests clickability for expansion */
}

.character-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* We will use a pseudo element for the glowing top border based on the symbolic color */
.character-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--char-color);
    z-index: 10;
}

.card-image {
    width: 100%;
    height: 350px;
    overflow: hidden;
    position: relative;
    background-color: #000;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.6s ease;
    opacity: 0.9;
}

.character-card:hover .card-image img {
    transform: scale(1.05);
    opacity: 1;
}

.card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, var(--bg-secondary), transparent);
}

.card-content {
    padding: 30px;
}

.card-content h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: var(--char-color);
}

.card-content .born {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-content p {
    color: #D1D5DB;
    font-size: 0.95rem;
    /* Limit lines for clean layout */
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Add an expanded state class */
.character-card.expanded p {
    -webkit-line-clamp: initial;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px;
    background-color: #000;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal classes */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Icons & Links */
.icon-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-main);
    margin: 10px;
    transition: all 0.3s ease;
    width: 80px;
}
.icon-link i {
    font-size: 1.8rem;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}
.icon-link span {
    font-size: 0.85rem;
    opacity: 0.8;
}
.icon-link:hover i {
    background: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.icon-link.bn-link:hover i {
    background: #008272;
}
.social-links .icon-link i {
    font-size: 2.2rem;
    width: 70px;
    height: 70px;
    margin-bottom: 0;
}

.back-link {
    display: inline-block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 20px;
    font-weight: 600;
    transition: color 0.3s ease;
}
.back-link:hover { color: #fff; }

.purchase-links {
    margin-top: 30px;
}

/* Author Landing Page */
.author-hero-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    padding: 60px;
    margin-top: 50px;
}
.landing-author-img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.landing-author-info {
    flex: 1;
    min-width: 300px;
}
.landing-author-info h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
}
.landing-author-info .bio {
    font-size: 1.2rem;
    color: #D1D5DB;
    margin-bottom: 30px;
}
.social-links {
    display: flex;
    gap: 15px;
}

/* Book Portfolio */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}
.book-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
}
.book-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.book-cover {
    height: 350px;
    background: linear-gradient(135deg, #1f2937, var(--cover-color));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}
.book-cover span {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.book-info {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.book-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}
.book-info .subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.read-more {
    margin-top: auto;
    color: var(--accent);
    font-weight: 600;
}

.book-cover.has-image {
    padding: 0;
    background: none;
}
.book-cover.has-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- NEW SECTIONS --- */

/* Glassmorphism Utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 15, 25, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.nav-logo img {
    display: block;
}
.nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
}
.nav-links {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}
.nav-links:hover, .nav-links.active {
    color: var(--accent);
}
.nav-toggle {
    display: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* About Section */
.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
    padding: 50px;
}
.about-author-img {
    width: 300px;
    height: 400px;
    object-fit: cover;
    border-radius: 16px;
    border: 4px solid var(--accent);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}
.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #D1D5DB;
}

/* Reviews */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.review-card {
    padding: 40px;
    text-align: center;
}
.review-text {
    font-size: 1.2rem;
    font-style: italic;
    color: #fff;
    margin-bottom: 20px;
}
.review-author {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* News */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.news-card {
    padding: 30px;
}
.news-date {
    display: inline-block;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.news-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}
.news-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Contact */
.contact-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 50px;
}
.form-group {
    margin-bottom: 25px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #D1D5DB;
    font-weight: 600;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    outline: none;
    transition: border-color 0.3s ease;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent);
}
.submit-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
}
.submit-btn:hover {
    background: var(--accent-hover);
}

/* Newsletter */
.newsletter-card {
    padding: 60px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}
.newsletter-card h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}
.newsletter-card p {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.1rem;
}
.newsletter-form {
    display: flex;
    gap: 15px;
    justify-content: center;
}
.newsletter-form input {
    width: 350px;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.05);
    color: #fff;
    outline: none;
}
.newsletter-form input:focus {
    border-color: var(--accent);
}
.newsletter-form button {
    width: auto;
}

/* Media Queries */
@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    .nav-toggle {
        display: block;
    }
    .nav-menu {
        position: fixed;
        top: 70px; /* Below navbar */
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-primary);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 40px;
        transition: left 0.3s ease;
    }
    .nav-menu.active {
        left: 0;
    }
    .hero {
        padding: 100px 0 40px 0;
    }
    .hero h1, .landing-author-info h1 {
        font-size: 2.5rem;
    }
    .summary-card {
        padding: 25px;
    }
    .synopsis-content p:first-child::first-letter {
        font-size: 3rem;
        margin-top: -4px;
    }
    .author-hero-content {
        padding: 30px 20px;
        text-align: center;
        flex-direction: column;
        gap: 20px;
        margin-top: 40px;
    }
    .landing-author-img {
        width: 160px;
        height: 160px;
    }
    .landing-author-info {
        min-width: 100%;
    }
    .social-links {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    .social-links .icon-link {
        margin: 5px;
        width: 60px;
    }
    .social-links .icon-link i {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    .about-content {
        flex-direction: column;
        padding: 30px 20px;
        text-align: center;
    }
    .about-author-img {
        width: 100%;
        max-width: 250px;
        height: auto;
    }
    .newsletter-card {
        padding: 40px 20px;
    }
    .newsletter-card h2 {
        font-size: 2rem;
    }
    .newsletter-form {
        flex-direction: column;
    }
    .newsletter-form input, .newsletter-form button {
        width: 100%;
    }
    .contact-wrapper {
        padding: 30px 20px;
    }
    .books-grid, .reviews-grid, .news-grid {
        gap: 25px;
    }
}
