* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f0f0;
    color: #333;
    line-height: 1.6;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.header {
    background-color: #003399;
    color: white;
    text-align: center;
    padding: 15px 0;
    margin-bottom: 20px;
}

.title {
    font-size: 24px;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 14px;
    font-style: italic;
}

.container {
    width: 95%;
    max-width: 500px;
    margin: 0 auto;
    padding: 15px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.logo {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    color: #e91e63;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.drawing-machine {
    position: relative;
    height: 180px;
    background-color: #f9f9f9;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    border: 2px solid #ddd;
}

.ball-container {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.ball {
    position: absolute;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    box-shadow: inset -2px -2px 5px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    font-size: 14px;
}

.tube {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 35px;
    background-color: #ccc;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
}

.motor {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 15px;
    background-color: #999;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.air-effect {
    position: absolute;
    bottom: 35px;
    width: 100%;
    height: 20px;
    z-index: 1;
}

.air-effect span {
    position: absolute;
    bottom: 0;
    width: 2px;
    background-color: rgba(255, 255, 255, 0.7);
    animation: air 1s infinite;
}

@keyframes air {
    0% {
        height: 0;
        opacity: 0.7;
    }
    50% {
        height: 15px;
        opacity: 0.5;
    }
    100% {
        height: 0;
        opacity: 0.7;
    }
}

.status {
    text-align: center;
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: bold;
    color: #666;
    min-height: 40px;
}

.results {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    min-height: 50px;
    flex-wrap: wrap;
}

.result-ball {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 18px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
    animation: popIn 0.5s ease-out;
    margin-bottom: 5px;
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    70% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn {
    padding: 12px 20px;
    font-size: 16px;
    background-color: #e91e63;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    -webkit-appearance: none;
    touch-action: manipulation;
    min-width: 120px;
}

.btn:hover {
    background-color: #c2185b;
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 로또 번호 색상 */
.ball-1, .result-ball-1 { background-color: #ffc107; }  /* 노랑 (1-10) */
.ball-2, .result-ball-2 { background-color: #2196f3; }  /* 파랑 (11-20) */
.ball-3, .result-ball-3 { background-color: #f44336; }  /* 빨강 (21-30) */
.ball-4, .result-ball-4 { background-color: #9c27b0; }  /* 보라 (31-40) */
.ball-5, .result-ball-5 { background-color: #4caf50; }  /* 초록 (41-45) */

/* 모바일 최적화 */
@media (max-width: 480px) {
    .title {
        font-size: 20px;
    }
    
    .subtitle {
        font-size: 12px;
    }
    
    .container {
        width: 100%;
        padding: 10px;
        border-radius: 0;
    }
    
    .ball {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .result-ball {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 14px;
        min-width: 100px;
    }
}