/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.container {
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 480px;
    text-align: center;
}

.header h1 {
    color: #2c3e50;
    font-size: 2.2em;
    margin-bottom: 10px;
    font-weight: 600;
}

.header p {
    color: #7f8c8d;
    font-size: 1.1em;
    margin-bottom: 30px;
}

/* Main App Styles */
.main-app {
    transition: all 0.3s ease;
}

.pin-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.input-group {
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 1.1em;
}

.pin-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #ecf0f1;
    border-radius: 12px;
    font-size: 1.2em;
    text-align: center;
    letter-spacing: 3px;
    font-weight: 600;
    transition: all 0.3s ease;
    outline: none;
}

.pin-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.pin-input.pin-valid {
    border-color: #2ecc71;
    background-color: #f8f9fa;
}

.pin-input.pin-partial {
    border-color: #f39c12;
    background-color: #fffef7;
}

.pin-input.pin-invalid {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.validate-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
}

.validate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.28);
    filter: saturate(1.05);
}

.validate-btn:active {
    transform: translateY(0);
    filter: brightness(0.96);
}

.validate-btn:disabled {
    background: #cbd5e1;
    color: #f8fafc;
    border-color: rgba(0, 0, 0, 0.04);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading Screen */
.loading-screen {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #ecf0f1;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-screen p {
    font-size: 1.3em;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 600;
}

.loading-subtitle {
    font-size: 1em !important;
    color: #7f8c8d !important;
    font-weight: 400 !important;
}

/* Result Screen */
.result-screen {
    text-align: center;
    padding: 40px;
}

.result-screen.hidden {
    display: none;
}

.result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 30px;
    position: relative;
}

.result-icon.success {
    background: #2ecc71;
}

.result-icon.error {
    background: #e74c3c;
}

.result-icon.warning {
    background: #f39c12;
}

.result-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
}

.result-icon.success::after {
    content: '✓';
}

.result-icon.error::after {
    content: '✗';
}

.result-icon.warning::after {
    content: '⚠';
}

.result-screen h2 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 15px;
    font-weight: 600;
}

.result-screen p {
    color: #7f8c8d;
    font-size: 1.1em;
    margin-bottom: 30px;
}

.restart-btn {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(149, 165, 166, 0.3);
}

/* Volver button styling for error cases */
.restart-btn.volver-btn {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

.restart-btn.volver-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(231, 76, 60, 0.3);
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease;
}

.fade-out {
    animation: fadeOut 0.5s ease;
}

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

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

/* Nuevas clases para el diseño de la imagen */
body {
    background: #fff;
    font-family: Arial, sans-serif;
    color: #333;
}

.new-header {
    background-color: #007bff; /* Color azul de la imagen */
    color: #fff;
    padding: 30px 20px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    height: 300px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 600px;
}

.header-title {
    font-size: 2.5em;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    margin-right: 20px;
    padding-bottom: 50px;
}

.header-image {
    width: 250px;
    height: auto;
    border-radius: 50%;
    position: absolute;
    bottom: -150px;
    right: -50px;
}

.container {
    background: #fff;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    text-align: center;
    margin: -100px auto 20px;
    position: relative;
    z-index: 10;
}

.promo-subtitle {
    font-size: 1.5em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 25px;
}

.promo-box {

}

/* Reglas para los elementos dentro de #countdown-container */
#countdown-container {
    flex-direction: column; /* Apila los elementos verticalmente */
    justify-content: center; /* Centra verticalmente los elementos */
    align-items: center; /* Centra horizontalmente el texto */
    text-align: center; /* Asegura que el texto dentro esté centrado */
}

#countdown-container .box-label {
    font-size: 2em; /* Tamaño más grande para el mensaje principal */
    font-weight: 600;
    margin-bottom: 5px;
}

#countdown-container .box-value {

}


/* Reglas para los elementos dentro de #connecting-text */
#connecting-text {
    display: flex;
    flex-direction: column; /* Apila los elementos verticalmente */
    justify-content: center; /* Centra verticalmente los elementos */
    align-items: center; /* Centra horizontalmente el texto */
    text-align: center; /* Asegura que el texto dentro esté centrado */
}

#connecting-text .box-label {
    font-size: 1em; /* Tamaño normal para "Estado:" */
    font-weight: 400;
    margin-bottom: 5px; /* Pequeño espacio entre la etiqueta y el texto */
}

#connecting-text .connecting-value {
    font-size: 1.5em; /* Tamaño más pequeño para "Conectando..." */
    font-weight: 600;
}

/* Otras clases (sin cambios relevantes para este problema) */
.red-box-amount {
    letter-spacing: -1px;
    line-height: 1.2;
}

.red-box-installments {
    font-size: 1.8em;
    font-weight: 700;
    line-height: 1.2;
    padding: 25px;
}

.red-box-installments .box-details {
    display: block;
    font-size: 0.6em;
    font-weight: 400;
    margin-top: 5px;
    opacity: 0.8;
}

.cta-btn {
    background-color: #ff0000; /* Color rojo brillante */
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    box-shadow: 0 6px 14px rgba(255, 0, 0, 0.25);
    width: 80%;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(255, 0, 0, 0.35);
}

.slide-text {
    font-size: 1em;
    color: #7f8c8d;
    margin-top: 20px;
    font-weight: 500;
}

.slide-text .arrow {
    font-weight: bold;
    margin-left: 5px;
}

/* Nuevas clases de colores para los mensajes de estado */
.success-box {
    background-color: #2ecc71; /* Un color verde para el éxito */
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.4);
}