/* 1. GLOBAL RESET - NO VW UNITS */
html, body {
	margin: 0 !important;
	padding: 0 !important;
	width: 100% !important; /* Use % instead of vw */
	height: 100% !important;
	background-color: #050505;
	overflow-x: hidden; /* Global safety net */
}

*, *::before, *::after {
	box-sizing: border-box; /* Critical: includes padding/border in width */
}


table, div {
	max-width:100%;
}

img {
	max-width:550px;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, figure {
	margin: 0;
	padding: 0;
}

body {
	color: #00ff41;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 1.1rem; /* Slightly smaller base for mobile safety */
	line-height: 1.6;
	display: block;
}

/* 2. CONTAINER - SAFE WIDTH */
.container {
	width: 100% !important;
	max-width: 100% !important; /* Prevents overflow */
	min-height: 100vh;
	margin: 0 !important;
	padding: 20px 15px; 
	background: radial-gradient(circle at center, #0a0a0a 0%, #000000 100%);
	display: flex;
	flex-direction: column;
	align-items: stretch;
	border: none !important;
	overflow-x: hidden;
}

/* 3. NAVIGATION */
.main-nav {
	width: 100%;
	max-width: 100%;
	margin: 0 auto 40px auto;
	border-bottom: 2px solid #00ff41;
	padding-bottom: 15px;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 15px;
}

.main-nav a {
	color: #00ff41;
	text-decoration: none;
	font-size: .8rem;
	text-transform: uppercase;
	letter-spacing: 2px;
	padding: 5px 10px;
	white-space: nowrap;
}

.main-nav a:hover {
	color: #ffff00;
	text-shadow: 0 0 8px #ffff00;
}

/* 4. HEADER - REDUCED FONT SCALING */
.site-header {
	width: 100%;
	text-align: center;
	margin-bottom: 30px;
	padding: 0 10px; /* Prevents title touching edges */
}

h1 {
	/* Reduced vw factor to prevent overflow */
	font-size: clamp(1.5rem, 4vw, 3rem); 
	color: #00ff41;
	text-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
	margin-bottom: 10px;
	line-height: 1.1;
	word-wrap: break-word;
}

.subtitle {
	font-size: clamp(1rem, 2.5vw, 1.5rem);
	color: #ffff00;
	text-shadow: 0 0 5px rgba(255, 255, 0, 0.4);
}

/* 5. CONTENT BODY - FIXED OVERFLOW */
.content-body {
	overflow-wrap: break-word; /* modern standard */
	word-break: break-word; /* agressive at breaking strings */
	width: 100%;
	max-width: 1200px; /* Ensures it never exceeds parent */

	margin: 0 auto 30px auto;
	padding: 15px; /* Reduced padding for mobile */
	border-left: 2px solid #ff0000;
	border-right: 2px solid #ff0000;
	background-color: rgba(20, 20, 20, 0.5);
	text-align: center;
	color: #e0e0e0;
	/* Reduced font scaling */
	font-size: clamp(1rem, 2vw, 1.4rem); 
	overflow-x: hidden;
	box-sizing: border-box;
}

.terminal-text {
	color: #00ff41;
	text-shadow: 0 0 2px rgba(0, 255, 65, 0.4);
}

/* 6. FOOTER */
.site-footer {
	margin-top: auto;
	width: 100%;
	color: #ff0000;
	opacity: 0.8;
	border-top: 1px solid #333;
	padding-top: 10px;
	text-align: center;
}

.blink {
	animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
	50% { opacity: 0; }
}

/* 7. MOBILE SPECIFIC */
@media (max-width: 600px) {
	.container {
		padding: 10px 5px; /* Minimal padding */
	}

	.content-body {
		padding: 10px 5px; /* Ensures borders stay visible */
	}

	h1 {
		font-size: clamp(1.3rem, 4.5vw, 2.2rem); /* Smaller max font */
	}
	img { 
		max-width: 100% !important; /* Force override any inline or fixed max-width */
                width: auto !important;                /* Ensure width is not fixed */
                height: auto;
                display: block;
	}

	.main-nav {
		gap: 10px;
	}
}   


/*****************MAP********************/
/* Force Leaflet popups to ignore global resets */
/* 1. Reset the wrapper to ignore global constraints */
.leaflet-popup-content-wrapper {
	all: initial !important; /* Strips all inherited styles from your global CSS */
	display: block !important;
	position: absolute !important;
	background: #0a0a0a !important;
	border: 1px solid #00ff41 !important;
	border-radius: 0 !important;
	padding: 10px !important;
	min-width: 150px !important; /* Forces a minimum width */
	width: auto !important; /* Overrides Leaflet's JS inline width */
	max-width: 300px !important;
	color: #00ff41 !important;
	font-family: 'VT323', monospace !important;
	font-size: 16px !important; /* Fixed size to prevent vertical squishing */
	line-height: 1.4 !important;
	text-align: left !important;
	box-shadow: 0 0 10px rgba(0, 255, 65, 0.5) !important;
	z-index: 1000 !important;
}

/* 2. Reset the content div specifically */
.leaflet-popup-content {
	all: initial !important; /* Critical: removes global margin/padding/width */
	display: block !important;
	width: auto !important; /* Overrides Leaflet's JS inline width */
	margin: 0 !important;
	padding: 0 !important;
	font-size: 16px !important;
	line-height: 1.4 !important;
	color: #00ff41 !important;
	font-family: 'VT323', monospace !important;
	text-align: left !important;
}

/* 3. Fix the arrow tip */
.leaflet-popup-tip {
	background: #0a0a0a !important;
	box-shadow: none !important;
	border: none !important;
}

/* 4. CRITICAL: Override any inline 'width' set by Leaflet JS */
/* This targets the style attribute directly */
div.leaflet-popup-content[style] {
	width: auto !important;
	min-width: 100px !important;
}   
