:root {
    --primary: #4a90e2;
    --primary-hover: #357abd;
    --secondary: #f3f4f6;
    --accent: #e74c3c;
    --text: #333;
    --bg: #f0f2f5;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

#app {
    width: 100%;
    max-width: 500px;
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.screen {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
}

h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

input {
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 0.5rem;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

input:focus {
    border-color: var(--primary);
}

button {
    padding: 0.8rem;
    border: none;
    border-radius: 0.5rem;
    background-color: var(--primary);
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

button:hover {
    background-color: var(--primary-hover);
}

button:active {
    transform: scale(0.98);
}

button.secondary {
    background-color: #95a5a6;
}

.divider {
    font-size: 0.9rem;
    color: #888;
    position: relative;
    margin: 0.5rem 0;
}

#status-msg {
    font-size: 0.9rem;
    min-height: 1.2rem;
}

#ranking-container {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    text-align: left;
}

#ranking-container h2 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

#ranking-list {
    font-size: 0.9rem;
}

.player-list-container {
    background: var(--secondary);
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: left;
}

#player-list {
    list-style: none;
    margin-top: 0.5rem;
}

#player-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #ddd;
}

#player-list li:last-child {
    border-bottom: none;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--secondary);
}

#game-area {
    position: relative;
    height: 300px;
    background: #f9f9f9;
    border: 2px dashed #ccc;
    border-radius: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    cursor: pointer;
}

#target {
    width: 100px;
    height: 100px;
    background-color: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.2rem;
    user-select: none;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

#game-status-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #666;
}

#game-scores {
    font-size: 0.9rem;
    display: flex;
    gap: 10px;
}

#final-rankings {
    margin: 1.5rem 0;
    text-align: left;
}

.rank-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem;
    background: var(--secondary);
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
}

.rank-item.winner {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    font-weight: bold;
}

/* Mobile responsive */
@media (max-width: 480px) {
    #app {
        padding: 1.5rem;
        max-width: 100%;
        height: 100%;
        border-radius: 0;
    }
}
