/* =============================================
   DNS Lookup Tool — IQVerse Design System
   Matches QR Forge (lime-green accent variant)
   ============================================= */

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

:root {
	--bg: #080c14;
	--surface: #0d1220;
	--surface-2: #111827;
	--surface-3: #1a2235;
	--border: rgba(255, 255, 255, 0.07);
	--border-hover: rgba(200, 241, 53, 0.25);

	--accent: #c8f135;
	--accent-dim: rgba(200, 241, 53, 0.12);
	--accent-glow: rgba(200, 241, 53, 0.25);

	--text: #f0f4ff;
	--text-muted: #8896aa;
	--text-dim: #4a5568;

	--green: #22c55e;
	--red: #ef4444;
	--blue: #3b82f6;
	--orange: #f59e0b;

	--radius: 10px;
	--radius-sm: 6px;
	--radius-lg: 14px;

	--font-display: "Syne", sans-serif;
	--font-body: "DM Sans", sans-serif;
	--font-mono: "DM Mono", monospace;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-body);
	background: var(--bg);
	color: var(--text);
	min-height: 100vh;
	line-height: 1.6;
	overflow-x: hidden;
}

/* ─── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}
::-webkit-scrollbar-track {
	background: var(--bg);
}
::-webkit-scrollbar-thumb {
	background: var(--border2);
	border-radius: 99px;
}

/* ---- Background Effects ---- */

.bg-grid {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
	background-size: 48px 48px;
	mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 40%, transparent 100%);
}

.bg-glow {
	position: fixed;
	border-radius: 50%;
	pointer-events: none;
	z-index: 0;
	filter: blur(120px);
	opacity: 0.14;
}
.bg-glow--1 {
	width: 600px;
	height: 600px;
	background: var(--accent);
	top: -200px;
	right: -150px;
}
.bg-glow--2 {
	width: 500px;
	height: 500px;
	background: var(--accent2);
	bottom: 20%;
	left: -200px;
}

/* ─── Header ────────────────────────────────────────────────── */
.header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(10, 10, 10, 0.85);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--border);
}

.header-inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 28px;
	height: 58px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.logo {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 17px;
	letter-spacing: -0.02em;
	color: var(--text);
}

.header-nav {
	display: flex;
	align-items: center;
	gap: 14px;
}
.header-nav a {
	text-decoration: none;
	margin-left: 15px;
}

.nav-tag {
	font-size: 13px;
	color: var(--text-muted);
	text-decoration: none;
	font-family: var(--font-mono);
	letter-spacing: 0.02em;
}
.nav__logo-bracket {
	color: var(--accent);
}

.btn-header {
	background: var(--accent);
	color: #0a0a0a;
	border: none;
	border-radius: var(--radius-sm);
	padding: 7px 16px;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	transition:
		background 0.15s,
		transform 0.1s;
}
.btn-header:hover {
	background: var(--accent-dark);
	transform: translateY(-1px);
}
.btn-header:active {
	transform: scale(0.97);
}

