/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563EB;
    --primary-dark: #1E40AF;
    --secondary-color: #60A5FA;
    --accent-color: #93C5FD;
    --text-color: #1E293B;
    --text-light: #64748B;
    --bg-color: #F8FAFC;
    --bg-cream: #EFF6FF;
    --white: #FFFFFF;
    --success-color: #4CAF50;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 20px 0;
    box-shadow: var(--shadow);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.logo-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 2px;
}

/* Hero Section */
.hero {
    background: linear-gradient(180deg, var(--bg-cream) 0%, var(--bg-color) 100%);
    padding: 40px 0 1px;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.hero-text {
    flex: 1;
}

.hero-title {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--success-color);
    color: var(--white);
    border-radius: 50%;
    font-size: 14px;
}

.hero-image {
    flex: 0 0 300px;
}

.book-mockup {
    perspective: 1000px;
}

.book-cover {
    width: 250px;
    height: 350px;
    background: #FFFFFF;
    border-radius: 0 10px 10px 0;
    box-shadow:
        -10px 10px 30px rgba(0, 0, 0, 0.3),
        inset -2px 0 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transform: rotateY(-15deg);
    overflow: hidden;
    transition: transform 0.3s ease;
    position: relative;
}

.book-cover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(90deg, rgba(0,0,0,0.3) 0%, transparent 100%);
}

.book-cover:hover {
    transform: rotateY(-5deg);
}

.book-author {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.95rem;
    color: #555;
    text-align: center;
    padding: 10px 20px 5px;
    letter-spacing: 1px;
}

.book-cover-image {
    width: 80%;
    flex: 1;
    object-fit: contain;
}

.book-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: #1a1a1a;
    text-align: center;
    padding: 0 20px 15px;
    margin-top: -5px;
    letter-spacing: 1px;
}

/* About Book Section */
.about-book {
    padding: 80px 0;
    background: var(--white);
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 16px;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: justify;
}

.about-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-light);
}

.book-contents {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
    text-align: left;
}

.book-contents li {
    padding: 15px 20px;
    background: var(--bg-cream);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

/* Purchase Section */
.purchase {
    padding: 1px 0 80px;
    background: linear-gradient(180deg, var(--bg-color) 0%, var(--bg-cream) 100%);
}

.purchase-cards {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: stretch;
    max-width: 1060px;
    margin: 0 auto;
}

.purchase-card {
    flex: 1;
    max-width: 500px;
    background: var(--white);
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.purchase-card {
    border-top: 4px solid var(--primary-color);
}

.purchase-card-stripe {
    border-top: 4px solid #635BFF;
}

.purchase-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.price-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.price-input-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.price-input {
    font-family: Arial, sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    width: 112px;
    padding: 7px 11px;
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    background: var(--bg-cream);
    outline: none;
    transition: border-color 0.3s ease;
    -moz-appearance: textfield;
}

.price-input::-webkit-outer-spin-button,
.price-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.price-input:focus {
    border-color: var(--primary-color);
}

.price-input-currency {
    font-size: 1.5rem;
    color: var(--text-light);
}

.price-hint {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.purchase-benefits {
    list-style: none;
    margin-bottom: 15px;
    text-align: left;
}

.purchase-benefits li {
    padding: 5px 0;
    padding-left: 30px;
    position: relative;
    border-bottom: 1px solid var(--bg-cream);
}

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

.purchase-benefits li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.btn-buy {
    display: inline-block;
    width: 100%;
    padding: 18px 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-buy:active {
    transform: translateY(0);
}

.btn-buy-stripe {
    background: linear-gradient(135deg, #635BFF 0%, #4B45C6 100%);
    box-shadow: 0 4px 15px rgba(99, 91, 255, 0.3);
}

.btn-buy-stripe:hover {
    box-shadow: 0 6px 20px rgba(99, 91, 255, 0.4);
}

.payment-info {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.payment-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.payment-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

/* Modal */
.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(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 50px 40px;
    border-radius: 20px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s ease;
}

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

.modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
}

.success-icon {
    background: var(--success-color);
    color: var(--white);
}

.modal-content h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.modal-content p {
    color: var(--text-light);
    margin-bottom: 25px;
}

.btn-download {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--success-color) 0%, #3d8b40 100%);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-cream);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 30px 0;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer p {
    opacity: 0.8;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 900px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-features {
        align-items: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .book-contents {
        grid-template-columns: 1fr;
    }

    .purchase-cards {
        flex-direction: column;
        align-items: center;
    }

    .purchase-card {
        max-width: 500px;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .logo {
        justify-content: center;
    }

    .logo-image {
        width: 45px;
        height: 45px;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    .hero {
        padding: 50px 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .book-cover {
        width: 200px;
        height: 280px;
    }

    .book-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .purchase-card {
        padding: 30px 20px;
    }

    .price-value {
        font-size: 3rem;
    }

    .footer .container {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}

/* Payment Invitation Block */
.payment-invitation {
    text-align: center;
    padding: 1px 20px 20px;
    background: #fff;
}

.payment-invitation-text {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.payment-invitation-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
}

.payment-invitation-logo {
    height: 25px;
    width: auto;
    object-fit: contain;
}
