/* --- CONFIGURACIÓN DE FONDO PARA PC (EXTERIOR) --- */
html {
    background-color: #000 !important; 
}

/* 1. Forzamos el fondo de la pantalla completa a negro para que no se vea nada blanco detrás de las curvas */
html {
    background-color: #000 !important;
}

@media screen and (min-width: 600px) {
    body {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        height: 100vh !important;
        width: 100% !important;
        position: relative !important;
        background-color: #000 !important; /* Fondo exterior */
        overflow: hidden !important;
        margin: 0 !important;
    }

    .main-viewport {
        width: 750px !important; 
        height: 90vh !important;
        max-height: 950px !important;
        background: #242424 !important;
        position: relative !important;
        
        /* CLAVE: overflow hidden corta el contenido que se sale de las esquinas redondeadas */
        overflow: hidden !important; 
        border-radius: 35px !important;
        
        /* Borde y sombra del dispositivo */
        border: 8px solid #333 !important;
        box-shadow: 0 0 50px rgba(0,0,0,0.9) !important;
        z-index: 5;
        display: flex;
        flex-direction: column;
    }

    /* Contenedor interno para que el contenido haga scroll sin romper las esquinas redondeadas */
    .main-viewport > aside, 
    .main-viewport > div:not([style*="fixed"]) {
        overflow-y: auto !important;
        height: 100%;
        width: 100%;
    }

    /* AJUSTE BARRA SUPERIOR (HEADER) */
    div[style*="position:fixed;z-index:3;width:100%;top:0px"] {
        position: absolute !important; 
        width: 100% !important;
        max-width: 100% !important; /* Ahora es relativo al viewport de 430px */
        left: 0 !important;
        right: 0 !important;
        transform: none !important; /* Quitamos el translate para que encaje exacto */
        top: 0 !important;
        /* Redondeamos solo las esquinas superiores para que encajen con el marco del cel */
        border-radius: 25px 25px 0 0 !important; 
        z-index: 10 !important;
    }

    /* LOGO CENTRADO */
    .logoin {
        width: 100%;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    /* BOTONES FLOTANTES */
    .save-contact-fix, 
    .fixed-action-btn { 
        position: absolute !important; 
    }

    .save-contact-fix {
        bottom: 20px !important;
        right: 60px !important; /* Aumentado para dar espacio al menú sin solapamiento */
        padding: 0 !important;
        width: auto !important;
        z-index: 999;
    }

    .fixed-action-btn {
        bottom: 20px !important;
        right: 20px !important;
        z-index: 999;
    }

    /* MENÚ VERTICAL */
    .fixed-action-btn ul {
        display: flex !important;
        flex-direction: column !important;
        bottom: 60px !important;
        left: 12px !important; /* Centrado respecto al botón */
        transform: translateX(-50%) !important;
        width: 100% !important;
        align-items: center !important;
    }
    
    .fixed-action-btn ul li {
        margin-bottom: 15px !important;
        display: block !important;
    }

    /* EFECTO BALL (Carga) */
    body:before {
        position: absolute !important;
        left: 50% !important;
        width: 100% !important;
        max-width: 430px !important;
        z-index: 2 !important;
    }

    @keyframes puff {
        0% { top: 100%; height: 0px; padding: 0px; }
        100% { top: 50%; height: 100%; padding: 0px 430px; }
    }
}

/* Ocultar scrollbar visualmente */
.main-viewport::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* --- TU CSS ORIGINAL COMPLETO --- */

body {
  overflow: hidden;
  background-size: cover;
  position: fixed;
  padding: 0px;
  margin: 0px;
  width: 100%;
  height: 100%;
  font: bold 16px/1.650em 'Russo One', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body:before {
  content: "";
  height: 0px;
  padding: 0px;
  border: 130em solid black;
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: 2;
  display: block;
  -webkit-border-radius: 50%;
  border-radius: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  -webkit-animation: puff 0.5s 1.8s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards, borderRadius 0.2s 2.3s linear forwards;
  animation: puff 0.5s 1.8s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards, borderRadius 0.2s 2.3s linear forwards;
}

.container{
  margin: 0 auto;
}

.ball{
  text-align: center;
  margin: 0 auto;
  position: relative;
  z-index: 99;
  top: 6px;
  opacity: 0.5;
}

#media:hover{
    cursor: pointer;
}

h1,
h2 { 
  font-weight: 500;
  margin: 0px 0px 5px 0px;
}

h1 {
    font-size: 30px;
}

h2 {
  font-size: 20px;
  color:white
}

#rubberBand {
  animation-duration: 3s;
  animation-delay: 3.5s;
  animation-iteration-count: forwards;
    cursor: pointer;
}

