/* ===========================
   LOGIN PAGE STYLES - LATINBOOK
   =========================== */

:root {
    --primary: #FF3CAC;
    --secondary: #FF6B35;
    --tertiary: #784BA0;
    --gradient: linear-gradient(135deg, #FF6B35, #FF3CAC, #784BA0);
    --bg-light: #FFFFFF;
    --text-dark: #1A1F3A;
    --text-gray: #6B7280;
    --border-light: #E5E7EB;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: #F9FAFB;
    overflow-x: hidden;
}

/* ===========================
   LOGIN CONTAINER
   =========================== */
.login-container {
    display: flex;
    min-height: 100vh;
    background: var(--bg-light);
}

/* ===========================
   LEFT SIDE - IMAGE
   =========================== */
.login-image-side {
    flex: 1;
    position: relative;
    display: none;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .login-image-side {
        display: block;
    }
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.8), rgba(255, 60, 172, 0.8), rgba(120, 75, 160, 0.8));
    z-index: 1;
}

.image-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: white;
    text-align: center;
}

.network-visual {
    margin-bottom: 40px;
    animation: float 3s ease-in-out infinite;
}

.network-img {
    max-width: 600px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
}

.network-img-logo {
    max-width: 300px;
    width: 100%;
    height: auto;
    border-radius: 40px;
    filter: drop-shadow(0 20px 60px rgba(255, 60, 172, 0.6));
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    backdrop-filter: blur(10px);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.welcome-text {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.welcome-subtext {
    font-size: 20px;
    font-weight: 400;
    opacity: 0.95;
}

/* ===========================
   RIGHT SIDE - FORM
   =========================== */
.login-form-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 20px;
    background: var(--bg-light);
}

@media (min-width: 768px) {
    .login-form-side {
        padding: 60px 80px;
    }
}

.login-form-wrapper {
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
}

/* ===========================
   LOGO
   =========================== */
.login-logo {
    text-align: center;
    margin-bottom: 48px;
}

.logo-image-official {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    display: block;
    border-radius: 28px;
    box-shadow: 0 10px 30px rgba(255, 60, 172, 0.3);
    transition: transform 0.3s ease;
}

.logo-image-official:hover {
    transform: scale(1.05);
}

/* ===========================
   LOGIN METHOD TABS
   =========================== */
.login-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    background: #F9FAFB;
    padding: 6px;
    border-radius: 16px;
}

.login-tab {
    flex: 1;
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.login-tab i {
    font-size: 18px;
}

.login-tab:hover {
    color: var(--text-dark);
}

.login-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ===========================
   LOGIN METHODS (Show/Hide)
   =========================== */
.login-method {
    display: none;
}

.login-method.active {
    display: block;
}

/* ===========================
   LOGO
   =========================== */

.logo-icon-large {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(255, 60, 172, 0.3);
    animation: pulse-logo 2s infinite;
}

@keyframes pulse-logo {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo-icon-large i {
    font-size: 40px;
    color: white;
}

.logo-text-large {
    font-size: 36px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.logo-subtitle {
    font-size: 16px;
    color: var(--text-gray);
    font-weight: 500;
}

/* ===========================
   LANGUAGE SELECTOR
   =========================== */
.language-selector {
    display: flex;
    gap: 8px;
    margin: 32px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.language-btn {
    padding: 10px 16px;
    background: #F9FAFB;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.language-btn:hover {
    border-color: var(--primary);
    background: white;
    transform: translateY(-2px);
}

.language-btn.active {
    background: var(--gradient);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 60, 172, 0.3);
}

.language-btn span {
    font-size: 13px;
}

@media (max-width: 480px) {
    .language-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .language-btn span {
        font-size: 12px;
    }
}

/* ===========================
   FORM STYLES
   =========================== */
.login-form {
    margin-bottom: 32px;
}

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

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 20px;
    color: var(--text-gray);
    font-size: 18px;
    z-index: 1;
}

.form-input {
    width: 100%;
    padding: 18px 20px 18px 56px;
    border: 2px solid var(--border-light);
    border-radius: 16px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
    background: #F9FAFB;
    transition: all 0.3s;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 60, 172, 0.1);
}

.form-input::placeholder {
    color: var(--text-gray);
}

.toggle-password {
    position: absolute;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: var(--primary);
}

/* ===========================
   PHONE INPUT
   =========================== */
.phone-input-wrapper {
    display: flex;
    gap: 8px;
}

.country-code {
    width: 130px;
    padding: 18px 12px;
    border: 2px solid var(--border-light);
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    background: #F9FAFB;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
    flex-shrink: 0;
}

.country-code:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 60, 172, 0.1);
}

