@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #D60C3E;
    --secondary-color: #1F1F44;
    --gold-color: #FFD700;
    --background-color: #f0f2f5;
    --surface-color: #FFFFFF;
    --border-color: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #6c757d;
}

body {
    background-color: var(--secondary-color);
    background-image: radial-gradient(circle at top right, #3a3a78, var(--secondary-color) 60%);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
    overflow-x: hidden;
}
.main-container {
    background-color: var(--surface-color);
    padding: clamp(2rem, 5vw, 4rem);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 900px;
    width: 100%;
    border-top: 6px solid var(--primary-color);
}
.page-title {
    color: var(--secondary-color);
    font-weight: 700;
}

.event-card-link { text-decoration: none; }
.event-card { background-color: #fff; border: 1px solid var(--border-color); border-radius: 1rem; padding: 2.5rem 2rem; text-align: center; cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1); }
.event-card:hover { transform: translateY(-10px); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1); }
.event-card i { font-size: 4.5rem; color: var(--primary-color); margin-bottom: 1rem; display: block; transition: transform 0.3s ease; }
.event-card:hover i { transform: scale(1.1); }
.event-card h3 { color: var(--text-primary); font-weight: 600; }

.btn-primary { background-color: var(--primary-color); border-color: var(--primary-color); font-weight: 600; padding: 0.8rem 1.5rem; letter-spacing: 0.5px; color: #fff !important; transition: all 0.3s ease; }
.btn-primary:hover, .btn-primary:focus { background-color: #b00a33; border-color: #a0092e; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(214, 12, 62, 0.3); }

/* Added Styles For Login Button Consistency */
.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}
.btn-outline-primary:hover, .btn-outline-primary:focus {
    color: #fff !important;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(214, 12, 62, 0.3);
}
/* End of Added Styles */

.form-control:focus { border-color: var(--primary-color); box-shadow: 0 0 0 0.25rem rgba(214, 12, 62, 0.25); }

.wheel-container { position: relative; width: 100%; max-width: 400px; aspect-ratio: 1 / 1; margin: 0 auto 2rem auto; }
.wheel-pointer { font-size: 3.5rem; color: var(--primary-color); position: absolute; top: -25px; left: 50%; transform: translateX(-50%); z-index: 10; text-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.wheel-base-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
#spin-wheel-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 5; }

.box-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
    margin-bottom: 1rem;
    margin-top: 0;
    perspective: 800px;
}
.gift-box {
    position: relative;
    width: 160px;
    height: 120px;
    background-color: var(--secondary-color);
    border-radius: 5px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.3s ease;
}
.gift-box:hover {
    transform: scale(1.05);
}
.gift-box::before, .gift-box::after {
    content: '';
    position: absolute;
    background-color: #4a4a88;
}
.gift-box::before {
    width: 25px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
}
.gift-box::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 25px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background-color: #4a4a88;
}
.gift-lid {
    position: absolute;
    width: 170px;
    height: 30px;
    background-color: var(--secondary-color);
    border-radius: 5px;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    transform-origin: bottom; 
    z-index: 10;
    transition: transform 1s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.gift-lid::before { 
    content: '';
    position: absolute;
    width: 25px;
    height: 100%;
    background-color: #4a4a88;
    left: 50%;
    transform: translateX(-50%);
}
.gift-box.open::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--gold-color) 0%, transparent 60%);
    transform: translate(-50%, -80%);
    opacity: 0;
    animation: glow 1.5s ease-out forwards;
    animation-delay: 0.3s;
}

.gift-box.open {
    animation: shakeSimple 0.5s ease-in-out;
}
.gift-box.open .gift-lid {
    transform: translateY(-50px) translateX(-50%) rotateX(-120deg); /* Tutup terbuka ke belakang (efek 3D) */
}
@keyframes shakeSimple {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px) rotate(-3deg); }
    75% { transform: translateX(10px) rotate(3deg); }
}
@keyframes glow {
    0% { opacity: 0; transform: translate(-50%, -80%) scale(0); }
    50% { opacity: 0.7; transform: translate(-50%, -80%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -80%) scale(1.5); }
}
.swal2-footer { border-top: 0; padding-top: 10px !important; }
.swal2-footer .btn { display: inline-flex; align-items: center; margin: 0 5px; }
.swal2-footer .btn i { margin-right: 5px; }