* { box-sizing: border-box; }

body {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	min-height: 100vh;
	background: linear-gradient(135deg, #0a0a0a 0%, #0f0f0f 100%);
	color: #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	margin: 0;
	padding: 20px;
	overflow-y: auto;
}

body > *:not(#bgCanvas) {
	position: relative;
	z-index: 1;
}

.center {
	max-width: 640px;
	width: 100%;
	text-align: center;
	position: relative;
	z-index: 1;
	margin: clamp(20px, 5vh, 48px) auto;
}

.site-nav {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin: 0 auto 22px;
	font-size: 14px;
	width: 100%;
	max-width: 520px;
	padding: 0;
}

.site-nav a {
	color: #a9d5bf;
	text-decoration: none;
	padding: 8px 14px;
	border-radius: 999px;
	border: 1px solid transparent;
	transition: all 0.2s ease;
	font-weight: 700;
}

.site-nav a:hover,
.site-nav a.active {
	color: #02251a;
	background: #0f9;
	border-color: rgba(0, 255, 153, 0.7);
}

#startCard,
#listenCard,
#receivedCard {
	animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.start-logo,
.listen-logo,
.received-logo {
	font-size: 56px;
	font-weight: 700;
	margin-bottom: 28px;
	letter-spacing: -1px;
}

.start-logo { margin-bottom: 12px; }

.start-tagline {
	font-size: 16px;
	color: #999;
	margin-bottom: 40px;
	letter-spacing: 0.3px;
}

.trust-block {
	background: rgba(0, 255, 153, 0.03);
	border: 1px solid rgba(0, 255, 153, 0.1);
	border-radius: 12px;
	padding: 24px;
	margin-bottom: 48px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	text-align: center;
}

.trust-line {
	font-size: 14px;
	color: #ccc;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

.trust-line::before {
	content: "✓";
	color: #0f9;
	font-weight: 700;
	width: 20px;
}

.start-label {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: 0.2px;
	color: #e8e8e8;
	margin-bottom: 8px;
}

.session-ready-note {
	font-size: 13px;
	color: #8f8f8f;
	margin-bottom: 22px;
}

.btn-generate {
	width: 100%;
	padding: 18px 24px;
	background: #0f9;
	color: #000;
	border: none;
	border-radius: 10px;
	font-weight: 700;
	font-size: 16px;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 8px 24px rgba(0, 255, 153, 0.2);
}

.btn-generate:hover {
	background: #0dd;
	box-shadow: 0 12px 32px rgba(0, 255, 153, 0.3);
	transform: translateY(-2px);
}

.btn-generate:active { transform: scale(0.98); }

.btn-send-toggle {
	margin-top: 10px;
	background: rgba(0, 255, 153, 0.12);
	color: #8cf6cc;
	box-shadow: none;
	border: 1px solid rgba(0, 255, 153, 0.28);
}

.btn-send-toggle:hover {
	background: rgba(0, 255, 153, 0.2);
	color: #d9fff0;
	box-shadow: none;
}

.send-entry-block {
	margin-top: 12px;
	padding: 14px;
	border: 1px solid rgba(0, 255, 153, 0.12);
	border-radius: 10px;
	background: rgba(0, 255, 153, 0.03);
}

.send-entry-title {
	font-size: 15px;
	font-weight: 700;
	color: #dfffee;
	letter-spacing: 0.2px;
}

.send-entry-desc {
	font-size: 13px;
	color: #9bb2a5;
	margin-top: 4px;
	margin-bottom: 10px;
}

.send-entry-row {
	display: flex;
	gap: 10px;
}

.send-entry-input {
	flex: 1;
	min-width: 0;
	padding: 11px 12px;
	border-radius: 8px;
	border: 1px solid rgba(0, 255, 153, 0.2);
	background: rgba(0, 0, 0, 0.34);
	color: #e8f8ee;
	font-size: 13px;
}

.send-entry-input::placeholder {
	color: #88958c;
}

.send-entry-btn {
	padding: 11px 14px;
	border-radius: 8px;
	border: 1px solid rgba(0, 255, 153, 0.26);
	background: rgba(0, 255, 153, 0.12);
	color: #8cf6cc;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
}

.send-entry-btn:hover {
	background: rgba(0, 255, 153, 0.2);
}

.send-entry-error {
	margin-top: 8px;
	font-size: 12px;
	color: #ff7d7d;
}

.start-back { margin-top: 24px; }

.start-back a {
	font-size: 13px;
	color: #0f9;
	text-decoration: none;
	transition: opacity 0.2s;
}

.start-back a:hover { opacity: 0.8; }

.trust-claim {
	font-size: 14px;
	color: #999;
	margin-top: 32px;
	line-height: 1.6;
}

.trust-claim strong { color: #0f9; }

.home-knowledge {
	margin-top: 28px;
	padding: 18px;
	border: 1px solid rgba(0, 255, 153, 0.12);
	border-radius: 12px;
	background: rgba(0, 255, 153, 0.03);
	text-align: left;
}

.knowledge-title {
	font-size: 21px;
	margin: 0;
	color: #dfffee;
}

.knowledge-subtitle {
	margin-top: 8px;
	margin-bottom: 14px;
	color: #9cb4a8;
	font-size: 13px;
	line-height: 1.5;
}

.tab-list {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}

.tab-btn {
	border: 1px solid rgba(0, 255, 153, 0.2);
	background: rgba(0, 255, 153, 0.08);
	color: #9feecf;
	border-radius: 999px;
	padding: 8px 14px;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}

.tab-btn.active {
	background: #0f9;
	color: #002d1e;
	border-color: #0f9;
}

.tab-pane {
	display: none;
	border: 1px solid rgba(0, 255, 153, 0.1);
	border-radius: 10px;
	padding: 14px;
	background: rgba(0, 0, 0, 0.25);
}

.tab-pane.active {
	display: block;
}

.tab-pane h3 {
	margin-top: 0;
	margin-bottom: 8px;
	font-size: 18px;
	color: #def9ec;
}

.tab-pane p {
	margin-top: 0;
	margin-bottom: 10px;
	color: #aec4ba;
	font-size: 13px;
	line-height: 1.55;
}

.tab-pane ul {
	margin: 0 0 10px 18px;
	padding: 0;
	color: #b8d2c7;
	font-size: 13px;
	line-height: 1.5;
}

.tab-read-more {
	display: inline-block;
	color: #0f9;
	text-decoration: none;
	font-size: 13px;
	font-weight: 700;
}

.tab-read-more:hover {
	text-decoration: underline;
}

.session-status-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: rgba(0, 255, 153, 0.05);
	border: 1px solid rgba(0, 255, 153, 0.1);
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 32px;
	font-size: 14px;
}

.session-status-bar .status-label {
	color: #0f9;
	font-weight: 600;
}

.session-status-bar .status-timer {
	color: #999;
	font-size: 13px;
}

.qr-section {
	background: rgba(0, 255, 153, 0.03);
	border: 1px solid rgba(0, 255, 153, 0.1);
	border-radius: 12px;
	padding: 32px 24px;
	margin-bottom: 20px;
}

.qr-card {
	background: #fff;
	padding: 16px;
	border-radius: 8px;
	display: inline-block;
	margin-bottom: 16px;
}

canvas#qrcode { display: block; }

.qr-label {
	font-size: 13px;
	color: #999;
	margin-bottom: 20px;
}

.url-box {
	display: flex;
	gap: 10px;
	align-items: center;
}

.url-box input {
	flex: 1;
	padding: 12px;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 6px;
	color: #fff;
	font-size: 12px;
	font-family: monospace;
	min-width: 0;
}

#copyBtn {
	padding: 12px 20px;
	background: #0f9;
	color: #000;
	border: none;
	border-radius: 6px;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.2s;
	white-space: nowrap;
}

#copyBtn:hover {
	background: #0dd;
	transform: translateY(-1px);
}

