/* Fortune Wheel Overlay and Backdrop */
.fortune-wheel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 12, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.fortune-wheel-overlay.active {
    opacity: 1;
}

/* Modal Container */
.fortune-wheel-container {
    background: linear-gradient(135deg, #1e1e24 0%, #121216 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    width: 90%;
    max-width: 820px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* Close Button */
.fortune-wheel-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 32px;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s ease, transform 0.2s ease;
}

.fortune-wheel-close:hover {
    color: #ffffff;
    transform: scale(1.1);
}

/* Layout Split */
.fortune-wheel-layout {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 420px;
}

/* Left Column: Visual and Canvas */
.fortune-wheel-visual {
    flex: 1.1;
    background: radial-gradient(circle at center, #252530 0%, #0d0d11 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 30px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.fortune-wheel-pointer {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 25px solid #ff3366;
    z-index: 5;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

#fortune-wheel-canvas {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
    transition: transform 0.1s ease-out;
}

/* Right Column: Copywriting and Input */
.fortune-wheel-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fortune-wheel-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #ff3366, #ff9933);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fortune-wheel-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0 0 24px 0;
}

/* Form Styles */
.fortune-wheel-input-group {
    margin-bottom: 16px;
    position: relative;
}

.fortune-wheel-input-group input[type="email"] {
    width: 100%;
    padding: 14px 18px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    transition: border-color 0.25s ease, background-color 0.25s ease;
    box-sizing: border-box;
}

.fortune-wheel-input-group input[type="email"]:focus {
    outline: none;
    border-color: #ff3366;
    background-color: rgba(255, 255, 255, 0.08);
}

.fortune-wheel-error-msg {
    color: #ff3366;
    font-size: 12px;
    margin-top: 6px;
    display: none;
}

/* Buttons */
.fortune-wheel-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(90deg, #ff3366 0%, #ff5e3a 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.fortune-wheel-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 51, 102, 0.4);
}

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

.fortune-wheel-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.fortune-wheel-terms {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    margin: 16px 0 0 0;
}

/* Success Layout */
.fortune-wheel-success-icon {
    font-size: 48px;
    margin-bottom: 16px;
    text-align: center;
}

.fortune-wheel-coupon-box {
    display: flex;
    align-items: stretch;
    background-color: rgba(255, 255, 255, 0.04);
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
}

.fortune-wheel-coupon-code {
    flex: 1;
    padding: 14px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 2px;
    color: #ff9933;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fortune-wheel-copy-btn {
    background-color: rgba(255, 255, 255, 0.08);
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.fortune-wheel-copy-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

#fortune-wheel-continue-btn {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

#fortune-wheel-continue-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

/* Responsive Styles */
@media (max-width: 767px) {
    .fortune-wheel-layout {
        flex-direction: column;
    }
    
    .fortune-wheel-visual {
        padding: 20px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .fortune-wheel-content {
        padding: 30px 20px;
    }
    
    .fortune-wheel-pointer {
        top: 10px;
    }
    
    #fortune-wheel-canvas {
        max-width: 280px;
    }
}

/* Countdown Banner Style */
.fw-countdown-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #ff3366 0%, #ff5e3a 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.25);
    z-index: 999999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding: 10px 0;
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    animation: fwSlideDown 0.4s ease-out;
}

.fw-countdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.fw-countdown-text {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.fw-countdown-text strong {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-family: monospace;
    font-size: 15px;
}

.fw-countdown-timer {
    background-color: #ffffff;
    color: #ff3366;
    font-weight: 800;
    font-size: 16px;
    padding: 4px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    display: inline-block;
    min-width: 60px;
    text-align: center;
}

@keyframes fwSlideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Adjust page body to prevent content overlay when banner is visible */
body.fw-banner-active {
    margin-top: 48px !important;
}