/* ── Hero ── */
.hero {
	position: relative;
	z-index: 1;
	text-align: center;
	padding: 4rem 1rem 2.5rem;
}
.hero-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--font-mono);
	font-size: 0.75rem;
	color: var(--accent);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 1.2rem;
	padding: 0.3rem 0.9rem;
	border: 1px solid var(--accent-glow);
	border-radius: 999px;
	background: var(--accent-dim);
}
.eyebrow-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--accent);
	animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
	0%,
	100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.4;
		transform: scale(0.8);
	}
}
.hero-title {
	font-family: var(--font-display);
	font-size: clamp(2.4rem, 6vw, 4rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
	margin-bottom: 1rem;
}
.accent {
	color: var(--accent);
}
.hero-subtitle {
	max-width: 560px;
	margin: 0 auto;
	color: var(--text-muted);
	font-size: 0.95rem;
	line-height: 1.7;
}

/* ── Tool Wrapper ── */
.tool-wrapper {
	position: relative;
	z-index: 1;
	max-width: 960px;
	margin: 0 auto;
	padding: 0 1.5rem 5rem;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

/* ── Panels ── */
.panel {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 1.75rem;
	transition: border-color 0.2s;
}
.panel:hover {
	border-color: rgba(200, 241, 53, 0.12);
}

.panel-header {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
}
.panel-label {
	font-family: var(--font-mono);
	font-size: 0.7rem;
	color: var(--accent);
	background: var(--accent-dim);
	border: 1px solid var(--accent-glow);
	padding: 0.2rem 0.55rem;
	border-radius: 4px;
	letter-spacing: 0.05em;
	flex-shrink: 0;
}
.panel-title {
	font-family: var(--font-display);
	font-size: 1.1rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	flex: 1;
}

/* ── Form Elements ── */
.input-group {
	margin-bottom: 1.4rem;
}
.input-group:last-child {
	margin-bottom: 0;
}

.field-label {
	display: block;
	font-family: var(--font-mono);
	font-size: 0.7rem;
	color: var(--text-muted);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 0.55rem;
}

.input-row {
	display: flex;
	gap: 0.6rem;
}
.text-input {
	flex: 1;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	color: var(--text);
	font-family: var(--font-mono);
	font-size: 0.88rem;
	padding: 0.65rem 0.9rem;
	outline: none;
	transition:
		border-color 0.2s,
		box-shadow 0.2s;
	min-width: 0;
}
.text-input::placeholder {
	color: var(--text-dim);
}
.text-input:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-dim);
}

/* ── Buttons ── */
.btn-primary {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: var(--accent);
	color: #080c14;
	font-family: var(--font-display);
	font-size: 0.88rem;
	font-weight: 700;
	padding: 0.65rem 1.2rem;
	border: none;
	border-radius: var(--radius-sm);
	cursor: pointer;
	white-space: nowrap;
	transition:
		filter 0.15s,
		transform 0.1s;
}
.btn-primary:hover {
	filter: brightness(1.1);
}
.btn-primary:active {
	transform: scale(0.97);
}
.btn-primary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.btn-ghost {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	background: transparent;
	color: var(--text-muted);
	font-family: var(--font-body);
	font-size: 0.82rem;
	font-weight: 500;
	padding: 0.5rem 0.85rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition:
		border-color 0.15s,
		color 0.15s,
		background 0.15s;
}
.btn-ghost:hover {
	border-color: var(--border-hover);
	color: var(--accent);
	background: var(--accent-dim);
}
.btn-ghost.small {
	font-size: 0.77rem;
	padding: 0.38rem 0.7rem;
}

/* ── Type Grid ── */
.type-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}
.type-btn {
	font-family: var(--font-mono);
	font-size: 0.73rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	padding: 0.3rem 0.65rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	color: var(--text-muted);
	cursor: pointer;
	transition: all 0.15s;
}
.type-btn:hover {
	border-color: var(--accent);
	color: var(--accent);
	background: var(--accent-dim);
}
.type-btn.active {
	border-color: var(--accent);
	background: var(--accent);
	color: #080c14;
}

/* ── Toggle ── */
.options-row {
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
}
.toggle-label {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	cursor: pointer;
	font-size: 0.85rem;
	color: var(--text-muted);
	user-select: none;
}
.toggle-label:hover {
	color: var(--text);
}
.toggle-input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.toggle-track {
	position: relative;
	width: 34px;
	height: 18px;
	background: var(--surface-3);
	border: 1px solid var(--border);
	border-radius: 999px;
	flex-shrink: 0;
	transition:
		background 0.2s,
		border-color 0.2s;
}
.toggle-thumb {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--text-dim);
	transition:
		transform 0.2s,
		background 0.2s;
}
.toggle-input:checked + .toggle-track {
	background: var(--accent-dim);
	border-color: var(--accent);
}
.toggle-input:checked + .toggle-track .toggle-thumb {
	transform: translateX(16px);
	background: var(--accent);
}

/* ── Preset Row ── */
.preset-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}
.preset-btn {
	font-family: var(--font-mono);
	font-size: 0.73rem;
	color: var(--text-muted);
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 0.28rem 0.65rem;
	cursor: pointer;
	transition: all 0.15s;
}
.preset-btn:hover {
	color: var(--accent);
	border-color: var(--accent-glow);
	background: var(--accent-dim);
}

