/* Ebook Page Styles */

/* ========================================
   Ebook Hero Section
   ======================================== */
.ebook-hero {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    padding: 2rem 0;
}

.ebook-cover {
    flex-shrink: 0;
}

.ebook-cover img {
    max-width: 350px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.ebook-info {
    flex: 1;
}

.ebook-info h1 {
    margin-bottom: 1rem;
    font-size: 2.2rem;
}

.ebook-info .description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* ========================================
   Ebook Features List
   ======================================== */
.ebook-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.ebook-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.ebook-features li::before {
    content: "\2713";
    color: #22c55e;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ========================================
   Auth Modal
   ======================================== */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.auth-modal.active {
    display: flex;
}

.auth-content {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 16px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.auth-content > p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* ========================================
   Auth Benefits List
   ======================================== */
.auth-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    text-align: left;
}

.auth-benefits li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    font-size: 0.95rem;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-light);
}

.auth-benefits li:last-child {
    border-bottom: none;
}

.auth-benefits li::before {
    content: "\2713";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #dcfce7;
    color: #22c55e;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* ========================================
   Google Sign-In Button Container
   ======================================== */
#googleSignInButton {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

/* ========================================
   Auth Close Button
   ======================================== */
.auth-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: color 0.2s ease;
}

.auth-close:hover {
    color: var(--text-dark);
}

/* ========================================
   Download Button States
   ======================================== */
.download-btn {
    position: relative;
    min-width: 180px;
}

.download-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.download-btn.loading::after {
    content: "";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* ========================================
   User Profile Display
   ======================================== */
#userProfileDisplay {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 1rem;
}

#userProfileDisplay img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

#userProfileDisplay .user-info {
    display: flex;
    flex-direction: column;
}

#userProfileDisplay .user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
}

#userProfileDisplay .user-email {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========================================
   Responsive Styles
   ======================================== */
@media (max-width: 768px) {
    .ebook-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .ebook-cover img {
        max-width: 280px;
    }

    .ebook-info h1 {
        font-size: 1.8rem;
    }

    .ebook-features {
        grid-template-columns: 1fr;
    }

    .ebook-features li {
        justify-content: center;
    }

    .auth-content {
        padding: 1.5rem;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .ebook-cover img {
        max-width: 220px;
    }

    .ebook-info h1 {
        font-size: 1.5rem;
    }
}
