.ip-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 1rem;
  background: var(--card); 
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  font-size: 1rem;
  color: var(--text); 
}

.ip-container:hover {
  transform: translateY(-1px);
  opacity: 1;
}

  /* Headings & Text */
  .ip-container h1 {
    font-size: 2rem !important;
    font-weight: 800;
    margin-top: 0.5rem;
    line-height: 1.3 !important;
    text-align: center !important;
  }

  .ip-container p,
  .tool-sub {
    font-size: 1rem;
    text-align: center;
    color: var(--soft);
  }

.ip-tool { 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 1rem; 
}

.ip-tool .ip-grid { 
  display: grid; 
  gap: 1.5rem; 
  grid-template-columns: 1fr; 
}
@media(min-width:960px){ 
  .ip-tool .ip-grid { 
    grid-template-columns: 500px 1fr; 
    align-items: start; 
  } 
}

/* Form card */
.ip-controls { 
  background: var(--card); 
  padding: 1.2rem; 
  border-radius: 12px; 
  border: 1px solid var(--border); 
  box-shadow: var(--shadow, 0 4px 12px rgba(0,0,0,0.06)); 
  display: flex; 
  flex-direction: column; 
  gap: 1rem; 
}
.ip-controls input[type="text"] {
  width: 100%;
  padding: .7rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
}

.hint{
  margin-top: 0.8rem;
}

.ip-controls .controls { 
  display: flex; 
  gap: .6rem; 
  flex-wrap: wrap; 
}

/* Results card */
.ip-results { 
  background: var(--card); 
  border-radius: 12px; 
  padding: 1.2rem; 
  box-shadow: var(--shadow, 0 4px 12px rgba(0,0,0,0.06)); 
  overflow: hidden; 
}

.result-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.ip-public .muted {
  font-weight: 500;
  color: var(--soft);
}

.ip-public h2 {
  margin: 0.2rem 0 0;
  font-size: 1.4rem;
}

.ip-time .muted {
  font-weight: 500;
  text-align:right;
  margin-bottom: 0.4rem;
  color: var(--soft);
}

.info-item .muted { 
  font-size: .9rem; 
  color: var(--soft); 
}

/* Dark mode */
[data-theme="dark"] .result-json {
  background: #1e293b; 
  color: #f1f5f9;     
}

.info-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); 
  gap: .8rem; 
  margin-top: .8rem; 
}

.info-grid .info-item{ 
  background: var(--muted); 
  padding: .6rem; 
  border-radius: 10px; 
  border: 1px solid var(--border); 
  overflow: auto;
}

/* Map wrapper */
#map { 
  width: 100%; 
  height: 320px; 
  border-radius: 10px; 
  border: 1px solid var(--border); 
}

/* Buttons */
.result-actions{
  display: flex;
  flex-wrap: wrap;
  margin-top: 1rem;
  gap: 0.6rem;
}

.result-actions .btn { 
  max-width: 140px; 
}

/* small */
.result-json { 
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace; 
  font-size: .9rem; 
  background: var(--soft-bg, #f6f6f6); 
  padding: .6rem; 
  border-radius: 8px; 
  max-height:200px;
  margin-top:.6rem;
  overflow-x: auto; 
}

/* Raw JSON */
.result-json {
  background: #f8fafc;
  color: #020617;
  padding: 0.75rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  font-family: monospace;
  font-size: 0.9rem;
  line-height: 1.4;
}

#loadingOverlay { 
  position: fixed; 
  inset: 0; 
  background: rgba(0,0,0,0.45); 
  display: none; 
  align-items: center; 
  justify-content: center; 
  z-index: 1000; 
}

#loadingOverlay.active { display: flex; }
#loadingOverlay .spinner { 
  width: 46px; 
  height: 46px; 
  border-radius: 50%; 
  border: 5px solid rgba(255,255,255,0.15); 
  border-top-color: #fff; 
  animation: spin 1s linear infinite; 
}

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


/* SEO Help Section */
.seo-help { 
  background: var(--card); 
  border: 1px solid var(--border); 
  padding: 1.25rem; 
  border-radius: 12px; 
  box-shadow: 0 8px 18px rgba(0,0,0,0.04); 
  margin-bottom: 1.5rem; 
}

.seo-help h2 { margin-top: 0; font-size: 1.5rem; font-weight: 800; }
.seo-help h3 { margin-top: 1rem; font-size: 1.05rem; color: var(--text); font-weight: 700; }
.seo-help p, .seo-help li, .seo-help dd { color: var(--text); line-height: 1.6; }
.seo-help ul { margin-left: 1.25rem; }
.seo-help ol { margin-left: 1.25rem; }
.seo-help dl { margin-top: .6rem; }
.seo-help dt { font-weight: 700; margin-top: .6rem; }
.seo-help dd { margin: 0 0 .6rem 0; }

/* =========================
   MOBILE ENHANCEMENTS 
   ========================= */
@media(max-width:520px){

  .ip-container {
    max-width: none !important; 
    width: 100% !important;
    padding: 1rem 0.2rem !important;
    margin: 1rem auto 1rem !important;
    border-radius: 12px !important;
    background: var(--card);
    box-shadow: 0 3px 10px rgba(0,0,0,0.15) !important;
  }

  /* Headings & Text */
  .ip-container h1 {
    font-size: 1.55rem !important;
    font-weight: 800;
    margin-top: 0.5rem;
    line-height: 1.3 !important;
    text-align: center !important;
  }

  .ip-container p,
  .tool-sub {
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    line-height: 1.55 !important;
    margin-bottom: 1rem !important;
    color: var(--soft);
  }

  /* IP Tool Grid */
  .ip-tool .ip-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
  }

  .ip-tool {
    padding: 0.8rem;
  }

  .info-grid { 
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }

  .info-grid .info-item{
    background: #f8f9fa;
    color: #0f172a;
    overflow-x: auto;
  }

  .ip-public .muted {
    font-weight: 600;
    color: var(--soft);
  }

  .info-item .muted { 
    color: var(--soft); 
  }

  /* Input + Buttons */
  .card {
    max-width: none;
    width: 100% !important;
    background: var(--muted);
    padding: 1.2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    border: none;
    box-shadow: var(--shadow, 0 4px 12px rgba(0,0,0,0.06));
  }

  .ip-controls input[type="text"] {
    width: 100%;
    padding: .7rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 1rem;
  }

  .ip-controls label{
    text-align: center;
  }

  .hint{
    margin: 0rem auto -1rem;
  }

  .ip-controls .controls { 
    display: flex;
    font-size: 0.85rem;
    gap: .6rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .btn{
    font-size: 0.75rem;
  }

  .controls{

  }

  .result-top{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .ip-public{
    text-align: center;
  }

/* Hide the Detection Time on mobile */
  .ip-time{
    display: none;
  }

  .result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    justify-content: center;
  }

  .result-actions .btn.download-json {
    display: none !important;
  }

}

