/* Reset and Variables */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #ffe66d;
    --dark-color: #292f36;
    --light-color: #f7fff7;
    --font-heading: 'Fredoka One', cursive;
    --font-body: 'Nunito', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: #f0f8ff;
    color: var(--dark-color);
    line-height: 1.6;
}

/* Typography Details */
h1, h2, h3 {
    font-family: var(--font-heading);
}

/* Header & Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.logo {
    font-size: 4rem;
    text-shadow: 3px 3px 0 rgba(0,0,0,0.1);
    letter-spacing: 2px;
}

.logo span {
    color: var(--accent-color);
}

.tagline {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 10px;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
}

/* Book Card */
.book-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.book-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 107, 107, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

.book-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-bottom: 5px solid var(--accent-color);
}

.book-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.book-title {
    font-size: 1.4rem;
    color: var(--dark-color);
    margin-bottom: 10px;
    line-height: 1.3;
}

.book-author {
    color: #888;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.card-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.watch-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    text-align: center;
}

.watch-btn:hover {
    background: #3bbcb3;
    transform: scale(1.05);
}

.card-amazon-btn {
    display: block;
    background: #ff9900;
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-family: var(--font-heading);
    text-align: center;
    transition: background 0.2s, transform 0.2s;
}

.card-amazon-btn:hover {
    background: #e68a00;
    transform: scale(1.05);
}

/* Modal Overlay */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(41, 47, 54, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--light-color);
    width: 90vw;
    max-width: 90vw;
    border-radius: 20px;
    padding: 2% 3%;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.active .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 10;
    transition: transform 0.2s;
}

.close-btn:hover {
    transform: scale(1.1);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    margin-bottom: 20px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

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

.amazon-cta {
    display: inline-block;
    background: #ff9900;
    color: white;
    text-decoration: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    box-shadow: 0 6px 15px rgba(255, 153, 0, 0.4);
    transition: all 0.3s ease;
}

.amazon-cta:hover {
    background: #e68a00;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 153, 0, 0.5);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    background: var(--dark-color);
    color: white;
    margin-top: 50px;
}
