:root {
	--bg: #0b0c10;
	--card: #111218;
	--muted: #b3b7c0;
	--text: #e8ecf1;
	--brand: #7c5cff;
	--brand-2: #00d4ff;
	--ring: rgba(124, 92, 255, 0.45);
	--border-color: rgba(255, 255, 255, 0.08);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 20px;
	color: var(--text);
	font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
		Arial, "Apple Color Emoji", "Segoe UI Emoji";
	background: radial-gradient(
			900px 520px at 70% -10%,
			rgba(124, 92, 255, 0.12),
			transparent 60%
		),
		var(--bg);
	line-height: 1.6;
	min-height: 100vh;
}

.container {
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
	text-align: center;
}

/* (User Story 2: Random Button) */
.random-btn {
	display: inline-block;
	color: var(--muted);
	text-decoration: none;
	padding: 10px;
	margin-bottom: 24px;
	transition: color 0.15s ease;
}
.random-btn:hover {
	color: var(--brand-2);
	text-decoration: underline;
}

/* --- Main Search Component --- */
.search-container {
	margin: 40px auto;
	position: relative;
	transition: all 0.4s ease-in-out;
}

.search-icon-state {
	transition: opacity 0.3s ease, transform 0.3s ease;
}
.icon-btn {
	background: transparent;
	border: none;
	color: var(--brand-2);
	cursor: pointer;
	padding: 15px;
	border-radius: 50%;
	transition: all 0.3s ease;
}
.icon-btn:hover {
	background: rgba(0, 212, 255, 0.1);
	box-shadow: 0 0 0 10px rgba(0, 212, 255, 0.1);
}
.search-hint {
	color: var(--muted);
	margin-top: 10px;
}

.search-form {
	display: flex;
	position: relative;
	max-width: 700px;
	margin: 0 auto;

	opacity: 0;
	transform: scale(0.8);
	pointer-events: none;
	transition: opacity 0.4s ease, transform 0.4s ease;
}
.search-input {
	flex-grow: 1;
	height: 60px;
	border: 2px solid var(--brand-2);
	background: var(--card);
	color: var(--text);
	padding: 0 60px 0 24px;
	font-size: 20px;
	border-radius: 999px;
	-webkit-appearance: none;
	appearance: none;
}
.search-input:focus-visible {
	outline: none;
	box-shadow: 0 0 0 6px rgba(0, 212, 255, 0.25);
}
.close-btn {
	position: absolute;
	right: 10px;
	top: 10px;
	bottom: 10px;
	width: 40px;
	background: var(--card);
	color: var(--text);
	border: none;
	border-radius: 50%;
	font-size: 28px;
	font-weight: 300;
	cursor: pointer;
	transition: background 0.15s ease;
}
.close-btn:hover {
	background: rgba(255, 255, 255, 0.1);
}

.search-container.active .search-form {
	opacity: 1;
	transform: scale(1);
	pointer-events: auto;
}
.search-container.active .search-icon-state {
	opacity: 0;
	transform: scale(0.8);
	pointer-events: none;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
}

/* --- (User Story 1: Results) --- */
.results-container {
	display: grid;
	gap: 16px;
	margin-top: 32px;
	text-align: left;
}

.status-message {
	text-align: center;
	font-size: 18px;
	color: var(--muted);
}

.result-card {
	display: block;
	background: var(--card);
	border: 1px solid var(--border-color);
	border-radius: 16px;
	padding: 20px;
	text-decoration: none;
	color: var(--text);
	transition: transform 0.18s ease, box-shadow 0.18s ease,
		border-color 0.18s ease;
}

.result-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
	border-color: var(--brand-2);
}

.result-card h3 {
	margin: 0 0 8px;
	font-size: 20px;
	color: var(--brand-2);
}

.result-card p {
	margin: 0;
	color: var(--muted);
	font-size: 15px;
}
