:root {
    --primary-blue: #3b5998;
    --secondary-blue: #8b9dc3;
    --light-gray: #f7f7f7;
    --dark-gray: #666;
    --instagram-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    font-family: var(--instagram-font);
    background: var(--light-gray);
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.5;
}

.header-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    margin-bottom: 30px;
}

.auth-container {
    width: 100%;
    max-width: 980px;
    margin: 20px auto;
    padding: 0 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 32px;
}

.auth-header h1 {
    color: #262626;
    font-size: 36px;
    margin: 0 0 12px 0;
    font-family: 'Instagram Sans Script', var(--instagram-font);
}

.welcome-message {
    background: white;
    padding: 1.875rem;
    border: 1px solid #dbdbdb;
    border-radius: 3px;
    margin: 1.25rem 0;
    text-align: left;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.welcome-message h2 {
    color: #4f5feb;
    font-size: 1.5rem;
    margin: 0 0 1.25rem 0;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    text-align: center;
}

.welcome-message p {
    margin: 0 0 0.9375rem 0;
    color: #737373;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.35;
    font-family: inherit;
}

.welcome-message ul {
    text-align: left;
    max-width: 100%;
    margin: 1.25rem 0;
    padding-left: 2rem;
    font-family: inherit;
}

.welcome-message ul li {
    margin: 0.625rem 0;
    color: #737373;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.35;
    list-style-type: disc;
    font-family: inherit;
}

.welcome-message ul li::marker {
    color: #262626;
}


.welcome-footer {
    margin-top: 1.875rem;
    font-size: 0.875rem;
    color: #737373;
    border-top: 1px solid #dbdbdb;
    padding-top: 1.25rem;
    font-family: inherit;
    font-weight: 400;
    line-height: 1.35;
    text-align: center;
}

.welcome-footer p {
    margin: 0 0 0.5rem 0;
    color: #737373;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.35;
    font-family: inherit;
}

.welcome-footer .copyright {
    margin: 0;
    color: #737373;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.35;
    font-family: inherit;
}

.auth-content {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 350px;
    margin: 30px auto;
    gap: 10px;
}

.login-section, .register-section {
    background: white;
    padding: 20px;
    border: 1px solid #dbdbdb;
    border-radius: 1px;
    text-align: center;
}

.login-section {
    padding: 30px 40px;
}

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

.form-group input {
    width: 100%;
    padding: 9px 8px;
    border: 1px solid #dbdbdb;
    border-radius: 3px;
    font-size: 12px;
    box-sizing: border-box;
    font-family: var(--instagram-font);
    background-color: #fafafa;
}

.form-group input:focus {
    border-color: #a8a8a8;
    outline: none;
}

/* Sobrescribir estilos de autocompletado del navegador */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus,
.form-group input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #fafafa inset !important;
    -webkit-text-fill-color: #262626 !important;
    background-color: #fafafa !important;
    background-clip: content-box !important;
}

.form-group input:-webkit-autofill::first-line {
    font-family: var(--instagram-font) !important;
    font-size: 12px !important;
}

.btn-login, #registerForm button {
    width: 100%;
    padding: 7px 16px;
    background: #4f5feb;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    font-family: var(--instagram-font);
    margin-top: 8px;
}

.btn-login:hover, #registerForm button:hover {
    background: #3d4fd4;
}

.register-section {
    margin-top: 10px;
}

.register-section h3 {
    color: #262626;
    font-size: 17px;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.register-section p {
    color: #262626;
    font-size: 14px;
    margin: 15px 0;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 10px 0;
    text-align: center;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #dbdbdb;
}

.auth-divider span {
    color: #8e8e8e;
    font-size: 13px;
    font-weight: 600;
    margin: 0 18px;
    text-transform: uppercase;
}

.privacy-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #8e8e8e;
}

.privacy-footer a {
    color: #8e8e8e;
    text-decoration: none;
    margin: 0 5px;
}

