/* ============================================
   ПЕРЕМЕННЫЕ
   ============================================ */
:root {
	--primary: #00C7FE;
	--site-bg: #1D1E33;
	--page-bg: #151719;
	--card-bg: #1E213D;
	--gradient-start: #00416A;
	--gradient-end: #0099cc;
	--black-translucent-strong: rgba(0, 0, 0, 0.75);
	--black-translucent-light: rgba(0, 0, 0, 0.25);
	--white-translucent-strong: rgba(255, 255, 255, 0.75);
	--white-translucent-light: rgba(255, 255, 255, 0.25);
	--red: #EE204D;
	--purple: #9966CC;
}

/* ============================================
   ПАДАЮЩИЕ ЗВЁЗДЫ (CANVAS)
   ============================================ */
.stars-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    display: block;
}

/* ============================================
   АНИМАЦИИ
   ============================================ */
@keyframes scanlines {
	0% {
		background-position: 0 0, 0 0;
	}
	100% {
		background-position: 0 10px, 0 0;
	}
}

@keyframes shine {
	0% {
		filter: brightness(1) drop-shadow(0 0 0px var(--primary));
	}
	50% {
		filter: brightness(1.025) drop-shadow(0 0 5px var(--primary));
	}
	100% {
		filter: brightness(1) drop-shadow(0 0 0px var(--primary));
	}
}

@keyframes gentlePulse {
	0% { transform: scale(1); }
	50% { transform: scale(1.05); }
	100% { transform: scale(1); }
}

