/* --- Global Styles & Variables --- */
:root {
    --primary-blue: #0a192f;
    --light-blue: #1d3a61;
    --accent-teal: #00f7f7;
    --accent-orange: #f58a07;
    --text-light: #ccd6f6;
    --text-dark: #8892b0;
    --font-primary: 'Orbitron', sans-serif; /* For titles */
    --font-secondary: 'Roboto', sans-serif; /* For body text */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--primary-blue);
    color: var(--text-light);
    font-family: var(--font-secondary);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-family: var(--font-primary);
    color: var(--accent-teal);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    text-transform: uppercase;
}

/* --- Header & Navigation --- */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem;
    border-bottom: 1px solid var(--light-blue);
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-nav ul li {
    margin: 0 20px;
}

.main-nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.main-nav ul li a:hover {
    color: var(--accent-teal);
}

/* --- Hero Section --- */
.hero-section {
    background: url('images/hero-background.jpg') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.hero-content {
    background: rgba(0, 0, 0, 0.3);
    padding: 2rem;
    border-radius: 10px;
}

.author-name {
    font-family: var(--font-primary);
    font-size: 4rem;
    color: #fff;
    text-shadow: 0 0 15px rgba(0, 247, 247, 0.7);
    margin-bottom: 0.5rem;
}

.tagline {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    color: var(--text-light);
    font-weight: 300;
    letter-spacing: 2px;
}


/* --- Books Section --- */
.books-section {
    padding: 80px 0;
    background-color: var(--primary-blue);
    border-top: 2px solid var(--accent-teal);
    border-bottom: 2px solid var(--accent-teal);
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
}

.book-card {
    position: relative; /* This is the positioning context for the banner */
}

.book-card img {
    width: 100%;
    height: auto;
    border: 2px solid var(--light-blue);
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.book-card a:hover img {
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--accent-teal);
}

/* Styles for the Coming Soon book */
.book-card.coming-soon img {
    filter: grayscale(60%) brightness(0.7);
}

.book-card.coming-soon:hover img {
    filter: grayscale(20%) brightness(0.9);
}

.coming-soon-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.75);
    color: var(--accent-teal);
    font-family: var(--font-primary);
    padding: 8px 15px;
    border: 1px solid var(--accent-teal);
    border-radius: 4px;
    font-size: 0.9rem;
    letter-spacing: 1px;
    pointer-events: none;
    z-index: 2;
    text-align: center;
    width: auto;
    white-space: nowrap;
}

.series-intro {
    text-align: center;
    max-width: 800px;
    margin: 4rem auto 0 auto;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.series-intro p {
    margin-bottom: 1.5rem;
}

.btn-container {
    text-align: center;
    margin-top: 2rem;
}

.btn-primary {
    display: inline-block;
    border: 1px solid var(--accent-teal);
    padding: 12px 25px;
    color: var(--accent-teal);
    text-decoration: none;
    font-family: var(--font-primary);
    transition: background-color 0.3s, color 0.3s;
}

.btn-primary:hover {
    background-color: var(--accent-teal);
    color: var(--primary-blue);
}


/* --- Author Bio Section --- */
.author-bio-section {
    padding: 80px 0;
}

.author-bio-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.author-photo-frame {
    flex: 0 0 250px;
    padding: 10px;
    border: 2px solid var(--accent-teal);
    background: var(--light-blue);
    box-shadow: 0 0 15px rgba(0, 247, 247, 0.5), inset 0 0 10px rgba(0,0,0,0.5);
    position: relative;
}

.author-photo-frame::before, .author-photo-frame::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--accent-teal);
    border-style: solid;
}
.author-photo-frame::before {
    top: -5px; left: -5px;
    border-width: 2px 0 0 2px;
}
.author-photo-frame::after {
    bottom: -5px; right: -5px;
    border-width: 0 2px 2px 0;
}


.author-photo {
    width: 100%;
    display: block;
}

.author-text {
    flex: 1;
}

.author-text .section-title {
    text-align: left;
}

.author-text p {
    font-size: 1.1rem;
    color: var(--text-dark);
    max-width: 600px;
}

/* --- Trailer Section (REMOVED) --- */
/* The old .trailer-section style was removed */

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background-color: #000;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-top: 4rem; /* Adds spacing below the button */
}

.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: filter 0.3s ease;
    z-index: 2; /* <-- THIS IS THE FIX */
}

.video-thumbnail:hover {
    filter: brightness(1.2);
}

.play-button {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #fff;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-button svg {
    width: 40px;
    height: 40px;
    color: #fff;
    transform: translateX(3px); /* Optically center the play icon */
}

.video-thumbnail:hover .play-button {
    transform: scale(1.1);
    background: rgba(0, 247, 247, 0.8);
    border-color: var(--accent-teal);
}

#video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#video-player iframe {
    width: 100%;
    height: 100%;
}


