
/* ====== Color Variables ====== */
:root {
	--bg-color: #0c0c0c;
	--text-color: #cccccc;
	--terminal-bg: #0c0c0c;
	--terminal-header: #151515;
	--accent-color: #6b8fe8;
	--warning-color: #d44;
	--success-color: #4d8;
	--font-mono: 'Courier New', monospace;
}

/* ====== Basic Layout ====== */
body {
	background-color: var(--bg-color);
	color: var(--text-color);
	font-family: var(--font-mono);
	line-height: 1.5;
	margin: 0;
	padding: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
.footer {
	text-align: center;
	margin-top: 30px;
	margin-bottom: 15px;
	color: #555;
	font-size: 12px;
 }

/* ====== Terminal Container ====== */
.noscript-warning {
	background: #1a1a1a;
	color: #ff4f4f;
	padding: 1rem;
	text-align: center;
	font-family: monospace;
	border-bottom: 1px solid #ff4f4f;
}
.terminal-container {
	max-width: 900px;
	margin: 20px auto;
	width: calc(100% - 40px);
	display: flex;
	flex-direction: column;
	border: 1px solid #333;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
	flex-grow: 1;
}

/* ====== Terminal Header ====== */
.terminal-header {
	background-color: var(--terminal-header, #111);
	padding: 10px 15px;
	border: 1px solid #222;
	font-family: var(--font-mono);
	font-size: 14px;
	color: #aaa;
	line-height: 1.4;
	margin-bottom: 1rem;
}

.terminal-header-title, .terminal-header-subtitle {
	text-align: center;
	max-width: 95ch;
	margin-left: auto;
	margin-right: auto;
}

.terminal-header-title {
	font-weight: normal;
	font-size: 14px;
	color: #ccc;
	margin-bottom: 4px;
}

.terminal-header-subtitle {
	font-size: 13px;
	font-style: italic;
	color: #666;
	margin-bottom: 12px;
}

#timestamp {
	opacity: 0.85;
}

.terminal-divider {
	border: none;
	border-top: 1px solid #444;
	margin: 0.75rem -15px; /* negative horizontal margin matches .terminal-header horizontal padding */
}

.terminal-header-diagnostics {
	display: grid;
	grid-template-columns: auto 1fr auto 1fr;
	column-gap: 0.75rem;
	row-gap: 0.15rem;
	font-size: 13.5px;
}

.full-span {
	grid-column: span 2;
}

.diag-label {
	color: #666;
	white-space: nowrap;
	font-weight: normal;
}

.diag-value {
	color: #ccc;
	opacity: 0.85;
	white-space: nowrap;
	font-weight: normal;
}

.connection-status {
	color: #00aa00;
	animation: blink 1s infinite;
}

/* ====== Terminal Window ====== */
.terminal-window {
	background-color: var(--terminal-bg);
	padding: 15px;
	overflow-y: auto;
	flex-grow: 1;
	position: relative;
}

/* ====== Terminal Footer ====== */
.terminal-footer {
	background-color: var(--terminal-header);
	padding: 15px;
	border-top: 1px solid #333;
	text-align: center;
}

/* ====== Boot Prompt ====== */
.boot-prompt {
	margin-bottom: 20px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.command-line {
	display: flex;
	align-items: center;
}

.prompt-text {
	color: #00aa00;
	margin-right: 10px;
}

.boot-command {
	color: var(--text-color);
}

.boot-message {
	color: #888;
	font-size: 0.9em;
	margin-top: 5px;
	margin-left: 10px;
	font-style: italic;
}

/* ====== Boot Sequence ====== */
.boot-sequence {
	margin-bottom: 30px;
	display: none;
}

.initial-cursor {
	display: inline-block;
	width: 8px;
	height: 16px;
	background-color: #aaa;
	animation: blink 1s step-end infinite;
}

.log-line {
	margin: 4px 0;
	font-size: 14px;
	color: #aaa;
	white-space: nowrap;
	overflow: hidden;
	position: relative;
}

.log-line::after {
	content: "";
	display: inline-block;
	width: 8px;
	height: 14px;
	background-color: #aaa;
	margin-left: 2px;
	animation: blink 0.5s step-end infinite;
}

.log-line.completed::after {
	display: none;
}

/* ====== Document Container ====== */
.document-container {
	background-color: rgba(255, 255, 255, 0.03);
	border: 1px solid #333;
	padding: 20px;
	margin: 20px 0;
	position: relative;
	display: none;
}

.document-container.active {
	display: block;
	animation: flicker-in 0.5s linear;
}

/* Document flicker-in animation */
@keyframes flicker-in {
	0% { opacity: 0; }
	10% { opacity: 0.8; }
	15% { opacity: 0.2; }
	20% { opacity: 1; }
	25% { opacity: 0.6; }
	30% { opacity: 0.8; }
	35% { opacity: 0.4; }
	40% { opacity: 0.8; }
	45% { opacity: 1; }
	50% { opacity: 0.5; }
	55% { opacity: 0.9; }
	60% { opacity: 0.7; }
	65% { opacity: 1; }
	70% { opacity: 0.8; }
	75% { opacity: 0.9; }
	80% { opacity: 1; }
	85% { opacity: 0.9; }
	90% { opacity: 1; }
	95% { opacity: 0.9; }
	100% { opacity: 1; }
}

/* ====== Document Header & Content ====== */
.document-header {
	text-align: center;
	margin-bottom: 20px;
	border-bottom: 1px solid #333;
	padding-bottom: 15px;
}

.document-title {
	font-size: 24px;
	font-weight: bold;
	color: var(--accent-color);
	margin-bottom: 10px;
}

.document-meta {
	font-style: italic;
	font-size: 14px;
	color: #888;
}

.document-content {
	line-height: 1.6;
}

.document-content p {
	margin-bottom: 15px;
}

.document-content strong {
	color: var(--text-color);
	font-weight: bold;
}

/* ====== Alert Box ====== */
.alert-box {
	display: none;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: var(--bg-color);
	border: double 5px var(--warning-color);
	padding: 20px;
	box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.5);
	z-index: 1000;
	width: 80%;
	max-width: 500px;
	text-align: center;
}

.alert-box.active {
	display: block;
	animation: alert-appear 0.3s ease-out;
}

@keyframes alert-appear {
	0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
	70% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
	100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.alert-header {
	background-color: var(--warning-color);
	color: var(--bg-color);
	font-weight: bold;
	padding: 5px;
	margin: -20px -20px 15px -20px;
}

.alert-message {
	margin-bottom: 15px;
	font-size: 18px;
	color: var(--warning-color);
}

.alert-button {
	background-color: var(--warning-color);
	color: var(--bg-color);
	border: none;
	padding: 8px 20px;
	cursor: pointer;
	font-family: var(--font-mono);
	font-weight: bold;
}

/* ====== Encryption Effect ====== */
.encrypting-line {
	position: relative;
	animation: encrypt-text 0.2s steps(1, end) forwards;
	animation-play-state: paused;
}

@keyframes encrypt-text {
	0% { color: var(--text-color); }
	20% { color: var(--warning-color); }
	40% { color: var(--text-color); }
	60% { color: var(--warning-color); }
	80% { color: var(--text-color); }
	100% {
		color: var(--bg-color);
		background-color: var(--warning-color);
		opacity: 0.2;
	}
}

/* ====== Final Message ====== */
.final-message {
	text-align: center;
	margin: 40px 0 20px 0;
	display: none;
}

.final-message.active {
	display: block;
}

.archive-secured {
	display: inline-block;
	white-space: nowrap;
	overflow: hidden;
	margin-bottom: 20px;
}

.typing-cursor {
	display: inline-block;
	width: 8px;
	height: 16px;
	background-color: #aaa;
	margin-left: 2px;
	vertical-align: middle;
	animation: blink 0.7s step-end infinite;
}

.connection-terminated {
	display: none;
	margin-top: 10px;
	color: var(--warning-color);
}

.connection-terminated.active {
	display: block;
	animation: flash-in 0.3s linear;
}

@keyframes flash-in {
	0% { opacity: 0; }
	50% { opacity: 1; color: white; }
	100% { opacity: 1; }
}

/* ====== New CTA Button with Hover Decryption Effect ====== */
.cta-button {
	display: none; /* Initially hidden */
	padding: 12px 30px;
	background-color: #333; /* Darker initial state */
	color: #777; /* Muted text color initially */
	text-decoration: none;
	font-weight: bold;
	border: none;
	font-family: var(--font-mono);
	font-size: 16px;
	position: relative;
	cursor: pointer;
	letter-spacing: 1px;
	border: 1px solid #444;
	transition: background-color 0.8s, color 0.8s, border-color 0.8s;
	text-align: center; /* Ensure text is centered */
}

/* The active state - when button is visible */
.cta-button.active {
	display: inline-block;
	animation: button-appear 0.5s ease-out;
}

/* The decrypted state - this class is added after decryption */
.cta-button.decrypted {
	background-color: var(--accent-color);
	color: #000;
	border-color: var(--accent-color);
}

.cta-button .text-container {
	position: relative;
	display: inline-block;
	min-width: 100px; /* Ensure minimum width */
}

.cta-button .glitch-text {
	display: inline-block;
	white-space: nowrap; /* Prevent wrapping */
}

/* The scrambled characters */
.cta-button .dud {
	opacity: 0.8;
}

/* When fully decrypted, make the text stronger */
.cta-button.decrypted .glitch-text {
	font-weight: bold;
}

@keyframes button-appear {
	0% { transform: scale(0.8); opacity: 0; }
	100% { transform: scale(1); opacity: 1; }
}

/* ====== Scanning Line Effect ====== */
.scanning-line {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	background-color: rgba(107, 143, 232, 0.3);
	z-index: 100;
	pointer-events: none;
	animation: scan 4s linear infinite;
}

@keyframes scan {
	0% { top: 0; }
	100% { top: 100%; }
}

/* ====== Animation Keyframes ====== */
@keyframes blink {
	0%, 49% { opacity: 1; }
	50%, 100% { opacity: 0; }
}

/* ====== Responsive Design ====== */
@media (max-width: 768px) {
	.terminal-container {
		margin: 10px auto;
		width: calc(100% - 20px);
	}
	
	.document-container {
		padding: 15px;
	}
	
	.document-title {
		font-size: 20px;
	}
}

/* ====== Overlay for Alert Box ====== */
.overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.7);
	z-index: 900;
	display: none;
}

