/* ============================================
   EL IMPOSTOR - Estilos Limpios y Corregidos
   ============================================ */

:root {
    --primary: #FF6B6B;
    --secondary: #4ECDC4;
    --accent: #FFE66D;
    --success: #00B894;
    --danger: #E74C3C;
    --text-dark: #2D3436;
    --text-light: #636E72;
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
}

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

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

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

/* HEADER */
.header {
    text-align: center;
    padding: 20px 0 30px 0;
    margin-bottom: 10px;
}

.logo {
    font-size: 4rem;
    margin-bottom: 10px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2));
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.title {
    font-size: 2rem;
    font-weight: 800;
    color: #FFE66D;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,0.9);
}

/* CARDS */
.card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title span {
    font-size: 1.4rem;
}

/* CATEGORY SELECTOR - AHORA CON FONDO CLARO */
.category-selector {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.category-selector label {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1rem;
}

.category-selector select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 2px solid #E0E0E0;
    background-color: var(--bg-white);
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

.category-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.category-selector select option {
    background-color: var(--bg-white);
    color: var(--text-dark);
    font-size: 1rem;
    padding: 10px;
}

/* FORMS */
.form-group {
    margin-bottom: 15px;
}

.label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 2px solid #E8E8E8;
    background: var(--bg-white);
    color: var(--text-dark);
    font-size: 1rem;
    transition: all 0.2s;
}

.input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(78,205,196,0.2);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border-radius: 50px;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #FF6B6B, #FF8E8E);
    color: white;
    box-shadow: 0 4px 15px rgba(255,107,107,0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,107,0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, #4ECDC4, #6EE7DE);
    color: white;
    box-shadow: 0 4px 15px rgba(78,205,196,0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78,205,196,0.5);
}

/* PLAYERS LIST */
.players-list {
    margin-top: 15px;
}

.player-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: 12px;
    margin-bottom: 8px;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.player-item:hover {
    border-color: var(--secondary);
    transform: translateX(3px);
}

.player-avatar {
    font-size: 2rem;
    line-height: 1;
}

.player-name {
    flex: 1;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
}

/* GAME CARD 3D */
.game-card {
    width: 240px;
    height: 320px;
    margin: 20px auto;
    perspective: 1000px;
    cursor: pointer;
}

.game-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.game-card.flipped .game-card-inner {
    transform: rotateY(180deg);
}

.game-card-front,
.game-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.game-card-front {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.game-card-back {
    background: linear-gradient(135deg, #00B894, #4ECDC4);
    transform: rotateY(180deg);
    color: white;
}

.game-card-back.impostor {
    background: linear-gradient(135deg, #E74C3C, #FF6B6B);
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.card-text {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    color: white;
}

.secret-word {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    text-align: center;
    margin: 10px 0;
}

/* INSTRUCTIONS */
.instructions {
    background: #FFF9E6;
    border-radius: 12px;
    padding: 15px;
    border: 2px dashed #FFD93D;
}

.instructions-title {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

.instructions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.instructions li {
    padding: 8px 0 8px 28px;
    position: relative;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.instructions li::before {
    content: '✨';
    position: absolute;
    left: 0;
    font-size: 1.1rem;
}

/* REVEAL PAGE */
.reveal-section {
    background: #FFFFFF;
    border: 4px solid #E74C3C;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.reveal-section h2 {
    color: #C0392B;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.reveal-impostor {
    font-size: 4rem;
    margin: 15px 0;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.reveal-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: #C0392B;
}

.secret-word-section {
    background: #FFFFFF;
    border: 4px solid #00B894;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.secret-word-section h3 {
    color: #00A885;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.big-word {
    font-size: 2rem;
    font-weight: 800;
    color: #00A885;
}

/* UTILITIES */
.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .logo {
        font-size: 3.5rem;
    }
    
    .game-card {
        width: 220px;
        height: 300px;
    }
    
    .card {
        padding: 15px;
    }
    
    .category-selector {
        padding: 16px;
    }
}
