:root {
    --bg-dark: #0f172a;
    /* Deep slate */
    --text-light: #f8fafc;
    --text-dim: #cbd5e1;
    --primary: #38bdf8;
    /* Ice Blue */
    --accent: #818cf8;
    /* Indigo */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --font-heading: 'Outfit', sans-serif;
}

body {
    background: linear-gradient(to bottom, #1e293b, #0f172a);
    font-family: var(--font-heading);
    color: var(--text-light);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Effects - Snow like */
/* Background Effects - Dynamic Gradient */
:root {
    --gradient-background-start: rgb(15, 23, 42);
    /* Dark Blue */
    --gradient-background-end: rgb(2, 6, 23);
    /* Very Dark Blue */
    --first-color: 18, 113, 255;
    /* Blue */
    --second-color: 29, 78, 216;
    /* Dark Indigo */
    --third-color: 30, 64, 175;
    /* Dark Blue */
    --fourth-color: 59, 130, 246;
    /* Brighter Blue */
    --fifth-color: 0, 71, 255;
    /* Blue */
    --pointer-color: 96, 165, 250;
    /* Light Blue */
    --size: 80%;
    --blending-value: hard-light;
}

.hidden-svg {
    display: none;
}

.background-gradient-animation {
    width: 100vw;
    height: 100vh;
    position: fixed;
    overflow: hidden;
    top: 0;
    left: 0;
    background: linear-gradient(40deg, var(--gradient-background-start), var(--gradient-background-end));
    z-index: -1;
}

.gradients-container {
    filter: url(#blurMe) blur(40px);
    width: 100%;
    height: 100%;
}

/* Safari support class */
.safari-blur {
    filter: blur(40px);
    /* Simplified blur for Safari to avoid performance issues */
}

.gradient-blob {
    position: absolute;
    mix-blend-mode: var(--blending-value);
    width: var(--size);
    height: var(--size);
    top: calc(50% - var(--size) / 2);
    left: calc(50% - var(--size) / 2);
    opacity: 1;
}

.blob-1 {
    background: radial-gradient(circle at center, rgba(var(--first-color), 0.8) 0, rgba(var(--first-color), 0) 50%) no-repeat;
    transform-origin: center center;
    animation: moveVertical 30s ease infinite;
}

.blob-2 {
    background: radial-gradient(circle at center, rgba(var(--second-color), 0.8) 0, rgba(var(--second-color), 0) 50%) no-repeat;
    transform-origin: calc(50% - 400px);
    animation: moveInCircle 20s reverse infinite;
}

.blob-3 {
    background: radial-gradient(circle at center, rgba(var(--third-color), 0.8) 0, rgba(var(--third-color), 0) 50%) no-repeat;
    transform-origin: calc(50% + 400px);
    animation: moveInCircle 40s linear infinite;
}

.blob-4 {
    background: radial-gradient(circle at center, rgba(var(--fourth-color), 0.8) 0, rgba(var(--fourth-color), 0) 50%) no-repeat;
    transform-origin: calc(50% - 200px);
    animation: moveHorizontal 40s ease infinite;
    opacity: 0.7;
}

.blob-5 {
    background: radial-gradient(circle at center, rgba(var(--fifth-color), 0.8) 0, rgba(var(--fifth-color), 0) 50%) no-repeat;
    transform-origin: calc(50% - 800px) calc(50% + 800px);
    animation: moveInCircle 20s ease infinite;
}

.interactive-blob {
    background: radial-gradient(circle at center, rgba(var(--pointer-color), 0.8) 0, rgba(var(--pointer-color), 0) 50%) no-repeat;
    width: 100%;
    height: 100%;
    top: -50%;
    left: -50%;
    opacity: 0.7;
    /* Will be animated via JS */
}

@keyframes moveHorizontal {
    0% {
        transform: translateX(-50%) translateY(-10%);
    }

    50% {
        transform: translateX(50%) translateY(10%);
    }

    100% {
        transform: translateX(-50%) translateY(-10%);
    }
}

@keyframes moveInCircle {
    0% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(180deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes moveVertical {
    0% {
        transform: translateY(-50%);
    }

    50% {
        transform: translateY(50%);
    }

    100% {
        transform: translateY(-50%);
    }
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Hero Section */
.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80vh;
    gap: 4rem;
}

.hero-text {
    flex: 1;
    animation: slideUp 0.8s ease-out;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    perspective: 1000px;
    animation: fadeIn 1s ease-out 0.3s backwards;
}

/* Typography */
h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.gradient-text {
    background: linear-gradient(135deg, #e0f2fe, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-dim);
    margin-bottom: 2.5rem;
    max-width: 500px;
    line-height: 1.6;
}

.author {
    font-size: 1rem;
    opacity: 0.8;
    font-weight: 300;
    display: block;
    margin-top: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Buttons */
.cta-group {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.btn-primary {
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    font-family: var(--font-heading);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(56, 189, 248, 0.5);
}

.btn-secondary {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.2s;
    font-family: var(--font-heading);
}

.btn-text:hover {
    color: var(--text-light);
}

/* 3D Book Card - Davos Edition */
.book-card-3d {
    width: 320px;
    height: 480px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateY(-15deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.book-card-3d:hover {
    transform: rotateY(0deg) rotateX(0deg) scale(1.05);
}

.book-cover {
    width: 100%;
    height: 100%;
    /* True Davos Edition Cover */
    background-image: url('ebook - cover.png');
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    box-shadow:
        0 20px 40px -10px rgba(0, 0, 0, 0.6),
        inset 0 0 10px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.cover-image-overlay {
    /* Removed overlay as the image is the final design */
    display: none;
}

.book-front {
    /* Removed content styles */
    display: none;
}

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

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

.modal-container {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid var(--glass-border);
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    border-radius: 16px;
    padding: 2.5rem;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: white;
}

.modal-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.modal-body {
    overflow-y: auto;
    padding-right: 1rem;
    color: var(--text-dim);
    line-height: 1.8;
}

.preview-content .drop-cap {
    float: left;
    font-size: 3.5rem;
    line-height: 0.8;
    margin-right: 0.5rem;
    color: var(--primary);
    font-weight: 700;
}

.preview-content h3 {
    color: var(--text-light);
    margin: 1.5rem 0 0.5rem;
}

.pull-quote {
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    font-style: italic;
    color: var(--text-light);
    margin: 2rem 0;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
}

.blur-overlay {
    position: relative;
    margin-top: 2rem;
    padding: 4rem 2rem 2rem;
    text-align: center;
    background: linear-gradient(to bottom, transparent, rgba(30, 41, 59, 1));
}

.blur-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    filter: blur(2px);
    z-index: -1;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
        padding-top: 2rem;
    }

    .cta-group {
        justify-content: center;
    }

    .book-card-3d {
        margin: 0 auto;
        height: 400px;
        width: 260px;
    }
}

/* Pricing Info */
.pricing-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.price-tag {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-light);
}

.original-price {
    text-decoration: line-through;
    color: var(--text-dim);
    font-size: 1rem;
    margin-right: 0.5rem;
}

.current-price {
    color: var(--primary);
}

.discount-note {
    font-size: 0.9rem;
    color: var(--accent);
    background: rgba(129, 140, 248, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(129, 140, 248, 0.2);
    display: inline-block;
}

/* Adjustments for Stripe Button alignment */
stripe-buy-button {
    display: inline-block;
    vertical-align: middle;
}

/* Button Layout */
.button-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
}

/* Secondary Outline Button (for Preview) */
.btn-secondary-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.9rem 1.8rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    font-family: var(--font-heading);
    text-decoration: none;
}

.btn-secondary-outline:hover {
    background: rgba(56, 189, 248, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px -3px rgba(56, 189, 248, 0.2);
}

/* Ensure links behaves like buttons */
a.btn-primary {
    text-decoration: none;
    display: inline-flex;
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-icons a {
    color: var(--text-dim);
    transition: color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icons a:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

/* Hover effect for PNG icon in author section */
.author-container .social-icons a:hover img {
    filter: invert(59%) sepia(50%) saturate(1600%) hue-rotate(180deg) brightness(101%) contrast(98%) !important;
}

@media (max-width: 768px) {
    .author-container {
        padding: 2rem 5% !important;
    }

    .author-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem !important;
        padding: 2rem !important;
    }

    .author-image-wrapper img {
        width: 150px !important;
        height: 150px !important;
    }

    .social-icons {
        justify-content: center;
    }
}