.overlay.active {
	display: block;
}

/* ====== Signup Form ====== */
.signup-form {
	display: none;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: var(--terminal-bg);
	border: 2px solid var(--accent-color);
	padding: 25px;
	box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.5);
	z-index: 1000;
	width: 80%;
	max-width: 500px;
	text-align: center;
}

.signup-form.active {
	display: block;
	animation: alert-appear 0.3s ease-out;
}

.signup-header {
	background-color: var(--accent-color);
	color: var(--bg-color);
	font-weight: bold;
	padding: 8px;
	margin: -25px -25px 20px -25px;
	font-size: 18px;
}

.signup-message {
	margin-bottom: 25px;
	font-size: 16px;
	color: var(--text-color);
	text-align: left;
}

.form-group {
	margin-bottom: 15px;
	text-align: left;
}

.form-group label {
	display: block;
	margin-bottom: 5px;
	font-size: 14px;
	color: var(--accent-color);
}

.form-group input {
	width: 100%;
	padding: 10px;
	background-color: #1a1a1a;
	border: 1px solid #444;
	color: var(--text-color);
	font-family: var(--font-mono);
	font-size: 14px;
}

.form-group input:focus {
	outline: none;
	border-color: var(--accent-color);
}

.signup-buttons {
	margin-top: 20px;
	display: flex;
	justify-content: space-between;
}

