/* assets/css/estilo.css */

* {
    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: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* Tipografía */
h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2.5em;
    border-bottom: 3px solid #667eea;
    padding-bottom: 15px;
}

h2 {
    color: #444;
    margin-bottom: 20px;
}

h3 {
    color: #555;
    margin-bottom: 15px;
}

/* Mensajes */
.mensaje {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mensaje.exito {
    background: #d4edda;
    border: 2px solid #c3e6cb;
    color: #155724;
}

.mensaje.error {
    background: #f8d7da;
    border: 2px solid #f5c6cb;
    color: #721c24;
}

.mensaje.ya-voto {
    background: #fff3cd;
    border: 2px solid #ffeeba;
    color: #856404;
}

.mensaje.informacion {
    background: #d1ecf1;
    border: 2px solid #bee5eb;
    color: #0c5460;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.btn:active {
    transform: translateY(0);
}

.btn-votar {
    background: #48bb78;
    font-size: 18px;
    padding: 15px 40px;
}

.btn-votar:hover {
    background: #38a169;
}

/* Grid de candidatos */
.candidatos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.candidato-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.candidato-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.candidato-card:hover {
    border-color: #667eea;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.2);
    transform: translateY(-5px);
}

.candidato-card:hover::before {
    transform: scaleX(1);
}

.candidato-info h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.partido {
    color: #666;
    font-size: 1em;
    margin-bottom: 20px;
    padding: 5px 10px;
    background: #f8f9fa;
    border-radius: 20px;
    display: inline-block;
}

/* Radio buttons personalizados */
.radio-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    font-size: 16px;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s;
}

.radio-container:hover {
    background: #f8f9fa;
}

.radio-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 50%;
    transition: all 0.3s;
}

.radio-container:hover input ~ .checkmark {
    background-color: #ccc;
}

.radio-container input:checked ~ .checkmark {
    background-color: #667eea;
    transform: scale(1.1);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.radio-container input:checked ~ .checkmark:after {
    display: block;
}

/* Tablas */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th {
    background: #667eea;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

tr:hover {
    background: #f8f9fa;
}

/* Formularios */
input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #667eea;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .candidatos-grid {
        grid-template-columns: 1fr;
    }
    
    table {
        display: block;
        overflow-x: auto;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Barras de progreso */
.progress-container {
    width: 100%;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 30px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    color: #666;
}