:root {
    --primary: #6C5CE7;
    --primary-dark: #5849c7;
    --secondary: #00B894;
    --danger: #FF7675;
    --warning: #FDCB6E;
    --dark: #2D3436;
    --light: #DFE6E9;
    --white: #FFFFFF;
    --gray: #636E72;
    --bg: #0F1419;
    --card-bg: #1A1F29;
    --border: #2D3748;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--bg) 0%, #1a1a2e 100%);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
    padding: 1rem;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
}

.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);
    }
}

.title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    text-shadow: 0 0 40px rgba(108, 92, 231, 0.3);
}

.screen-title {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    color: var(--white);
}

.card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

.reveal-card,
.results-card {
    text-align: center;
    padding: 3rem 2rem;
}

.chat-card {
    padding: 1rem;
    height: 60vh;
    display: flex;
    flex-direction: column;
}

.message-stats {
    background: var(--bg);
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
    max-height: 150px;
    overflow-y: auto;
}

.message-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    font-size: 0.85rem;
    color: var(--light);
}

.message-count {
    color: var(--primary);
    font-weight: 600;
}

h2 {
    margin-bottom: 1.5rem;
    color: var(--white);
    font-size: 1.5rem;
    text-align: center;
}

.info-text {
    color: var(--light);
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

input[type="text"] {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    width: 100%;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(108, 92, 231, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #00a080);
    color: var(--white);
    width: 100%;
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 184, 148, 0.4);
}

.btn-secondary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-restart {
    background: var(--danger);
    color: var(--white);
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(255, 118, 117, 0.3);
}

.btn-restart:hover {
    background: #e74c3c;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 118, 117, 0.5);
}

.btn-icon {
    background: var(--primary);
    color: var(--white);
    padding: 0.8rem 1.2rem;
    min-width: 50px;
}

.full-width {
    width: 100%;
}

.players-list {
    margin: 1.5rem 0;
}

.player-item {
    background: var(--bg);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid var(--border);
}

.player-name {
    font-weight: 600;
    color: var(--white);
}

.player-status {
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    background: var(--border);
    color: var(--light);
}

.player-status.ready {
    background: var(--secondary);
    color: var(--white);
}

.player-status.disconnected {
    background: var(--danger);
    color: var(--white);
}

.waiting-status {
    text-align: center;
    padding: 2rem;
    color: var(--light);
    font-size: 1.1rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding: 0.5rem;
}

.chat-message {
    background: var(--bg);
    padding: 0.8rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--primary);
}

.message-author {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.message-text {
    color: var(--light);
    font-size: 0.95rem;
    word-wrap: break-word;
}

.chat-input-container {
    display: flex;
    gap: 0.5rem;
}

.chat-input-container input {
    margin-bottom: 0;
    flex: 1;
}

.voting-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin: 1.5rem 0;
}

.vote-option {
    background: var(--bg);
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    color: var(--white);
    font-weight: 500;
}

.vote-option:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}

.vote-option.selected {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.3);
}

.voting-status {
    text-align: center;
    margin-top: 1rem;
    color: var(--light);
    font-size: 0.9rem;
}

.tie-warning {
    background: var(--warning);
    color: var(--dark);
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    font-weight: 600;
    text-align: center;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.reveal-word {
    font-size: 3rem;
    font-weight: 800;
    margin: 2rem 0;
    color: var(--secondary);
    text-shadow: 0 0 20px rgba(0, 184, 148, 0.5);
}

.reveal-impostor {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 2rem 0;
    color: var(--danger);
    text-shadow: 0 0 20px rgba(255, 118, 117, 0.5);
}

.results-content {
    margin-bottom: 2rem;
}

.result-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.result-title.win {
    color: var(--secondary);
}

.result-title.lose {
    color: var(--danger);
}

.results-list {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    text-align: left;
}

.result-item {
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    background: var(--card-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-item.impostor {
    border: 2px solid var(--danger);
    background: rgba(255, 118, 117, 0.1);
}

.result-item.accused {
    border: 2px solid var(--warning);
    background: rgba(253, 203, 110, 0.1);
}

.result-votes {
    font-weight: 600;
    color: var(--primary);
}

/* Scrollbar personalizado */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--bg);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .reveal-word {
        font-size: 2.2rem;
    }
    
    .reveal-impostor {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .card {
        padding: 1rem;
    }
}
