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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    max-width: 800px;
    width: 90%;
    margin: 20px;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
}

.main-content {
    margin-bottom: 2rem;
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.selector-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.selector-group label {
    font-weight: 600;
    color: #555;
}

.number-select {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.number-select:hover {
    border-color: #667eea;
}

.number-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.generate-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.generate-btn:active {
    transform: translateY(0);
}

.generate-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-spinner {
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.info-text {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    font-style: italic;
}

.numbers-container {
    display: flex;
    justify-content: center;
    min-height: 120px;
    align-items: center;
}

.numbers-display {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.lottery-ball {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    position: relative;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    animation: ballAppear 0.6s ease-out;
    transition: transform 0.3s ease;
}

.lottery-ball:hover {
    transform: translateY(-5px) scale(1.05);
}

.lottery-ball::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 20%;
    width: 30%;
    height: 30%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    filter: blur(8px);
}

.lottery-ball::after {
    content: '';
    position: absolute;
    top: 5%;
    left: 15%;
    width: 20%;
    height: 20%;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    filter: blur(4px);
}

@keyframes ballAppear {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

/* Color schemes for different number ranges */
.lottery-ball.range-1-10 {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
}

.lottery-ball.range-11-20 {
    background: linear-gradient(135deg, #4ECDC4, #44A08D);
}

.lottery-ball.range-21-30 {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.lottery-ball.range-31-40 {
    background: linear-gradient(135deg, #F093FB, #F5576C);
}

.lottery-ball.range-41-49 {
    background: linear-gradient(135deg, #FA709A, #FEE140);
}

.footer {
    text-align: center;
    color: #666;
    font-size: 0.85rem;
    border-top: 1px solid #e0e0e0;
    padding-top: 1.5rem;
}

.home-button-container {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.home-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    background: linear-gradient(45deg, #764ba2, #667eea);
}

.home-button svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Responsive design */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem;
        margin: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .lottery-ball {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }
    
    .numbers-display {
        gap: 0.75rem;
    }
    
    .controls {
        gap: 1rem;
    }
}

@media (max-width: 400px) {
    .lottery-ball {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .numbers-display {
        gap: 0.5rem;
    }
}