.country-code option {
    padding: 10px;
    font-size: 14px;
}

.phone-input {
    flex: 1;
    padding: 18px 20px;
}

.phone-input-wrapper .form-input {
    padding-left: 20px;
}

/* ===========================
   BUTTONS
   =========================== */
.btn-primary {
    width: 100%;
    padding: 18px 24px;
    background: var(--gradient);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s;
    box-shadow: 0 8px 20px rgba(255, 60, 172, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(255, 60, 172, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ===========================
   DIVIDER
   =========================== */
.divider {
    position: relative;
    text-align: center;
    margin: 32px 0;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 80px);
    height: 1px;
    background: var(--border-light);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    background: white;
    padding: 0 20px;
    color: var(--text-gray);
    font-size: 14px;
    font-weight: 500;
}

/* ===========================
   SOCIAL LOGIN
   =========================== */
.social-login {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.btn-social {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid var(--border-light);
    border-radius: 16px;
    background: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.btn-social:hover {
    border-color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.btn-social i {
    font-size: 20px;
}

.btn-google {
    color: #DB4437;
}

.btn-google:hover {
    background: #FEF2F2;
    border-color: #DB4437;
}

.btn-apple {
    color: #000000;
}

.btn-apple:hover {
    background: #F9FAFB;
    border-color: #000000;
}

/* ===========================
   FOOTER LINKS
   =========================== */
.login-footer {
    text-align: center;
    margin-bottom: 24px;
}

.forgot-password {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.3s;
}

.forgot-password:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.register-link {
    text-align: center;
    padding: 20px;
    background: #F9FAFB;
    border-radius: 16px;
}

.register-link p {
    font-size: 15px;
    color: var(--text-gray);
}

.register-link a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.3s;
}

.register-link a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ===========================
   PAGE FOOTER
   =========================== */
.login-page-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.login-page-footer p {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 13px;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-links span {
    color: var(--border-light);
}

/* ===========================
   LOADING OVERLAY
   =========================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner p {
    font-size: 16px;
    font-weight: 600;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
    .login-form-side {
        padding: 40px 24px;
    }
    
    .logo-text-large {
        font-size: 32px;
    }
    
    .welcome-text {
        font-size: 32px;
    }
    
    .btn-primary {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .social-login {
        flex-direction: column;
    }
}

/* ===========================
   MOBILE BACKGROUND
   =========================== */
@media (max-width: 1023px) {
    body {
        background: var(--gradient);
    }
    
    .login-form-side {
        background: white;
        border-radius: 24px 24px 0 0;
        margin-top: 120px;
    }
    
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 200px;
        background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 60, 172, 0.1), rgba(120, 75, 160, 0.1));
        z-index: -1;
    }
}

/* ===========================
   DOWNLOAD SECTION
   =========================== */
.download-section {
    margin-top: 24px;
    padding: 20px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.download-title {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 14px;
    font-weight: 500;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: 12px;
    text-decoration: none;
    border: 1.5px solid var(--border-light);
    background: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
    width: 100%;
    font-family: 'Inter', sans-serif;
}

.download-btn:hover:not(:disabled) {
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(255, 60, 172, 0.12);
    transform: translateY(-1px);
}

.download-btn i {
    font-size: 1.5rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.download-btn-android i { color: #34A853; }
.download-btn-ios i     { color: #555; }
.download-btn-web i     { color: #3B82F6; }

.download-btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.download-btn-label {
    font-size: 10px;
    color: var(--text-gray);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.download-btn-store {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
}

/* Próximamente */
.download-btn-soon {
    opacity: 0.45;
    cursor: not-allowed;
    background: #F3F4F6;
}

.download-btn-soon .download-btn-label {
    color: var(--primary);
    font-weight: 600;
}

/* Responsive - 2 columnas en pantallas más anchas */
@media (min-width: 400px) {
    .download-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .download-btn-web {
        grid-column: 1 / -1;
    }
}