.signup-submit {
	background-color: var(--accent-color);
	color: var(--bg-color);
	border: none;
	padding: 10px 20px;
	cursor: pointer;
	font-family: var(--font-mono);
	font-weight: bold;
	font-size: 14px;
}

.signup-cancel {
	background-color: transparent;
	color: var(--text-color);
	border: 1px solid #444;
	padding: 10px 20px;
	cursor: pointer;
	font-family: var(--font-mono);
	font-size: 14px;
}

.signup-submit:hover {
	background-color: #8baff9;
}

.signup-cancel:hover {
	background-color: #1a1a1a;
}

/* ====== Access Granted Page Styles ====== */
.access-granted {
	color: var(--success-color);
	font-size: 24px;
	font-weight: bold;
	margin-bottom: 20px;
	letter-spacing: 2px;
	text-align: center;
	border-bottom: 1px solid #333;
	padding-bottom: 20px;
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0% { opacity: 0.8; }
	50% { opacity: 1; }
	100% { opacity: 0.8; }
}

.message-section {
	margin: 30px 0;
	font-size: 16px;
}

.message-header {
	color: var(--accent-color);
	font-weight: bold;
	margin-bottom: 10px;
}

.message-content {
	background-color: rgba(255, 255, 255, 0.03);
	border: 1px solid #333;
	padding: 20px;
	margin-bottom: 20px;
	position: relative;
	line-height: 1.6;
}

.message-meta {
	color: #777;
	font-size: 14px;
	font-style: italic;
	margin-top: 15px;
}

.signature {
	font-style: italic;
	color: var(--accent-color);
	margin-top: 15px;
}

.next-steps {
	border-top: 1px solid #333;
	padding-top: 20px;
	margin-top: 30px;
}

.steps-list {
	list-style-type: none;
	padding: 0;
}

.steps-list li {
	margin-bottom: 15px;
	display: flex;
	align-items: flex-start;
}

.step-number {
	color: var(--accent-color);
	font-weight: bold;
	margin-right: 10px;
	min-width: 20px;
}

.personal-note {
	margin-top: 5px;
	color: #aaa;
	font-style: italic;
}

/* end Access Granted Page Styles */
