:root {
    --nc-primary: #ee4d2d;
    --nc-primary-bg: #fef6f5;
    --nc-primary-gradient: linear-gradient(#ee4d2d, #ff7337);
    --nc-secondary-blue: #0046ab;
    --nc-secondary-yellow: #eda500;
    --nc-secondary-green: #26aa99;
    --nc-error: #ee2c4a;
    --nc-error-bg: #fff4f4;
    --nc-caution: #f69113;
}

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.shopee-navbar {
    background: var(--nc-primary-gradient);
    box-shadow: 0 2px 10px rgba(4, 123, 214, 0.3);
}

.shopee-btn {
    background: var(--nc-primary-gradient);
    color: white;
    font-weight: 600;
    padding: 16px 32px;
    border-radius: 8px;
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(4, 123, 214, 0.3);
}

.shopee-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(238, 77, 45, 0.4);
    background: linear-gradient(135deg, #d63c1e 0%, #e55a00 100%);
}

.shopee-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wheel-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px 0;
}

.wheel {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    border: 12px solid #fff;
    box-shadow: 
        0 0 0 8px var(--nc-primary),
        0 20px 40px rgba(0,0,0,0.15),
        inset 0 0 50px rgba(255,255,255,0.1);
    transition: transform 4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: conic-gradient(
        #FF6B6B 0deg 45deg,
        #4ECDC4 45deg 90deg,
        #45B7D1 90deg 135deg,
        #96CEB4 135deg 180deg,
        #FECA57 180deg 225deg,
        #FF9FF3 225deg 270deg,
        #54A0FF 270deg 315deg,
        #5F27CD 315deg 360deg
    );
}

.wheel::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90%;
    height: 90%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.3), transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}

