/* ===============================================
   Global Styles & Reset
   =============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #FFE5EC 0%, #FFC0CB 50%, #FF9EBC 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ===============================================
   Floating Hearts Background Animation
   =============================================== */
.hearts-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.heart {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 105, 180, 0.3);
    transform: rotate(45deg);
    animation: floatHeart 10s infinite ease-in-out;
}

.heart:before,
.heart:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 105, 180, 0.3);
    border-radius: 50%;
}

.heart:before {
    top: -10px;
    left: 0;
}

.heart:after {
    top: 0;
    left: 10px;
}

.heart:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.heart:nth-child(2) {
    left: 30%;
    animation-delay: 2s;
}

.heart:nth-child(3) {
    left: 50%;
    animation-delay: 4s;
}

.heart:nth-child(4) {
    left: 70%;
    animation-delay: 6s;
}

.heart:nth-child(5) {
    left: 90%;
    animation-delay: 8s;
}

@keyframes floatHeart {
    0% {
        bottom: -50px;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        bottom: 110%;
        opacity: 0;
    }
}

/* ===============================================
   Main Container
   =============================================== */
.container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

/* ===============================================
   Left Section - Background Image
   =============================================== */
.left-section {
    flex: 0 0 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.background-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(255, 105, 180, 0.3));
    animation: gentleBounce 3s ease-in-out infinite;
}

@keyframes gentleBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ===============================================
   Right Section - Subscription Form
   =============================================== */
.right-section {
    flex: 0 0 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.form-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(255, 105, 180, 0.4);
    max-width: 450px;
    width: 100%;
    backdrop-filter: blur(10px);
}

.form-container h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #FF69B4;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 30px;
    text-align: center;
}

/* ===============================================
   Form Input Styles
   =============================================== */
.input-group {
    margin-bottom: 20px;
    position: relative;
}

input[type="email"] {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    border: 2px solid #FFB6C1;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

input[type="email"]:focus {
    border-color: #FF69B4;
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.1);
}

input[type="email"].error {
    border-color: #dc3545;
}

.error-message {
    display: none;
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* ===============================================
   Subscribe Button
   =============================================== */
.subscribe-btn {
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #FF69B4, #FF9EBC);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.4);
}

.subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(255, 105, 180, 0.5);
}

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

.btn-icon {
    font-size: 1.3rem;
}

/* ===============================================
   Disclaimer
   =============================================== */
.disclaimer {
    font-size: 0.75rem;
    color: #999;
    text-align: center;
    margin-top: 20px;
    line-height: 1.4;
}

/* ===============================================
   Loading Overlay - CRITICAL: Hidden by default
   =============================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
    display: none;
    opacity: 0;
}

.loading-content {
    text-align: center;
    color: white;
}

/* Loading Hearts */
.loading-hearts {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.loading-heart {
    font-size: 2.5rem;
    animation: heartPulse 1.5s ease-in-out infinite;
}

.loading-heart:nth-child(1) {
    animation-delay: 0s;
}

.loading-heart:nth-child(2) {
    animation-delay: 0.3s;
}

.loading-heart:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes heartPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Circular Progress Spinner */
.loading-spinner {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
}

.spinner-svg {
    width: 100%;
    height: 100%;
    animation: rotate 2s linear infinite;
}

.spinner-circle {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 75;
    transform-origin: center;
    animation: dash 2s ease-in-out infinite;
}

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

@keyframes dash {
    0% {
        stroke-dasharray: 1, 283;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 141, 283;
        stroke-dashoffset: -71;
    }
    100% {
        stroke-dasharray: 1, 283;
        stroke-dashoffset: -282;
    }
}

/* SVG Gradient */
.spinner-svg defs {
    display: none;
}

/* Alternative: Use stroke with pink color */
.spinner-circle {
    stroke: #FF9EBC;
}

/* Loading Text */
.loading-text {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 20px;
    animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Bouncing Dots */
.loading-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    background: #FF9EBC;
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite;
}

.dot:nth-child(1) {
    animation-delay: 0s;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
}

/* ===============================================
   Video Overlay - CRITICAL: Hidden by default
   =============================================== */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.video-overlay.hidden {
    display: none;
    opacity: 0;
}

.mystery-video {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ===============================================
   Error Overlay
   =============================================== */
.error-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.error-overlay.hidden {
    display: none;
    opacity: 0;
}

.error-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.error-content h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
}

.error-content p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.retry-btn {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #FF69B4, #FF9EBC);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.4);
}

/* ===============================================
   Prize Modal - CRITICAL: Hidden by default
   =============================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    display: none;
    opacity: 0;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: white;
    padding: 50px 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    border: 3px solid #FF9EBC;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #FF69B4;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #FF69B4;
    text-align: center;
    margin-bottom: 30px;
}

/* ===============================================
   Prize Display
   =============================================== */
.prize-display {
    text-align: center;
    margin-bottom: 30px;
}

.prize-image {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 10px;
}

.prize-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.prize-discount {
    font-size: 2rem;
    font-weight: 700;
    color: #FF69B4;
    margin-bottom: 0;
}

/* ===============================================
   Coupon Section
   =============================================== */
.coupon-section {
    background: #FFF5F8;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 2px dashed #FFB6C1;
}

.coupon-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    text-align: center;
}

.coupon-code-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.coupon-code {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FF69B4;
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
}

.copy-btn {
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.copy-btn:hover {
    transform: scale(1.2);
}

.copy-btn:active {
    transform: scale(0.9);
}

.copy-feedback {
    display: block;
    color: #28a745;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 10px;
}

.copy-feedback.hidden {
    display: none;
}

/* ===============================================
   Claim Button
   =============================================== */
.claim-btn {
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #FF69B4, #FF9EBC);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.4);
}

.claim-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(255, 105, 180, 0.5);
}

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

/* ===============================================
   Utility Classes
   =============================================== */
.hidden {
    display: none !important;
}

/* ===============================================
   Responsive Design
   =============================================== */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }
    
    .left-section,
    .right-section {
        flex: 0 0 100%;
        padding: 30px 20px;
    }
    
    .background-image {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .form-container {
        padding: 40px 30px;
    }
    
    .form-container h1 {
        font-size: 1.6rem;
    }
    
    .modal-content {
        padding: 40px 30px;
    }
    
    .loading-spinner {
        width: 100px;
        height: 100px;
    }
    
    .loading-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 30px 20px;
    }
    
    .form-container h1 {
        font-size: 1.4rem;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
    
    .prize-discount {
        font-size: 1.6rem;
    }
    
    .coupon-code {
        font-size: 1.2rem;
    }
}
