/* components.css — переиспользуемые компоненты */

/* ── Кнопка (по спеке Figma) ── */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-xs);
	height: var(--btn-height);
	width: var(--btn-width);
	padding: var(--btn-pad-y) var(--btn-pad-x);
	background-color: var(--btn-bg);
	color: var(--btn-text) !important;
	border: var(--btn-border-width) solid var(--btn-border);
	border-radius: var(--radius-full);
	font-family: var(--font-display);
	font-size: var(--btn-font-size);
	line-height: var(--btn-line-height);
	font-weight: var(--btn-font-weight);
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
	white-space: nowrap;
}

.btn:hover {
	background-color: var(--btn-bg-hover);
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(189, 12, 30, 0.4);
}

.btn:active {
	transform: translateY(0);
	box-shadow: none;
}

/* Компактная кнопка (свитки статей) */
.btn--compact {
	height: var(--btn-height-compact);
	width: var(--btn-width-compact);
	font-size: var(--fs-16);
	padding: var(--space-xs) var(--space-m);
}

/* Широкая кнопка (результаты игр) */
.btn--wide {
	width: var(--btn-width-wide);
}

/* Кнопка-призрак (ссылка) */
.btn--ghost {
	background: transparent;
	border-color: var(--color-cream);
	color: var(--color-cream);
}

.btn--ghost:hover {
	background: rgba(255, 246, 234, 0.1);
	box-shadow: 0 4px 16px rgba(255, 246, 234, 0.1);
}

/* Ссылка-навигация (текстовая, без рамки) */
.link-nav {
	font-size: var(--fs-body);
	font-weight: 500;
	color: var(--color-gold);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
	transition: opacity 0.2s;
}

.link-nav:hover {
	opacity: 0.7;
}

/* Прогресс-бар игр */
.progress-bar {
	width: 100%;
	height: 4px;
	background: rgba(255, 208, 142, 0.2);
	border-radius: var(--radius-full);
	overflow: hidden;
}

.progress-bar__fill {
	height: 100%;
	background: linear-gradient(90deg, var(--color-gold-glow), var(--color-gold));
	border-radius: var(--radius-full);
	transition: width 0.4s var(--ease-cinematic);
}

/* Попап-оверлей */
.popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 500;
	background: rgba(18, 18, 23, 0.75);
	backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--space-m);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.popup-overlay.is-open {
	opacity: 1;
	pointer-events: all;
}

.popup {
	position: relative;
	max-width: 560px;
	width: 100%;
	background: rgba(18, 18, 23, 0.95);
	border: 1px solid var(--color-gold);
	border-radius: var(--radius-card);
	padding: var(--space-l) var(--space-l);
	transform: translateY(20px) scale(0.97);
	transition: transform 0.3s var(--ease-cinematic);
	box-shadow: 0 0 40px rgba(255, 199, 120, 0.15);
}

.popup-overlay.is-open .popup {
	transform: translateY(0) scale(1);
}

.popup__close {
	position: absolute;
	top: var(--space-s);
	right: var(--space-s);
	background: none;
	border: none;
	color: var(--color-gold);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: var(--space-xs);
	transition: opacity 0.2s;
}

.popup__close:hover {
	opacity: 0.6;
}

.popup__brand-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	display: inline-block;
	margin-right: var(--space-xs);
}

/* Стеклянная карточка игр */
.glass-card {
	background: var(--color-card-fill);
	border: 1px solid var(--color-card-border);
	border-radius: var(--radius-card);
	backdrop-filter: blur(var(--card-blur));
	padding: var(--space-m);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.glass-card:hover {
	transform: translateY(-4px) rotate3d(1, 1, 0, 2deg);
	box-shadow: 0 0 24px rgba(255, 208, 142, 0.25);
}
