/* IP display section enhancements */
.ip-display {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

#ip {
  font-family: ui-monospace, SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  word-break: break-all;
}

.action-button {
  padding: 0.4rem 0.9rem;
  border: 1px solid #3a5a8a;
  border-radius: 6px;
  background: #1b3a6d;
  color: #d9ebff;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.action-button:hover {
  background: #254a80;
  border-color: #4a7ab8;
}

.action-button:active {
  transform: translateY(1px);
}

.action-button.secondary {
  background: #1a2740;
  border-color: #2a4a7a;
}

.action-button.secondary:hover {
  background: #223355;
}

.meta-text {
  font-size: 0.8rem;
  color: #7a9bc8;
  margin-top: 0.5rem;
}

#ip-section {
  background: #0d1a30;
  border: 1px solid #2a4a86;
  border-radius: 12px;
  padding: 1.25rem;
  margin: 1rem 0;
}

/* Loading state animation */
#ip.loading {
  animation: pulse 1.5s ease-in-out infinite;
  opacity: 0.7;
}

#ip[data-state="error"] {
  color: #ff7b7b;
  font-weight: 500;
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 0.4; }
}

#ip-section .status-hint {
  font-size: 0.85rem;
  color: #7a9bc8;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Additional styles for IP history */

.content-section {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
  .content-section {
    background: #1a1a1a;
    color: #eee;
  }
}

@media (max-width: 768px) {
  .content-section {
    margin-left: 1rem;
    margin-right: 1rem;
  }
}

#ip-history-container table {
  font-size: 0.9rem;
}

#ip-history-container th {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem;
  border-bottom: 2px solid #2a4a86;
}

#ip-history-container td {
  padding: 0.5rem;
  border-bottom: 1px solid #1a2a4d;
}

@media (prefers-color-scheme: dark) {
  #ip-history-container th {
    border-bottom-color: #3a5a96;
  }
  
  #ip-history-container td {
    border-bottom-color: #2a3a5d;
  }
}

#export-history-btn, #clear-history-btn {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: opacity 0.2s ease;
}

#export-history-btn:hover, #clear-history-btn:hover {
  opacity: 0.9;
}

#export-history-btn {
  background: #1b2f54;
  color: #d9e7ff;
  border: 1px solid #325791;
}

#clear-history-btn {
  background: #2a1b2f;
  color: #e7d9ff;
  border: 1px solid #5a3260;
}

@media (prefers-color-scheme: dark) {
  #export-history-btn {
    background: #2a3f64;
    border-color: #4267a1;
  }
  
  #clear-history-btn {
    background: #3a2b3f;
    border-color: #6a4270;
  }
}

nav a {
  margin: 0 1rem;
  color: #0c0c0c;
  text-decoration: none;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

nav a:hover {
  background-color: rgba(0,0,0,0.05);
  text-decoration: none;
}

@media (prefers-color-scheme: dark) {
  nav a {
    color: #eee;
  }
  
  nav a:hover {
    background-color: rgba(255,255,255,0.1);
  }
}
/* 2026-02-28: header/nav readability + boxed layout polish */
#languages-placeholder {
  max-width: 1100px;
  margin: 0.9rem auto 0;
  padding: 0 1rem;
}

.lang-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  background: #0f1a2e;
  border: 1px solid #2a4a86;
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
}

.lang-switch a,
nav a,
nav a:visited {
  color: #d9e7ff !important;
  background: #1b2f54;
  border: 1px solid #325791;
  border-radius: 8px;
  text-decoration: none;
  padding: 0.42rem 0.72rem;
  display: inline-block;
  font-weight: 600;
}

.lang-switch a:hover,
nav a:hover {
  color: #ffffff !important;
  background: #26467b;
  border-color: #4c73b3;
}

.lang-switch {
  color: transparent; /* hide pipe separators visually */
}

nav {
  max-width: 1100px;
  margin: 0.8rem auto 0;
  border: 1px solid #2a4a86;
  border-radius: 12px;
  background: #0f1a2e;
  padding: 0.75rem;
}

#about {
  max-width: 1100px;
  margin: 1.25rem auto;
  background: #0f1a2e;
  border: 1px solid #23385f;
  border-radius: 14px;
  padding: 1.15rem 1.2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.22);
}

#about h2,
#about h3 {
  background: #131f36;
  border: 1px solid #24385f;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
}

#about p,
#about ul {
  background: #111c33;
  border: 1px solid #1f3256;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
}

@media (max-width: 768px) {
  #about { margin: 1rem; padding: 0.9rem; }
}

/* 2026-02-28 follow-up: simplify article section (remove nested boxes) */
#about h2,
#about h3,
#about p,
#about ul {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

#about h2,
#about h3 {
  margin-top: 1rem;
}

#about p,
#about ul {
  margin-top: .65rem;
}

/* 2026-02-28 force unboxed article body */
#about .content-section,
#about section,
#about article,
#about div,
#about p,
#about ul,
#about ol,
#about li {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* 2026-02-28: make checkmyip upper section feel closer to checkmyspeed hero */
body {
  padding: 0 0.9rem 1rem;
}