.media:hover{
    cursor: pointer;
}

.profile-card {
  background: transparent;
  width: 56px;
  height: 56px;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  overflow: hidden;
  opacity: 0;
  margin-top: 70px;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  -webkit-border-radius: 50%;
  border-radius: 50%;
  -webkit-box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16), 0px 3px 6px rgba(0, 0, 0, 0.23);
  box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16), 0px 3px 6px rgba(0, 0, 0, 0.23);
  -webkit-animation: init 0.5s 0.2s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards, moveDown 1s 0.8s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards, moveUp 1s 1.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, materia 0.5s 2.7s cubic-bezier(0.86, 0, 0.07, 1) forwards;
  animation: init 0.5s 0.2s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards, moveDown 1s 0.8s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards, moveUp 1s 1.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, materia 0.5s 2.7s cubic-bezier(0.86, 0, 0.07, 1) forwards;
}

.profile-card header {
  width: 179px;
  height: 220px;
  padding: 40px 20px 30px 20px;
  display: inline-block;
  float: left;
  border-right: 2px dashed #EEEEEE;
  color: #000000;
  margin-top: 50px;
  opacity: 0;
  text-align: left;
  -webkit-animation: moveIn 1s 3.1s ease forwards;
  animation: moveIn 1s 3.1s ease forwards;
}

.profile-card header h1 {
  color: black;
  font-family: 'Sacramento', 'cursive'; 
  font-size: 2.em;
  font-weight: bold;
}

.profile-card .profile-bio {
  width: 175px;
  height: 180px;
  display: inline-block;
  float: right;
  padding: 50px 20px 30px 20px;
  color: #333333;
  margin-top: 50px;
  text-align: center;
  opacity: 0;
  -webkit-animation: moveIn 1s 3.1s ease forwards;
  animation: moveIn 1s 3.1s ease forwards;
}

.typewrite{
  text-decoration: none;
  color: black;
  margin: 0 auto;
  text-align: center;
  font-family: 'Wire One', sans-serif;
}

.bio{
    margin-top: 25px;
    font-size: 11px;
}

@-webkit-keyframes init {
  0% { width: 0px; height: 0px; }
  100% { width: 56px; height: 56px; margin-top: 0px; opacity: 1; }
}

@keyframes init {
  0% { width: 0px; height: 0px; }
  100% { width: 56px; height: 56px; margin-top: 0px; opacity: 1; }
}

@-webkit-keyframes puff {
  0% { top: 100%; height: 0px; padding: 0px; }
  100% { top: 50%; height: 100%; padding: 0px 100%; }
}

@keyframes puff {
  0% { top: 100%; height: 0px; padding: 0px; }
  100% { top: 50%; height: 100%; padding: 0px 100%; }
}

@-webkit-keyframes borderRadius {
  0% { -webkit-border-radius: 50%; }
  100% { -webkit-border-radius: 0px; }
}

@keyframes borderRadius {
  0% { -webkit-border-radius: 50%; }
  100% { border-radius: 0px; }
}

@-webkit-keyframes moveDown {
  0% { top: 50%; }
  50% { top: 40%; }
  100% { top: 100%; }
}

@keyframes moveDown {
  0% { top: 50%; }
  50% { top: 40%; }
  100% { top: 100%; }
}