.error-message {
    color: #ed4956;
    font-size: 12px;
    margin-top: 4px;
    display: none;
    text-align: left;
}

/* Estilos para mensajes de éxito */
.success-message {
    color: #4CAF50;
    background-color: #E8F5E9;
    border: 1px solid #C8E6C9;
    padding: 10px;
    margin: 10px 0;
    border-radius: 3px;
    display: none;
}

.btn-facebook {
    background: none;
    border: none;
    color: #385185;
    cursor: pointer;
    font-family: var(--instagram-font);
    font-size: 14px;
    font-weight: 600;
    margin: 8px 0;
    padding: 0;
    width: auto;
}

.forgot-password {
    color: #00376b;
    font-size: 12px;
    line-height: 16px;
    margin-top: 12px;
    text-align: center;
    display: block;
    text-decoration: none;
}

/* Ajustes adicionales para mejorar el aspecto */
.form-group input::placeholder {
    color: #8e8e8e;
    font-size: 12px;
}

.btn-register {
    width: 100%;
    padding: 7px 16px;
    background: #4f5feb;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    font-family: var(--instagram-font);
    margin-top: 8px;
}

.btn-register:hover {
    background: #3d4fd4;
}

.login-link, .register-link {
    color: #4f5feb;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.login-link:hover, .register-link:hover {
    color: #3d4fd4;
}

#registerSection {
    background: white;
    padding: 20px;
    border: 1px solid #dbdbdb;
    border-radius: 1px;
    margin-top: 10px;
}

#registerSection .form-group {
    margin-bottom: 6px;
}

#registerSection input {
    width: 100%;
    padding: 9px 8px;
    border: 1px solid #dbdbdb;
    border-radius: 3px;
    font-size: 12px;
    box-sizing: border-box;
    font-family: var(--instagram-font);
    background-color: #fafafa;
}

#registerSection input:focus {
    border-color: #a8a8a8;
    outline: none;
}

/* Sobrescribir estilos de autocompletado del navegador para registro */
#registerSection input:-webkit-autofill,
#registerSection input:-webkit-autofill:hover,
#registerSection input:-webkit-autofill:focus,
#registerSection input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #fafafa inset !important;
    -webkit-text-fill-color: #262626 !important;
    background-color: #fafafa !important;
    background-clip: content-box !important;
}

#registerSection input:-webkit-autofill::first-line {
    font-family: var(--instagram-font) !important;
    font-size: 12px !important;
}

#registerSection h3 {
    color: #262626;
    font-size: 17px;
    margin: 0 0 10px 0;
    font-weight: 600;
    text-align: center;
}

#registerSection p {
    color: #8e8e8e;
    font-size: 12px;
    margin-bottom: 15px;
    text-align: center;
}

.register-section p, .login-section p {
    text-align: center;
    margin: 15px 0;
    font-size: 14px;
    color: #262626;
}

.birthday-icon {
    text-align: center;
    margin: 20px 0;
}

.birthday-info {
    text-align: center;
    color: #8e8e8e;
    font-size: 14px;
    margin: 10px 0;
}

.birthday-disclaimer {
    text-align: center;
    color: #8e8e8e;
    font-size: 12px;
    margin: 10px 0;
}

.birthday-group {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.birthday-group select {
    flex: 1;
    padding: 8px;
    border: 1px solid #dbdbdb;
    border-radius: 4px;
    background-color: #fafafa;
    font-size: 12px;
    color: #8e8e8e;
    font-family: var(--instagram-font);
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%238e8e8e' d='M0 2l4 4 4-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
}

.birthday-group select:focus {
    border-color: #a8a8a8;
    outline: none;
    color: #262626;
}

.birthday-group select option {
    color: #262626;
    background-color: #ffffff;
    font-size: 12px;
}

.birthday-group select option:disabled {
    color: #8e8e8e !important;
    background-color: #fafafa !important;
    font-style: normal;
}

.btn-next {
    width: 100%;
    padding: 12px;
    background-color: #4f5feb;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.btn-next:hover {
    background-color: #3d4fd4;
}

.btn-next:disabled {
    background-color: #b2dffc;
    cursor: not-allowed;
}

#registerStep2 {
    text-align: center;
}

