@import url('https://fonts.googleapis.com/css2?family=SF+Pro+Display:wght@100;200;300;400;500;600;700;800;900&display=swap');

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

a { color: inherit; text-decoration: none; }

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
    /* 🔥 MODO OSCURO - GRADIENTE OSCURO ORIGINAL DE iCLOUD */
    background: linear-gradient(135deg, #000000 0%, #1a1a1e 50%, #0f0f11 100%);
    overflow-x: hidden;
    line-height: 1.5;
    color: #f5f5f7;
}

/* HEADER OSCURO */
header nav, header .nav-container {
    padding: 1.2rem 2.5rem;
    position: sticky;
    top: 0;
    /* 🔥 FONDO OSCURO CON BLUR */
    background: rgba(15, 15, 17, 0.95);
    backdrop-filter: blur(20px);
    z-index: 100;
}

.icloud-logo {
    font-size: clamp(1.4rem, 4.5vw, 2rem);
    font-weight: 300;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    /* 🔥 TEXTO BLANCO */
    color: #f5f5f7;
    letter-spacing: -0.015em;
}

.icloud-logo i { 
    font-size: 1.7em; 
    color: #f5f5f7; 
}

/* HERO SECTION OSCURA */
.hero-section { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    min-height: 70vh; 
    padding: 2rem 1rem; 
    text-align: center; 
}

.memoji-vid video { 
    width: 100%; 
    max-width: 800px; 
    height: auto; 
    border-radius: 24px; 
}

@media (max-width: 768px) { 
    .memoji-vid video { max-width: 90vw; border-radius: 20px; }
}

.heading h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 300;
    margin: 1rem 0;
    line-height: 1;
    /* 🔥 TEXTO BLANCO PRINCIPAL */
    color: #ffffff;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.sign-in-button, #sign-in-btn {
    padding: clamp(1rem, 2.5vw, 1.3rem) clamp(2.5rem, 6vw, 4rem);
    border: none;
    border-radius: 999px;
    /* 🔥 BOTÓN NEGRO ORIGINAL */
    background: #000000;
    color: #ffffff;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin: 2rem 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    display: inline-block;
}

.sign-in-button:hover, #sign-in-btn:hover {
    background: #1a1a1a;
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}

.sign-in-button a {
    color: white;
    text-decoration: none;
    font-size: inherit;
}

#intro-text, .intro p {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    width: min(90%, 550px);
    text-align: center;
    margin: 2rem auto;
    font-weight: 400;
    /* 🔥 TEXTO GRIS CLARO */
    color: #d2d2d7;
}

/* BOXES OSCUROS */
.box-container {
    display: flex; 
    align-items: center; 
    justify-content: center;
    width: min(95%, 1200px); 
    margin: 6rem auto;
    gap: clamp(3rem, 6vw, 5rem); 
    flex-wrap: wrap;
}

.box-1, .box-2 {
    flex: 1; 
    min-width: 320px; 
    max-width: 480px;
    /* 🔥 FONDO OSCURO CON BORDE SUTIL */
    background: rgba(26, 26, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.6);
    display: flex; 
    flex-direction: column; 
    justify-content: center;
    gap: 1.5rem; 
    padding: 2.5rem;
    height: clamp(480px, 55vh, 550px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(20px);
}

.box-1:hover, .box-2:hover {
    transform: translateY(-8px);
    box-shadow: 0 35px 70px -15px rgba(0,0,0,0.8);
    border-color: rgba(255, 255, 255, 0.15);
}

.box-1-img, .box-2-img { 
    width: clamp(140px, 22vw, 200px); 
    height: auto; 
    margin: 0 auto; 
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.3));
}

#box-1-heading, #box-2-heading { 
    font-size: clamp(1.3rem, 2.1vw, 1.6rem); 
    font-weight: 600; 
    text-align: center; 
    /* 🔥 TEXTO BLANCO */
    color: #ffffff; 
}

.box-1-txt, .box-2-txt { 
    font-size: clamp(0.95rem, 1.2vw, 1.05rem); 
    text-align: center; 
    line-height: 1.6; 
    /* 🔥 TEXTO GRIS CLARO */
    color: #d2d2d7; 
}

/* LOGIN PAGE OSCURA */
#main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    /* 🔥 FONDO OSCURO EN MAIN */
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(15,15,17,0.9) 100%);
}

#sign-in {
    /* 🔥 FORM OSCURO ORIGINAL */
    background: rgba(26, 26, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 25px 60px -12px rgba(0,0,0,0.7);
    width: clamp(360px, 92vw, 440px);
    padding: 3rem 2.5rem 2.5rem;
    position: relative;
    overflow: visible;
    backdrop-filter: blur(30px);
}

.login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
}

#apple-color-logo { 
    width: clamp(105px, 25vw, 135px); 
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.4));
}

