/* Custom Properties for Institucional Look (Guinda / Blanco) */
:root {
    --bg-color: #6b1428; /* Guinda institucional */
    --card-bg: #ffffff;  /* Fondo blanco sólido para paneles */
    --card-border: #e2e8f0;
    --text-primary: #1e293b; /* Letras negras / oscuras */
    --text-secondary: #475569;
    --primary-color: #6b1428; /* Botones también asumen color institucional principal */
    --primary-hover: #4d0e1c;
    --success-color: #10b981;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden; /* Avoid scrolls for app-like feel */
    display: flex;
    justify-content: center;
    align-items: center;
}

#app-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Video Section --- */
#video-wrapper {
    position: absolute;
    top: 0; left: 0; 
    width: 100%; height: 100%;
    z-index: 10;
    background: #000;
    transition: opacity 0.8s ease, visibility 0.8s;
}

#video-wrapper.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Ensure the iframe fills the screen */
iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* --- Survey and Thanks UI Section --- */
#survey-wrapper, #thanks-wrapper {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 5;
}

.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    z-index: 20;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.survey-card, .thanks-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 3rem 2.5rem;
    border-radius: 28px;
    text-align: center;
    max-width: 550px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.survey-card h2, .thanks-card h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.survey-card p, .thanks-card p {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

.survey-options {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.option-btn {
    flex: 1;
    background: #f8fafc;
    border: 2px solid var(--card-border);
    border-radius: 20px;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.option-btn:hover {
    background: #f1f5f9;
    transform: translateY(-4px);
}

.option-btn.selected {
    border-color: var(--primary-color);
    background: #fff1f2;
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(107, 20, 40, 0.2);
}

.option-btn .emoji {
    font-size: 3rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.option-btn .label {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.5);
}

.submit-btn:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Success Icon styling */
.icon-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.check-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid rgba(16, 185, 129, 0.2);
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

/* Responsiveness for mobile devices */
@media (max-width: 600px) {
    .survey-options {
        flex-direction: column;
    }
    
    .survey-card {
        padding: 2rem 1.5rem;
    }
}

/* Badge del Contador de Visitantes */
.visitor-badge {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: #f8fafc;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    display: inline-block;
    border: 1px solid var(--card-border);
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
