* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
	--bg: #101216;
	--panel: #191d24;
	--panel-2: #21262f;
	--text: #e6e9ee;
	--muted: #9aa3b2;
	--accent: #4f9cf9;
	--danger: #e5534b;
}

body {
	background: var(--bg);
	color: var(--text);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	line-height: 1.45;
}

header {
	background: var(--panel);
	border-bottom: 1px solid #2a2f3a;
	position: sticky;
	top: 0;
	z-index: 10;
}

.header-inner {
	max-width: 1000px;
	margin: 0 auto;
	padding: 12px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.header-right {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	flex-wrap: wrap;
}

.auth-name {
	color: var(--text);
	font-size: 14px;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
}

.auth-name:hover {
	color: var(--accent);
	text-decoration: underline;
}

.login-panel {
	display: flex;
	align-items: center;
	gap: 8px;
}

.login-panel input[type=text] {
	min-width: 0;
	width: 132px;
	padding: 6px 10px;
	font-size: 13px;
}

.login-panel button {
	padding: 6px 12px;
	font-size: 13px;
}

h1 { font-size: 20px; letter-spacing: 0.4px; }

.brand { color: var(--text); text-decoration: none; }
.brand:hover { color: var(--accent); }

main {
	max-width: 1000px;
	margin: 0 auto;
	padding: 20px;
}

.panel {
	background: var(--panel);
	border: 1px solid #2a2f3a;
	border-radius: 10px;
	padding: 16px 20px;
	margin-bottom: 20px;
}

.panel h2 { font-size: 16px; margin-bottom: 10px; }

.panel p { color: var(--muted); font-size: 14px; }

.row { display: flex; gap: 8px; margin-top: 10px; align-items: center; flex-wrap: wrap; }

button {
	background: var(--panel-2);
	color: var(--text);
	border: 1px solid #3a4150;
	border-radius: 6px;
	padding: 7px 14px;
	font-size: 14px;
	cursor: pointer;
}

button:hover { background: #2b3140; }

button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover { background: #3b86e6; }

button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
button.danger:hover { background: #c8433c; }

input[type=text], input[type=url] {
	background: #10141a;
	color: var(--text);
	border: 1px solid #3a4150;
	border-radius: 6px;
	padding: 8px 12px;
	font-size: 14px;
	min-width: 220px;
}

.link-input { width: 100%; margin-top: 8px; }

.hidden { display: none !important; }

.center-note { text-align: center; color: var(--muted); padding: 24px; font-size: 14px; }

/* feed */
.player-list-wrap {
	margin-bottom: 20px;
}

.player-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	background: var(--panel);
	border: 1px solid #2a2f3a;
	border-radius: 10px;
}

.player-list-label {
	color: var(--muted);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	margin-bottom: 8px;
	white-space: nowrap;
}

.player-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 12px 5px 6px;
	background: var(--panel-2);
	border: 1px solid #3a4150;
	border-radius: 20px;
	color: var(--text);
	text-decoration: none;
	font-size: 13px;
	transition: background 0.15s, color 0.15s;
}

.player-chip:hover { background: #2b3140; color: var(--accent); }

.player-chip .avatar {
	width: 24px;
	height: 24px;
}

.post {
	background: var(--panel);
	border: 1px solid #2a2f3a;
	border-radius: 10px;
	margin-bottom: 20px;
	overflow: hidden;
}

.post-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
}

.avatar {
	width: 32px;
	height: 32px;
	border-radius: 12%;
	background: var(--panel-2);
	flex: none;
	image-rendering: pixelated;
}

.post-author { font-weight: 600; font-size: 14px; color: var(--text); }

.post-identity {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--text);
	transition: opacity 0.15s;
}

.post-identity:hover { opacity: 0.7; }

.status-icon {
	display: inline-block;
	width: 0.7em;
	height: 0.7em;
	border-radius: 50%;
	flex: none;
	background: var(--status-color, #6e7681);
	box-shadow: 0 0 6px 1px var(--status-glow, transparent);
}

.status-online { --status-color: #3fb950; --status-glow: rgba(63, 185, 80, 0.75); }
.status-afk { --status-color: #d29922; --status-glow: rgba(210, 153, 34, 0.75); }
.status-offline { --status-color: #6e7681; --status-glow: rgba(110, 118, 129, 0.45); }

.mod-pill {
	display: inline-block;
	padding: 1px 10px;
	border: 1px solid var(--accent);
	border-radius: 999px;
	background: rgba(79, 156, 249, 0.12);
	color: var(--accent);
	font-size: 11px;
	line-height: 1.5;
	letter-spacing: 0.3px;
}

.post-author-wrap {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
	min-width: 0;
}

.auth-wrap {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
}

#auth-box {
	display: flex;
	align-items: center;
	gap: 12px;
}

.profile-info .mod-pill { margin-bottom: 6px; }

.post-author .status-icon { margin-right: 0.3em; }
.auth-name .status-icon { margin-right: 0.35em; }
.profile-name .status-icon { margin-right: 0.3em; }

.post-time { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }

.post-caption { padding: 4px 16px 12px; font-size: 15px; }

.post-img {
	display: block;
	width: 100%;
	max-height: 700px;
	object-fit: contain;
	background: #000;
	cursor: zoom-in;
}

.post-img.crop {
	object-fit: cover;
}

.post-foot {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 16px;
}

.like-btn { display: inline-flex; align-items: center; gap: 6px; }
.like-btn.liked { background: #3a2a30; border-color: #6d3a45; color: #ff8a9b; }

.like-count { min-width: 18px; text-align: center; }

.share-btn { display: inline-flex; align-items: center; gap: 6px; }

.delete-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	padding: 6px 12px;
	font-size: 13px;
}

.inline-link { color: var(--accent); }

.delete-btn { margin-left: auto; padding: 6px 12px; font-size: 13px; }

/* profile header (instagram-style) */
.profile-header {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 20px;
	margin-bottom: 20px;
	background: var(--panel);
	border: 1px solid #2a2f3a;
	border-radius: 12px;
}

.profile-avatar {
	width: 96px;
	height: 96px;
	border-radius: 12%;
	background: var(--panel-2);
	border: 2px solid #3a4150;
	flex: none;
	image-rendering: pixelated;
}

.profile-name {
	font-size: 22px;
	font-weight: 700;
	margin-bottom: 6px;
}

.profile-stats { color: var(--muted); font-size: 15px; }

.profile-count { font-weight: 600; color: var(--text); }

/* modal */
.modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 50;
}

.modal-inner {
	background: var(--panel);
	border: 1px solid #2a2f3a;
	border-radius: 12px;
	padding: 24px;
	max-width: 420px;
	width: 90%;
	text-align: center;
	position: relative;
}

.modal-close {
	position: absolute;
	top: 8px;
	right: 10px;
	background: none;
	border: none;
	font-size: 24px;
	color: var(--muted);
	padding: 4px 8px;
}

.modal-close:hover { color: var(--text); background: none; }

body.no-scroll { overflow: hidden; }

.qr { width: 220px; height: 220px; margin: 12px auto; display: block; border-radius: 6px; }

.code-display { font-size: 26px; letter-spacing: 4px; font-weight: 700; margin: 8px 0; }

.hint { color: var(--muted); font-size: 13px; margin-top: 10px; }

/* full-size photo viewer */
.viewer {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.92);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 55;
	padding: 28px;
}

.viewer-close {
	position: fixed;
	top: 12px;
	right: 16px;
	background: none;
	border: none;
	font-size: 34px;
	color: var(--muted);
	padding: 4px 10px;
	z-index: 56;
}

.viewer-close:hover { color: #fff; background: none; }

.viewer-stage {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

#viewer-img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 6px;
}

/* native-style dialog (in-game browsers don't support window.confirm/alert) */
.dialog {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 60;
}

.dialog-inner {
	background: var(--panel);
	border: 1px solid #2a2f3a;
	border-radius: 10px;
	padding: 20px 22px;
	max-width: 380px;
	width: 90%;
}

.dialog-message { font-size: 14px; color: var(--text); }

.dialog-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 18px;
}

.dialog-btn { min-width: 72px; }
