/* 公開天文台100年史 - カスタムCSS */

/* 星空パーティクルアニメーション */
.stars-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 0;
	overflow: hidden;
}

.star {
	position: absolute;
	background: white;
	border-radius: 50%;
	animation: twinkle var(--duration) ease-in-out infinite;
}

@keyframes twinkle {

	0%,
	100% {
		opacity: 0.3;
		transform: scale(1);
	}

	50% {
		opacity: 1;
		transform: scale(1.2);
	}
}

/* スクロールスナップ（オプション） */
.scroll-snap-container {
	scroll-snap-type: y proximity;
}

.scroll-snap-section {
	scroll-snap-align: start;
}

/* タイムライン */
.timeline {
	position: relative;
	padding-left: 2rem;
}

.timeline::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 2px;
	background: linear-gradient(to bottom, #fbbf24, #3b82f6, #a855f7);
}

.timeline-item {
	position: relative;
	padding-bottom: 2rem;
	padding-left: 1.5rem;
}

.timeline-item::before {
	content: '';
	position: absolute;
	left: -2rem;
	top: 0.5rem;
	width: 12px;
	height: 12px;
	background: #fbbf24;
	border-radius: 50%;
	border: 2px solid #0f172a;
	transform: translateX(-5px);
}

.timeline-item.important::before {
	width: 16px;
	height: 16px;
	background: #ef4444;
	box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
	transform: translateX(-7px);
}

/* PC版: 中央軸の左右配置 */
@media (min-width: 1024px) {
	.timeline-desktop {
		padding-left: 0;
	}

	.timeline-desktop::before {
		left: 50%;
		transform: translateX(-50%);
	}

	.timeline-desktop .timeline-item {
		width: 45%;
		padding-left: 0;
		padding-right: 2rem;
	}

	.timeline-desktop .timeline-item:nth-child(odd) {
		margin-left: 0;
		text-align: right;
	}

	.timeline-desktop .timeline-item:nth-child(even) {
		margin-left: 55%;
		text-align: left;
		padding-right: 0;
		padding-left: 2rem;
	}

	.timeline-desktop .timeline-item::before {
		left: auto;
		right: -2rem;
	}

	.timeline-desktop .timeline-item:nth-child(even)::before {
		left: -2rem;
		right: auto;
	}
}

/* カテゴリーバッジ */
.category-badge {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* セクション背景オーバーレイ */
.section-overlay {
	position: relative;
}

.section-overlay::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(to bottom, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.95));
	z-index: 1;
}

.section-overlay>* {
	position: relative;
	z-index: 2;
}

/* ヒーローセクション */
.hero-section {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
	position: relative;
	overflow: hidden;
}

.hero-section::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: radial-gradient(ellipse at center, transparent 0%, #0f172a 70%);
	z-index: 1;
}

/* グロー効果 */
.glow {
	text-shadow: 0 0 10px rgba(251, 191, 36, 0.5),
		0 0 20px rgba(251, 191, 36, 0.3),
		0 0 30px rgba(251, 191, 36, 0.2);
}

.glow-blue {
	text-shadow: 0 0 10px rgba(59, 130, 246, 0.5),
		0 0 20px rgba(59, 130, 246, 0.3);
}

/* マップコンテナ */
.map-container {
	position: relative;
	max-width: 100%;
	overflow: hidden;
	border-radius: 1rem;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.map-container img {
	width: 100%;
	height: auto;
	display: block;
}

/* チャートコンテナ */
.chart-container {
	background: rgba(255, 255, 255, 0.05);
	border-radius: 1rem;
	padding: 1.5rem;
	backdrop-filter: blur(10px);
}

/* カード */
.era-card {
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 1rem;
	padding: 2rem;
	transition: all 0.3s ease;
}

.era-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
	border-color: rgba(251, 191, 36, 0.3);
}

/* スクロールインジケーター */
.scroll-indicator {
	position: absolute;
	bottom: 2rem;
	left: 50%;
	transform: translateX(-50%);
	animation: bounce 2s infinite;
}

@keyframes bounce {

	0%,
	20%,
	50%,
	80%,
	100% {
		transform: translateX(-50%) translateY(0);
	}

	40% {
		transform: translateX(-50%) translateY(-10px);
	}

	60% {
		transform: translateX(-50%) translateY(-5px);
	}
}

/* ナビゲーションドット */
.nav-dots {
	position: fixed;
	right: 2rem;
	top: 50%;
	transform: translateY(-50%);
	z-index: 50;
	display: none;
}

@media (min-width: 1024px) {
	.nav-dots {
		display: flex;
		flex-direction: column;
		gap: 0.75rem;
	}
}

.nav-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.3);
	border: 2px solid transparent;
	cursor: pointer;
	transition: all 0.3s ease;
}

.nav-dot:hover,
.nav-dot.active {
	background: #fbbf24;
	border-color: #fbbf24;
	box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* フィルターボタン */
.filter-btn {
	padding: 0.5rem 1rem;
	border-radius: 9999px;
	font-size: 0.875rem;
	transition: all 0.2s ease;
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.filter-btn:hover {
	transform: scale(1.05);
}

.filter-btn.active {
	border-color: currentColor;
	box-shadow: 0 0 10px currentColor;
}

/* ギャラリー */
.gallery-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
}

@media (min-width: 768px) {
	.gallery-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 1024px) {
	.gallery-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.gallery-item {
	position: relative;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 0.5rem;
	cursor: pointer;
	transition: transform 0.3s ease;
}

.gallery-item:hover {
	transform: scale(1.05);
	z-index: 10;
}

.gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gallery-item .overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 0.5rem;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
	opacity: 0;
	transition: opacity 0.3s ease;
}

.gallery-item:hover .overlay {
	opacity: 1;
}

/* スムーススクロール */
html {
	scroll-behavior: smooth;
}

/* フェードインアニメーション */
.fade-in {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
	opacity: 1;
	transform: translateY(0);
}

/* ローディング */
.loading {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 200px;
}

.loading-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid rgba(251, 191, 36, 0.3);
	border-top-color: #fbbf24;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* フッター */
footer a {
	transition: color 0.2s ease;
}

footer a:hover {
	color: #fbbf24;
}

/* スクロールバー */
::-webkit-scrollbar {
	width: 8px;
}

::-webkit-scrollbar-track {
	background: #0f172a;
}

::-webkit-scrollbar-thumb {
	background: #374151;
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: #4b5563;
}

/* タイムライン切り替えボタン */
.timeline-switch-btn {
	padding: 0.75rem 1.5rem;
	border-radius: 9999px;
	border: 2px solid rgba(251, 191, 36, 0.3);
	background: rgba(255, 255, 255, 0.05);
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
}

.timeline-switch-btn:hover {
	background: rgba(251, 191, 36, 0.1);
	border-color: rgba(251, 191, 36, 0.5);
	color: #fbbf24;
}

.timeline-switch-btn.active {
	background: rgba(251, 191, 36, 0.2);
	border-color: #fbbf24;
	color: #fbbf24;
	box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

.timeline-switch-btn:active {
	transform: scale(0.95);
}