/* ====== Общие стили ====== */

/* Центрирование основного контейнера по вертикали и горизонтали */
body {
	display: flex;
	justify-content: center;
	align-items: center;
}

body, html {
	margin: 0;
	padding: 0;
	font-family: 'Inter', sans-serif;
	background: #f0f4f8;
	color: #111827;
	height: 100%;
	overflow: hidden; /* убираем вертикальную и горизонтальную прокрутку */
}

.hidden { display: none; }
.center-box {
	max-width: 360px;
	margin: 50px auto;
	padding: 24px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.1);
	text-align: center;
}

h2 { margin-bottom: 16px; }

/* ====== Inputs ====== */
input {
	width: 100%;
	padding: 12px 10px;
	margin: 6px 0;
	border-radius: 10px;
	border: 1px solid #d1d5db;
	font-size: 16px;
}

/* ====== Buttons ====== */
button {
	width: 100%;
	padding: 12px;
	margin-top: 12px;
	border: none;
	border-radius: 12px;
	background: #4f46e5;
	color: #fff;
	font-weight: 600;
	cursor: pointer;
	transition: 0.2s;
}

button:hover { background: #6366f1; }

button.bad { background: #ef4444; }
button.good { background: #10b981; }

.small-btn {
	padding: 6px 12px;
	font-size: 14px;
}

/* ====== Links ====== */
.link {
	color: #4f46e5;
	cursor: pointer;
	margin-top: 8px;
	display: block;
}

/* ====== Errors ====== */
.error {
	color: #ef4444;
	margin-top: 8px;
	min-height: 18px;
}

/* ====== Main Box ====== */
#main-box {
	max-width: 520px;
	margin: 20px auto;
	text-align: center;
}

#top-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

#card-area {
	width: 100%;
	height: 400px;
	perspective: 1200px;
	display: flex;
	justify-content: center;
	align-items: center;
}

/* ====== Карточки ====== */
.card {
	width: 340px;
	max-width: 92%;
	background: linear-gradient(145deg, #ffffff, #eef2ff);
	padding: 22px;
	border-radius: 20px;
	box-shadow: 0 18px 40px rgba(0,0,0,0.08);
	text-align: center;
	user-select: none;
	touch-action: none;
	transition: transform 0.3s ease, opacity 0.3s;
}

.word { font-size: 32px; font-weight: 700; }
.transcription { font-size: 18px; color: #6b7280; margin-top: 6px; }
.translation { font-size: 20px; color: #374151; margin-top: 10px; }
.example { font-size: 16px; color: #6b7280; margin-top: 12px; font-style: italic; }

.card img {
	max-width: 100%;
	border-radius: 12px;
	margin-top: 12px;
	box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

/* ====== Swipe Animation ====== */
.fade-in { animation: fadeIn 0.28s ease; }
@keyframes fadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

.card.dragging { box-shadow: 0 30px 80px rgba(0,0,0,0.12); }
.card.swipe-right { transform: translateX(400px) rotateY(180deg) rotate(20deg) scale(0.9); opacity: 0; }
.card.swipe-left { transform: translateX(-400px) rotateY(180deg) rotate(-20deg) scale(0.9); opacity: 0; }

/* ====== Swipe buttons ====== */
#swipe-buttons {
	display: flex;
	gap: 16px;
	justify-content: center;
	margin-top: 20px;
}