@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;600&family=Montserrat:wght@300;400;500;600&display=swap');

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Montserrat', sans-serif;
	background: #1a2332;
	min-height: 100vh;
	position: relative;
	overflow-x: hidden;
	color: #e0e8f0;
}

.waves-bg {
	position: fixed;
	width: 200%;
	height: 200%;
	top: -50%;
	left: -50%;
	z-index: 0;
	background: linear-gradient(45deg,
		#0d1621 0%,
		#1a2940 25%,
		#2d4a6b 50%,
		#1a2940 75%,
		#0d1621 100%);
	animation: waveAnimation 20s ease-in-out infinite;
}

@keyframes waveAnimation {
	0%, 100% { transform: rotate(0deg) scale(1); }
	25% { transform: rotate(1deg) scale(1.05); }
	50% { transform: rotate(-1deg) scale(1); }
	75% { transform: rotate(1deg) scale(1.05); }
}

.particles {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	pointer-events: none;
	overflow: visible;
}

.particle {
	position: absolute;
	width: 2px;
	height: 2px;
	background: linear-gradient(45deg, #d4a574, #f4e4c1);
	border-radius: 50%;
	opacity: 0;
}

.page-wrapper {
	position: relative;
	z-index: 10;
	min-height: 100vh;
	padding: 40px 20px 60px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.header {
	width: 100%;
	max-width: 1200px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 60px;
	animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
	from { opacity: 0; transform: translateY(-20px); }
	to { opacity: 1; transform: translateY(0); }
}

.back-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #7a9ec7;
	text-decoration: none;
	font-size: 0.9em;
	font-weight: 400;
	letter-spacing: 0.5px;
	transition: all 0.3s ease;
	padding: 8px 0;
}

.back-link:hover {
	color: #d4a574;
}

.back-link:hover .back-arrow {
	transform: translateX(-4px);
}

.back-arrow {
	transition: transform 0.3s ease;
	display: inline-flex;
}

.header-logo {
	height: 50px;
	width: auto;
	filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
	transition: filter 0.3s ease;
}

.header-logo:hover {
	filter: drop-shadow(0 4px 16px rgba(212, 165, 116, 0.3));
}

.events-grid {
	width: 100%;
	max-width: 1000px;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
	animation: fadeInUp 1s ease-out 0.2s both;
}

@keyframes fadeInUp {
	from { opacity: 0; transform: translateY(30px); }
	to { opacity: 1; transform: translateY(0); }
}

.poster-card {
	position: relative;
	border-radius: 12px;
	cursor: pointer;
	border: 1px solid rgba(212, 165, 116, 0.1);
	background: rgba(13, 22, 33, 0.6);
	transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.poster-card img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 12px;
	transition: transform 0.4s ease;
}

.poster-card:hover {
	transform: translateY(-8px) scale(1.02);
	border-color: rgba(212, 165, 116, 0.35);
	box-shadow:
		0 20px 40px rgba(0, 0, 0, 0.4),
		0 0 30px rgba(212, 165, 116, 0.1);
}

.poster-card:hover img {
	transform: scale(1.03);
}

.overlay {
	position: fixed;
	inset: 0;
	background: rgba(10, 17, 26, 0.85);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	z-index: 100;
	opacity: 0;
	visibility: hidden;
	transition: all 0.4s ease;
}

.overlay.active {
	opacity: 1;
	visibility: visible;
}

.lecture-panel {
	position: fixed;
	inset: 0;
	z-index: 101;
	padding: 40px 20px;
	opacity: 0;
	visibility: hidden;
	transition: all 0.4s ease;
	overflow-y: auto;
}

.lecture-panel.active {
	opacity: 1;
	visibility: visible;
}

.panel-content {
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	gap: 40px;
	align-items: flex-start;
	animation: panelSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes panelSlideIn {
	from { opacity: 0; transform: translateY(40px) scale(0.95); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.panel-poster {
	flex: 0 0 280px;
	position: sticky;
	top: 40px;
}

.panel-poster img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 12px;
	border: 1px solid rgba(212, 165, 116, 0.2);
	box-shadow:
		0 20px 50px rgba(0, 0, 0, 0.5),
		0 0 30px rgba(212, 165, 116, 0.1);
}

.panel-lectures {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 24px;
	min-width: 0;
}

.lecture-card {
	background: rgba(15, 25, 40, 0.7);
	border: 1px solid rgba(212, 165, 116, 0.1);
	border-radius: 12px;
	overflow: hidden;
	transition: all 0.3s ease;
}

.lecture-card:hover {
	border-color: rgba(212, 165, 116, 0.25);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
	transform: translateY(-2px);
}

.lecture-thumb {
	width: 100%;
	position: relative;
}

.lecture-thumb img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.4s ease;
}

.lecture-card:hover .lecture-thumb img {
	transform: scale(1.03);
}

.lecture-info {
	padding: 18px 20px;
}

.lecture-title {
	font-family: 'Cormorant Garamond', serif;
	font-size: 1.3em;
	font-weight: 400;
	color: #d4a574;
	margin-bottom: 4px;
	line-height: 1.3;
}

.lecture-lecturer {
	font-size: 0.85em;
	font-weight: 300;
	color: #7a9ec7;
	margin-bottom: 14px;
	letter-spacing: 0.3px;
	line-height: 1.5;
}

.video-links {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}

.video-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border-radius: 8px;
	border: 1px solid rgba(212, 165, 116, 0.2);
	background: rgba(212, 165, 116, 0.05);
	text-decoration: none;
	font-size: 0.8em;
	font-weight: 500;
	letter-spacing: 0.3px;
	color: #d4a574;
	transition: all 0.3s ease;
	white-space: nowrap;
}

.video-link svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	transition: all 0.3s ease;
}

.video-link:hover {
	transform: translateY(-2px);
}

.video-link[data-platform="youtube"]:hover {
	color: #ff4444;
	border-color: rgba(255, 68, 68, 0.4);
	background: rgba(255, 68, 68, 0.1);
	box-shadow: 0 0 20px rgba(255, 68, 68, 0.15);
}

.video-link[data-platform="youtube"]:hover svg {
	fill: #ff4444;
}

.video-link[data-platform="vk"]:hover {
	color: #0077ff;
	border-color: rgba(0, 119, 255, 0.4);
	background: rgba(0, 119, 255, 0.1);
	box-shadow: 0 0 20px rgba(0, 119, 255, 0.15);
}

.video-link[data-platform="vk"]:hover svg {
	fill: #0077ff;
}

.video-link[data-platform="rutube"]:hover {
	color: #e8e8e8;
	border-color: rgba(232, 232, 232, 0.4);
	background: rgba(232, 232, 232, 0.1);
	box-shadow: 0 0 20px rgba(232, 232, 232, 0.1);
}

.video-link[data-platform="rutube"]:hover svg {
	fill: #e8e8e8;
}

.close-btn {
	position: fixed;
	top: 24px;
	right: 28px;
	z-index: 102;
	width: 48px;
	height: 48px;
	border: 1px solid rgba(212, 165, 116, 0.3);
	border-radius: 50%;
	background: rgba(15, 25, 40, 0.8);
	backdrop-filter: blur(10px);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	color: #d4a574;
}

.close-btn.active {
	opacity: 1;
	visibility: visible;
}

.close-btn:hover {
	border-color: #d4a574;
	background: rgba(212, 165, 116, 0.1);
	box-shadow: 0 0 20px rgba(212, 165, 116, 0.2);
	transform: rotate(90deg);
}

.close-btn svg {
	width: 20px;
	height: 20px;
}

.loading {
	text-align: center;
	padding: 60px 0;
	color: #7a9ec7;
	font-weight: 300;
	letter-spacing: 1px;
	grid-column: 1 / -1;
}

.loading-spinner {
	width: 40px;
	height: 40px;
	border: 2px solid rgba(212, 165, 116, 0.1);
	border-top-color: #d4a574;
	border-radius: 50%;
	margin: 0 auto 16px;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

.coming-soon {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 300px;
	text-align: center;
	padding: 40px;
	background: rgba(15, 25, 40, 0.5);
	border: 1px solid rgba(212, 165, 116, 0.12);
	border-radius: 12px;
}

.coming-soon-text {
	font-family: 'Cormorant Garamond', serif;
	font-size: 1.6em;
	font-weight: 300;
	line-height: 1.6;
	background: linear-gradient(135deg, #d4a574, #f4e4c1, #d4a574);
	background-size: 200% 200%;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	animation: shimmerText 3s ease-in-out infinite;
	letter-spacing: 1px;
}

@keyframes shimmerText {
	0% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

.lecture-panel::-webkit-scrollbar {
	width: 6px;
}

.lecture-panel::-webkit-scrollbar-track {
	background: rgba(212, 165, 116, 0.05);
}

.lecture-panel::-webkit-scrollbar-thumb {
	background: rgba(212, 165, 116, 0.25);
	border-radius: 4px;
}

.lecture-panel::-webkit-scrollbar-thumb:hover {
	background: rgba(212, 165, 116, 0.4);
}

@media (max-width: 900px) {
	.events-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}

	.panel-content {
		flex-direction: column;
		align-items: center;
	}

	.panel-poster {
		flex: none;
		width: 200px;
		position: static;
	}

	.panel-lectures {
		width: 100%;
	}
}

@media (max-width: 600px) {
	.page-wrapper {
		padding: 20px 10px 40px;
	}

	.header {
		margin-bottom: 30px;
	}

	.header-logo {
		height: 36px;
	}

	.back-link {
		font-size: 0.8em;
	}

	.events-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	.poster-card {
		border-radius: 8px;
	}

	.poster-card img {
		border-radius: 8px;
	}

	.lecture-panel {
		padding: 20px 10px;
	}

	.panel-content {
		gap: 20px;
		padding-top: 50px;
	}

	.panel-poster {
		width: 180px;
	}

	.close-btn {
		top: 10px;
		right: 10px;
		width: 40px;
		height: 40px;
	}

	.lecture-title {
		font-size: 1.1em;
	}

	.lecture-info {
		padding: 14px 16px;
	}

	.video-links {
		gap: 8px;
	}

	.video-link {
		padding: 6px 10px;
		font-size: 0.75em;
	}

	.coming-soon {
		min-height: 180px;
		padding: 24px 16px;
	}

	.coming-soon-text {
		font-size: 1.15em;
		line-height: 1.5;
	}
}