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

html, body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #1e2430;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  position: relative;
}

/* Ambient Glowing Background Orbs */
body::before, body::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: 0;
  opacity: 0.45;
  pointer-events: none;
  animation: orbFloat 10s ease-in-out infinite alternate;
}

body::before {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #5b67f2 0%, #8b5cf6 100%);
  top: 10%;
  left: 10%;
}

body::after {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #2ecc71 0%, #06b6d4 100%);
  bottom: 10%;
  right: 10%;
  animation-delay: -5s;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.1); }
  100% { transform: translate(-20px, 30px) scale(0.95); }
}

/* Card Container with Glowing Border */
@keyframes cardPop {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-container {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  width: 100%;
  max-width: 520px;
  border-radius: 16px;
  padding: 24px 20px 24px 20px;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 25px rgba(91, 103, 242, 0.2);
  position: relative;
  z-index: 10;
  margin: 0 auto;
  animation: cardPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.4s ease;
}

/* Fluid Flex Badges Row */
.badges-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  width: 100%;
}

.desktop-tag, .country-title-badge {
  flex: 1;
  max-width: 49%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  padding: 5px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.desktop-tag {
  background: linear-gradient(135deg, #06b6d4 0%, #10b981 100%);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
  animation: floatBadge 3s ease-in-out infinite;
  animation-delay: -1.5s;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

@keyframes spinGlobe {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.country-title-badge {
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899, #6366f1);
  background-size: 300% 300%;
  animation: gradientShift 4s ease infinite, floatBadge 3s ease-in-out infinite;
}

.country-title-badge::before {
  content: '🌐';
  font-size: 12px;
  flex-shrink: 0;
  animation: spinGlobe 6s linear infinite;
}

.card-title {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #0f172a, #334155);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 4px;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

/* Search Box & Inputs */
.search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
  width: 100%;
}

.ip-input {
  flex: 1;
  min-width: 0;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  color: #1e293b;
  font-weight: 600;
  outline: none;
  transition: all 0.25s ease;
  background: #f8fafc;
}

.ip-input:focus {
  border-color: #6366f1;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

/* Sheen Animated Lookup Button */
.btn-lookup {
  position: relative;
  background: linear-gradient(135deg, #5b67f2 0%, #4f46e5 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  white-space: nowrap;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(91, 103, 242, 0.3);
}

.btn-lookup::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: rotate(30deg) translateX(-100%);
  transition: transform 0.6s ease;
}

.btn-lookup:hover::after {
  transform: rotate(30deg) translateX(100%);
}

.btn-lookup:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(91, 103, 242, 0.45);
}

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

/* Results Container Initial Hidden State & Smooth Reveal */
.result-container {
  display: none;
  margin-top: 16px;
  opacity: 0;
}

@keyframes resultExpand {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-container.show {
  display: block;
  animation: resultExpand 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Data List Rows */
.data-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 6px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13.5px;
  border-radius: 6px;
  gap: 8px;
  transition: background-color 0.2s ease;
}

.data-row:hover {
  background-color: #f1f5f9;
}

.data-row:last-child {
  border-bottom: none;
}

.label {
  width: 85px;
  flex-shrink: 0;
  color: #64748b;
  font-weight: 600;
  font-size: 13px;
}

.value {
  flex: 1;
  min-width: 0;
  color: #0f172a;
  font-weight: 600;
  font-size: 13.5px;
  word-break: break-word;
  overflow-wrap: anywhere;
  transition: all 0.3s ease;
}

/* Joss Value Pop Keyframes */
@keyframes jossFlash {
  0% {
    opacity: 0;
    transform: translateY(6px);
    color: #6366f1;
  }
  50% {
    color: #10b981;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    color: #0f172a;
  }
}

.value.joss-pop {
  animation: jossFlash 0.4s ease-out forwards;
}

/* Interactive Copy Buttons */
.btn-copy {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: all 0.2s ease;
  min-width: 54px;
  text-align: center;
}

.btn-copy:hover {
  background: #6366f1;
  border-color: #6366f1;
  color: #ffffff;
  transform: translateY(-1px);
}

@keyframes successBounce {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.btn-copy.copied {
  background: #10b981 !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
  animation: successBounce 0.3s ease;
}

/* Copy All Button */
.btn-copy-all {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, #2ecc71 0%, #10b981 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 18px;
  overflow: hidden;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.35);
  letter-spacing: 0.3px;
}

.btn-copy-all::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent 30%, rgba(255, 255, 255, 0.4) 50%, transparent 70%);
  transform: rotate(30deg) translateX(-100%);
  animation: buttonSheen 4s infinite linear;
}

@keyframes buttonSheen {
  0% { transform: rotate(30deg) translateX(-100%); }
  20% { transform: rotate(30deg) translateX(100%); }
  100% { transform: rotate(30deg) translateX(100%); }
}

.btn-copy-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(46, 204, 113, 0.45);
}

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

.btn-copy-all.copied {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  animation: successBounce 0.3s ease;
}

/* Small Screens Tweaks */
@media (max-width: 380px) {
  .card-container {
    padding: 18px 12px;
  }
  .label {
    width: 75px;
    font-size: 12px;
  }
  .value {
    font-size: 12px;
  }
  .btn-copy {
    padding: 4px 8px;
    font-size: 11px;
    min-width: 48px;
  }
}