.wheel-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: 100% 100%;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 12px;
    text-align: center;
    padding: 20px 10px 10px;
    box-sizing: border-box;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.wheel-segment:nth-child(1) { 
    background: linear-gradient(135deg, #FF6B6B 0%, #FF5252 100%); 
    transform: rotate(0deg); 
}
.wheel-segment:nth-child(2) { 
    background: linear-gradient(135deg, #4ECDC4 0%, #26C6DA 100%); 
    transform: rotate(45deg); 
}
.wheel-segment:nth-child(3) { 
    background: linear-gradient(135deg, #45B7D1 0%, #2196F3 100%); 
    transform: rotate(90deg); 
}
.wheel-segment:nth-child(4) { 
    background: linear-gradient(135deg, #96CEB4 0%, #4CAF50 100%); 
    transform: rotate(135deg); 
}
.wheel-segment:nth-child(5) { 
    background: linear-gradient(135deg, #FECA57 0%, #FFC107 100%); 
    transform: rotate(180deg); 
}
.wheel-segment:nth-child(6) { 
    background: linear-gradient(135deg, #FF9FF3 0%, #E91E63 100%); 
    transform: rotate(225deg); 
}
.wheel-segment:nth-child(7) { 
    background: linear-gradient(135deg, #54A0FF 0%, #3F51B5 100%); 
    transform: rotate(270deg); 
}
.wheel-segment:nth-child(8) { 
    background: linear-gradient(135deg, #5F27CD 0%, #673AB7 100%); 
    transform: rotate(315deg); 
}

.wheel-segment-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: rotate(-22.5deg);
    width: 100px;
    margin-top: 15px;
}

.wheel-segment-icon {
    font-size: 24px;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.wheel-segment-text {
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wheel-segment-price {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.9;
    margin-top: 2px;
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--nc-primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 16px;
    box-shadow: 
        0 0 0 6px #fff,
        0 0 20px rgba(4, 123, 214, 0.4),
        inset 0 2px 10px rgba(255,255,255,0.3);
    z-index: 10;
    animation: centerPulse 2s infinite;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border: 3px solid rgba(255,255,255,0.2);
}

@keyframes centerPulse {
    0%, 100% { 
        box-shadow: 
            0 0 0 6px #fff,
            0 0 20px rgba(4, 123, 214, 0.4),
            inset 0 2px 10px rgba(255,255,255,0.3);
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        box-shadow: 
            0 0 0 6px #fff,
            0 0 30px rgba(4, 123, 214, 0.6),
            inset 0 2px 10px rgba(255,255,255,0.3);
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.wheel-pointer {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 35px solid var(--nc-primary);
    z-index: 20;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.wheel-pointer::after {
    content: '';
    position: absolute;
    top: 35px;
    left: -15px;
    width: 30px;
    height: 15px;
    background: var(--nc-primary);
    border-radius: 0 0 50% 50%;
}

.spin-button {
    margin-top: 40px;
    background: var(--nc-primary-gradient);
    color: white;
    font-weight: 800;
    padding: 20px 50px;
    border-radius: 60px;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 8px 25px rgba(255, 111, 0, 0.4),
        inset 0 2px 10px rgba(255,255,255,0.2);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.spin-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.spin-button:hover:not(:disabled)::before {
    left: 100%;
}

.spin-button:hover:not(:disabled) {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 12px 35px rgba(255, 111, 0, 0.5),
        inset 0 2px 10px rgba(255,255,255,0.2);
}

.spin-button:active:not(:disabled) {
    transform: translateY(-2px) scale(0.98);
}

.spin-button:disabled {
    background: linear-gradient(135deg, #ccc 0%, #999 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.wheel-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(4, 123, 214, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from { opacity: 0.5; transform: translate(-50%, -50%) scale(0.95); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
}

.step {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.5s ease;
}

.step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.form-input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--nc-primary);
    box-shadow: 0 0 0 3px rgba(4, 123, 214, 0.1);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(4, 123, 214, 0.95) 0%, rgba(0, 86, 179, 0.95) 100%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.loading-content {
    text-align: center;
    color: white;
    max-width: 400px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(30px) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-dots {
    display: inline-flex;
    gap: 4px;
    margin-left: 8px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: white;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes bounce {
    0%, 80%, 100% { 
        transform: scale(0.8);
        opacity: 0.6;
    } 
    40% { 
        transform: scale(1.2);
        opacity: 1;
    }
}

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

.celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--nc-secondary-yellow);
    animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.progress-container {
    background: #e9ecef;
    border-radius: 10px;
    height: 6px;
    overflow: hidden;
}

.progress-bar {
    background: var(--nc-primary-gradient);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.countdown-container {
    animation: countdown-pulse 2s infinite;
}

@keyframes countdown-pulse {
    0%, 100% { 
        background-color: rgba(239, 68, 68, 0.1);
        transform: scale(1);
    }
    50% { 
        background-color: rgba(239, 68, 68, 0.2);
        transform: scale(1.02);
    }
}

.trust-badge {
    transition: all 0.3s ease;
}

.trust-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .wheel {
        width: 320px;
        height: 320px;
        border: 8px solid #fff;
    }
    .wheel-glow {
        width: 370px;
        height: 370px;
    }
    .wheel-segment {
        font-size: 10px;
    }
    .wheel-segment-icon {
        font-size: 20px;
        margin-bottom: 6px;
    }
    .wheel-segment-text {
        font-size: 9px;
    }
    .wheel-segment-price {
        font-size: 8px;
    }
    .wheel-center {
        width: 65px;
        height: 65px;
        font-size: 14px;
    }
    .spin-button {
        padding: 16px 40px;
        font-size: 18px;
    }
}

/* Header Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.count-animation {
    animation: countUp 0.8s ease-out;
}

/* Mystery Box Animation Styles */
.mystery-box {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    perspective: 1000px;
}

.box-base {
    width: 180px;
    height: 120px;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 50%, #CD853F 100%);
    border-radius: 8px;
    position: absolute;
    bottom: 0;
    left: 10px;
    box-shadow: 
        inset 0 -10px 20px rgba(0,0,0,0.3),
        0 10px 30px rgba(0,0,0,0.3);
    border: 3px solid #654321;
}

.box-lid {
    width: 190px;
    height: 80px;
    position: absolute;
    top: 0;
    left: 5px;
    transform-origin: bottom center;
    transition: transform 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10;
}

.box-lid.open {
    transform: rotateX(-120deg) translateZ(40px);
}

.lid-top {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 50%, #CD853F 100%);
    border-radius: 8px 8px 4px 4px;
    border: 3px solid #654321;
    box-shadow: 
        inset 0 5px 15px rgba(255,255,255,0.2),
        0 5px 20px rgba(0,0,0,0.3);
}

.ribbon-vertical {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 90px;
    background: linear-gradient(90deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    box-shadow: 
        inset 2px 0 4px rgba(255,255,255,0.3),
        inset -2px 0 4px rgba(0,0,0,0.2);
}

.ribbon-horizontal {
    position: absolute;
    top: 35px;
    left: -5px;
    width: 200px;
    height: 20px;
    background: linear-gradient(180deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    box-shadow: 
        inset 0 2px 4px rgba(255,255,255,0.3),
        inset 0 -2px 4px rgba(0,0,0,0.2);
}

.bow {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 30px;
}

.bow-left, .bow-right {
    position: absolute;
    width: 15px;
    height: 20px;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF5252 100%);
    border-radius: 50% 10px 50% 10px;
    box-shadow: inset 2px 2px 4px rgba(255,255,255,0.3);
}

.bow-left {
    left: 2px;
    transform: rotate(-25deg);
}

.bow-right {
    right: 2px;
    transform: rotate(25deg);
}

.bow-center {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 10px;
    background: linear-gradient(135deg, #FF5252 0%, #E53E3E 100%);
    border-radius: 2px;
    box-shadow: inset 1px 1px 2px rgba(255,255,255,0.3);
}

.sparkles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.sparkles.show {
    opacity: 1;
}

.sparkle {
    position: absolute;
    font-size: 20px;
    animation: sparkleFloat 2s infinite ease-in-out;
    animation-delay: var(--delay);
    transform: translate(var(--x), var(--y));
}

@keyframes sparkleFloat {
    0%, 100% { 
        transform: translate(var(--x), var(--y)) scale(0.8) rotate(0deg);
        opacity: 0.7;
    }
    50% { 
        transform: translate(var(--x), calc(var(--y) - 20px)) scale(1.2) rotate(180deg);
        opacity: 1;
    }
}

.prize-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popupFadeIn 0.5s ease-out;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

.popup-content {
    background: white;
    border-radius: 24px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popupSlideUp 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.popup-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FFD700, #FF6B6B, #4ECDC4, #45B7D1);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes popupSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}