.listen-status {
	background: rgba(0, 255, 153, 0.05);
	border-left: 3px solid #0f9;
	border-radius: 6px;
	padding: 14px;
	font-size: 14px;
	color: #ccc;
}

.password-panel {
	background: rgba(255,255,255,0.03);
	padding: 20px;
	border-radius: 8px;
	margin-bottom: 20px;
	text-align: center;
}

.password-panel-title {
	color: #ccc;
	margin-bottom: 12px;
	font-size: 14px;
}

.password-panel-row {
	display: flex;
	gap: 10px;
	align-items: center;
	max-width: 400px;
	margin: 0 auto;
}

.password-panel-input {
	flex: 1;
	padding: 10px;
	background: rgba(0,0,0,0.3);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 6px;
	color: #fff;
}

.toggle-pass-btn {
	padding: 10px 16px;
	background: rgba(0, 255, 153, 0.1);
	color: #0f9;
	border: 1px solid rgba(0, 255, 153, 0.2);
	border-radius: 6px;
	font-size: 12px;
	cursor: pointer;
	transition: all 0.2s;
	white-space: nowrap;
}

.toggle-pass-btn:hover { background: rgba(0, 255, 153, 0.15); }

.password-panel-btn {
	padding: 10px 20px;
	background: #0f9;
	color: #000;
	border: 0;
	border-radius: 6px;
	font-weight: 700;
	cursor: pointer;
}