#sign-in p {
    font-size: clamp(1.25rem, 3.2vw, 1.5rem);
    font-weight: 600;
    /* 🔥 TEXTO BLANCO */
    color: #ffffff;
    text-align: center;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.input-group {
    width: 100%;
    position: relative;
}

#email-phone, #password {
    width: 100%;
    padding: 1.15rem 3.5rem 1.15rem 1.4rem;
    font-size: clamp(1rem, 2.4vw, 1.08rem);
    /* 🔥 INPUTS OSCUROS */
    background: rgba(52, 52, 56, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: inherit;
    font-weight: 400;
}

#email-phone:focus, #password:focus {
    border-color: #0a84ff;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.2);
    outline: none;
    color: #ffffff;
}

#email-phone::placeholder { 
    color: rgba(210, 210, 215, 0.6); 
}

.password-field {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: scaleY(0.8) translateY(-10px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-top: 0;
    position: relative;
}

.password-field.show {
    opacity: 1;
    max-height: 75px;
    transform: scaleY(1) translateY(0);
    margin-top: 1rem;
}

.bx-right-arrow-circle {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: clamp(1.3rem, 2.8vw, 1.4rem);
    color: #0a84ff;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.6rem;
    z-index: 10;
}

.bx-right-arrow-circle:hover { 
    color: #0066cc; 
    transform: translateY(-50%) scale(1.05); 
}

.bx-lock-alt {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: clamp(1.25rem, 2.6vw, 1.35rem);
    /* 🔥 ÍCONO GRIS CLARO */
    color: #d2d2d7;
}

.submit-btn {
    width: 100%;
    padding: 1.2rem;
    /* 🔥 BOTÓN AZUL ORIGINAL */
    background: #0a84ff;
    color: white;
    border: none;
    border-radius: 14px;
    font-size: clamp(1.05rem, 2.3vw, 1.1rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    margin-top: 0;
    box-shadow: 0 4px 16px rgba(10, 132, 255, 0.4);
}

.submit-btn.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    margin-top: 0.5rem;
}

.submit-btn:hover:not(:disabled) { 
    background: #0066cc; 
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(10, 132, 255, 0.5);
}

.submit-btn:disabled {
    background: rgba(52, 52, 56, 0.6);
    cursor: not-allowed;
    transform: none;
}

.login-options {
    width: 100%;
    margin-top: 1rem;
    padding-top: 1rem;
    /* 🔥 BORDE GRIS OSCURO */
    border-top: 1px solid rgba(210, 210, 215, 0.2);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    width: 100%;
    font-size: clamp(0.88rem, 1.95vw, 0.96rem);
    /* 🔥 TEXTO GRIS OSCURO */
    color: #aeaeb2;
    cursor: pointer;
    gap: 0.8rem;
    padding: 0.4rem 0;
    margin-bottom: 0.5rem;
}

#check { 
    width: 18px; 
    height: 18px; 
    accent-color: #0a84ff;
    flex-shrink: 0;
    margin-top: 2px;
}

.links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
}

.links a {
    /* 🔥 ENLACES AZULES */
    color: #0a84ff;
    font-size: clamp(0.87rem, 1.85vw, 0.94rem);
    font-weight: 500;
    padding: 0.4rem 0;
    transition: color 0.25s ease;
}

.links a:hover { 
    color: #0066cc; 
}

/* FOOTER OSCURO */
footer, .footer-responsive {
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
    /* 🔥 FONDO OSCURO */
    background: rgba(15, 15, 17, 0.8); 
    padding: 3rem 2rem; 
    gap: 1.5rem;
    text-align: center; 
    margin-top: 5rem; 
    backdrop-filter: blur(10px);
}

.footer-div {
    display: flex; 
    flex-wrap: wrap; 
    font-size: clamp(0.75rem, 1vw, 0.85rem);
    /* 🔥 TEXTO GRIS OSCURO */
    color: #86868b; 
    align-items: center; 
    justify-content: center; 
    gap: 1.5rem;
}

.sep { 
    background: rgba(210, 210, 215, 0.3); 
    height: 12px; 
    width: 1px; 
}

@media (max-width: 480px) { 
    .sep { display: none; } 
    .footer-div { flex-direction: column; gap: 1rem; } 
}

.footer-div.copyright {
    font-size: clamp(0.8rem, 1.1vw, 0.9rem);
    color: #aeaeb2;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    header nav, header .nav-container { padding: 1rem 1.5rem; }
    .box-container { flex-direction: column; width: 95%; gap: 3rem; }
    .box-1, .box-2 { max-width: 100%; height: auto; min-height: 420px; }
}

@media (max-width: 480px) {
    #main { padding: 1.5rem 1rem; }
    #sign-in { width: 96vw; padding: 2.5rem 2rem 2rem; margin: 1rem; }
    #apple-color-logo { width: 90px; }
}

@media (max-height: 500px) and (orientation: landscape) {
    #sign-in { padding: 2.5rem 2rem; gap: 1.4rem; }
}
