* {
    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: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.logo {
    max-width: 40%;
    height: auto;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.3));
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

/* Pestañas */
.tabs {
    display: flex;
    background: #f5f5f5;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.tab-btn:hover {
    background: #e8e8e8;
}

.tab-btn.active {
    background: white;
    border-bottom: 3px solid #667eea;
    color: #667eea;
}

/* Contenido de pestañas */
.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.section {
    margin-bottom: 30px;
}

.section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* Formularios */
.form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

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

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

/* Switch/Toggle Slider */
.switch-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.switch-text {
    font-weight: 600;
    color: #555;
    font-size: 1em;
}

/* Switch Container */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

/* Hide default checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
}

/* Rounded slider */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* When checkbox is checked */
input:checked + .slider {
    background-color: #667eea;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

input:focus + .slider {
    box-shadow: 0 0 1px #667eea;
}

/* Mensaje de éxito */
.mensaje-agregado {
    background: #48bb78;
    color: white;
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    text-align: center;
    font-weight: 600;
    animation: slideIn 0.3s ease-out;
}

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

/* Botones */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin: 5px;
}

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

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

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(72, 187, 120, 0.4);
}

.btn-warning {
    background: #ed8936;
    color: white;
}

.btn-warning:hover {
    background: #dd6b20;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(237, 137, 54, 0.4);
}

.btn-danger {
    background: #f56565;
    color: white;
}

.btn-danger:hover {
    background: #e53e3e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 101, 101, 0.4);
}

/* Lista de participantes */
.lista-participantes {
    display: grid;
    gap: 15px;
}

.participante-card {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.participante-card:hover {
    background: #e8e8e8;
    transform: translateX(5px);
}

.participante-info {
    flex: 1;
}

.participante-nombre {
    font-weight: 600;
    font-size: 1.1em;
    color: #333;
}

.participante-categoria {
    color: #666;
    font-size: 0.9em;
}

.participante-padre {
    color: #667eea;
    font-size: 0.9em;
    margin-top: 5px;
}

.btn-eliminar {
    background: #f56565;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.btn-eliminar:hover {
    background: #e53e3e;
}

/* Emparejamientos */
.subtitle-secreto {
    background: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 10px;
    border-left: 5px solid #ffc107;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.botones-emparejamientos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.btn-participante {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 0.95em;
}

.btn-participante:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-participante.revelado {
    background: #e8e8e8;
    border-color: #ccc;
    color: #999;
    cursor: not-allowed;
}

.emparejamiento-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.emparejamiento-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dador-info, .receptor-info {
    flex: 1;
}

.flecha {
    font-size: 2em;
    margin: 0 20px;
}

/* Resultado de consulta */
.resultado-consulta {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.resultado-consulta h3 {
    margin-bottom: 15px;
    font-size: 1.3em;
}

.resultado-consulta p {
    margin: 10px 0;
    font-size: 1.1em;
}

.mensaje-error {
    background: #f56565;
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.mensaje-sin-datos {
    background: #fff3cd;
    color: #856404;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.2em;
}

/* Administración */
.admin-section {
    padding: 30px;
    background: #f5f5f5;
    border-top: 2px solid #e0e0e0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .logo {
        max-width: 60%;
    }

    header h1 {
        font-size: 2em;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .emparejamiento-info {
        flex-direction: column;
        text-align: center;
    }
    
    .flecha {
        transform: rotate(90deg);
        margin: 10px 0;
    }
}

