* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.screen {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.title {
    font-size: 3em;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2em;
}

h3 {
    color: #444;
    margin-bottom: 15px;
}

h4 {
    color: #555;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.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.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

.icon {
    font-size: 1.3em;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
}

.room-code-display {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.room-code {
    display: block;
    font-size: 2.5em;
    font-weight: bold;
    letter-spacing: 5px;
    margin-top: 10px;
}

.players-section {
    margin-bottom: 20px;
}

#playersList,
#onlinePlayers {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.player-item {
    background: white;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.player-icon {
    font-size: 1.5em;
}

.player-name {
    flex: 1;
    font-weight: 600;
    color: #333;
}

.host-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.game-info {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.game-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.game-status {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

#hintText {
    margin-top: 10px;
    font-size: 1.1em;
}

.guess-history {
    margin-bottom: 20px;
}

#historyList {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    max-height: 250px;
    overflow-y: auto;
}

.history-item {
    background: white;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.history-player {
    font-weight: 600;
    color: #667eea;
}

.history-guess {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.history-result {
    font-size: 1.5em;
}

.guess-input {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.guess-input input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.1em;
}

.guess-input input:focus {
    outline: none;
    border-color: #667eea;
}

.players-online {
    margin-bottom: 20px;
}

.rules-content {
    margin-bottom: 30px;
}

.rule-item {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.rule-item h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.rule-item p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 8px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.modal-content p {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #555;
}

#winnerText {
    font-weight: bold;
    color: #667eea;
    font-size: 1.5em;
}

#answerText {
    color: #764ba2;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 25px;
    }

    .title {
        font-size: 2.5em;
    }

    .room-code {
        font-size: 2em;
        letter-spacing: 3px;
    }
}