/* ======================================
   VARIABLES (PUEDES PROBAR COLORES AQUÍ)
   ====================================== */
:root {
  --bg-main: #e6f2ff;
  --item-bg: rgba(255,255,255,0.45);
  --item-bg-hover: rgba(255,255,255,0.85);
  --shadow-main: 0 14px 30px rgba(0,0,0,0.18);
}

/* ======================================
   MICRO-ANIMACIÓN AL CARGAR URL
   ====================================== */
body {
  font-family: Arial, sans-serif;
  background: var(--bg-main);
  min-height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;

  animation: pageEnter 0.35s cubic-bezier(.25,.8,.25,1);
}

/* Respeta usuarios con reducir movimiento */
@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
  }
}

/* ======================================
   CONTENEDOR
   ====================================== */
.country-selector {
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ======================================
   ITEM PAÍS
   ====================================== */
.country-item {
  display: flex;
  align-items: center;
  gap: 14px;

  padding: 14px 16px;
  border-radius: 18px;
  text-decoration: none;
  color: #000;

  background: var(--item-bg);

  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp 0.5s ease forwards;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

/* Entrada escalonada automática */
.country-item:nth-child(n) {
  animation-delay: calc(0.04s * var(--i));
}

/* ======================================
   HOVER (DESKTOP)
   ====================================== */
.country-item:hover {
  transform: translateY(-6px) scale(1.03);
  background: var(--item-bg-hover);
  box-shadow: var(--shadow-main);
}

/* ======================================
   BANDERAS
   ====================================== */
.fi {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: 0 5px 12px rgba(0,0,0,0.28);
  transition: transform 0.25s ease;
}

.country-item:hover .fi {
  transform: scale(1.12);
}

/* ======================================
   TEXTO
   ====================================== */
.country-name {
  font-size: 15px;
}

/* ======================================
   ANIMACIONES
   ====================================== */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ======================================
   📱 RESPONSIVE MÓVIL
   ====================================== */
@media (max-width: 480px) {

  body {
    align-items: flex-start;
    padding-top: 40px;
  }

  .country-selector {
    width: 100%;
    max-width: 360px;
    padding: 0 16px;
  }

  .country-item {
    padding: 16px;
    border-radius: 16px;
  }

  .country-name {
    font-size: 16px;
  }

  .country-item:hover {
    transform: scale(1.02);
  }
}

/* ======================================
   📳 VIBRACIÓN VISUAL (TAP)
   ====================================== */
@keyframes tapFeedback {
  0%   { transform: scale(1); }
  40%  { transform: scale(0.96); }
  70%  { transform: scale(0.98); }
  100% { transform: scale(1); }
}

@media (max-width: 480px) {
  .country-item:active {
    animation: tapFeedback 0.18s ease;
  }
}