header {
  max-width: 1100px;
  margin: 0.95rem auto 0.6rem;
  border: 1px solid #2a4a86;
  border-radius: 16px;
  background: linear-gradient(135deg,#10213f,#1f3f78) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.22);
}

header h1 {
  color: #76f3db;
  letter-spacing: -0.4px;
}

header p {
  color: #d2e2ff;
}

#ip-section {
  max-width: 1100px;
  margin: 1rem auto;
  border-radius: 16px;
  border: 1px solid #2a4a86;
  background: linear-gradient(135deg,#10213f,#173564);
  box-shadow: 0 4px 12px rgba(0,0,0,.22);
  padding: 1.2rem;
}

#ip-section > div {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
}

#ip-section p {
  color: #d5e4ff;
  margin-bottom: .6rem;
  font-size: 1.05rem;
}

#ip {
  min-width: 210px;
  border-radius: 10px;
  border: 1px solid #47d4c0;
  background: rgba(100, 255, 218, 0.08);
  color: #7df6e0;
  font-size: 1.6rem;
  line-height: 1.25;
}

.copy-button,
button.copy-button {
  background: #1b2f54;
  color: #d9e7ff;
  border: 1px solid #325791;
  border-radius: 8px;
  padding: .45rem .72rem;
  font-weight: 600;
  cursor: pointer;
}

.copy-button:hover,
button.copy-button:hover {
  background: #26467b;
  border-color: #4c73b3;
  color: #fff;
}

.info-map-wrapper {
  max-width: 1100px;
  margin: 1rem auto;
}

/* 2026-02-28: unified box alignment (match checkmyspeed rhythm) */
:root {
  --page-max: 1100px;
  --page-gutter: 18px;
}

.container {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

header,
#languages-placeholder,
nav,
#ip-section,
.info-map-wrapper,
#about,
#ip-history {
  width: min(var(--page-max), calc(100% - (var(--page-gutter) * 2))) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#languages-placeholder {
  padding: 0 !important;
}

nav {
  padding: 0.75rem !important;
}

#ip-section,
.info-map-wrapper,
#about,
#ip-history {
  margin-top: 1rem !important;
}

/* 2026-03-15: result-panel polish */
#geo-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  align-content: start;
}

#geo-info p {
  margin: 0 !important;
  background: #111c33;
  border: 1px solid #1f3256;
  border-radius: 12px;
  padding: 0.8rem 0.9rem !important;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#geo-info strong {
  color: #9fc2ff;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 0.35rem;
}

#geo-info span {
  color: #f4f8ff;
  font-size: 1.02rem;
  line-height: 1.35;
  font-weight: 600;
}

#map {
  border-radius: 14px;
  border: 1px solid #23385f;
  box-shadow: 0 4px 12px rgba(0,0,0,.22);
}

#ip-section {
  position: relative;
}

#ip-section::after {
  content: "Tip: compare this result with VPN on and off to verify privacy protection.";
  display: block;
  margin-top: 0.85rem;
  color: #a9bee9;
  font-size: 0.92rem;
}

#ip {
  box-shadow: inset 0 0 0 1px rgba(126, 246, 224, 0.15);
}

@media (max-width: 768px) {
  :root { --page-gutter: 12px; }
  #geo-info { grid-template-columns: 1fr; }
}

/* 2026-02-28: language selector un-nest (single container look) */
#languages-placeholder {
  background: #0f1a2e;
  border: 1px solid #2a4a86;
  border-radius: 12px;
  padding: 0.65rem 0.8rem !important;
  margin-top: 0.8rem !important;
}

.lang-switch {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

/* 2026-02-28: bottom section consistency with checkmyspeed */
#about a,
#about a:visited {
  color: #8ec8ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#about a:hover {
  color: #b9ddff;
}

#footer-placeholder,
.site-footer {
  width: min(var(--page-max), calc(100% - (var(--page-gutter) * 2))) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.site-footer {
  margin-top: 1rem;
  padding-top: .35rem;
  color: #9bb2dc;
  text-align: center;
}

.site-footer hr {
  border: 0;
  border-top: 1px solid #2a4a86;
  margin: 0.65rem 0 1rem;
}

.site-footer p {
  margin: 0 0 0.7rem;
  color: #9bb2dc;
}

.site-footer a,
.site-footer a:visited {
  color: #8ec8ff;
}

.site-footer a:hover {
  color: #b9ddff;
}

/* 2026-02-28: footer separator alignment parity with checkmyspeed */
.site-footer {
  border-top: 0 !important;   /* neutralize base footer border line */
  padding: 0 !important;      /* remove inherited large padding */
  margin-top: 1rem !important;
}

.site-footer hr {
  width: 100%;
  margin: 0 0 1rem 0 !important;
  border: 0;
  border-top: 1px solid #2a4a86;
}

.site-footer p {
  margin: 0 0 .7rem 0 !important;
}

/* 2026-02-28: exact footer parity with checkmyspeed */
#footer-placeholder {
  margin-top: 1rem !important;
}

.site-footer {
  margin-top: 0.5rem !important;
  color: #9bb2dc !important;
  text-align: center;
}

.site-footer hr {
  border: 0;
  border-top: 1px solid #2a4a86;
  margin: 0.65rem 0 1rem !important;
}

.site-footer p {
  margin: 0 0 .7rem !important;
  color: #9bb2dc !important;
}

.site-footer a,
.site-footer a:visited {
  color: #8ec8ff !important;
}

.site-footer a:hover {
  color: #b9ddff !important;
}
