:root {
    --bg-color: #F7F5F0; /* Soft cream signature to elegant imprints */
    --card-bg: #FFFFFF;
    --card-border: rgba(0, 0, 0, 0.06);
    --text-main: #1A1A1A;
    --text-muted: #555555;
    --accent: #000000; /* High contrast elegant black */
    --accent-hover: #333333;
    --input-bg: #FFFFFF;
    --input-border: #D1D1D1;
    --input-focus: #000000;
    --error: #D32F2F;
    --success-bg: rgba(0, 0, 0, 0.03);
    
    --font-heading: 'Playfair Display', serif; /* Sophisticated serif */
    --font-body: 'Inter', sans-serif; /* Clean readable body */
}

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

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

/* Background Setup */
.bg-layer {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
    transform: scale(1.05); /* Slight scale to prevent edge bleed */
}

.bg-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(247, 245, 240, 0.92); /* Wash out the dark AI background to match light theme */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: -1;
}

/* Layout */
.layout-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Card Style */
.content-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px; /* Sharper corners for a bookish, editorial feel */
    padding: 0; 
    width: 100%;
    max-width: 900px; 
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    display: flex;
    overflow: hidden;
}

/* Book Image Column */
.book-image-col {
    flex: 0 0 45%;
    background: #000000; /* Dark background to seamlessly blend the desktop image letterboxing */
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0; /* Full bleed */
    position: relative;
    overflow: hidden;
}

.book-image-col img {
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.img-desktop {
    display: block;
    object-fit: contain; /* Prevents text/logo from cutting out on desktop */
}

.img-mobile {
    display: none;
    object-fit: cover;
}

.book-image-col img:hover {
    transform: scale(1.02); /* Reduced hover scale so contain image doesn't pop oddly */
}

/* Form Content Column */
.form-content-col {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Header */
.header-section {
    text-align: center;
    margin-bottom: 35px;
}

.imprint-badge {
    display: inline-block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-main);
    margin-bottom: 20px;
    font-weight: 600;
    border-bottom: 1px solid var(--text-main);
    padding-bottom: 4px;
}

h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
    color: var(--text-main);
}

.subtitle {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.intro-text {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.7;
}

.intro-text strong {
    color: var(--text-main);
    font-weight: 600;
}

.pub-date {
    display: block;
    margin-top: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

/* Countdown */
.countdown-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background: var(--success-bg);
    border-radius: 4px;
    border: 1px solid var(--card-border);
}

.countdown-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.countdown-timer {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--text-main);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.countdown-timer span {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 400;
    margin-right: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group.row {
    display: flex;
    gap: 15px;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.input-wrapper.half {
    flex: 1;
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.optional {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.2s ease;
}

input::placeholder {
    color: #A0A0A0;
}

input:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 1px var(--input-focus);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--accent);
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary:disabled {
    background: #E0E0E0;
    color: #999999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Messages */
.error-alert {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: var(--error);
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

.status-message {
    text-align: center;
    padding: 40px 20px;
}

.status-message h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 10px;
}

/* Success State */
.success-state {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    background: var(--success-bg);
    color: var(--text-main);
    border-radius: 50%;
    margin: 0 auto 20px;
}

.success-state h3 {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    margin-bottom: 10px;
}

.success-state p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 30px;
}

/* Share Box */
.share-box {
    background: var(--success-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 25px;
    margin-top: 30px;
}

.share-box h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-main);
    font-weight: 600;
}

.share-box p {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.share-input-group {
    display: flex;
    gap: 10px;
}

.share-input-group input {
    background: #FFFFFF;
}

.btn-secondary {
    padding: 0 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
}

.btn-secondary:hover {
    background: var(--accent-hover);
}

.copy-feedback {
    font-size: 0.85rem;
    color: #059669;
    margin-top: 10px;
    font-weight: 500;
}

/* Footer & Modal */
.site-footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.text-link {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    opacity: 0.8;
    transition: all 0.2s;
}

.text-link:hover {
    opacity: 1;
    color: var(--text-main);
}

#wbx-powered-by-slot {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: var(--bg-color);
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.05);
    border: none;
    color: var(--text-main);
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(0,0,0,0.1);
}

.modal-content h2 {
    font-family: var(--font-heading);
    padding: 30px 35px 20px;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-main);
}

.rules-text {
    padding: 25px 35px 35px;
    overflow-y: auto;
    font-size: 0.95rem;
    color: var(--text-muted);
    white-space: pre-wrap;
    line-height: 1.7;
}

/* Responsive */
@media (max-width: 768px) {
    .content-card {
        flex-direction: column;
        max-width: 600px;
    }
    
    .book-image-col {
        padding: 0;
        height: 350px;
        background: #F2F0EB; /* Revert to lighter background for mobile image */
    }
    
    .img-desktop {
        display: none;
    }
    
    .img-mobile {
        display: block;
        max-width: 100%;
        height: 100%;
        object-position: center top;
    }
    
    .form-content-col {
        padding: 40px 25px;
    }
    
    .form-group.row {
        flex-direction: column;
        gap: 20px;
    }
    
    h1 {
        font-size: 2.25rem;
    }
}
