@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=IBM+Plex+Mono:wght@500&display=swap");

:root {
	--bg-a: #f8f4e8;
	--bg-b: #d2ebe3;
	--ink: #102a2d;
	--muted: #30555b;
	--panel: rgba(255, 255, 255, 0.78);
	--line: rgba(16, 42, 45, 0.18);
	--primary: #1f6f78;
	--primary-2: #16535a;
	--good: #2b8754;
	--bad: #a33636;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	color: var(--ink);
	background: radial-gradient(circle at 15% 10%, #ffffff 0%, transparent 35%),
		linear-gradient(130deg, var(--bg-a) 0%, var(--bg-b) 100%);
	min-height: 100vh;
	font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.app-shell {
	width: min(920px, 100% - 2rem);
	margin: 2rem auto 3rem;
	display: grid;
	gap: 1rem;
}

.hero {
	padding: 0.75rem 0.2rem;
}

.kicker {
	margin: 0;
	color: var(--muted);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

h1 {
	margin: 0.2rem 0;
	font-size: clamp(1.8rem, 5vw, 2.8rem);
	line-height: 1.1;
}

.subtitle {
	margin: 0;
	color: var(--muted);
}

.card {
	border: 1px solid var(--line);
	border-radius: 20px;
	backdrop-filter: blur(6px);
	background: var(--panel);
	box-shadow: 0 12px 35px rgba(16, 42, 45, 0.09);
}

.panel {
	padding: 1rem;
}

h2 {
	margin-top: 0;
	margin-bottom: 0.7rem;
}

.hint,
.status,
.study-meta p {
	margin: 0.35rem 0;
	color: var(--muted);
}

.mode-select {
	border: 1px dashed var(--line);
	border-radius: 12px;
	padding: 0.75rem;
	margin: 0.8rem 0;
}

.mode-select label {
	display: block;
	margin: 0.5rem 0;
}

.settings-stack {
	display: grid;
	gap: 0.8rem;
	margin-bottom: 0.8rem;
}

.lang-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0.35rem 0;
}

.lang-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 0.28rem 0.55rem;
	background: rgba(255, 255, 255, 0.55);
	font-size: 0.92rem;
}

.filter-shortcuts {
	display: flex;
	gap: 0.45rem;
}

.speech-grid {
	display: grid;
	grid-template-columns: auto minmax(120px, 1fr);
	gap: 0.45rem 0.8rem;
	align-items: center;
	max-width: 400px;
}

.settings-actions {
	display: flex;
	gap: 0.6rem;
	align-items: center;
	margin-top: 0.55rem;
	flex-wrap: wrap;
}

.backup-actions {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 0.6rem;
	align-items: center;
}

#backupFileInput,
#fileInput,
#speechRepeats,
#voiceGender {
	width: 100%;
	padding: 0.56rem 0.65rem;
	border-radius: 10px;
	border: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.75);
	color: var(--ink);
	font: inherit;
}

#speechRate {
	width: 100%;
}

.word-zone {
	border: 1px dashed var(--line);
	border-radius: 12px;
	padding: 1rem;
	margin: 0.7rem 0 1rem;
	background: rgba(255, 255, 255, 0.6);
}

.prompt {
	font-family: "IBM Plex Mono", "Consolas", monospace;
	font-size: 1.05rem;
	margin: 0;
}

.revealed {
	margin: 0.9rem 0 0;
	font-size: clamp(1.2rem, 4vw, 1.8rem);
	font-weight: 700;
}

.hidden {
	visibility: hidden;
}

.actions {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 0.6rem;
}

.btn {
	border: 0;
	border-radius: 11px;
	padding: 0.7rem 0.9rem;
	font-family: inherit;
	font-weight: 600;
	background: #ebf0f0;
	color: var(--ink);
	cursor: pointer;
	transition: transform 110ms ease, box-shadow 110ms ease, background 110ms ease;
}

.btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.btn.primary {
	background: var(--primary);
	color: #ffffff;
}

.btn.primary:hover {
	background: var(--primary-2);
}

.btn.ghost {
	background: rgba(255, 255, 255, 0.5);
	border: 1px solid var(--line);
}

.btn.success {
	background: var(--good);
	color: #ffffff;
}

.btn.danger {
	background: var(--bad);
	color: #ffffff;
}

@media (max-width: 640px) {
	.app-shell {
		width: min(920px, 100% - 1rem);
		margin-top: 1rem;
	}

	.panel {
		padding: 0.85rem;
	}
}
