/* --- Общие стили --- */
body,
html {
	margin: 0;
	padding: 0;
	font-family: 'Montserrat', sans-serif;
	font-optical-sizing: auto;
	font-style: normal;
	background-color: #201739; /* Базовый цвет фона для canvas */
	position: relative; /* Необходимо для абсолютного позиционирования canvas */
	overflow-x: hidden; /* Предотвращает горизонтальную прокрутку */
	color: #eee;
}

/* --- Стили для фона canvas --- */
#canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 0;
	height: 100%;
}

/* --- Стили контейнера и темы --- */
.main-theme {
	/* Старый фон удален, теперь фон создается через canvas */
	width: 100%;
	box-sizing: border-box; /* Учитываем padding в общей ширине */
	padding: 20px 10px;
}

.content {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-height: 100vh;
	position: relative; /* Чтобы контент был над canvas */
	z-index: 1;
}

/* --- Элементы страницы --- */
.avatar {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	margin-bottom: 20px;
	border: 3px solid rgba(255, 255, 255, 0.8);
	/* Используем локальный файл logo.png */
	background-image: url('logo.png');
	background-size: cover;
	background-position: center;
}

.about-us {
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}
.link-btn {
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.title {
	font-size: 2.2em;
	font-weight: bold;
	text-align: center;
	margin: 10px 0 5px 0;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.title-description {
	font-size: 2em;
	font-weight: 400;
	text-align: center;
	margin: 0 0 10px 0;
	font-family: 'Caveat', cursive;
	font-optical-sizing: auto;
	font-style: normal;

	background: linear-gradient(
		to bottom,
		#fffcbe 85%,
		rgba(255, 255, 255, 1) 95%,
		#fffcbe 100%
	);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	color: transparent;
}
img.link-img {
	filter: saturate(0.5);
}

.about-us {
	color: #ffffff;
	font-size: 0.9em;
	margin-bottom: 3em;
	max-width: 600px;
	text-align: center;
	line-height: 1.6;
}

/* --- Стили для кнопок-ссылок --- */
.link-btn {
	display: flex;
	align-items: center;
	width: 95%;
	max-width: 500px;
	margin-bottom: 15px;
	padding: 12px 20px;
	background-color: rgba(255, 255, 255, 0.1);
	color: #ffffff;
	text-decoration: none;
	border-radius: 8px;
	font-size: 1em;
	font-weight: 500;
	transition: background-color 0.3s ease, transform 0.2s ease;
	border: 1px solid rgba(255, 255, 255, 0.2);
	box-sizing: border-box;
}

.link-btn:hover {
	background-color: rgba(255, 255, 255, 0.2);
	transform: scale(1.02); /* Небольшое увеличение при наведении */
}

.link-img {
	width: 24px;
	height: 24px;
	margin-right: 15px;
	object-fit: contain; /* Сохраняет пропорции иконки */
}

/* --- Стили для аккордеона --- */
.accordion-group {
	width: 95%; /* Занимает ту же ширину, что и кнопки */
	max-width: 500px; /* С тем же максимальным ограничением */
	margin-bottom: 15px;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
	box-sizing: border-box;
}

.accordion-header {
	background-color: rgba(0, 0, 0, 0.5);
	color: white;
	cursor: pointer;
	padding: 18px 20px;
	width: 100%;
	border: none;
	text-align: left;
	outline: none;
	font-size: 18px;
	transition: background-color 0.3s ease;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.accordion-header:hover,
.accordion-header.active {
	background-color: rgba(0, 0, 0, 0.7);
}

.accordion-header::after {
	content: '';
	width: 12px;
	height: 12px;
	flex-shrink: 0; /* Предотвращает сжатие иконки */
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 7' fill='none'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M1 1l5 5 5-5'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: center;
	transition: transform 0.3s ease;
}

.accordion-header.active::after {
	transform: rotate(180deg);
}

/* Внешний контейнер для анимации */
.accordion-content {
	background-color: rgba(255, 255, 255, 0.1);
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s ease-out;
	padding: 0; /* Убираем все отступы */
	box-sizing: border-box;
}

/* Внутренняя обертка для отступов */
.accordion-body {
	padding: 15px 10px;
}

/* Убираем лишний отступ у последней кнопки внутри аккордеона */
.accordion-body .link-btn:last-child {
	margin-bottom: 0;
}

/* Центрируем кнопки-ссылки внутри аккордеона */
.accordion-body .link-btn {
	margin-left: auto;
	margin-right: auto;
}

.link-btn {
	background-color: rgba(255, 255, 255, 0.15);
	box-shadow: 0 2px 6px rgba(255, 255, 255, 0.1);
}

.link-btn:hover {
	background-color: rgba(255, 255, 255, 0.25);
	box-shadow: 0 4px 10px rgba(255, 255, 255, 0.25);
	transform: scale(1.04);
	color: #fff;
}

.accordion-content {
	background-color: rgba(255, 255, 255, 0.1);
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
	padding: 0 10px; /* Добавим горизонтальные отступы всегда */
	opacity: 0;
	box-sizing: border-box;
}

.accordion-header.active + .accordion-content {
	opacity: 1;
	padding: 15px 10px;
	max-height: 500px; /* или большой макс. размер */
}

.accordion-header {
	background: linear-gradient(
		90deg,
		rgba(45, 45, 70, 0.8),
		rgba(25, 25, 45, 0.8)
	);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	font-weight: 600;
	letter-spacing: 0.05em;
}
.accordion-header.active {
	background: linear-gradient(
		90deg,
		rgba(70, 70, 110, 1),
		rgba(50, 50, 80, 1)
	);
}

.accordion-header::after {
	transition: transform 0.3s ease, filter 0.3s ease;
}

.accordion-header:hover::after {
	filter: drop-shadow(0 0 1px rgb(255 255 255));
	transform: rotate(180deg) scale(1.1);
}

@media (max-width: 480px) {
	.title {
		font-size: 2em;
		margin-bottom: 0.5em;
	}

	.title-description {
		font-size: 1.5em;
		padding: 0 10px;
	}

	.about-us {
		font-size: 0.9em;
	}

	.link-btn {
		font-size: 0.9em;
		padding: 10px 15px;
	}

	.accordion-header {
		font-size: 16px;
		padding: 15px 15px;
	}
}

body,
html {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

.avatar {
	box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
	transition: box-shadow 0.3s ease;
}

.avatar:hover {
	box-shadow: 0 0 20px rgba(255, 255, 255, 0.7);
}
