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

body {
    font-family: 'Noto Sans', sans-serif;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.main-title {
    font-family: 'Creepster', cursive;
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    color: #ff6b35;
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.screen.active {
    display: block;
}

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

.rules-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.rules-section h2 {
    color: #ff6b35;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.rules-content p {
    margin-bottom: 12px;
    line-height: 1.6;
}

.difficulty-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.difficulty-btn {
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 140px;
}

.difficulty-btn.easy {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.difficulty-btn.medium {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
}

.difficulty-btn.hard {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.difficulty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.game-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.lives, .timer {
    font-size: 1.2rem;
    font-weight: 600;
}

.admit-btn, .start-btn {
    display: block;
    margin: 20px auto;
    padding: 15px 30px;
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admit-btn:hover, .start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.4);
}

.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

.witch-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.witch-intro {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.chat-interface {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
}

.chat-messages {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.message {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 10px;
    animation: slideIn 0.3s ease;
}

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

.user-message {
    background: rgba(74, 144, 226, 0.3);
    margin-left: 20%;
}

.witch-message {
    background: rgba(155, 89, 182, 0.3);
    margin-right: 20%;
}

.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#message-input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

#message-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#send-message {
    padding: 12px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#send-message:hover {
    background: #45a049;
}

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

.give-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ff6b35, #f45b33);
    color: white;
    font-weight: 600;
}

.give-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

.game-result {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.final-stats {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.mode-selection {
    margin-bottom: 20px;
    text-align: center;
}

.mode-selection h3 {
    color: #ff6b35;
    margin-bottom: 15px;
}

.mode-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.mode-btn {
    padding: 10px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    background: transparent;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn.active {
    background: rgba(255, 107, 53, 0.3);
    border-color: #ff6b35;
}

.mode-btn:hover {
    border-color: #ff6b35;
}

.lobby-status {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin-bottom: 20px;
}

.players-list {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.player-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 10px;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.player-stats {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 600px) {
    .main-title {
        font-size: 2rem;
    }
    
    .difficulty-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .input-section {
        flex-direction: column;
    }
}