
/* --- Font Definitions --- */
@font-face {
	font-family: 'Naked Power Bd';
	src: url('/fonts/Naked Power Bd.otf') format('opentype');
	font-weight: bold;
	font-style: normal;
}

@font-face {
	font-family: 'Noto Sans';
	src: url('/fonts/NotoSans-Regular.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
}

/* --- New Fallback Font Integration --- */
@font-face {
	font-family: 'Zhaohua';
	src: url('/fonts/朝華標題A.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
}

/* --- Global Resets & Styles --- */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	/* 'TsukuhouMincho-Regular' has been integrated as the primary fallback font right after the English fonts */
	font-family: 'Naked Power Bd', 'Noto Sans', 'Zhaohua', 'Noto Serif TC', 'Microsoft JhengHei', sans-serif;
	color: #000000;
	background-color: #ffffff;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* --- Clean link --- */
.clean-link {
  color: inherit;
  text-decoration: none;
}
.clean-link:hover {
  color: green;
}

/* --- White Section Wrap --- */
.white-section {
	width: 100%;
	display: flex;
	justify-content: center;
	padding: 40px 20px; /* Added minor padding safety for mobile */
}

.container {
	width: 100%;
	max-width: 1600px; 
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
}

/* --- Left Column Layout --- */
.left-col {
	display: flex;
	flex-direction: column;
	gap: 30px;
	height: 100%;
}

.header-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 15px;
}

.logo {
	font-size: 7rem;
	font-style: italic;
	font-weight: bold;
	color: #1E3D0D; 
	line-height: 1;
}

.logo-ch {
	font-size: 7rem;
	font-weight: bold;
	color: #1E3D0D; 
	line-height: 1;
}

.crest-img {
	width: 180px;
	height: auto;
	max-width: 30%; /* Keeps emblem proportional on medium screens */
}

.nav-links .nav-links-ch {
	color: #1E3D0D; 
	font-size: 1.1rem;
	word-spacing: 2px;
}

.nav-links span {
	font-style: italic;
	font-weight: normal;
	margin-right: 15px;
}

.nav-links-ch span {
	font-weight: normal;
	margin-right: 15px;
}

/* --- NEW STICKY NAV STYLES --- */
.sticky-navbar {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	background-color: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(5px);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	z-index: 10000;
	padding: 15px 40px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-100%);
	transition: all 0.3s ease;
}

