/* =============================================
   GREEN POPUPS — FORTUNE WHEEL v2
   Embedded inside GP multi-page form popups.
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

/* --- Container inside GP HTML element --- */
#gpfw-wheel {
    min-height: 10px;
}

.gpfw-inner {
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 20px;
    padding: 32px 24px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.gpfw-inner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(255, 255, 255, 0.03) 60deg,
        transparent 120deg
    );
    animation: gpfw-shimmer 8s linear infinite;
    pointer-events: none;
}
@keyframes gpfw-shimmer {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Loading state --- */
.gpfw-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}
.gpfw-spinner-large {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Titles --- */
.gpfw-title {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 2;
}
.gpfw-subtitle {
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
    text-align: center;
    margin: 0 0 24px;
    position: relative;
    z-index: 2;
}

/* --- Buttons --- */
.gpfw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Montserrat', inherit;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
    z-index: 2;
}
.gpfw-btn-primary {
    background: linear-gradient(135deg, #e94560 0%, #c23152 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(233, 69, 96, 0.35);
}
.gpfw-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(233, 69, 96, 0.5);
}
.gpfw-btn-primary:active {
    transform: translateY(0);
}
.gpfw-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- Spinner --- */
.gpfw-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: gpfw-spin 0.6s linear infinite;
}
@keyframes gpfw-spin {
    to { transform: rotate(360deg); }
}

/* =============================================
   WHEEL
   ============================================= */
.gpfw-wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 2;
}

.gpfw-wheel-wrap {
    position: relative;
    width: 300px;
    height: 300px;
}
@media (max-width: 480px) {
    .gpfw-wheel-wrap {
        width: 250px;
        height: 250px;
    }
    .gpfw-inner {
        padding: 24px 16px;
    }
}

/* Pointer / marker */
.gpfw-wheel-pointer {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 24px solid #e94560;
    z-index: 5;
    filter: drop-shadow(0 3px 6px rgba(233, 69, 96, 0.5));
}

.gpfw-canvas-container {
    width: 100%;
    height: 100%;
    position: relative;
}
.gpfw-canvas-container canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow:
        0 0 0 6px rgba(255, 255, 255, 0.1),
        0 0 0 10px rgba(233, 69, 96, 0.3),
        0 0 30px rgba(233, 69, 96, 0.2);
}

/* Center dot */
.gpfw-wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: radial-gradient(circle, #fff 30%, #e94560 100%);
    border-radius: 50%;
    z-index: 4;
    box-shadow:
        0 0 0 3px rgba(233, 69, 96, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Outer ring LEDs */
.gpfw-wheel-leds {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 3;
}
.gpfw-led {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px 2px rgba(255,255,255,0.6);
    transition: opacity 0.15s;
}
.gpfw-led.gpfw-led-off {
    opacity: 0.2;
    box-shadow: none;
}

/* --- Controls below wheel --- */
.gpfw-wheel-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.gpfw-btn-spin {
    width: 100%;
    max-width: 260px;
    padding: 16px 32px;
    font-size: 18px;
    background: linear-gradient(135deg, #e94560 0%, #c23152 100%);
    color: #fff;
    box-shadow: 0 4px 25px rgba(233, 69, 96, 0.4);
    animation: gpfw-pulse 2s ease-in-out infinite;
}
.gpfw-btn-spin:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 35px rgba(233, 69, 96, 0.55);
}
@keyframes gpfw-pulse {
    0%, 100% { box-shadow: 0 4px 25px rgba(233, 69, 96, 0.4); }
    50% { box-shadow: 0 4px 35px rgba(233, 69, 96, 0.7); }
}

.gpfw-btn-stop {
    width: 100%;
    max-width: 260px;
    padding: 16px 32px;
    font-size: 18px;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: #fff;
    box-shadow: 0 4px 25px rgba(243, 156, 18, 0.4);
}
.gpfw-btn-stop:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(243, 156, 18, 0.55);
}

/* Timer bar */
.gpfw-timer-wrap {
    width: 100%;
    max-width: 260px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}
.gpfw-timer-bar {
    height: 100%;
    background: linear-gradient(90deg, #f39c12, #e94560);
    border-radius: 3px;
    transition: width 0.1s linear;
    width: 100%;
}
.gpfw-timer-text {
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    position: relative;
    z-index: 2;
}

/* =============================================
   RESULT SCREEN
   ============================================= */
.gpfw-result-icon {
    font-size: 56px;
    margin-bottom: 12px;
    display: block;
    text-align: center;
    animation: gpfw-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 2;
}
@keyframes gpfw-bounce {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.gpfw-result .gpfw-title,
.gpfw-already-played .gpfw-title {
    margin-top: 8px;
}

.gpfw-result-prize {
    display: inline-block;
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.2), rgba(233, 69, 96, 0.1));
    border: 1px solid rgba(233, 69, 96, 0.3);
    border-radius: 12px;
    padding: 12px 24px;
    color: #e94560;
    font-size: 20px;
    font-weight: 700;
    margin: 16px auto 20px;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 2;
    text-align: center;
}

.gpfw-result-message {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.6;
    text-align: center;
    position: relative;
    z-index: 2;
}

.gpfw-result,
.gpfw-already-played {
    text-align: center;
}

.gpfw-btn-continue {
    width: 100%;
    max-width: 260px;
    padding: 16px 32px;
    font-size: 16px;
    background: linear-gradient(135deg, #4ECDC4 0%, #44a899 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(78, 205, 196, 0.35);
    margin: 0 auto;
}
.gpfw-btn-continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(78, 205, 196, 0.5);
}

/* --- Confetti --- */
.gpfw-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}
.gpfw-confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    opacity: 0;
}
@keyframes gpfw-confetti-fall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(500px) rotate(720deg);
        opacity: 0;
    }
}