/* --- CTA Section --- */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(rgba(10, 25, 47, 0.9), rgba(10, 25, 47, 0.9)), url('images/circuit-background.jpg');
    background-size: cover;
    text-align: center;
    border-top: 1px solid var(--light-blue);
}

.cta-title {
    font-family: var(--font-primary);
    color: var(--accent-orange);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-subtitle {
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.signup-form {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.signup-form input {
    background: var(--light-blue);
    border: 1px solid var(--text-dark);
    color: var(--text-light);
    padding: 15px;
    font-family: var(--font-secondary);
    width: 300px;
}

.signup-form input::placeholder {
    color: var(--text-dark);
}

.btn-secondary {
    background-color: var(--accent-orange);
    border: none;
    color: var(--primary-blue);
    padding: 15px 30px;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: bold;
}

.btn-secondary:hover {
    background-color: #ff9d2b;
}

/* --- Footer --- */
.main-footer {
    text-align: center;
    padding: 40px 20px;
    background-color: #05101f;
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* --- Social Links --- */
.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
}

.social-links a {
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-teal);
}

.social-links svg {
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
}


/* --- ############# ABOUT PAGE STYLES ############# --- */
.about-hero {
    padding-top: 120px;
    padding-bottom: 40px;
    border-bottom: 2px solid var(--accent-teal);
}

.page-title {
    font-family: var(--font-primary);
    color: var(--accent-teal);
    font-size: 3rem;
    text-align: center;
}

.about-content {
    padding: 80px 0;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    align-items: center;
}

.about-photo .author-photo-frame {
    max-width: 350px;
}

.about-text h2 {
    font-family: var(--font-primary);
    font-size: 2rem;
    color: var(--accent-teal);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* --- ############# BOOK DETAIL PAGE STYLES ############# --- */

.book-detail-hero {
    padding: 120px 0 60px 0;
}

.book-detail-container {
    display: flex;
    align-items: flex-start;
    gap: 50px;
}

.book-detail-cover {
    flex: 0 0 300px;
    position: relative;
}

.book-detail-cover img {
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--light-blue);
}

.book-detail-info h1 {
    font-family: var(--font-primary);
    font-size: 2.8rem;
    color: var(--accent-teal);
    margin-bottom: 0.5rem;
}

.book-detail-info .book-tagline {
    font-family: var(--font-secondary);
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    font-style: italic;
}

.book-detail-info p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

.buy-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 15px;
}

.series-nav {
    padding: 60px 0;
    border-top: 2px solid var(--accent-teal);
    background-color: #05101f;
}

.series-nav .section-title {
    font-size: 2rem;
}

.series-nav-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.series-nav-book {
    position: relative;
    display: block; /* Ensures the link fills the space */
}

.series-nav-book img {
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    border: 2px solid transparent;
}

.series-nav-book:hover img {
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--accent-teal);
}

.series-nav-book.active img {
    transform: scale(1.1);
    border: 2px solid var(--accent-teal);
    box-shadow: 0 0 25px var(--accent-teal);
}

/* --- ############# HAMBURGER MENU STYLES ############# --- */

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger-btn .line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

.hamburger-btn.active .line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-btn.active .line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* --- ############# RESPONSIVE STYLES ############# --- */

@media (max-width: 900px) {
    .author-name {
        font-size: 3rem;
    }
    .tagline {
        font-size: 1.2rem;
    }
    
    .book-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .author-bio-container {
        flex-direction: column;
        text-align: center;
    }
    .author-text .section-title {
        text-align: center;
    }

    .about-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .about-photo {
        margin: 0 auto;
    }

    .book-detail-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .book-detail-cover {
        flex-basis: auto;
        width: 100%;
        max-width: 300px;
    }

    .buy-buttons {
        justify-content: center;
    }

    .series-nav-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .main-header {
        border-bottom: none !important;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        padding-right: 20px;
    }

    .hamburger-btn {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -320px;
        width: 300px;
        height: 100vh;
        background-color: rgba(10, 25, 47, 0.9);
        backdrop-filter: blur(10px);
        display: flex;
        justify-content: flex-start;
        align-items: stretch;
        transition: right 0.4s ease-in-out;
        padding-top: 60px;
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
        text-align: center;
    }

    .main-nav ul li {
        margin: 15px 0;
    }

    .main-nav ul li a {
        font-size: 1.5rem;
    }
}

@media (max-width: 600px) {
    .main-nav ul li {
        margin: 15px 0;
    }

    .author-name {
        font-size: 2.2rem;
    }
    .tagline {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }
    
    .book-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .page-title {
        font-size: 2.2rem;
    }

    .about-text h2 {
        font-size: 1.8rem;
    }

    .signup-form {
        flex-direction: column;
        align-items: center;
    }
    .signup-form input, .signup-form button {
        width: 100%;
        max-width: 350px;
    }
    
    .book-detail-info h1 {
        font-size: 2.2rem;
    }

    .author-photo-frame {
        display: block;
        margin: 0 auto 30px auto;
    }
}