@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #df1929;
    --primary-green: #40ae49;
    --gray: #a0a4a3;
    --dark-gray: #333;
    --white: #ffffff;
    --overlay: rgba(0, 0, 0, 0.75);
}

body {
    /* Usando Inter como alternativa a Filson Pro Regular */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100vh;
    background: #000;
}

.container {
    position: relative;
    width: 100%;
    height: 100vh;
    background: url('https://skema.com.ar/wp-content/uploads/2023/03/08.jpg') center/cover no-repeat;
}

/* Fondo específico para la pantalla de formulario */
#form-screen {
    background: url('https://smartdisplay.com.ar/wp-content/uploads/2025/08/tra-2.jpg') center/cover no-repeat;
}

/* Overlays mejorados con diferentes opacidades */
.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(3px);
    z-index: 1;
}

/* Overlay para pantalla de bienvenida */
.welcome-overlay {
    background: linear-gradient(
        135deg, 
        rgba(0,0,0,0.75) 0%, 
        rgba(223,25,41,0.08) 50%, 
        rgba(0,0,0,0.85) 100%
    );
}

/* Overlay para pantalla de formulario - más oscuro */
.form-overlay {
    background: linear-gradient(
        135deg, 
        rgba(0,0,0,0.82) 0%, 
        rgba(64,174,73,0.08) 50%, 
        rgba(0,0,0,0.88) 100%
    );
    backdrop-filter: blur(4px);
}

/* Overlay para pantalla de éxito */
.success-overlay {
    background: linear-gradient(
        135deg, 
        rgba(0,0,0,0.78) 0%, 
        rgba(64,174,73,0.12) 50%, 
        rgba(0,0,0,0.85) 100%
    );
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* display: none; */
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.screen.active {
    display: flex;
    opacity: 1;
}

.content {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    max-width: 420px;
    margin: 0 auto;
}

.logo-container {
    margin-bottom: 40px;
}

.logo {
    height: 70px;
    width: auto;
}

.logo-small {
    height: 45px;
    width: auto;
}

/* Logo en formulario - esquina superior derecha */
.logo-form {
    height: 45px;
    width: auto;
    /* Removido position absolute */
}

.wifi-icon {
    margin-bottom: 35px;
    animation: pulse 2.5s infinite ease-in-out;
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.3));
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.85; }
    100% { transform: scale(1); opacity: 1; }
}

h1 {
    /* Usando Inter Bold como alternativa a Filson Soft Bold */
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 2.8rem;
    color: var(--white);
    margin-bottom: 12px;
    text-align: center;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
    letter-spacing: -0.5px;
}

h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.9rem;
    color: var(--white);
    margin-bottom: 35px;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.subtitle {
    font-size: 1.15rem;
    color: var(--white);
    margin-bottom: 45px;
    text-align: center;
    opacity: 0.95;
    text-shadow: 0 1px 6px rgba(0,0,0,0.3);
    font-weight: 400;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    margin-top: 10px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 20px 28px;
    border: none;
    border-radius: 16px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-green) 0%, #359c3e 100%);
    color: var(--white);
    border: 2px solid transparent;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #359c3e 0%, var(--primary-green) 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(64, 174, 73, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px) scale(1.01);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.15);
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-green) 0%, #359c3e 100%);
    color: var(--white);
    margin-top: 25px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-size: 1.1rem;
    padding: 22px 32px;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #359c3e 0%, var(--primary-green) 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 35px rgba(64, 174, 73, 0.5);
}

/* Form Screen */
.form-header {
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
}

.back-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    /* Removido position absolute para que se alinee con el logo */
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(-2px);
}

.registration-form {
    width: 100%;
    margin-top: 50px;
}

.form-group {
    margin-bottom: 22px;
}

