/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
}

.container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
}

/* Pantallas */
.screen {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 2rem;
    text-align: center;
}

.screen.active {
    display: flex;
}

/* Pantalla de login */
.login-content {
    max-width: 500px;
    animation: fadeInUp 0.8s ease-out;
    padding: 1rem;
}

.login-title {
    font-size: 2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.login-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.password-container {
    margin-bottom: 1.5rem;
    position: relative;
}

.password-input {
    display: none; /* Ocultamos el input real */
}

.password-display {
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 1.5rem 2rem;
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    letter-spacing: 0.3em;
}

.login-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
}

.login-button {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(78, 205, 196, 0.6);
}

.login-button:disabled {
    background: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.6);
    cursor: not-allowed;
    box-shadow: none;
}

.error-message {
    background: rgba(255, 107, 107, 0.9);
    color: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Pantalla de calificación */
.rating-content {
    max-width: 800px;
    animation: fadeInUp 0.8s ease-out;
    display: flex;
    flex-direction: column;
    height: 100vh;
    justify-content: flex-start;
    padding-top: 1rem;
}

.logo-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    order: 1;
}

.logo {
    max-width: 320px;
    max-height: 160px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.question {
    font-size: 2.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.1rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    order: 2;
}

.faces-container {
    display: flex;
    justify-content: space-evenly;
    gap: 2rem;
    flex-wrap: nowrap;
    margin-top: -0.2rem;
    order: 3;
    flex: 1;
    align-items: center;
}

.face-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 1.5rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    min-width: 180px;
    flex: 1;
    max-width: 220px;
}

