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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    text-align: center;
}

h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2.5em;
}

.score-board {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.score {
    display: flex;
    justify-content: space-around;
    font-weight: bold;
    color: #555;
    margin-bottom: 15px;
}

.score span {
    font-size: 1.1em;
}

.leaderboard-banner {
    background: #667eea;
    padding: 10px 15px;
    border-radius: 8px;
    height: 60px;
    position: relative;
    overflow: hidden;
}

.score-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.leaderboard-rolling {
    height: 40px;
    overflow: hidden;
    position: relative;
}

.leaderboard-track {
    display: flex;
    flex-direction: column;
    animation: roll 20s linear infinite;
    white-space: nowrap;
}

.leaderboard-track:hover {
    animation-play-state: paused;
}

.leaderboard-item-small {
    color: white;
    font-size: 0.9em;
    font-weight: bold;
    padding: 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-item-small .rank {
    color: rgba(255, 255, 255, 0.8);
    margin-right: 5px;
}

.leaderboard-item-small .name {
    margin-right: 5px;
}

.leaderboard-item-small .score {
    color: #ffd700;
}

@keyframes roll {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

.game-area {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.choices {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.choice-btn {
    padding: 15px 30px;
    font-size: 1.2em;
    border: none;
    border-radius: 15px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-weight: bold;
}

.choice-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

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

.result-area {
    margin-top: 20px;
}

.choice-display {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 20px;
}

.player-display, .computer-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.choice-icon {
    font-size: 5em;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.vs {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
}

.result-message {
    font-size: 1.5em;
    font-weight: bold;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
}

.result-message.win {
    background: #d4edda;
    color: #155724;
}

.result-message.lose {
    background: #f8d7da;
    color: #721c24;
}

.result-message.draw {
    background: #fff3cd;
    color: #856404;
}

@media (max-width: 600px) {
    h1 {
        font-size: 2em;
    }

    .choice-btn {
        padding: 12px 20px;
        font-size: 1em;
    }

    .choice-icon {
        font-size: 4em;
        width: 100px;
        height: 100px;
    }
}

/* 순위 스타일 */
.leaderboard-section {
    margin-top: 20px;
}

.leaderboard-btn {
    padding: 12px 30px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.leaderboard-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.leaderboard-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.leaderboard-modal.hidden {
    display: none;
}

.leaderboard-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.leaderboard-content h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
    text-align: center;
}

.player-name-input {
    margin: 20px 0;
    display: flex;
    gap: 10px;
}

#player-name {
    flex: 1;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

.save-btn {
    padding: 10px 20px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.save-btn:hover {
    background: #229954;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 20px 0;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.leaderboard-item.rank-1 {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.leaderboard-item.rank-2 {
    background: #e2e3e5;
    border-left-color: #6c757d;
}

.leaderboard-item.rank-3 {
    background: #f8d7da;
    border-left-color: #dc3545;
}

.leaderboard-rank {
    font-weight: bold;
    color: #667eea;
    min-width: 30px;
}

.leaderboard-name {
    flex: 1;
    margin-left: 10px;
    color: #333;
}

.leaderboard-score {
    font-weight: bold;
    color: #333;
    min-width: 60px;
    text-align: right;
}

.close-btn {
    width: 100%;
    padding: 12px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s;
}

.close-btn:hover {
    background: #7f8c8d;
}