/* 기본 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.5s ease;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* 화면 전환 */
.screen {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.screen.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* 시작 화면 */
#start-screen .content {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.title {
    font-size: 3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

.start-form {
    margin-bottom: 20px;
}

#player-name {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

#player-name:focus {
    outline: none;
    border-color: #667eea;
}

/* 버튼 스타일 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 5px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(240, 147, 251, 0.3);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

/* 게임 화면 */
#game-screen {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.progress-info, .score-info {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

.question-container {
    margin-bottom: 30px;
}

.question-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#question-text {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.6;
    font-weight: 500;
}

.answer-input {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

#answer-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
}

#answer-input:focus {
    outline: none;
    border-color: #667eea;
}

.game-controls {
    text-align: center;
}

/* 결과 화면 */
#result-screen .content {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.result-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 30px;
}

.result-info {
    margin-bottom: 40px;
}

.score-display {
    margin-bottom: 30px;
}

.score-number {
    font-size: 4rem;
    font-weight: 700;
    color: #667eea;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.score-label {
    font-size: 1.5rem;
    color: #666;
    margin-left: 10px;
}

.level-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 20px;
}

.character {
    font-size: 4rem;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.level-info h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 5px;
}

.level-info p {
    color: #666;
    font-size: 1rem;
}

.result-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 오늘의 리더보드 섹션 */
.today-leaderboard-section {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.leaderboard-subtitle {
    font-size: 1.3rem;
    color: #333;
    text-align: center;
    margin-bottom: 15px;
    font-weight: 600;
}

.my-rank-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 25px;
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.rank-badge {
    font-size: 1.2rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.rank-text {
    font-size: 1rem;
    font-weight: 500;
}

.today-leaderboard-list {
    max-height: 200px;
    overflow-y: auto;
    border-radius: 10px;
    background: white;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.today-leaderboard-list .leaderboard-item {
    margin-bottom: 5px;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 0.9rem;
}

.today-leaderboard-list .leaderboard-item.current-player {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.today-leaderboard-list .leaderboard-item.current-player .rank,
.today-leaderboard-list .leaderboard-item.current-player .player-name,
.today-leaderboard-list .leaderboard-item.current-player .player-score {
    color: white;
}

/* 리더보드 화면 */
#leaderboard-screen .content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.leaderboard-title {
    font-size: 2.5rem;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

.date-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.date-btn {
    padding: 8px 16px;
    border: 2px solid #e1e5e9;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.date-btn.active,
.date-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.leaderboard-list {
    margin-bottom: 30px;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.rank {
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
    min-width: 40px;
}

.player-info {
    flex: 1;
    text-align: left;
    margin-left: 15px;
}

.player-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}

.player-score {
    font-size: 0.9rem;
    color: #666;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .result-title,
    .leaderboard-title {
        font-size: 2rem;
    }
    
    .score-number {
        font-size: 3rem;
    }
    
    .character {
        font-size: 3rem;
    }
    
    .answer-input {
        flex-direction: column;
    }
    
    #answer-input {
        min-width: auto;
    }
    
    .game-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .level-display {
        flex-direction: column;
        text-align: center;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .today-leaderboard-section {
        margin: 20px 0;
        padding: 15px;
    }
    
    .leaderboard-subtitle {
        font-size: 1.1rem;
    }
    
    .my-rank-info {
        padding: 8px 15px;
    }
    
    .rank-badge {
        font-size: 1rem;
        padding: 4px 10px;
    }
    
    .rank-text {
        font-size: 0.9rem;
    }
    
    .today-leaderboard-list {
        max-height: 150px;
    }
    
    .today-leaderboard-list .leaderboard-item {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }
    
    .question-card {
        padding: 20px;
    }
    
    #question-text {
        font-size: 1.2rem;
    }
    
    .date-selector {
        flex-direction: column;
        align-items: center;
    }
    
    .date-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.screen.active {
    animation: fadeInUp 0.5s ease;
}

/* 배경 그래디언트 변화 */
body.question-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
body.question-2 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
body.question-3 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
body.question-4 { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
body.question-5 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
body.question-6 { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }
body.question-7 { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); }
body.question-8 { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }
body.question-9 { background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%); }
body.question-10 { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); } 