.face-option:hover {
    transform: translateY(-10px) scale(1.05);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.face-option:active {
    transform: translateY(-5px) scale(1.02);
}

.face-image {
    width: 160px;
    height: 160px;
    object-fit: contain;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
}

.face-option:hover .face-image {
    transform: scale(1.1);
}

.face-label {
    font-size: 1.2rem;
    font-weight: 500;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Pantalla de teléfono */
.phone-content {
    max-width: 600px;
    animation: fadeInUp 0.8s ease-out;
}

/* selected-face-preview removido - ya no se usa */

.phone-title {
    font-size: 2.2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.phone-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-weight: 300;
}

.phone-input-container {
    margin-bottom: 2rem;
    position: relative;
}

.phone-input {
    display: none; /* Ocultamos el input real */
}

.phone-display {
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 1.5rem 2rem;
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.numeric-keypad {
    display: grid;
    grid-template-rows: repeat(4, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.keypad-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

.keypad-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 1.2rem 0.8rem;
    font-size: 1.6rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.keypad-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.keypad-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.keypad-btn.special {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border-color: rgba(255, 107, 107, 0.5);
}

.keypad-btn.special:hover {
    background: linear-gradient(45deg, #ff5252, #d63031);
    transform: translateY(-2px);
}

.keypad-letters {
    font-size: 0.7rem;
    font-weight: 400;
    color: #666;
    margin-top: 0.2rem;
}

.keypad-btn.special .keypad-letters {
    color: rgba(255, 255, 255, 0.8);
}

.phone-actions {
    display: flex;
    justify-content: center;
    align-items: center;
}

.skip-button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.5px;
}

.skip-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.submit-button {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(78, 205, 196, 0.6);
}

.submit-button:disabled {
    background: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.6);
    cursor: not-allowed;
    box-shadow: none;
}

/* Pantalla de agradecimiento */
.thank-you-content {
    max-width: 500px;
    animation: fadeInUp 0.8s ease-out;
}

.selected-face {
    margin-bottom: 2rem;
}

.face-image.large {
    width: 200px;
    height: 200px;
    animation: bounce 1s ease-in-out;
}

.thank-you-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.thank-you-message {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    font-weight: 300;
}

.auto-return-message {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    font-weight: 300;
    font-style: italic;
}

/* Estilos del botón de nueva calificación removidos - ahora es automático */

/* Contador removido - ya no se muestra en pantalla */

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Responsive para tabletas */
@media (max-width: 1024px) {
    .logo {
        max-width: 280px;
        max-height: 140px;
    }
    
    .login-title {
        font-size: 1.8rem;
        margin-bottom: 0.3rem;
    }
    
    .login-subtitle {
        font-size: 1rem;
        margin-bottom: 1.2rem;
    }
    
    .password-display {
        font-size: 1.4rem;
        padding: 1rem 1.2rem;
    }
    
    .numeric-keypad {
        max-width: 260px;
        gap: 0.6rem;
        margin-bottom: 1.2rem;
    }
    
    .keypad-btn {
        padding: 1rem 0.6rem;
        font-size: 1.4rem;
        min-height: 55px;
    }
    
    .phone-title {
        font-size: 1.8rem;
    }
    
    .phone-subtitle {
        font-size: 1.1rem;
    }
    
    .phone-display {
        font-size: 1.5rem;
        padding: 1.2rem 1.5rem;
    }
    
    .keypad-btn {
        font-size: 1.5rem;
        padding: 1.2rem 0.8rem;
        min-height: 60px;
    }
    
    .question {
        font-size: 2.2rem;
        margin-bottom: 0.1rem;
    }
    
    .faces-container {
        gap: 1.5rem;
        margin-top: -0.1rem;
        flex-wrap: nowrap;
        justify-content: space-evenly;
    }
    
    .face-option {
        min-width: 140px;
        padding: 1.2rem;
        flex: 1;
        max-width: 200px;
    }
    
    .face-image {
        width: 130px;
        height: 130px;
    }
    
    .face-image.large {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 768px) {
    .logo {
        max-width: 240px;
        max-height: 120px;
    }
    
    .login-title {
        font-size: 1.6rem;
        margin-bottom: 0.3rem;
    }
    
    .login-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .password-display {
        font-size: 1.2rem;
        padding: 0.8rem 1rem;
    }
    
    .numeric-keypad {
        max-width: 240px;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .keypad-btn {
        padding: 0.8rem 0.5rem;
        font-size: 1.2rem;
        min-height: 50px;
    }
    
    .login-button {
        padding: 0.8rem 2rem;
        font-size: 1.1rem;
    }
    
    .phone-title {
        font-size: 1.6rem;
    }
    
    .phone-subtitle {
        font-size: 1rem;
    }
    
    .phone-display {
        font-size: 1.3rem;
        padding: 1rem 1.2rem;
    }
    
    .keypad-btn {
        font-size: 1.3rem;
        padding: 1rem 0.6rem;
        min-height: 50px;
    }
    
    .keypad-letters {
        font-size: 0.6rem;
    }
    
    .phone-actions {
        /* Solo un botón ahora, no necesita flex-direction column */
    }
    
    .question {
        font-size: 2rem;
        margin-bottom: 0.1rem;
    }
    
    .faces-container {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        margin-top: -0.1rem;
    }
    
    .face-option {
        min-width: 200px;
        flex-direction: row;
        justify-content: space-between;
        padding: 1rem 2rem;
    }
    
    .face-image {
        width: 100px;
        height: 100px;
        margin-bottom: 0;
        margin-right: 1rem;
    }
    
    .face-label {
        font-size: 1.1rem;
    }
    
    /* Contador removido */
}

/* Modo landscape para tabletas */
@media (max-height: 600px) and (orientation: landscape) {
    .logo {
        max-width: 180px;
        max-height: 90px;
    }
    
    .question {
        font-size: 1.8rem;
        margin-bottom: 0rem;
    }
    
    .faces-container {
        gap: 1.5rem;
    }
    
    .face-option {
        padding: 1rem;
        min-width: 140px;
    }
    
    .face-image {
        width: 120px;
        height: 120px;
    }
    
    .face-label {
        font-size: 1rem;
    }
    
    /* Optimizaciones para login en landscape */
    .login-content {
        padding: 0.5rem;
    }
    
    .login-title {
        font-size: 1.4rem;
        margin-bottom: 0.2rem;
    }
    
    .login-subtitle {
        font-size: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .password-container {
        margin-bottom: 1rem;
    }
    
    .password-display {
        font-size: 1.1rem;
        padding: 0.6rem 0.8rem;
    }
    
    .numeric-keypad {
        max-width: 200px;
        gap: 0.4rem;
        margin-bottom: 0.8rem;
    }
    
    .keypad-btn {
        padding: 0.6rem 0.4rem;
        font-size: 1rem;
        min-height: 40px;
    }
    
    .login-button {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }
}