.sticky-navbar.is-sticky {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.sticky-navbar .sticky-logo {
	font-size: 2.2rem;
	font-style: italic;
	font-weight: bold;
	color: #1E3D0D;
	line-height: 1;
}

.sticky-logo-ch {
	font-size: 2.2rem;
	font-weight: bold;
	color: #1E3D0D;
	line-height: 1;
}

/* Dynamic Map Container */
.map-container {
	width: 100%;
	flex: 1; 
	min-height: 400px; 
	border: none;
	box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.map-container iframe {
	width: 100%;
	height: 100%;
	border: none;
}

/* --- Right Column Layout --- */
.right-col {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.main-news-img {
	width: 100%;
	height: auto;
	object-fit: cover;
}

.main-title {
	font-size: 2.5rem;
	line-height: 1.2;
	margin-top: -10px;
}

/* Sub-articles Layout */
.entire-card-link {
    text-decoration: none;
    color: inherit;
    display: block; /* Ensures the link behaves like a block wrapper */
}

.sub-article {
	display: flex;
	gap: 20px;
	align-items: center;
}

.sub-img {
	width: 120px;
	height: 120px;
	object-fit: cover;
	flex-shrink: 0; /* Prevents tiny squeezed aspect ratios on mobile */
}

.article-content {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.category {
	font-family: 'Noto Sans', 'Zhaohua', 'Noto Serif TC', sans-serif;
	font-size: 0.9rem;
	color: #666666;
}

.sub-title {
	font-size: 1.4rem;
	line-height: 1.3;
}

/* --- FULL WIDTH DARK PURPLE SECTION --- */
.interactive-section {
	width: 100%;
	background-color: #301934; 
	padding: 60px 40px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 30px;
}

.interactive-content-wrapper {
	width: 100%;
	max-width: 1600px; 
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.section-title {
	font-size: 2.5rem;
	color: #ffffff; 
	text-align: left;
}

/* Split layout container for map and text */
.interactive-split-grid {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 50px;
	align-items: start;
}

.interactive-map-wrapper {
	position: relative;
	display: inline-block;
	width: 100%;
}

.interactive-map-wrapper img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
}

/* Glow Overlay Canvas Layer */
#glowCanvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	border-radius: 8px;
	z-index: 10;
}

/* Right Hand Content Column */
.info-text-column {
	display: flex;
	flex-direction: column;
	gap: 25px;
	max-width: 550px; 
	color: #ffffff;
}

.info-block {
	cursor: pointer;
}

.info-block h3 {
	font-size: 1.8rem;
	margin-bottom: 8px;
	color: #ffffff;
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	padding-bottom: 5px;
	transition: color 0.2s ease;
}

.info-block:hover h3 {
	color: #facc15; 
}

.info-block p {
	font-family: 'Noto Sans', 'Zhaohua', 'Noto Serif TC', sans-serif;
	font-size: 1rem;
	line-height: 1.6;
	color: #e2e8f0;
}

/* Dark Dynamic Info Hover Frame Styles */
.info-box {
	position: fixed; 
	display: none; 
	background: rgba(15, 23, 42, 0.95); 
	border: 2px solid #66ff66; 
	padding: 14px;
	border-radius: 8px;
	box-shadow: 0 10px 25px rgba(0,0,0,0.5);
	pointer-events: none; 
	z-index: 9999; 
	width: 260px;
	color: #f8fafc;
}

.info-box h3 {
	margin: 0 0 6px 0;
	font-size: 18px;
	font-family: 'Naked Power Bd', 'Zhaohua', 'Noto Serif TC', sans-serif;
	color: #66ff66; 
	border-bottom: 1px solid #334155;
	padding-bottom: 4px;
}

.info-box p {
	margin: 0;
	font-family: 'Noto Sans', 'Zhaohua', 'Noto Serif TC', sans-serif; 
	font-size: 13px;
	line-height: 1.4;
	color: #cbd5e1;
}

/* --- SITE FOOTER --- */
.site-footer {
	width: 100%;
	background-color: #000000;
	color: #ffffff;
	padding: 40px 40px;
	display: flex;
	justify-content: center;
	margin-top: auto;
}

.footer-container {
	width: 100%;
	max-width: 1600px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 20px;
}

.footer-left {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.footer-logo {
	font-size: 2rem;
	font-style: italic;
	font-weight: bold;
	color: #ffffff;
	line-height: 1;
}

.footer-logo-ch {
	font-size: 2rem;
	font-weight: bold;
	color: #ffffff;
	line-height: 1;
}


.footer-meta {
	font-family: 'Noto Sans', 'Zhaohua', 'Noto Serif TC', sans-serif;
	font-size: 0.85rem;
	color: #a0aec0;
}

.footer-meta a {
	color: #ffffff;
	text-decoration: none;
	transition: color 0.2s ease;
}

.footer-meta a:hover {
	color: #facc15;
}

.footer-socials {
	display: flex;
	gap: 15px;
	align-items: center;
}

.social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-link:hover {
	transform: translateY(-2px);
}

.social-link img {
	width: 28px;
	height: 28px;
	object-fit: contain;
}

/* --- Improved Responsive Tweaks --- */
@media (max-width: 1200px) {
	.logo {
		font-size: 5rem; /* Downsized massive text on laptop screens */
	}
}

@media (max-width: 1024px) {
	.interactive-split-grid {
		grid-template-columns: 1fr;
		gap: 40px;
	}
	.info-text-column {
		max-width: 100%;
	}
	.sticky-navbar {
		padding: 15px 20px;
	}
}

@media (max-width: 768px) {
	/* TOOLTIP FIXED SCREEN-SAFE OVERRIDE FOR MOBILE */
	.info-box {
		position: fixed !important;
		left: 50% !important;
		bottom: 20px !important;
		top: auto !important;
		transform: translateX(-50%) !important;
		width: calc(100% - 40px) !important;
		max-width: 360px !important;
		box-sizing: border-box !important;
		pointer-events: auto; /* Let users click/dismiss if needed */
	}

	.container {
		grid-template-columns: 1fr;
	}
	.logo {
		font-size: 3.5rem;
	}
	.nav-links {
		font-size: 1rem;
		line-height: 1.5;
	}
	.map-container {
		height: 400px; 
	}
	.interactive-section {
		padding: 40px 20px;
	}
	.site-footer {
		padding: 30px 20px;
	}
	.footer-container {
		flex-direction: column;
		text-align: center;
		justify-content: center;
	}
	.sticky-navbar .sticky-logo {
		font-size: 1.8rem;
	}
	.sticky-navbar .nav-links {
		font-size: 0.85rem;
		word-spacing: 1px;
	}
	.sticky-navbar .nav-links span {
		margin-right: 5px;
	}
	.main-title {
		font-size: 2rem;
	}
	.sub-title {
		font-size: 1.2rem;
	}
}

/* Extra layer of protection for very narrow phones */
@media (max-width: 480px) {
	.logo {
		font-size: 2.8rem;
	}
	.header-top {
		flex-direction: column;
		align-items: flex-start;
	}
	.crest-img {
		max-width: 100px;
		align-self: flex-start;
	}
	.sticky-navbar {
		flex-direction: column;
		gap: 5px;
		padding: 10px;
		text-align: center;
	}
	.sub-article {
		flex-direction: column;
		align-items: flex-start;
	}
	.sub-img {
		width: 100%;
		height: 200px;
	}
}

/* Hide the line break on desktop/large screens */
.mobile-only {
  display: none;
}

/* Show the line break only on screens smaller than 768px (mobile/tablet) */
@media (max-width: 768px) {
  .mobile-only {
	display: inline;
  }
}

/* --- Dual-Wing Simplistic Top Bar Layout --- */
.weather-top-bar {
    width: 100%;
    background-color: #000000;
    color: #ffffff;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.85rem;
    padding: 8px 40px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between; /* Pushes left-wing to the left, right-wing to the right */
    align-items: center;
    border-bottom: 1px solid #111111;
    z-index: 10001; 
    position: relative;
    transition: background-color 0.5s ease;
}

/* Dark Purple Holiday Override */
.weather-top-bar.holiday-active {
    background-color: #301934 !important;
    border-bottom: 1px solid #4a2750;
}

/* Left Wing Style (Clock & Countdown) */
.weather-left-wing {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #a0aec0; /* Uniform gray tone */
}

.holiday-countdown {
    color: #a0aec0; /* Matches date and time gray tone by default */
    font-weight: normal;
}

/* Active Holiday State Theme Shifts */
.weather-top-bar.holiday-active .holiday-countdown {
    color: #D4AF37; /* Changes to vibrant green only on active holiday states */
    font-weight: bold;
}

/* --- Server Status indicator --- */
.weather-middle-wing {
    position: relative; /* Keeps the tooltip anchored nearby */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.server-status {
    font-size: 0.85rem;
    cursor: help;
    transition: color 0.3s ease;
}

.server-status.loading { color: #a0aec0; }
.server-status.online { color: #2ecc71; animation: pulse-green 2s infinite; }
.server-status.maintenance { color: #e74c3c; animation: pulse-red 2s infinite; }

/* Pulsing Animations */
@keyframes pulse-green {
    0% { opacity: 1; text-shadow: 0 0 2px rgba(46, 204, 113, 0.2); }
    50% { opacity: 0.6; text-shadow: 0 0 8px rgba(46, 204, 113, 0.8); }
    100% { opacity: 1; text-shadow: 0 0 2px rgba(46, 204, 113, 0.2); }
}

@keyframes pulse-red {
    0% { opacity: 1; text-shadow: 0 0 2px rgba(231, 76, 60, 0.2); }
    50% { opacity: 0.6; text-shadow: 0 0 8px rgba(231, 76, 60, 0.8); }
    100% { opacity: 1; text-shadow: 0 0 2px rgba(231, 76, 60, 0.2); }
}

/* Tooltip Default Hidden View State */
.server-tooltip {
    display: none;
    position: absolute;
    top: 130%; /* Positions it directly below the text */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.98); 
    /*border: 2px solid #66ff66; */
    padding: 10px 14px;
    /* border-radius: 6px; */
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    z-index: 10002; /* Keeps it above everything including navbar layers */
    width: 220px;
    color: #f8fafc;
    text-align: center;
}

/* Dynamic Tooltip Color Adjustments depending on status */
.server-status.maintenance + .server-tooltip {
    border-color: #e74c3c;
}

.server-tooltip h3 {
    margin: 0 0 4px 0;
    font-size: 13px;
    color: #a0aec0;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.server-tooltip p {
    margin: 0;
    font-family: 'Noto Sans', sans-serif; 
    font-size: 14px;
    color: #ffffff;
}

.top-bar-title {
    font-family: 'Naked Power Bd', 'Noto Sans', 'Zhaohua', 'Noto Serif TC', 'Microsoft JhengHei', sans-serif;
    font-weight: bold;
}

/* Hover Engine Activation Toggle */
.weather-middle-wing:hover .server-tooltip {
    display: block;
}

/* Screen boundary protection on responsive views */
@media (max-width: 992px) {
    .server-tooltip {
        top: 110%;
        left: 50%;
        transform: translateX(-50%);
    }
}


/* Right Wing Style (Weather Blocks) */
.weather-right-wing {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.weather-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #cccccc;
}

.weather-location strong {
    color: #ffffff;
    font-weight: normal;
}

.weather-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.weather-divider {
    color: #333333;
    user-select: none;
}

/* Responsive breakpoint handling */
@media (max-width: 992px) {
    .weather-top-bar {
        flex-direction: column; /* Stacks nicely on compact viewports */
        gap: 8px;
        justify-content: center;
        text-align: center;
        padding: 8px 20px;
    }
    .weather-left-wing, .weather-right-wing {
        justify-content: center;
    }
}