/* ip.css — IP info and lookup cards. */

/* IP Info Cards */
.ip-info-card {
  padding: 20px;
  border-radius: 14px;
  animation: fadeSlideIn 0.3s ease;
}

.ip-info-header {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.5;
  margin-bottom: 8px;
}

.ip-info-address {
  font-family: 'Roboto Mono', monospace;
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 16px;
  word-break: break-all;
}

.ip-info-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.ip-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.light-mode .ip-info-row {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.ip-label {
  opacity: 0.5;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ip-value {
  font-family: 'Roboto Mono', monospace;
  font-size: 13px;
}

.ip-copy-btn {
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: pointer;
  font-size: 13px;
  transition: background 200ms ease, border-color 200ms ease;
}

.ip-copy-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
}

body.light-mode .ip-copy-btn {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.04);
}

body.light-mode .ip-copy-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.2);
}

.ip-loading {
  text-align: center;
  padding: 16px;
  opacity: 0.5;
  font-size: 13px;
}

.ip-lookup-form {
  display: flex;
  gap: 8px;
  margin: 12px 0 16px;
}

.ip-lookup-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font-family: 'Roboto Mono', monospace;
  font-size: 14px;
  outline: none;
  transition: border-color 200ms ease;
}

.ip-lookup-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

body.light-mode .ip-lookup-input {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.03);
}

body.light-mode .ip-lookup-input:focus {
  border-color: rgba(0, 0, 0, 0.25);
}

.ip-lookup-btn {
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background 200ms ease, border-color 200ms ease;
}

.ip-lookup-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
}

body.light-mode .ip-lookup-btn {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .ip-lookup-btn:hover {
  background: rgba(0, 0, 0, 0.1);
}

.ip-abuse-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-mode .ip-abuse-section {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.ip-abuse-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Roboto Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--abuse-color);
}

.ip-abuse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ip-abuse-bar-track {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  margin: 8px 0 12px;
  overflow: hidden;
}

body.light-mode .ip-abuse-bar-track {
  background: rgba(0, 0, 0, 0.06);
}

.ip-abuse-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

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

.back-button {
  position: absolute;
  top: 12px;
  right: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: background 200ms ease, border 200ms ease;
  z-index: 10;
  pointer-events: auto;
}

body.light-mode .back-button {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.15);
  color: #111;
}

.profile-badge {
  display: none;
  align-items: center;
  gap: 12px;
}

.profile-glass {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.profile-glass img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.profile-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 2;
}

.profile-name {
  font-family: "Noto Sans", "PT Serif", serif;
  font-weight: 700;
  font-size: 16px;
}

.wave-emoji {
  display: inline-block;
  margin-left: 4px;
  transform-origin: 68% 72%;
}

.wave-emoji.is-waving {
  animation: wave-hello 1.1s ease-in-out 1;
}

@keyframes wave-hello {
  0% { transform: rotate(0deg); }
  16% { transform: rotate(18deg); }
  32% { transform: rotate(-10deg); }
  48% { transform: rotate(16deg); }
  64% { transform: rotate(-8deg); }
  80% { transform: rotate(10deg); }
  100% { transform: rotate(0deg); }
}

.profile-title {
  font-family: "Noto Sans", "PT Serif", serif;
  font-size: 13px;
  opacity: 0.85;
}

body.light-mode .profile-name,
body.light-mode .profile-title {
  color: #111;
}

.work-content {
  display: none;
  flex: 1;
  min-height: 0;
  position: relative;
  z-index: 2;
  pointer-events: auto;
  font-family: "Noto Sans", sans-serif;
}

.work-content * {
  font-family: "Noto Sans", sans-serif;
}

.work-tabs {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  z-index: 6;
  pointer-events: auto;
  transition: opacity 300ms ease, transform 300ms ease;
}

.work-tabs.is-hidden {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.work-tab {
  position: relative;
  overflow: hidden;
  background: transparent;
  border: none;
  color: #fff;
  padding: 10px 10px;
  border-radius: 14px;
  cursor: pointer;
  font-family: "Noto Sans", sans-serif;
  font-size: 12px;
  pointer-events: auto;
  transition: transform 0.2s ease;
}

.work-tab:hover {
  transform: scale(1.03);
}

.work-tab:active {
  transform: scale(0.97);
}

.work-tab__glass-filter,
.work-tab__glass-overlay,
.work-tab__glass-specular {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.work-tab__glass-filter {
  z-index: 0;
  backdrop-filter: blur(12px) saturate(120%) brightness(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(120%) brightness(1.1);
}

.work-tab__glass-overlay {
  z-index: 1;
  background: rgba(255, 255, 255, 0.12);
}

.work-tab__glass-specular {
  z-index: 2;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 0 6px rgba(255, 255, 255, 0.15);
}

.work-tab__label {
  position: relative;
  z-index: 3;
}

.work-tab.is-active .work-tab__glass-overlay {
  background: rgba(255, 255, 255, 0.22);
}

.work-tab.is-active .work-tab__glass-specular {
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 0 8px rgba(255, 255, 255, 0.2);
}

/* Globe pinned to the visitor's coordinates. Decorative and lazily mounted, so
   it stays hidden until COBE has actually painted a frame. */
.ip-globe {
  display: block;
  width: 200px;
  height: 200px;
  margin: 10px auto 14px;
  opacity: 0;
  transition: opacity 500ms ease;
  contain: layout paint;
}

.ip-globe.is-ready {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .ip-globe { transition: none; }
}
