/* Lottery Page Styles */
.lottery-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    /* Glass effect base */
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    text-align: center;
}

.lottery-machine {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 2rem 0;
    perspective: 1000px;
    min-height: 100px;
    /* Space for balls */
}

/* Base Ball Style */
.lottery-ball {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 30% 30%, #ffd700, #fdb931);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    box-shadow:
        inset -5px -5px 10px rgba(0, 0, 0, 0.3),
        inset 5px 5px 10px rgba(255, 255, 255, 0.5),
        0 10px 20px rgba(0, 0, 0, 0.3);
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    position: relative;
    border: 2px solid #fff;
}

/* Animation State */
.lottery-ball.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.lottery-ball.rolling {
    animation: rollIn 0.6s ease-out forwards;
}

@keyframes rollIn {
    0% {
        transform: translateY(-50px) rotateX(360deg) scale(0.5);
        opacity: 0;
    }

    60% {
        transform: translateY(10px) rotateX(-20deg) scale(1.1);
        opacity: 1;
    }

    100% {
        transform: translateY(0) rotateX(0) scale(1);
    }
}

/* Number Ranges Colors (Taiwan Lottery Style) */
/* 01-10: Yellow, 11-20: Blue, 21-30: Red, 31-40: Green, 41-49: Purple - Just varied for aesthetics */
.lottery-ball[data-number^="0"] {
    background: radial-gradient(circle at 30% 30%, #ffd700, #fdb931);
    color: #333;
}

.lottery-ball[data-number^="1"] {
    background: radial-gradient(circle at 30% 30%, #4facfe, #00f2fe);
    color: #fff;
}

.lottery-ball[data-number^="2"] {
    background: radial-gradient(circle at 30% 30%, #ff5858, #f09819);
    color: #fff;
}

.lottery-ball[data-number^="3"] {
    background: radial-gradient(circle at 30% 30%, #43e97b, #38f9d7);
    color: #333;
}

.lottery-ball[data-number^="4"] {
    background: radial-gradient(circle at 30% 30%, #cd93ff, #8a2be2);
    color: #fff;
}

.timer-section {
    margin-top: 2rem;
    font-family: 'Monaco', monospace;
    color: var(--text-secondary);
}

.next-draw-timer {
    font-size: 1.2rem;
    margin-top: 0.5rem;
    color: var(--primary-color);
    font-weight: bold;
}

.predict-btn {
    margin-top: 1rem;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.predict-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.predict-btn:active {
    transform: translateY(1px);
}

.predict-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: linear-gradient(135deg, #a0a0a0 0%, #808080 100%);
}

.message-box {
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 600px) {
    .lottery-ball {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}