/* Base and Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background: linear-gradient(135deg, #f6f8fd 0%, #f1f5f9 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

/* Container with Glassmorphism */
.container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 28px;
    padding: 40px 30px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0,0,0,0.05);
    text-align: center;
}

.header-image {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 16px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border: 4px solid rgba(255, 255, 255, 0.9);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

header h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #ff6a88 0%, #ff99ac 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

header p {
    font-size: 15px;
    color: #718096;
    margin-bottom: 40px;
    font-weight: 500;
}

/* Lotto Balls */
.lotto-ball-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
    min-height: 65px; /* To prevent layout shift */
    align-items: center;
}

.placeholder {
    color: #a0aec0;
    font-size: 15px;
    font-weight: 500;
}

.ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    font-weight: 800;
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), inset 0 -4px 6px rgba(0,0,0,0.1), inset 0 4px 6px rgba(255,255,255,0.4);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Colors for balls based on standard Korean Lotto colors */
/* 1-10: Yellow */
.ball.color-1 { background: linear-gradient(135deg, #ffd700, #ffb300); }
/* 11-20: Blue */
.ball.color-2 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
/* 21-30: Red */
.ball.color-3 { background: linear-gradient(135deg, #ff758c, #ff7eb3); }
/* 31-40: Gray/Black */
.ball.color-4 { background: linear-gradient(135deg, #a1aab3, #718096); }
/* 41-45: Green */
.ball.color-5 { background: linear-gradient(135deg, #43e97b, #38f9d7); color: #2d3748; }

@keyframes popIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Button */
.generate-btn {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 32px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 16px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 20px -5px rgba(118, 75, 162, 0.4);
    width: 100%;
    font-family: inherit;
    letter-spacing: -0.5px;
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -5px rgba(118, 75, 162, 0.5);
}

.generate-btn:active {
    transform: translateY(1px);
    box-shadow: 0 5px 10px -5px rgba(118, 75, 162, 0.4);
}

/* Mobile adjustments */
@media (max-width: 400px) {
    .ball {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    .container {
        padding: 30px 20px;
    }
}
