:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #17a2b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f5f7fa;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background-color: var(--dark-color);
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 25px;
    margin-bottom: 30px;
}

.status-card {
    background-color: #f8f9fa;
    border-left: 5px solid var(--info-color);
}

.card-title {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-color);
}

.encuesta-status {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.encuesta-status h3 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.candidate-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.candidate {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    background-color: #f9f9f9;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 1px solid #eee;
}

.candidate:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.candidate input[type="radio"] {
    transform: scale(1.2);
    margin-right: 15px;
}

.candidate-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 20px;
    border: 3px solid var(--light-color);
}

.candidate-info {
    flex: 1;
}

.candidate-name {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.candidate-party {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.candidate-votes {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: bold;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--dark-color);
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border 0.3s;
}

.form-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.g-recaptcha {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--secondary-color);
}

.btn-block {
    display: block;
    width: 100%;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: bold;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.results-container {
    margin-top: 40px;
}

.result-item {
    margin-bottom: 15px;
}

.result-name {
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.progress-bar {
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
}

.nav-tabs {
    display: flex;
    list-style: none;
    margin-bottom: 30px;
    border-bottom: 1px solid #ddd;
}

.nav-tabs li {
    margin-right: 10px;
}

.nav-tabs a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--dark-color);
    border-radius: 5px 5px 0 0;
    transition: all 0.3s;
}

.nav-tabs a.active {
    background-color: var(--primary-color);
    color: white;
}

.nav-tabs a:hover:not(.active) {
    background-color: #f0f0f0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
    color: #7f8c8d;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
}

.chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .candidate-list {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .nav-tabs {
        flex-wrap: wrap;
    }
    
    .nav-tabs li {
        margin-bottom: 5px;
    }
    
    .chart-container {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .g-recaptcha {
        transform: scale(0.85);
        transform-origin: left top;
    }
    
    .candidate {
        flex-direction: column;
        text-align: center;
    }
    
    .candidate-img {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .result-name {
        flex-direction: column;
    }
    
    .result-name span:first-child {
        margin-bottom: 5px;
    }
}