/* --- RESET & BASE STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
}

/* --- CONTAINER --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER --- */
header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* --- NAVIGATION --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-links a:focus,
.tool-card:focus,
.btn:focus {
    outline: 2px solid #4ecdc4;
    outline-offset: 3px;
    border-radius: 5px;
}

/* --- STATUS INDICATOR --- */
.status-indicator {
    background: linear-gradient(45deg, #4caf50, #45a049);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite alternate;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* --- HERO --- */
.hero {
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: slideInFromLeft 1s ease-out;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: slideInFromRight 1s ease-out;
}

@keyframes slideInFromLeft {
    0% { transform: translateX(-100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromRight {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

/* --- CARDS --- */
.card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.card h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- SHARED GRIDS --- */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.candidate-section {
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
}

.candidate-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 500px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.candidate-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.candidate-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    background: linear-gradient(45deg, #ff9a9e, #fecfef);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.candidate-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.candidate-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.data-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border-left: 4px solid #4ecdc4;
    transition: all 0.3s ease;
}

.data-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.data-item strong {
    color: #4ecdc4;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.tool-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tool-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.tool-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.tool-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #4ecdc4;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 0.5rem;
}

.btn-primary {
    display: block;
    margin: 0 auto;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-success {
    background: linear-gradient(45deg, #4caf50, #45a049);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-info {
    background: linear-gradient(45deg, #2196f3, #1976d2);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.chart-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    min-height: 300px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.chart-container:hover {
    border-color: #4ecdc4;
    background: rgba(78, 205, 196, 0.1);
}

.controls {
    text-align: center;
    margin: 3rem 0;
}

.controls h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

.control-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #4ecdc4;
}

footer {
    background: rgba(0, 0, 0, 0.3);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.status {
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    text-align: center;
    backdrop-filter: blur(10px);
}

.status.success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4caf50;
}

.status.error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid #f44336;
}

.status.info {
    background: rgba(33, 150, 243, 0.2);
    border: 1px solid #2196f3;
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .data-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .control-group {
        flex-direction: column;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Mejoras de Accesibilidad y UX */
.data-item strong {
    color: #5fd4d1; /* Color más contrastante para mejor legibilidad */
}

.btn:focus,
.tool-card:focus,
.nav-links a:focus {
    outline: 2px solid #4ecdc4;
    outline-offset: 3px;
    border-radius: 5px; /* Pequeño ajuste para el outline */
}

/* Micro-interacciones */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.data-item {
    transition: all 0.2s ease;
}

.data-item:hover {
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.tool-card:active {
    transform: translateY(0px) scale(0.98);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Animación para el status-indicator */
.status-indicator {
    animation: pulse 2s infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(0, 0, 0, 0.7); }
    100% { transform: scale(1.05); box-shadow: 0 0 15px rgba(0, 0, 0, 0.7); }
}

/* Animación para el hero section */
.hero h1 {
    animation: slideInFromLeft 1s ease-out;
}

.hero p {
    animation: slideInFromRight 1s ease-out;
}

@keyframes slideInFromLeft {
    0% { transform: translateX(-100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromRight {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

/* Mejoras para el responsive design */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .candidate-image {
        width: 150px;
        height: 150px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .status-indicator {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}