@-webkit-keyframes moveUp {
  0% { background: #FFB300; top: 100%; }
  50% { top: 40%; }
  100% { top: 50%; background: #E0E0E0; }
}

@keyframes moveUp {
  0% { background: #FFB300; top: 100%; }
  50% { top: 40%; }
  100% { top: 50%; background: #E0E0E0; }
}

@-webkit-keyframes materia {
  0% { background: #E0E0E0; }
  50% { -webkit-border-radius: 4px; }
  100% { width: 440px; height: 280px; background: #FFFFFF; -webkit-border-radius: 4px; }
}

@keyframes materia {
  0% { background: #E0E0E0; }
  50% { border-radius: 4px; }
  100% { 
      width: 100%; 
      height: 100%; 
      background: <? echo $taplinksetback ?>; 
      border-radius: 4px; 
      overflow-y: auto; 
  }
}

@-webkit-keyframes moveIn {
  0% { margin-top: 50px; opacity: 0; }
  100% { opacity: 1; margin-top: -20px; }
}

@keyframes moveIn {
  0% { margin-top: 50px; opacity: 0; }
  100% { opacity: 1; margin-top: -20px; }
}

@-webkit-keyframes scaleIn {
  0% { -webkit-transform: scale(0); }
  100% { -webkit-transform: scale(1); }
}

@keyframes scaleIn {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

@-webkit-keyframes ripple {
  0% { transform: scale3d(0, 0, 0); }
  50%, 100% { -webkit-transform: scale3d(1, 1, 1); }
  100% { opacity: 0; }
}

@keyframes ripple {
  0% { transform: scale3d(0, 0, 0); }
  50%, 100% { transform: scale3d(1, 1, 1); }
  100% { opacity: 0; }
}

@media screen and (min-aspect-ratio: 4/3) {
  body { background-size: cover; }
  body:before { width: 0px; }
}

@media screen and (min-height: 90px) {
  .profile-card header {
    width: auto;
    height: auto;
    padding: 30px 20px;
    display: block;
    float: none;
    border-right: none;
  }
  .profile-card .profile-bio {
    width: auto;
    height: auto;
    padding: 15px 20px 30px 20px;
    display: block;
    float: none;
  }
}

.button {
  min-width: 100%;
  min-height: 55px;
  font-family: 'Nunito', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  font-weight: 700;
  color: #313133;
  background: linear-gradient(90deg, rgb(192,192,192) 0%, rgb(230,230,230) 100%);
  border: none;
  border-radius: 1000px;
  transition: all 0.3s ease-in-out 0s;
  cursor: pointer;
  outline: none;
  position: relative;
  padding: 1px;
}

.button2 {
  min-width: 100%;
  min-height: 55px;
  font-family: 'Nunito', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  font-weight: 700;
  color: #313133;
  background: linear-gradient(90deg, rgb(192,192,192) 0%, rgb(230,230,230) 100%);
  border: none;
  border-radius: 1000px;
  transition: all 0.3s ease-in-out 0s;
  cursor: pointer;
  outline: none;
  position: relative;
  padding: 1px;
}

button::before {
  border-radius: 1000px;
  min-width: calc(100% + 12px);
  min-height: calc(55px + 12px);
  border: 6px solid #00FFCB;
  box-shadow: 0 0 30px rgba(0,255,203,.64);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: all .3s ease-in-out 0s;
}

.column { float: left; width: 50%; }
.row:after { content: ""; display: table; clear: both; }
.iconswrap{ display: flex; flex-wrap: wrap; justify-content: center; }
.swiper-container { width: 100%; height: 400px; overflow: hidden; }
.swiper-slide { width: 300px; height: 80%; border-radius: 10px; transition: transform 0.3s ease; z-index: auto; }
.swiper-slide img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.swiper-button-next, .swiper-button-prev { color: #fff; background-color: rgba(0, 0, 0, 0.5); border-radius: 50%; padding: 10px; }
.swiper-slide-active { box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5); }

.btn-add-contact {
  width: 85%;
  font-size: 1rem;
  padding: 12px 18px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(145deg, #e5e5e5, #6a6a6b);
  color: white;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3), inset 0 2px 4px rgba(255,255,255,0.3);
  transition: all .25s ease;
}

.btn-add-contact:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.25);
}

::-webkit-scrollbar { width: 0px; background: transparent; }

/* Mobile optimization: stack Save Contact and Floating Menu vertically to prevent overlapping */
@media screen and (max-width: 599px) {
    .save-contact-fix {
        position: fixed !important;
        bottom: 20px !important;
        right: 60px !important;
        left: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        width: auto !important;
        z-index: 999 !important;
    }
    .save-contact-fix img {
        width: 130px !important;
        border-radius: 15px !important;
    }
    .fixed-action-btn {
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        left: auto !important;
        z-index: 999 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    /* Stack FAB menu items (like admin lock button) directly above the FAB button on mobile */
    .fixed-action-btn ul {
        bottom: 64px !important;
        right: 0 !important;
        left: auto !important;
        width: 56px !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    .fixed-action-btn ul li {
        margin-bottom: 15px !important;
        display: block !important;
        width: 56px !important;
        height: 56px !important;
    }
}