* {
    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;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #f0f0f0;
}

h1 {
    color: #333;
    font-size: 2.8em;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #4CAF50, #2196F3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitulo {
    color: #666;
    font-size: 1.2em;
    margin-bottom: 20px;
}

/* Menu */
.menu {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

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

.btn-jurado {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.btn-resultados {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
}

.btn-salir {
    background: linear-gradient(135deg, #ff9a9e, #fad0c4);
    color: white;
    padding: 10px 20px;
    font-size: 0.9em;
}

.btn-actualizar {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
}

.btn-eliminar {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
    padding: 5px 15px;
    font-size: 0.8em;
    border-radius: 20px;
}

/* Participantes Grid */
.participantes-grid, .votacion-grid, .admin-sections {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.participante-card, .participante-voto, .admin-sections section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.participante-card:hover, .participante-voto:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* Perfil Images */
.perfil-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #4CAF50;
    margin: 0 auto 20px;
    display: block;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.perfil-img-voto {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #2196F3;
    margin: 0 auto 20px;
    display: block;
}

.perfil-jurado-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f5576c;
    margin-right: 20px;
}

.perfil-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.perfil-item .perfil-img {
    width: 70px;
    height: 70px;
    margin: 0 15px 0 0;
}

.perfil-info {
    flex: 1;
}

/* Card contenido */
.card-contenido {
    text-align: center;
}

.card-contenido h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.descripcion {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.etapa {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
}

/* Login */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
}

.login-container h2 {
    margin-bottom: 30px;
    color: #333;
}

.login-container input {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.login-container input:focus {
    border-color: #4CAF50;
    outline: none;
}

.error {
    color: #f44336;
    margin: 10px 0;
    padding: 10px;
    background: #ffebee;
    border-radius: 5px;
}

/* Header jurado */
.header-jurado {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.jurado-info {
    display: flex;
    align-items: center;
}

.subtitulo-jurado {
    color: #666;
    margin-top: 5px;
}

.progreso-votos {
    margin-top: 10px;
}

.progreso-bar {
    width: 300px;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progreso-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 0.5s ease;
}

/* Formulario de voto */
.form-voto {
    margin-top: 20px;
}

.selector-voto {
    margin-bottom: 15px;
}

.select-voto {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1em;
    background: white;
    cursor: pointer;
}

.btn-votar {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-votar:hover {
    background: linear-gradient(135deg, #388E3C, #1B5E20);
}

/* Mensajes */
.mensaje, .mensaje-voto {
    padding: 15px;
    margin: 20px 0;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
}

.mensaje {
    background: #e8f5e9;
    color: #2E7D32;
    border: 2px solid #4CAF50;
}

.mensaje-voto {
    background: #fff3e0;
    color: #EF6C00;
    border: 2px solid #FF9800;
}

.completado {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-radius: 15px;
    margin: 30px 0;
}

.completado h2 {
    color: #4CAF50;
    margin-bottom: 15px;
}

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

.overlay-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: overlayShow 0.3s ease;
}

@keyframes overlayShow {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.overlay-content h3 {
    color: #4CAF50;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.btn-cerrar {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
}

.btn-cerrar:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}

/* Sin participantes */
.sin-participantes {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 15px;
    grid-column: 1 / -1;
}

.sin-participantes h2 {
    color: #666;
    margin-bottom: 15px;
}

/* Footer */
footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    text-align: center;
    color: #888;
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .menu {
        flex-direction: column;
        align-items: center;
    }
    
    .participantes-grid, .votacion-grid, .admin-sections {
        grid-template-columns: 1fr;
    }
    
    .header-jurado {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .progreso-bar {
        width: 100%;
    }
    
    .perfil-item {
        flex-direction: column;
        text-align: center;
    }
    
    .perfil-item .perfil-img {
        margin: 0 auto 15px;
    }
}