/* ==========================================================================
   Daily Reward Modal - FINAL OPTIMIZED RESPONSIVE ZARA STYLE
   ========================================================================== */

/* 1. Schriftarten importieren */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

/* Verhindert Scrollen der Hauptseite */
body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* --- OVERLAY (Hintergrund) --- */
.reward-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75); /* Dunkel & Edel */
    backdrop-filter: blur(8px); /* Starker Blur für High-End Look */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; 
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
}

.reward-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* --- CONTENT BOX (Das Popup) --- */
.reward-modal-content {
    background: #ffffff;
    width: 90%; 
    max-width: 420px; /* Etwas schmaler, wirkt edler */
    min-height: 500px;
    padding: 2.5rem 1.5rem; /* Standard Padding */
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    
    /* ZARA STYLE: Eckig, scharfe Kanten */
    border-radius: 0; 
    border: 1px solid #f0f0f0;
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
    
    /* Wichtig für Responsive Verhalten */
    box-sizing: border-box;
    transform: translateY(30px);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.reward-modal-overlay.visible .reward-modal-content {
    transform: translateY(0);
}

/* --- TYPOGRAFIE --- */
h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 0.5rem 0;
    /* color: #000000; */
    text-align: center;
    line-height: 1.2;
    width: 100%;
}

.sub-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888888;
    margin-bottom: 2rem;
    text-align: center;
    width: 100%;
}

/* --- STATES (Spin vs Cooldown) --- */
.reward-spin-state, 
.reward-cooldown-state {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1; 
}

.state-hidden {
    display: none !important;
}

/* --- WHEEL CONTAINER (RESPONSIV & SKALIERT) --- */
.wheel-container {
    position: relative;
    width: 100%;           /* Nimmt verfügbare Breite im Popup */
    max-width: 320px;      /* Desktop Limit: Nicht zu riesig */
    aspect-ratio: 1 / 1;   /* Bleibt immer quadratisch */
    margin: 0 auto 2rem;   /* Abstand nach unten */
    display: flex;
    justify-content: center;
    align-items: center;
}

canvas#canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Der Zeiger (Schwarzes Dreieck) */
.wheel-pointer {
    position: absolute;
    top: -5%; /* Sitzt knapp über dem Rad */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 22px solid #000000;
    z-index: 10;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.15));
}

/* --- BUTTONS --- */
.spin-button {
    background: #000000;
    color: #ffffff;
    border: 1px solid #000000;
    padding: 1rem 0;
    width: 100%;
    max-width: 220px; /* Button Breite begrenzt */
    
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.spin-button:hover {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.spin-button:disabled {
    background: #f5f5f5;
    border-color: #f5f5f5;
    color: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* Schließen Button (X) */
.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #cccccc;
    cursor: pointer;
    transition: color 0.3s ease;
    font-weight: 200;
    padding: 10px;
    z-index: 20;
}

.close-button:hover {
    color: #000000;
}

/* --- COOLDOWN (Der große Timer) --- */
.countdown-wrapper {
    margin: 2rem 0;
    padding: 2.5rem 0;
    border-top: 1px solid #eeeeee;
    border-bottom: 1px solid #eeeeee;
    width: 100%;
    text-align: center;
}

.reward-countdown {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 400;
    color: #000000;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
    word-break: break-all;
}

.countdown-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #999999;
    margin-top: 1rem;
}

.cooldown-info {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-style: italic;
    color: #666666;
    margin-top: 1.5rem;
}

/* --- MEDIA QUERIES (Handy Anpassungen) --- */
@media (max-width: 480px) {
    .reward-modal-content {
        padding: 1.5rem 1rem; /* Weniger Abstand zum Rand */
        width: 95%;
        min-height: 450px;
    }

    h2 {
        font-size: 1.5rem; /* Überschrift etwas kleiner */
    }

    /* Hier machen wir das Rad fürs Handy kleiner */
    .wheel-container {
        max-width: 260px; /* VORHER 320 -> JETZT 260 für Mobile */
    }
    
    .wheel-pointer {
        top: -6%; /* Zeiger etwas anpassen */
    }

    .reward-countdown {
        font-size: 2.8rem;
    }
    
    .spin-button {
        max-width: 200px;
        font-size: 0.8rem;
    }
}

/* --- COUPON COPY BOX IM ALERT --- */
.coupon-copy-box {
    background: #f9f9f9;
    border: 1px dashed #000;
    padding: 15px;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.coupon-copy-box:hover {
    background: #f0f0f0;
    transform: scale(1.02);
}

.code-text {
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.copy-icon {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
    border: 1px solid #ddd;
    padding: 4px 8px;
    background: #fff;
    border-radius: 4px;
}