/* ── States ── */
.hidden {
	display: none !important;
}

.idle-state,
.loading-state,
.error-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 3.5rem 1rem;
	text-align: center;
}
.idle-icon,
.error-icon {
	color: var(--text-dim);
}
.idle-text {
	color: var(--text-muted);
	font-size: 0.9rem;
}
.idle-text strong {
	color: var(--text);
}
.idle-hint {
	color: var(--text-dim);
	font-family: var(--font-mono);
	font-size: 0.72rem;
	line-height: 1.9;
}

.spinner {
	width: 36px;
	height: 36px;
	border: 2.5px solid var(--border);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: spin 0.7s linear infinite;
}
@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}
.loading-text {
	color: var(--text-muted);
	font-size: 0.88rem;
}

.error-icon {
	color: var(--red);
}
.error-title {
	font-family: var(--font-display);
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--text);
}
.error-msg {
	color: var(--text-muted);
	font-size: 0.84rem;
	max-width: 360px;
}

/* ── Summary Bar ── */
.summary-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	margin-bottom: 1.25rem;
}
.summary-item {
	flex: 1;
	min-width: 120px;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.8rem 1rem;
	border-right: 1px solid var(--border);
}
.summary-item:last-child {
	border-right: none;
}
.summary-key {
	font-family: var(--font-mono);
	font-size: 0.65rem;
	color: var(--text-dim);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.summary-val {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--text);
}
.summary-val.mono {
	font-family: var(--font-mono);
	font-weight: 400;
}
.status-ok {
	color: var(--green);
}
.status-err {
	color: var(--red);
}
.status-nxdomain {
	color: var(--orange);
}
.badge-yes {
	color: var(--green);
}
.badge-no {
	color: var(--text-dim);
}

/* ── Result Tabs ── */
.result-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-bottom: 1rem;
}
.result-tab {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.03em;
	padding: 0.3rem 0.7rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	color: var(--text-muted);
	cursor: pointer;
	transition: all 0.15s;
	display: flex;
	align-items: center;
	gap: 0.35rem;
}
.result-tab .tab-count {
	background: var(--surface-3);
	border-radius: 4px;
	padding: 0 4px;
	font-size: 0.65rem;
	color: var(--text-dim);
}
.result-tab:hover {
	border-color: var(--accent);
	color: var(--accent);
}
.result-tab.active {
	border-color: var(--accent);
	background: var(--accent);
	color: #080c14;
}
.result-tab.active .tab-count {
	background: rgba(0, 0, 0, 0.2);
	color: #080c14;
}

/* ── DNS Table ── */
.table-wrap {
	overflow-x: auto;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	margin-bottom: 1rem;
}
table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.82rem;
}
thead {
	background: var(--surface-2);
}
th {
	font-family: var(--font-mono);
	font-size: 0.65rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-dim);
	padding: 0.6rem 1rem;
	text-align: left;
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
}
td {
	padding: 0.65rem 1rem;
	border-bottom: 1px solid var(--border);
	vertical-align: top;
	font-family: var(--font-mono);
	font-size: 0.78rem;
	color: var(--text);
	word-break: break-all;
}
tr:last-child td {
	border-bottom: none;
}
tr:hover td {
	background: rgba(200, 241, 53, 0.025);
}
.td-type {
	font-weight: 500;
	color: var(--accent);
	white-space: nowrap;
}
.td-name {
	color: var(--text-muted);
}
.td-ttl {
	color: var(--text-dim);
	white-space: nowrap;
}
.td-data {
	color: var(--text);
	font-weight: 400;
}
.td-data .tag {
	display: inline-block;
	font-size: 0.65rem;
	background: var(--surface-3);
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 0.05rem 0.35rem;
	color: var(--text-muted);
	margin-right: 0.35rem;
}
.no-records {
	padding: 2.5rem 1rem;
	text-align: center;
	color: var(--text-dim);
	font-size: 0.85rem;
}

/* ── Action Bar ── */
.action-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-bottom: 1rem;
}

