* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #3a0ca3 0%, #7209b7 100%);
    min-height: 100vh;
    color: #fff;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    color: #ffd700;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.4);
}

.logo p {
    color: #ddd;
    font-size: 1.1rem;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wheel-container {
    position: relative;
    margin: 20px 0 40px;
}

.wheel-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
}

#wheelCanvas {
    border-radius: 50%;
    border: 10px solid gold;
    box-shadow: 
        0 0 30px rgba(0,0,0,0.6),
        inset 0 0 25px rgba(255,255,255,0.25),
        0 0 20px gold;
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.83, 0.67);
    position: relative;
    z-index: 10; /* ✅ stays above confetti */
    pointer-events: none; /* ✅ prevent blocking spin button */
}

/* 🔻 Red Arrow Pointer (downwards into the wheel) */
.wheel-pointer {
    position: absolute;
    bottom: -28px; /* place it under the wheel */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 30px solid #ff1744; /* ⬇️ red triangle */
    z-index: 15; /* ✅ above wheel */
    filter: drop-shadow(0 0 4px rgba(0,0,0,0.6));
}

/* ✨ Golden outline */
.wheel-pointer::after {
    content: "";
    position: absolute;
    top: 0;
    left: -15px;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 30px solid gold; 
    z-index: -1;
    filter: blur(1px) brightness(1.2);
}

/* 🎯 Center Spin Button */
.spin-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, #ba68c8, #6a1b9a);
    border: 5px solid gold;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    z-index: 20; /* ✅ above everything */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 
        0 0 20px rgba(0,0,0,0.6), 
        inset 0 0 20px rgba(255,255,255,0.3);
    transition: transform 0.2s ease;
}

.spin-btn:hover:not(:disabled) {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 
        0 0 35px rgba(0,0,0,0.8),
        inset 0 0 30px rgba(255,255,255,0.4),
        0 0 30px #ffd700;
}

.spin-btn:disabled {
    background: linear-gradient(145deg, #b8b8b8, #d9d9d9);
    border: 4px solid #999;
    cursor: not-allowed;
    text-shadow: none;
    box-shadow: none;
}

/* Result Popup */
.popup {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;

    align-items: center;
    justify-content: center;
}
.popup-content {
    background: #fff;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    padding: 25px;
    text-align: center;
    color: #333;
    box-shadow: 0 0 25px rgba(0,0,0,0.5);
    animation: popupIn 0.3s ease;
}

@keyframes popupIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.popup-content h2 {
    color: #6a1b9a;
    margin-bottom: 10px;
}

.popup-content button {
    margin-top: 15px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #d4af37, #f9e076);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.popup-content button:hover {
    transform: scale(1.05);
}

/* 🎉 Fullscreen Confetti Canvas */
.confetti-canvas {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 5 !important;   /* 👈 below wheel and button */
    pointer-events: none !important; /* doesn't block clicks */
}