* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f0f8ff;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#app {
    width: 90%;
    max-width: 800px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.screen {
    padding: 2rem;
    text-align: center;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hidden {
    display: none !important;
}

h1 {
    font-size: 3rem;
    color: #4a67d8;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

h2 {
    font-size: 2rem;
    color: #4a67d8;
    margin-bottom: 1.5rem;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 80%;
    margin: 0 auto;
}

button {
    background-color: #4a67d8;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

button:hover {
    background-color: #3a57c8;
    transform: translateY(-2px);
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.players-list {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
}

.player-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #f0f0f0;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.player-name {
    font-weight: bold;
}

.lobby-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
}

#ai-players-count {
    width: 60px;
    padding: 0.5rem;
    margin-left: 0.5rem;
}

.game-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

#game-status {
    font-size: 1.2rem;
    font-weight: bold;
    color: #4a67d8;
}

#simon-instructions {
    font-size: 1.5rem;
    margin: 1rem 0;
    min-height: 60px;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 10px;
}

#players-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 1rem 0;
}

.player-game-card {
    padding: 1rem;
    border-radius: 10px;
    background-color: #f0f0f0;
    text-align: center;
    width: 100px;
}

.player-game-card.simon {
    background-color: #ffd700;
}

.player-game-card.eliminated {
    background-color: #ffcccc;
    opacity: 0.7;
}

.player-game-card.completed {
    background-color: #ccffcc;
}

#simon-controls, #player-controls {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
    justify-content: center;
}

#simon-command {
    padding: 0.5rem;
    width: 100%;
    max-width: 300px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

#leave-game-btn {
    background-color: #e74c3c;
    margin-top: 1rem;
}

#leave-game-btn:hover {
    background-color: #c0392b;
}

.leaderboard-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.tab-btn {
    background-color: #f0f0f0;
    color: #333;
    padding: 0.5rem 1rem;
}

.tab-btn.active {
    background-color: #4a67d8;
    color: white;
}

#leaderboard-content {
    margin: 1rem 0;
    max-height: 300px;
    overflow-y: auto;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #eee;
}

.leaderboard-entry:nth-child(even) {
    background-color: #f9f9f9;
}

#achievements-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
    max-height: 300px;
    overflow-y: auto;
}

.achievement-card {
    padding: 1rem;
    border-radius: 10px;
    background-color: #f0f0f0;
    text-align: center;
}

.achievement-card.unlocked {
    background-color: #ffd700;
}

.achievement-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.achievement-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

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

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.recording-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.recording-dot {
    width: 20px;
    height: 20px;
    background-color: #e74c3c;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

.recording-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

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

.waiting-message {
    font-style: italic;
    color: #777;
    margin: 1rem 0;
}