/* ── Raw JSON ── */
.raw-details {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
}
.raw-summary {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.65rem 1rem;
	font-family: var(--font-mono);
	font-size: 0.75rem;
	color: var(--text-muted);
	cursor: pointer;
	background: var(--surface-2);
	user-select: none;
	list-style: none;
}
.raw-summary::-webkit-details-marker {
	display: none;
}
.raw-summary:hover {
	color: var(--text);
}
.raw-pre {
	background: var(--surface-2);
	border-top: 1px solid var(--border);
	padding: 1rem;
	font-family: var(--font-mono);
	font-size: 0.73rem;
	color: var(--text-muted);
	overflow-x: auto;
	max-height: 400px;
	line-height: 1.7;
	white-space: pre;
}

/* ── History Panel ── */
.history-panel .panel-header {
	margin-bottom: 1rem;
}
.history-list {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}
.history-empty {
	color: var(--text-dim);
	font-size: 0.83rem;
	padding: 0.5rem 0;
}
.history-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.6rem 0.85rem;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition:
		border-color 0.15s,
		background 0.15s;
}
.history-item:hover {
	border-color: var(--accent-glow);
	background: var(--accent-dim);
}
.history-domain {
	flex: 1;
	font-family: var(--font-mono);
	font-size: 0.8rem;
	color: var(--text);
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.history-type {
	font-family: var(--font-mono);
	font-size: 0.65rem;
	color: var(--accent);
	background: var(--accent-dim);
	border: 1px solid var(--accent-glow);
	border-radius: 4px;
	padding: 0.1rem 0.4rem;
	flex-shrink: 0;
}
.history-time {
	font-size: 0.7rem;
	color: var(--text-dim);
	flex-shrink: 0;
}
.history-status-ok {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--green);
	flex-shrink: 0;
}
.history-status-err {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--red);
	flex-shrink: 0;
}

/* ── Toast ── */
.toast {
	position: fixed;
	bottom: 1.5rem;
	right: 1.5rem;
	z-index: 999;
	background: var(--surface-3);
	border: 1px solid var(--border-hover);
	border-radius: var(--radius-sm);
	padding: 0.7rem 1.1rem;
	font-size: 0.82rem;
	color: var(--text);
	pointer-events: none;
	opacity: 0;
	transform: translateY(8px);
	transition:
		opacity 0.2s,
		transform 0.2s;
}
.toast.show {
	opacity: 1;
	transform: translateY(0);
}

/* ─── Footer ────────────────────────────────────────────────── */
.footer {
	background: var(--surface-2);
	border-top: 1px solid var(--border);
	padding: 20px 16px;
	text-align: center;
	z-index: 10;
}

.footer-inner {
	max-width: var(--content-width);
	margin: 0 auto;
}
.footer-inner span {
	font-size: 12px;
	color: var(--text-muted);
}
.footer-inner a {
	color: var(--accent);
	text-decoration: none;
}
.footer-inner a:hover {
	text-decoration: underline;
}
.footer__logo {
	font-family: var(--font-mono);
	font-size: 1rem;
	color: var(--text);
	margin-bottom: 0.75rem;
}
.footer__logo a {
	color: var(--text);
	text-decoration: none;
	cursor: pointer;
}
.footer__logo a:hover {
	text-decoration: underline;
}

.cursor-glow {
	position: fixed;
	left: 0;
	top: 0;
	width: 260px;
	height: 260px;
	pointer-events: none;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(0, 200, 150, 0.22) 0%, transparent 60%);
	filter: blur(18px);
	opacity: 0;
	transform: translate(-50%, -50%);
	transition: opacity 0.24s ease;
	mix-blend-mode: screen;
	z-index: 9999;
}

/* ── Responsive ── */
@media (max-width: 640px) {
	.nav {
		padding: 0 1rem;
	}
	.panel {
		padding: 1.25rem;
	}
	.hero {
		padding: 3rem 1rem 2rem;
	}
	.summary-item {
		min-width: 50%;
	}
	.input-row {
		flex-direction: column;
	}
	.btn-primary {
		width: 100%;
		justify-content: center;
	}
}
