:root {
    --primary-color: #1a237e;
    --secondary-color: #ffc400;
    --background: #f0f2f5;
    --dark-text: #2c3e50;
    --light-text: #6c757d;
    --font-family: 'Poppins', sans-serif;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    --wheel-size: 380px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--dark-text);
    overflow-x: hidden;
}

#confetti-canvas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 9999;
}

/* --- Recent Winners --- */
.recent-winners { background: var(--primary-color); padding: 0.5rem 0; overflow: hidden; }
.winners-slider-container { max-width: 1200px; margin: auto; }
#winners-slider .swiper-wrapper { transition-timing-function: linear !important; }
.winner-card {
    display: flex; align-items: center; gap: 10px; color: #fff;
    font-size: 0.9rem; background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px; border-radius: 50px; width: auto !important;
    white-space: nowrap;
}
.winner-card span { font-weight: 600; color: var(--secondary-color); }

/* --- Main Layout --- */
.container { max-width: 900px; margin: 0 auto; padding: 2rem 1rem; }
.page-header { text-align: center; margin-bottom: 2.5rem; }
.page-header h1 {
    font-size: 2.8rem; font-weight: 800; color: var(--primary-color);
    text-transform: uppercase; letter-spacing: 1px;
}
.page-header p { font-size: 1.1rem; color: var(--light-text); max-width: 500px; margin: 0.5rem auto 0; }

/* --- Wheel Section (REBUILT) --- */
.wheel-section { display: flex; justify-content: center; align-items: center; margin-bottom: 3rem; }
.wheel-container {
    position: relative;
    width: var(--wheel-size);
    height: var(--wheel-size);
    display: flex;
    justify-content: center;
    align-items: center;
}

.wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 25px solid #e74c3c;
    z-index: 10;
    filter: drop-shadow(0 -3px 3px rgba(0,0,0,0.2));
}

.wheel {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 8px solid white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1), inset 0 0 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 7s cubic-bezier(0.3, 1, 0.7, 1);
    /* Conic gradient will be applied by JavaScript */
}

.wheel-labels {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.prize-label {
    position: absolute;
    top: 50%; left: 50%;
    width: 50%; height: 2px; /* Lebar 50% dari roda */
    transform-origin: 0 0; /* Pivot di tengah roda */
    display: flex;
    align-items: center;
    justify-content: center;
}

.prize-label span {
    display: inline-block;
    font-weight: 400;
    font-size: 1rem;
    padding: 0 500px;
    transform: rotate(-10deg); /* Counter-rotate text to be upright */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.spin-btn {
    position: absolute;
    width: 90px; height: 90px;
    background: #fff;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-weight: 800; font-size: 1.5rem; text-transform: uppercase; color: var(--primary-color);
    cursor: pointer;
    border: 6px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 5;
    transition: transform 0.1s ease;
    user-select: none;
}
.spin-btn:active { transform: scale(0.95); }
.spin-btn:disabled { cursor: not-allowed; background-color: #e0e0e0; color: #9e9e9e; }

/* --- Testimonials & Pop-up --- */
.testimonials { text-align: center; margin-top: 3rem; }
.testimonials h2 { font-size: 2rem; margin-bottom: 2rem; color: var(--primary-color); }
#testimonial-slider { padding-bottom: 40px; }
.testimonial-card { background-color: #fff; padding: 1.5rem; border-radius: 15px; box-shadow: var(--shadow); height: auto; }
.quote { font-size: 1rem; color: var(--light-text); margin-bottom: 1rem; }
.author { font-weight: 600; color: var(--primary-color); }
.swiper-pagination-bullet-active { background-color: var(--primary-color) !important; }

.popup-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7); display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; z-index: 1000; }
.popup-container.show { opacity: 1; visibility: visible; }
.popup-content { background-color: #fff; padding: 2.5rem; border-radius: 15px; text-align: center; transform: scale(0.8); transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28); }
.popup-container.show .popup-content { transform: scale(1); }
.popup-content img { width: 80px; margin-bottom: 1rem; }
.popup-content h2 { font-size: 2rem; color: #2ecc71; }
.prize-amount { display: block; font-size: 2.5rem; font-weight: 800; color: var(--dark-text); margin: 1rem 0; }
.redeem-btn { text-decoration: none; display: inline-block; background-color: #2ecc71; color: #fff; padding: 12px 30px; border-radius: 8px; font-weight: 600; font-size: 1.1rem; border: none; cursor: pointer; transition: background-color 0.2s, transform 0.1s; }
.redeem-btn:hover { background-color: #27ae60; }
.redeem-btn:active { transform: scale(0.98); }

/* --- Responsive --- */
@media (max-width: 768px) {
    :root { --wheel-size: 320px; }
    .page-header h1 { font-size: 2.2rem; }
    .prize-label span { font-size: 1rem; }
}
@media (max-width: 480px) {
    :root { --wheel-size: 280px; }
    .page-header h1 { font-size: 1.8rem; }
    .prize-label span { font-size: 0.9rem; }
    .spin-btn { width: 80px; height: 80px; font-size: 1.3rem; }
}