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

body {
    font-family: 'Outfit', sans-serif;
    color: #fff;
    overflow-x: hidden;
    background-color: #11001c;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    opacity: 0.5;
}

.main-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 1;
}

.header-text {
    font-weight: 800;
    font-size: 1.2rem;
    text-transform: uppercase;
    text-align: center;
    background: linear-gradient(90deg, #ffd700, #ffaa00, #ffd700);
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.main-image-box {
    position: relative;
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    border: 4px solid #d500f9;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 30px rgba(213, 0, 249, 0.6);
    overflow: hidden;
    background: #11001c;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px; /* In case image is missing */
    z-index: 2;
}

#promo-img {
    width: 100%;
    display: block;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

/* Message when image is missing to help user */
.img-placeholder-text {
    position: absolute;
    text-align: center;
    color: #ff00ff;
    font-size: 0.9rem;
    padding: 20px;
    z-index: 0;
    line-height: 1.5;
}

.win-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 0, 28, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    z-index: 10;
}

.win-overlay.show {
    opacity: 1;
}

.win-text {
    font-size: 2rem;
    font-weight: 900;
    color: #ff00ff;
    text-shadow: 0 0 20px #ff00ff, 0 0 40px #d500f9;
    text-align: center;
    transform: scale(0.5);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.win-overlay.show .win-text {
    transform: scale(1);
    animation: winPulse 1s infinite alternate;
}

@keyframes winPulse {
    from { transform: scale(1); text-shadow: 0 0 20px #ff00ff; }
    to { transform: scale(1.1); text-shadow: 0 0 40px #ff00ff, 0 0 60px #d500f9; }
}

.spin-btn {
    background: linear-gradient(to bottom, #d500f9, #7b1fa2);
    color: #ffd700;
    border: none;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 800;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(123, 31, 162, 0.5), inset 0 2px 5px rgba(255,255,255,0.5);
    text-transform: uppercase;
    transition: all 0.2s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
    border: 2px solid #ff00ff;
}

.spin-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.spin-btn:active {
    transform: translateY(5px);
    box-shadow: 0 5px 10px rgba(123, 31, 162, 0.5), inset 0 2px 5px rgba(255,255,255,0.5);
}

.spin-btn:disabled {
    background: #3b0a45;
    border-color: #4a0e4e;
    box-shadow: none;
    cursor: not-allowed;
    color: #888;
}

.spin-btn:disabled::after {
    display: none;
}

/* Popup Modal */
.popup-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.popup-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.popup-content {
    background: linear-gradient(135deg, #2a0845, #4a0e4e);
    border: 2px solid #ff00ff;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 0 40px rgba(255, 0, 255, 0.4);
    transform: scale(0.8) translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup-modal.show .popup-content {
    transform: scale(1) translateY(0);
}

.warning-header {
    font-size: 1.2rem;
    font-weight: 800;
    color: #ff00ff;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

.desc-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #f0c8ff;
    margin-bottom: 20px;
}

.timer-container {
    background: #11001c;
    border: 1px solid #ff00ff;
    padding: 10px;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 20px;
    box-shadow: inset 0 0 10px rgba(255, 0, 255, 0.2);
}

.timer {
    font-family: 'Share Tech Mono', monospace;
    font-size: 2.5rem;
    color: #d500f9;
    text-shadow: 0 0 15px rgba(213, 0, 249, 0.6);
}

.daftar-btn {
    display: block;
    background: linear-gradient(to right, #b026ff, #ff00ff);
    color: white;
    text-decoration: none;
    padding: 15px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 5px 20px rgba(213, 0, 249, 0.5);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #ff99ff;
}

.daftar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(213, 0, 249, 0.7);
}