#registerStep2 h4 {
    font-size: 16px;
    margin: 10px 0;
}

/* Animación para la transición entre pasos */
#registerStep1, #registerStep2 {
    transition: all 0.3s ease;
}

/* Estilos para los globos y la torta */
.birthday-icon svg {
    max-width: 100%;
    height: auto;
}

.birthday-icon svg g {
    transform-origin: center;
    animation: float 3s ease-in-out infinite;
}

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

.btn-back {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background-color: transparent;
    border: 1px solid #4f5feb;
    border-radius: 5px;
    color: #4f5feb;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background-color: #fafafa;
    border-color: #3d4fd4;
    color: #3d4fd4;
}

.btn-back:active {
    background-color: #efefef;
}

.footer-links {
    margin-top: 8px;
    font-size: 12px;
    color: #8e8e8e;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.footer-links a {
    color: #8e8e8e;
    text-decoration: none;
    font-weight: 400;
}

.footer-links a:hover {
    text-decoration: underline;
}

.instagram-spinner-overlay {
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: transparent;
}

.instagram-spinner {
    animation: rotate 1s linear infinite;
}

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

.btn-login, .btn-register {
    position: relative;
}

.btn-login.loading, .btn-register.loading {
    color: transparent !important;
}

.btn-login.loading .instagram-spinner-overlay,
.btn-register.loading .instagram-spinner-overlay {
    display: flex;
}

/* Splash Screen para index.html */
.splash-screen {
  position: fixed;
  z-index: 9999;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #e5e6e8;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s;
}
.splash-screen.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}
.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.splash-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.logo-svg {
  width: 7.5m;
  height: 7.5m;
  max-width: 37vw;
  max-height: 37vw;
  min-width: 4.8em;
  min-height: 4.8em;
  margin-bottom: 0.8em;
}
.splash-title {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 2.1em;
  font-weight: 600;
  color: #00376b;
  letter-spacing: 0.04em;
  margin: 0.2em 0 0 0;
  text-align: center;
}
/* Ajuste para splash-title pequeño y abajo */
.splash-title {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 2.2em;
  text-align: center;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 1em;
  font-weight: 600;
  color: #00376b;
  letter-spacing: 0.04em;
  margin: 0;
  opacity: 0.95;
  z-index: 10001;
  pointer-events: none;
}
@media (max-width: 600px) {
  .logo-svg {
    width: 5.5em;
    height: 5.5em;
    max-width: 70vw;
    max-height: 70vw;
  }
  .splash-title {
    font-size: 1.3em;
  }
  .splash-title {
    font-size: 0.95em;
    bottom: 1.2em;
  }

  .welcome-message p,
  .welcome-message ul li,
  .welcome-footer p,
  .welcome-footer .copyright {
    font-size: 0.8125rem !important;
    color: #737373 !important;
    line-height: 1.35 !important;
  }
}
body.splash-active {
  overflow: hidden !important;
  height: 100vh !important;
}

/* Estilos para el botón mostrar/ocultar contraseña */
.password-field-container {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field-container input {
  padding-right: 80px !important;
}

.password-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #8e8e8e;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 3px;
  transition: all 0.2s ease;
  font-family: var(--instagram-font);
}

.password-toggle-btn:hover {
  color: #262626;
  background-color: transparent;
}

.password-toggle-btn:active {
  background-color: transparent;
}

.name-suggestion {
    color: #4f5feb !important;
    cursor: pointer;
    transition: color 0.2s ease;
}

.name-suggestion:hover {
    color: #3d4fd4 !important;
}

