* {
    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;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 30px;
    font-size: 2.5em;
}

h2 {
    text-align: center;
    color: #667eea;
    margin-bottom: 20px;
}

h3 {
    color: #764ba2;
    margin-bottom: 15px;
}

.game-intro {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.game-intro p {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.game-intro ul {
    list-style-position: inside;
    color: #555;
    line-height: 1.8;
}

.input-group {
    margin-bottom: 20px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.input-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.room-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.room-id {
    font-size: 1.5em;
    font-weight: bold;
    color: #667eea;
    display: block;
    margin: 10px 0;
    letter-spacing: 2px;
}

.players-list {
    margin-bottom: 20px;
}

#playersList {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    min-height: 100px;
}

.player-item {
    background: white;
    padding: 10px 15px;
    margin: 8px 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.player-item.host::before {
    content: '👑 ';
    margin-right: 5px;
}

.game-status {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.word-display {
    margin-top: 15px;
}

.word-display h3 {
    font-size: 2em;
    color: #667eea;
    margin-top: 10px;
}

.phase {
    margin-bottom: 20px;
}

.descriptions-list {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.description-item {
    background: white;
    padding: 10px;
    margin: 8px 0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.description-item strong {
    color: #667eea;
}

.voting-list {
    display: grid;
    gap: 10px;
    margin: 20px 0;
}

.vote-btn {
    padding: 15px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    font-weight: bold;
    color: #667eea;
}

.vote-btn:hover {
    background: #667eea;
    color: white;
    transform: translateX(5px);
}

.vote-btn.selected {
    background: #667eea;
    color: white;
}

.status-text {
    text-align: center;
    color: #666;
    margin-top: 10px;
}

#resultContent {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.result-success {
    color: #28a745;
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}

.result-fail {
    color: #dc3545;
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}

.result-info {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-content h3 {
    text-align: center;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .button-group {
        flex-direction: column;
    }
}