.password-panel-status {
	margin-top: 10px;
	color: #f44;
	font-size: 13px;
}

.session-ended-note {
	padding: 14px;
	border-radius: 8px;
	background: rgba(0, 255, 153, 0.05);
	border: 1px solid rgba(0, 255, 153, 0.14);
	color: #b9e7d2;
	line-height: 1.45;
	font-size: 14px;
}

.received-heading {
	font-size: 28px;
	font-weight: 600;
	margin-bottom: 28px;
	color: #0f9;
}

#receivedList {
	background: rgba(0, 255, 153, 0.03);
	border: 1px solid rgba(0, 255, 153, 0.1);
	border-radius: 10px;
	padding: 20px;
	margin-bottom: 20px;
	text-align: left;
}

.file-item {
	background: rgba(255, 255, 255, 0.02);
	border-radius: 8px;
	padding: 14px;
	margin-bottom: 12px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
}

.file-item:last-child { margin-bottom: 0; }

.file-info {
	flex: 1;
	min-width: 0;
}

.file-name {
	font-size: 14px;
	color: #ccc;
	font-weight: 500;
	line-height: 1.35;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.file-size {
	margin-top: 4px;
	font-size: 12px;
	color: #7d7d7d;
}

.file-actions {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.btn-print,
.btn-save {
	padding: 8px 12px;
	background: rgba(0, 255, 153, 0.1);
	color: #0f9;
	border: 1px solid rgba(0, 255, 153, 0.2);
	border-radius: 6px;
	font-size: 12px;
	cursor: pointer;
	transition: all 0.2s;
}

.btn-print:hover,
.btn-save:hover { background: rgba(0, 255, 153, 0.2); }

#destroyBtn {
	width: 100%;
	padding: 14px;
	background: rgba(255, 68, 68, 0.1);
	color: #f44;
	border: 1px solid rgba(255, 68, 68, 0.3);
	border-radius: 8px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s;
	margin-bottom: 20px;
}

#destroyBtn:hover {
	background: rgba(255, 68, 68, 0.15);
	border-color: rgba(255, 68, 68, 0.5);
}

.receive-footer {
	font-size: 12px;
	color: #666;
	margin-top: 28px;
}

.receive-footer a {
	color: #0f9;
	text-decoration: none;
}

.receive-footer a:hover { text-decoration: underline; }

.hidden { display: none !important; }

@media (max-width: 520px) {
	.start-logo,
	.listen-logo,
	.received-logo { font-size: 42px; }

	.site-nav {
		max-width: 100%;
		gap: 6px;
		padding: 6px;
		font-size: 12px;
	}

	.site-nav a {
		padding: 7px 10px;
	}

	.trust-block { padding: 20px; }

	.url-box { flex-direction: column; }

	.url-box input { width: 100%; }

	#copyBtn { width: 100%; }

	#copyBtn,
	.send-entry-btn,
	#destroyBtn,
	.toggle-pass-btn,
	.password-panel-btn {
		min-height: 44px;
	}

	.send-entry-row {
		flex-direction: column;
	}

	.site-nav {
		gap: 12px;
		font-size: 12px;
	}

	.tab-btn {
		width: 100%;
	}

	.password-panel-row {
		flex-direction: column;
	}

	.password-panel-input,
	.password-panel-btn {
		width: 100%;
	}

	.send-entry-btn {
		width: 100%;
	}

	.file-item {
		flex-direction: column;
		align-items: flex-start;
	}

	.file-actions { width: 100%; }

	.btn-print,
	.btn-save { flex: 1; }
}
