:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #14141f;
  --bg-tertiary: #1e1e2e;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;
  --accent: #00d4ff;
  --accent-secondary: #00ff88;
  --danger: #ff4466;
  --focus-ring: #00d4ff;
  --focus-glow: rgba(0, 212, 255, 0.4);
  --radius-md: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 600px; height: 600px; overflow: hidden;
  background: #000;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#app { width: 100%; height: 100%; position: relative; }
.screen { width: 100%; height: 100%; position: absolute; top: 0; left: 0; display: flex; flex-direction: column; }
.screen.hidden { display: none; }
.focusable { transition: all 0.15s ease; border: 2px solid transparent; cursor: pointer; outline: none; }
.focusable:focus { border-color: var(--focus-ring); box-shadow: 0 0 20px var(--focus-glow); }
.hidden { display: none !important; }

/* Header */
.hdr {
  height: 64px; flex: 0 0 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid #23232f;
}
.hdr-title { font-size: 22px; font-weight: 700; letter-spacing: 0.5px; }
.hdr-status {
  font-size: 14px; font-weight: 600;
  padding: 5px 13px; border-radius: 999px;
  background: var(--bg-tertiary); color: var(--text-secondary);
}
.st-live { color: #04110b; background: var(--accent-secondary); }
.st-load { color: var(--accent); background: rgba(0, 212, 255, 0.15); animation: pulse 1.2s ease-in-out infinite; }
.st-cache { color: var(--text-secondary); background: var(--bg-tertiary); }
.st-off { color: #fff; background: var(--danger); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* Home */
.home-main {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow: hidden;
}
.ip-card {
  width: 100%; max-width: 540px;
  background: linear-gradient(160deg, var(--bg-secondary), var(--bg-primary));
  border: 1px solid #262633; border-radius: 18px;
  padding: 34px 24px; text-align: center;
}
.ip-label {
  font-size: 14px; letter-spacing: 2px; font-weight: 700;
  color: var(--text-muted); margin-bottom: 18px;
}
.ip-value {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 40px; font-weight: 700; color: var(--accent);
  word-break: break-all; line-height: 1.15;
}
.ip-geo { margin-top: 18px; font-size: 18px; color: var(--text-secondary); line-height: 1.4; }

/* Actions */
.actions {
  display: flex; gap: 12px; padding: 16px;
  background: var(--bg-primary); flex: 0 0 auto;
}
.btn {
  flex: 1; min-height: 88px; border-radius: var(--radius-md);
  background: var(--bg-tertiary); color: var(--text-primary);
  font-size: 18px; font-weight: 600; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

/* Details */
.detail-list {
  flex: 1; overflow-y: auto; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.detail-list::-webkit-scrollbar { width: 6px; }
.detail-list::-webkit-scrollbar-thumb { background: #2c2c3a; border-radius: 3px; }
.drow {
  background: var(--bg-secondary); border-radius: 12px;
  padding: 13px 16px; min-height: 44px;
  display: flex; flex-direction: column; gap: 4px;
}
.drow-label {
  font-size: 13px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-muted); font-weight: 700;
}
.drow-val {
  font-size: 19px; color: var(--text-primary); word-break: break-all;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.detail-empty {
  color: var(--text-secondary); text-align: center;
  padding: 50px 20px; font-size: 18px; line-height: 1.5;
}

/* Toast */
#toast {
  position: fixed; left: 50%; bottom: 124px;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-tertiary); color: #fff;
  padding: 14px 24px; border-radius: 999px;
  font-size: 17px; font-weight: 600;
  border: 1px solid #2c2c3a;
  opacity: 0; pointer-events: none; z-index: 50;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
