:root {
    --primary: #0086FE;
    --primary-glow: rgba(0, 134, 254, 0.5);
    --bg-light: #F8F9FA;
    --text-dark: #1A1A1A;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --neon-shadow: 0 0 15px var(--primary-glow);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: radial-gradient(circle at top right, #e0f2ff, #f8f9fa);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    padding: 20px;
    overflow-x: hidden;
}

.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    text-align: center;
    margin: auto;
}

header {
    margin-bottom: 30px;
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.logo span {
    color: var(--text-dark);
    opacity: 0.6;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 0.95rem;
    color: #666;
}

.input-group {
    display: flex;
    gap: 10px;
    background: white;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.input-group:focus-within {
    border-color: var(--primary);
    box-shadow: var(--neon-shadow);
}

input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 15px;
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
}

button#searchBtn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

button#searchBtn:hover {
    background: #0076e0;
    transform: translateY(-2px);
}

.hidden {
    display: none !important;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 134, 254, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Result Card */
.result-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-top: 20px;
    border: 1px solid #eee;
    text-align: left;
    animation: revealUp 0.5s ease-out;
}

@keyframes revealUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-header {
    margin-bottom: 15px;
}

.status-badge {
    background: #e6f4ea;
    color: #1e7e34;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.info-block {
    margin-bottom: 20px;
}

.info-block:last-child {
    margin-bottom: 0;
}

.value-highlight {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    word-break: break-all;
}

.email-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
}

.email-display {
    flex: 1;
    font-size: 1.1rem;
    color: #444;
    font-weight: 500;
    word-break: break-all;
}

.copy-btn {
    background: #f0f7ff;
    border: 1px solid #cce4ff;
    color: var(--primary);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.copy-btn.success {
    background: #e6f4ea;
    color: #1e7e34;
    border-color: #c3e6cb;
}

.result-footer {
    margin-top: 20px;
}

.secondary-btn {
    width: 100%;
    background: #f0f7ff;
    color: var(--primary);
    border: 1px solid #cce4ff;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background: #e0f2ff;
}

.access-instructions {
    margin-top: 20px;
    padding: 20px;
    background: rgba(0, 134, 254, 0.05); /* Fondo azul muy tenue */
    border: 1px solid rgba(0, 134, 254, 0.1);
    border-radius: 12px;
    text-align: left;
    animation: revealUp 0.5s ease-out;
}

.access-instructions h4 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: var(--primary); /* Azul SENA */
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.step-list {
    margin: 0 0 20px 0;
    padding: 0;
    list-style: none;
}

.step-list li {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 12px;
    color: #444; /* Gris oscuro para máxima visibilidad */
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-num {
    background: var(--primary);
    color: #fff;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff;
    color: var(--primary);
    text-decoration: none;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
    border: 1px solid var(--primary);
}

.download-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 134, 254, 0.2);
}

.feedback-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.feedback-section p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 12px;
}

.feedback-buttons {
    display: flex;
    gap: 10px;
}

.feedback-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.feedback-btn.yes {
    background: #e6f4ea;
    color: #1e7e34;
}

.feedback-btn.yes:hover {
    background: #d4edda;
}

.feedback-btn.no {
    background: #fff5f5;
    color: #dc3545;
}

.feedback-btn.no:hover {
    background: #ffebeb;
}

.success-msg {
    color: #1e7e34;
    background: #e6f4ea;
    padding: 15px;
    border-radius: 12px;
    margin-top: 20px;
    animation: revealUp 0.5s ease-out;
}

.error-msg {
    color: #dc3545;
    background: #fff5f5;
    padding: 15px;
    border-radius: 12px;
    margin-top: 20px;
    font-size: 0.9rem;
}

footer {
    margin-top: 30px;
    font-size: 0.8rem;
    color: #aaa;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    body {
        padding: 15px;
        align-items: center; /* Volver a centrar en móviles si cabe */
        justify-content: center;
    }

    .glass-container {
        padding: 30px 20px;
        width: 100%; /* Usar todo el ancho disponible menos el padding del body */
        max-width: 100%;
        border-radius: 16px;
    }

    h1 {
        font-size: 1.4rem;
    }

    .input-group {
        flex-direction: column;
        background: transparent;
        border: none;
        padding: 0;
        gap: 12px;
    }

    .input-group input {
        background: white;
        border: 1px solid #eee;
        border-radius: 12px;
        width: 100% !important;
        padding: 15px;
    }

    button#searchBtn {
        width: 100% !important;
        padding: 15px;
        border-radius: 12px;
    }

    .value-highlight {
        font-size: 1.1rem;
    }
}