@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes slideIn {
	from { transform: translateY(-50px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

@keyframes zoomIn {
	from { transform: scale(0.75); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

@keyframes burgerMenuSlide {
	from {
		transform: translateX(100%);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

/* ============================================
   БАЗОВЫЕ СТИЛИ
   ============================================ */
body {
	background-color: var(--site-bg);
	font-family: 'Roboto', 'Courier New', monospace;
	margin: 0;
	min-height: 100vh;
	position: relative;
	overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

html {
    scroll-behavior: smooth;
}

/* ============================================
   ТИПОГРАФИКА
   ============================================ */
h1 {
	color: white;
	display: block;
	font-size: clamp(25px, 5vw, 35px);
	font-weight: 700;
	line-height: 1.5;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: clamp(20px, 5vw, 25px);
	position: relative;
	text-shadow: 0 0 5px white;
	text-align: center;
	white-space: normal;
	width: fit-content;
	max-width: 90%;
}

h2 {
	color: var(--primary);
	display: block;
	font-size: clamp(20px, 1vw, 25px);
	font-weight: 700;
	line-height: 1.5;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: clamp(20px, 5vw, 25px);
	position: relative;
	text-align: center;
	white-space: normal;
	width: fit-content;
	max-width: 90%;
}

/* ============================================
   ФОНОВЫЕ ЭЛЕМЕНТЫ
   ============================================ */
body::after {
	content: '';
	position: fixed;
	top: -20px;
	left: -20px;
	width: calc(100% + 40px);
	height: calc(100% + 40px);
	background-image: url("/media/Фон_волны_космос.png");
	background-size: cover;
	background-attachment: fixed;
	background-position: center;
	pointer-events: none;
	z-index: -3;
	opacity: 0.75;
}

body::before {
	background-color: var(--page-bg);
	content: '';
	height: 100vh;
	left: 50%;
	position: fixed;
	top: 0;
	transform: translateX(-50%);
	width: min(1200px, 75%);
	min-width: 75%;
	box-shadow: 0 0 25px black;
	z-index: -1;
	opacity: 0.9;
}

/* ============================================
   SCANLINES
   ============================================ */
.scanlines-layer {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 9999;
	animation: scanlines 2.5s linear infinite;
	background: linear-gradient(
		rgba(25, 25, 25, 0) 50%,
		rgba(0, 0, 0, 0.25) 50%
	), linear-gradient(
		90deg,
		rgba(255, 0, 0, 0.06),
		rgba(0, 255, 0, 0.02),
		rgba(0, 0, 255, 0.06)
	);
	background-size: 100% 5px, 0px 100%;
	opacity: 0.25;
}

/* ============================================
   НАВИГАЦИЯ
   ============================================ */
.nav-menu {
	background: 
    linear-gradient(135deg, 
        color-mix(in srgb, var(--gradient-end) 75%, transparent), 
        color-mix(in srgb, var(--gradient-start) 75%, transparent)
    ),
    url("/media/Фон_волны.png") center/cover no-repeat,
    linear-gradient(135deg, var(--gradient-end), var(--gradient-start));
	padding: clamp(10px, 2vw, 25px) 0;
	display: flex;
    min-height: 50px;
    height: auto;
	width: 100%;
	justify-content: center;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	box-shadow: 0 0 10px black;
	z-index: 1;
	transition: all 0.25s ease;
}

.nav-list {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: clamp(20px, 5vw, 50px);
	list-style: none;
	margin: 0;
	padding: 0 clamp(10px, 5vw, 20px);
	flex-wrap: wrap;
}

.nav-item {
	margin: 0;
}

.nav-link {
	color: white;
	text-decoration: none;
	font-size: clamp(20px, 1vw, 25px);
	font-weight: 700;
	padding: clamp(5px, 1vw, 10px) clamp(8px, 1.5vw, 20px);
	border-radius: clamp(5px, 1vw, 10px);
	transition: all 0.25s ease;
	display: inline-block;
	white-space: nowrap;
}

.nav-link:hover {
	color: var(--card-bg);
	text-shadow: 0 0 1px var(--card-bg);
	transform: translateY(-2px);
}

.nav-link.active {
	color: var(--card-bg);
	text-shadow: 0 0 1px var(--card-bg);
	cursor: default;
}

.page-nav {
    margin: 20px auto 40px auto;
    max-width: 90%;
    width: fit-content;
    padding: 10px 20px;
    backdrop-filter: blur(8px);
    text-align: center;
    position: relative;
    transition: all 0.25s;
}

.page-nav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px 25px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.page-nav-link {
    color: white;
    text-decoration: none;
	font-size: clamp(20px, 1vw, 25px);
    font-weight: 500;
    padding: 5px 0;
    transition: 0.2s;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.page-nav-link:hover {
    border-bottom-color: var(--primary);
    color: var(--primary);
}

.page-nav-list li:not(:last-child)::after {
    content: "|";
    margin-left: 20px;
    color: white;
    font-weight: 300;
}

.burger-btn {
	display: none;
	position: fixed;
	top: 2.5%;
	right: 5%;
	width: 50px;
	height: 50px;
	background: linear-gradient(135deg, var(--gradient-end) 0%, var(--gradient-start) 100%);
	border: none;
	border-radius: 10px;
	cursor: pointer;
	z-index: 3;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	box-shadow: 0 0 10px black;
	transition: all 0.25s ease;
}

.burger-btn:hover {
	transform: scale(1.05);
}

.burger-btn span {
	height: 3px;
	background-color: white;
	border-radius: 3px;
	transition: all 0.25s ease;
}

.burger-btn.active span:nth-child(1) {
	transform: rotate(45deg) translate(5px, 6px);
}

.burger-btn.active span:nth-child(2) {
	opacity: 0;
}

.burger-btn.active span:nth-child(3) {
	transform: rotate(-45deg) translate(5px, -6px);
}

.mobile-nav {
	display: none;
	position: fixed;
	top: 0;
	right: 0;
	width: 250px;
	height: 100vh;
	background: 
    linear-gradient(135deg, 
        color-mix(in srgb, var(--gradient-end) 75%, transparent), 
        color-mix(in srgb, var(--gradient-start) 75%, transparent)
    ),
    url("/media/Фон_волны.png") center/cover no-repeat,
    linear-gradient(135deg, var(--gradient-end), var(--gradient-start));
	backdrop-filter: blur(10px);
	z-index: 2;
	padding: 100px 25px 30px;
	animation: burgerMenuSlide 0.25s ease;
	overflow-y: auto;
}

.mobile-nav.show {
	display: block;
}

.mobile-nav-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.mobile-nav-item {
	margin-bottom: 20px;
}

.mobile-nav-link {
	color: white;
	text-decoration: none;
	font-size: clamp(20px, 1vw, 25px);
	font-weight: 700;
	padding: 10px 20px;
	display: block;
	border-radius: 8px;
	transition: all 0.25s ease;
	text-align: right;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
	color: var(--card-bg);
}

.mobile-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: var(--black-translucent-strong);
	z-index: 1;
}

.mobile-overlay.show {
	display: block;
}

/* ============================================
   ЛОГОТИП
   ============================================ */
.logo-container {
	text-align: center;
	margin-bottom: 50px;
}

.logo-image {
	width: 50%;
	height: auto;
	display: inline-block;
	animation: shine 5s linear infinite;
}

/* ============================================
   ОСНОВНОЙ КОНТЕНТ
   ============================================ */
.site-content {
	box-sizing: border-box;
	margin-left: auto;
	margin-right: auto;
	padding: 0 clamp(10px, 5vw, 50px);
	position: relative;
	width: min(1200px, 75%);
	min-width: 75%;
	padding-top: 150px;
	z-index: 0;
}

/* ============================================
   ПОДВАЛ
   ============================================ */
html, body {
    height: 100%;
    margin: 0;
}

.site-footer {
    margin-top: auto;
    background: linear-gradient(var(--black-translucent-strong), var(--black-translucent-strong)), 
                url("/media/Фон_волны.png") center/cover no-repeat, black;
    color: white;
    padding: 50px 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 50px;
}

.footer-column h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--white-translucent-light);
    padding-bottom: 8px;
}

.footer-contacts li, .footer-socials li {
    margin-bottom: 10px;
}

.footer-contacts a, .footer-socials a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-contacts a:hover, .footer-socials a:hover {
    color: var(--gradient-start);
}


/* ============================================
   КНОПКА НАВЕРХ
   ============================================ */
.scroll-to-top {
	position: fixed;
	bottom: 2.5%;
	right: 5%;
	width: 50px;
	height: 50px;
	background: linear-gradient(135deg, var(--gradient-end) 0%, var(--gradient-start) 100%);
	border: none;
	border-radius: 10px;
	cursor: pointer;
	z-index: 3;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	box-shadow: 0 0 10px black;
    color: white;
    font-size: 30px;
    font-weight: 700;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    user-select: none;
}

.scroll-to-top:hover {
    transform: scale(1.05);
}


.scroll-to-top.visible {
    transform: translateY(0);
    visibility: visible;
    opacity: 1;
}

/* ============================================
   КОНТЕЙНЕР
   ============================================ */
.container {
	background-color: var(--black-translucent-light);
	overflow: hidden;
	position: relative;
	box-shadow: inset 0 0 10px black;
	padding: 0 clamp(20px, 5vw, 50px);
	align-items: center;
}

/* ============================================
   СЕТКА КАРТОЧЕК
   ============================================ */
.grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: clamp(20px, 5vw, 50px);
	margin-bottom: clamp(20px, 5vw, 50px);
}

.grid-item {
	background-color: var(--card-bg);
	border-radius: clamp(5px, 1vw, 10px);
	overflow: hidden;
	position: relative;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	cursor: pointer;
	box-shadow: 0 0 10px black;
	display: flex;
	flex-direction: column;
}

.grid-item:hover {
	transform: scale(1.05);
	box-shadow: 0 0 10px black;
}

.grid-top {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: clamp(20px, 1vw, 25px);
	padding: clamp(20px, 1vw, 25px);
	position: relative;
	flex-wrap: wrap;
}

.grid-item .grid-top {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
	padding: clamp(5px, 5vw, 10px);
}

.grid-top img {
	max-width: 90%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	margin: 0 auto;
	animation: shine 5s linear infinite;
}

.grid-image-container {
	position: relative;
	overflow: hidden;
	border-radius: clamp(5px, 1vw, 10px);
	flex-shrink: 0;
	width: clamp(100px, 15vw, 300px);
	height: clamp(100px, 15vw, 300px);
}

.grid-image {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	margin: auto;
	transition: transform 0.25s ease;
	animation: shine 5s linear infinite;
}

.grid-item:hover .grid-image {
	animation: gentlePulse 1s ease-in-out infinite, shine 5s linear infinite;
}

.grid-header {
	flex: 1;
	min-width: 150px;
}

.grid-content {
	padding: 0 clamp(20px, 1vw, 25px) clamp(20px, 1vw, 25px) clamp(20px, 5vw, 50px);
	flex: 1;
}

.grid-content p, .grid-content li {
	color: white;
	font-size: clamp(20px, 1vw, 25px);
	font-weight: 700;
}

.grid-item .grid-header:has(h3) {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

.grid-item .grid-header h3 {
    text-align: center;
    margin: 0;
    width: 100%;
}

/* ============================================
   МОДАЛЬНЫЕ ОКНА
   ============================================ */
.modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: var(--black-translucent-strong);
	z-index: 5;
	justify-content: center;
	align-items: center;
	animation: fadeIn 0.25s ease;
}

.modal.show {
	display: flex;
}

.modal-content {
	background: linear-gradient(135deg, var(--card-bg) 0%, var(--site-bg) 100%);
	border-radius: clamp(5px, 1.5vw, 10px);
	max-width: 95%;
	width: min(800px, 95%);
	position: relative;
	box-shadow: 0 0 10px black;
	animation: slideIn 0.25s ease;
	margin: 20px;
	max-height: 90vh;
	overflow-y: auto;
}

.modal-header {
	background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
	padding: clamp(20px, 1vw, 25px);
	border-radius: clamp(5px, 1.5vw, 10px) clamp(5px, 1.5vw, 10px) 0 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.modal-header h3 {
	color: white;
	text-shadow: 0 0 1px black;
	margin: 0;
	font-size: clamp(20px, 5vw, 50px);
	white-space: normal;
}

.modal-close {
	background: transparent;
    box-shadow: none;
	border: none;
	color: white;
	font-size: clamp(25px, 5vw, 50px);
	cursor: pointer;
	padding: 0;
	width: clamp(25px, 5vw, 50px);
	height: clamp(25px, 5vw, 50px);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.25s ease;
	line-height: 1;
}

.modal-close:hover {
	background: transparent;
    box-shadow: none;
	border: none;
	transform: scale(1.05);
	color: black;
}

.modal-body {
	padding: clamp(20px, 1vw, 25px);
	color: white;
}

.modal-image {
	width: 90%;
	height: auto;
	border-radius: clamp(5px, 5vw, 10px);
	margin-bottom: clamp(20px, 5vw, 20px);
	margin: 0 auto clamp(20px, 5vw, 20px) auto;
	display: block;
}

.modal-description {
	font-size: clamp(20px, 1vw, 25px);
	font-weight: 700;
	line-height: 3;
	margin-bottom: clamp(20px, 1vw, 25px);
	color: var(--primary);
}

.modal-materials {
	margin-top: clamp(20px, 1vw, 25px);
}

.modal-materials-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.modal-materials-list li {
	margin-bottom: clamp(5px, 1.5vw, 10px);
	padding: clamp(5px, 1.5vw, 10px);
	background: var(--black-translucent-light);
	border-left: clamp(5px, 0.5vw, 10px) solid var(--primary);
	transition: background 0.25s ease;
}

.modal-materials-list li:hover {
	background: black;
}

.modal-materials-list a {
	color: var(--primary);
	text-decoration: none;
	font-size: clamp(20px, 5vw, 30px);
	display: block;
	word-break: break-word;
}

.modal-materials-list a:hover {
	text-decoration: underline;
}

.formulas-section {
    margin-bottom: 20px;
}

.formula-card-item {
    background: var(--black-translucent-light);
    border-left: 3px solid var(--primary);
    border-radius: 5px;
    padding: 10px;
    transition: all 0.25s ease;
    margin-top: 10px;
}

.formula-name {
    color: white;
	font-size: clamp(20px, 1vw, 25px);
    font-weight: 700;
}

.formula-latex {
	font-size: clamp(20px, 5vw, 30px);
    margin: 20px 0;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
}

.formula-latex .MathJax {
    color: white;
}

.sections-container {
    margin-top: 50px;
	font-size: clamp(25px, 5vw, 35px);
}

.sections-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
	background-color: var(--black-translucent-light);
    border-top: 2px solid rgba(255, 255, 255, 0.25);
    border-bottom: 2px solid rgba(255, 255, 255, 0.25);
	box-shadow: inset 0 0 10px black;
	padding: 0 clamp(5px, 5vw, 10px);
    flex-wrap: wrap;
}

.section-tab {
    cursor: pointer;
	font-size: clamp(20px, 1vw, 25px);
    font-weight: 700;
    color: white;
    transition: all 0.25s ease;
    position: relative;
    border-radius: 0;
    padding: 10px 0;
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
    line-height: normal;
}

.section-tab:hover {
    color: var(--primary);
}

.section-tab.active {
    color: var(--primary);
}

.section-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.modal-content::-webkit-scrollbar{
    width: 10px;
    height: 10px;
}

.modal-content::-webkit-scrollbar-track{
    background: var(--black-translucent-strong);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb{
    background: var(--primary);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover{
    background: color-mix(in srgb, var(--primary) 80%, white);
    cursor: pointer;
}

.modal-content{
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--black-translucent-strong);
}

.mobile-nav::-webkit-scrollbar {
    width: 10px;
}
.mobile-nav::-webkit-scrollbar-track {
    background: var(--black-translucent-strong);
    border-radius: 10px;
}
.mobile-nav::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

/* ============================================
   МАСШТАБИРУЕМОЕ ИЗОБРАЖЕНИЕ
   ============================================ */
.zoomable-image {
	width: 100%;
	box-shadow: 0 0 10px black;
	cursor: pointer;
	transition: transform 0.25s ease;
}

.zoomable-image:hover {
	transform: scale(1.05);
}

.zoomable-image-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: var(--black-translucent-strong);
	z-index: 5;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	animation: fadeIn 0.25s ease;
}

.zoomable-image-modal.show {
	display: flex;
}

.zoomable-image-modal-content {
	position: relative;
	max-width: 90vw;
	max-height: 90vh;
	animation: zoomIn 0.25s ease;
}

.zoomable-image-modal-content img {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 90vh;
	object-fit: contain;
	box-shadow: 0 0 20px black;
	background-color: var(--page-bg);
}

.zoomable-image-modal-close {
	background: transparent;
    box-shadow: none;
	border: none;
	position: absolute;
	top: -50px;
	right: 0;
	color: white;
	font-size: clamp(25px, 5vw, 50px);
	cursor: pointer;
	padding: 0;
	transition: transform 0.25s ease;
	z-index: 5;
}

.zoomable-image-modal-close:hover {
	background: transparent;
    box-shadow: none;
	border: none;
	transform: scale(1.05);
	color: var(--primary);
}

/* ============================================
   ОШИБКИ
   ============================================ */
.error-container {
	background: var(--card-bg);
	border-radius: 20px;
	margin: auto;
	padding: 50px;
	width: 50%;
	margin-bottom: 50px;
	text-align: center;
	box-shadow: 0 0 10px black;
}

.error-code {
	font-size: clamp(50px, 5vw, 100px);
	font-weight: 700;
	color: var(--primary);
	text-shadow: 0 0 10px var(--primary);
	margin-bottom: 20px;
	line-height: 1;
}

.home-link {
	display: inline-block;
	background: linear-gradient(135deg, var(--gradient-end) 0%, var(--gradient-start) 100%);
	color: white;
	text-decoration: none;
	padding: 12px 30px;
	border-radius: 8px;
	font-size: clamp(20px, 1vw, 25px);
	font-weight: 600;
	transition: all 0.25s ease;
	border: none;
	cursor: pointer;
}

.home-link:hover {
	transform: translateY(-2px);
	box-shadow: 0 0 10px black;
}

/* ============================================
   ВИДЕО
   ============================================ */
.video-container {
    width: 100%;
    margin: 0 auto;
    margin-bottom: clamp(20px, 5vw, 50px);
}

.video-grid {
    display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: clamp(20px, 5vw, 50px);
	margin-bottom: clamp(20px, 5vw, 50px);
}

.video-card {
    background: var(--card-bg);
    border-radius: 10px;
    border: 5px solid var(--card-bg);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    box-shadow: 0 0 10px black;
}

.video-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px black;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--card-bg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: color-mix(in srgb, var(--card-bg), transparent 25%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
	font-size: clamp(20px, 1vw, 25px);
    color: var(--primary);
    opacity: 0;
    transition: opacity 0.25s ease;
	z-index: 5;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.video-info {
    padding: 20px 20px;
}

.video-title {
    color: var(--primary);
	font-size: clamp(20px, 1vw, 25px);
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.video-description {
    color: white;
	font-size: clamp(10px, 5vw, 15px);
    line-height: 1.5;
    margin-bottom: 10px;
}

.video-duration {
    display: inline-block;
    background: var(--card-bg);
    color: white;
	font-size: clamp(10px, 5vw, 15px);
    border-radius: 5px;
}

.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 5;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.25s ease;
}

.video-modal.show {
    display: flex;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 30px black;
}

.video-modal-header {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding: 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-modal-header h3 {
    color: white;
    margin: 0;
	font-size: clamp(25px, 5vw, 35px);
}

.video-modal-close {
	background: transparent;
    box-shadow: none;
    border: none;
    color: white;
	font-size: clamp(25px, 5vw, 50px);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.video-modal-close:hover {
	background: transparent;
    box-shadow: none;
	border: none;
    transform: scale(1.05);
    color: black;
}

.video-iframe-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.empty-videos {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border-radius: 12px;
    color: white;
}

.empty-videos::before {
    content: "🎬";
    font-size: clamp(25px, 5vw, 35px);
    display: block;
    margin-bottom: 20px;
    opacity: 0.5;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--card-bg) inset !important;
    -webkit-text-fill-color: white !important;
    caret-color: white;
    transition: background-color 50000s ease-in-out 0s;
}

.video-thumbnail {
    position: relative;
    overflow: hidden;
}

.video-poster,
.video-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.25s ease;
}

.video-poster {
    z-index: 1;
}

.video-hover {
    opacity: 0;
    z-index: 1;
}

/* ============================================
   МАЯТНИК
   ============================================ */
canvas {
	display: block;
	margin: 0 auto;
	border-radius: 24px;
	cursor: pointer;
	width: 100%;
	height: auto;
}
.controls {
	margin-top: 20px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px;
}
.control-group {
	padding: 8px 18px;
	border-radius: 60px;
	display: flex;
	gap: 12px;
	align-items: center;
}
.control-group label {
	font-weight: 700;
	color: var(--primary);
}
input {
	width: 150px;
	cursor: pointer;
}
span {
	min-width: 45px;
	font-family: monospace;
	font-weight: bold;
	color: var(--primary);
}
button {
	background: var(--primary);
	border: none;
	padding: 6px 20px;
	border-radius: 40px;
	font-weight: bold;
	cursor: pointer;
	transition: 0.2s;
}
button:hover {
	background: var(--gradient-start);
	transform: scale(0.75);
}

.pendulum-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
	justify-content: center;
	align-items: flex-start;
	margin: 30px 0;
}

.pendulum-settings {
    flex: 1;
    min-width: 200px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 24px;
}

.pendulum-display {
    flex: 1;
    min-width: 280px;
    display: flex;
    justify-content: center;
}

.pendulum-settings .control-group {
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0;
    background: none;
    border-radius: 0;
}

.pendulum-settings .control-group label {
    width: 130px;
}

.pendulum-settings input {
    flex: 1;
    width: auto;
}

.pendulum-settings button {
    width: 100%;
}

/* ============================================
   АДАПТАЦИЯ
   ============================================ */
@media (orientation: portrait){
	.stars-canvas {
        display: none;
    }

    body::after {
        background-image: none;
    }

    body::before {
        width: 100%;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }

    .page-nav-list li:not(:last-child)::after {
        content: none;
    }

    .nav-menu {
        display: none;
    }
    
    .burger-btn {
        display: flex;
    }

    .site-content {
        width: 100%;
        padding-top: 70px;
    }

    .grid {
        grid-template-columns: 1fr;
    }
    
    .grid-top {
        flex-direction: row;
        text-align: center;
        flex-wrap: wrap;
    }
    
    .grid-image-container {
        margin: 0 auto;
        width: 250px;
        height: 250px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .image-modal-content {
        max-width: 95vw;
    }
    
    .logo-image {
        width: 70%;
    }

}