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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #1e2430;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-x: hidden;
  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;
  animation: orbFloat 10s ease-in-out infinite alternate;
}

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

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

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

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

.card-container {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  width: 100%;
  max-width: 540px;
  border-radius: 16px;
  padding: 40px 36px 30px 36px;
  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;
  animation: cardPop 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-container:hover {
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.45),
    0 0 35px rgba(91, 103, 242, 0.3);
}

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

/* Top-Left Corner Device Tag */
.desktop-tag {
  position: absolute;
  top: 14px;
  left: 18px;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4 0%, #10b981 100%);
  padding: 5px 14px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  z-index: 10;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.35);
  animation: floatBadge 3s ease-in-out infinite;
  animation-delay: -1.5s;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ultra Animated Shifting Gradient & Floating Neon Country Badge */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes floatBadge {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.5), 0 0 25px rgba(236, 72, 153, 0.3);
  }
  50% {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.7), 0 0 35px rgba(236, 72, 153, 0.5);
  }
}

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

.country-title-badge {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899, #6366f1);
  background-size: 300% 300%;
  padding: 5px 15px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
  animation: gradientShift 4s ease infinite, floatBadge 3s ease-in-out infinite;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

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

/* Search Box & Inputs */
.search-box {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.ip-input {
  flex: 1;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 14px;
  color: #1e293b;
  font-weight: 600;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #f8fafc;
}

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

/* Sheen Animated Lookup Button */
.btn-lookup {
  position: relative;
  background: linear-gradient(135deg, #5b67f2 0%, #4f46e5 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(91, 103, 242, 0.35);
}

.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(-2px);
  box-shadow: 0 8px 22px rgba(91, 103, 242, 0.5);
}

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

/* Data List Rows & 3D Cascade */
.data-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 10px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.data-row:hover {
  background-color: #f1f5f9;
  transform: translateX(4px) scale(1.01);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

.label {
  width: 105px;
  color: #64748b;
  font-weight: 600;
}

.value {
  flex: 1;
  color: #0f172a;
  font-weight: 600;
  padding-right: 12px;
  word-break: break-all;
  transition: all 0.3s ease;
}

/* Joss Value Pop & Flash Keyframes */
@keyframes jossFlash {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.95);
    color: #6366f1;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
  }
  50% {
    color: #10b981;
    text-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    color: #0f172a;
    text-shadow: none;
  }
}

.value.joss-pop {
  animation: jossFlash 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Interactive Copy Buttons */
.btn-copy {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 65px;
  text-align: center;
}

.btn-copy:hover {
  background: #6366f1;
  border-color: #6366f1;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

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

.btn-copy.copied {
  background: #10b981 !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
  animation: successBounce 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

/* Premium Sheen 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: 14px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 22px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 20px 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(-3px) scale(1.01);
  box-shadow: 0 10px 28px rgba(46, 204, 113, 0.5);
}

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

.btn-copy-all.copied {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  animation: successBounce 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (max-width: 580px) {
  .card-container {
    padding: 24px 20px;
  }
  .card-title {
    margin-top: 28px;
  }
  .label {
    width: 90px;
    font-size: 13px;
  }
  .value {
    font-size: 13px;
  }
  .country-title-badge {
    top: 10px;
    right: 12px;
    font-size: 11px;
  }
  .desktop-tag {
    top: 10px;
    left: 12px;
    font-size: 11px;
    max-width: 150px;
  }
}