.form-group input {
    width: 100%;
    padding: 20px 22px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    font-size: 1.05rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.form-group input:focus {
    outline: none;
    background: var(--white);
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(64, 174, 73, 0.15);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: var(--gray);
    font-weight: 400;
}

.checkbox-group {
    margin-bottom: 22px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
    padding-left: 40px;
    color: var(--white);
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 400;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 26px;
    width: 26px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
}

.checkbox-container input:checked ~ .checkmark,
.checkmark.checked {
    background: linear-gradient(135deg, var(--primary-green) 0%, #359c3e 100%);
    border-color: var(--primary-green);
    transform: scale(1.1);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 8px;
    top: 4px;
    width: 7px;
    height: 12px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after,
.checkmark.checked:after {
    display: block;
}

.checkbox-text {
    margin-left: 15px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.checkbox-text a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.checkbox-text a:hover {
    text-decoration: underline;
    color: #359c3e;
}

/* Success Screen */
.success-icon {
    margin-bottom: 35px;
    animation: checkmark 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 0 20px rgba(64, 174, 73, 0.4));
}

@keyframes checkmark {
    0% { transform: scale(0) rotate(45deg); opacity: 0; }
    50% { transform: scale(1.3) rotate(45deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.success-message {
    font-size: 1.15rem;
    color: var(--white);
    text-align: center;
    opacity: 0.95;
    text-shadow: 0 1px 6px rgba(0,0,0,0.3);
    font-weight: 400;
    line-height: 1.4;
}

/* Powered by DigitalArts */
.powered-by {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 20;
}

.powered-by a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: 400;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.powered-by a:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

.powered-by img {
    width: 16px;
    height: 16px;
}

/* Responsive para "Powered by" */
@media (max-width: 768px) {
    .powered-by {
        bottom: 15px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    .powered-by a {
        font-size: 0.75rem;
        padding: 6px 10px;
        gap: 6px;
    }
    
    .powered-by img {
        width: 14px;
        height: 14px;
    }
    
    .logo-form {
        top: 20px;
        right: 20px;
        height: 40px;
    }
    
    .form-header {
        padding: 0 20px;
    }
    
    .back-btn {
        left: 20px;
    }
}

@media (max-width: 480px) {
    .powered-by a {
        font-size: 0.7rem;
        padding: 5px 8px;
    }
    
    .logo-form {
        height: 35px;
        top: 15px;
        right: 15px;
    }
}

/* Responsive Mobile First */
@media (max-width: 480px) {
    h1 {
        font-size: 2.3rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .btn {
        padding: 18px 24px;
        font-size: 1rem;
    }
    
    .content {
        padding: 25px 18px;
    }
    
    .logo {
        height: 60px;
    }
    
    .wifi-icon svg {
        width: 70px;
        height: 70px;
    }
    
    .form-group input {
        padding: 18px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .btn {
        padding: 16px 20px;
        font-size: 0.95rem;
    }
    
    .content {
        padding: 20px 15px;
    }
}

@media (min-width: 768px) {
    .container {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .content {
        background: rgba(0, 0, 0, 0.85);
        border-radius: 0px;
        padding: 70px 50px;
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    h1 {
        font-size: 3.2rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    .btn {
        padding: 22px 32px;
        font-size: 1.1rem;
    }
}

@media (min-width: 1024px) {
    .content {
        max-width: 500px;
        padding: 80px 60px;
    }
}

/* Animaciones adicionales */
.btn svg {
    transition: transform 0.3s ease;
}

.btn:hover svg {
    transform: scale(1.1);
}

.form-group {
    animation: slideInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.checkbox-group {
    animation: slideInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.checkbox-group:nth-child(4) { animation-delay: 0.4s; }
.checkbox-group:nth-child(5) { animation-delay: 0.5s; }

/* Mejoras adicionales para accesibilidad */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus para accesibilidad */
button:focus,
input:focus,
a:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* Preloader styles (opcional) */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Print styles */
@media print {
    .container {
        background: none !important;
    }
    
    .powered-by {
        display: none !important;
    }
}

/* Overlay más oscuro solo en mobile */
@media (max-width: 767px) {
    .welcome-overlay,
    .form-overlay,
    .success-overlay {
        background: linear-gradient(
            135deg,
            rgba(0,0,0,0.95) 0%,
            rgba(0,0,0,0.95) 50%,
            rgba(0,0,0,0.98) 100%
        ) !important;
        opacity: 0.8 !important;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    transition: all 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-red) 0%, #e74c3c 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.modal-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    /* Usando Inter Bold como alternativa a Filson Soft Bold */
    font-family: 'Inter', sans-serif;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.modal-body {
    padding: 0;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.legal-content {
    padding: 32px 24px;
    line-height: 1.6;
    color: #333;
}

.legal-content h4 {
    color: var(--primary-red);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 24px 0 12px 0;
    font-family: 'Inter', sans-serif;
}

.legal-content h4:first-child {
    margin-top: 0;
}

.legal-content h5 {
    color: var(--dark-gray);
    font-size: 1rem;
    font-weight: 600;
    margin: 20px 0 8px 0;
    font-family: 'Inter', sans-serif;
}

.legal-content p {
    margin: 12px 0;
    color: #555;
    font-size: 0.95rem;
}

.legal-content ul {
    margin: 12px 0 12px 20px;
    color: #555;
}

.legal-content li {
    margin: 6px 0;
    font-size: 0.95rem;
}

.legal-content strong {
    color: var(--primary-red);
    font-weight: 600;
}

.legal-footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    margin: 24px -24px -32px -24px;
    border-top: 2px solid var(--primary-green);
    text-align: center;
    font-weight: 500;
    color: var(--dark-gray);
}

/* Custom scrollbar for modal content */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #c41e3a;
}

/* Responsive modal styles */
@media (max-width: 767px) {
    .modal-overlay {
        padding: 10px;
    }
    
    .modal-content {
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
    }
    
    .legal-content {
        padding: 24px 20px;
    }
    
    .legal-content h4 {
        font-size: 1rem;
    }
    
    .legal-content p,
    .legal-content li {
        font-size: 0.9rem;
    }
}