/* === Reset & Base === */
*, *::before, *::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root,
html[data-theme="dark"] {
	--bg: #1a1a2e;
	--floor: #2d2d44;
	--wall-back: #252540;
	--wall-left: #1f1f36;
	--accent: #e6c84c;
	--text: #e0dfe4;
	--text-muted: #8888a0;
	--panel-bg: #222238;
	--furniture-bg: #2a2a45;
	--furniture-hover: #353555;
	--furniture-active: #3d3d60;
}

html[data-theme="light"] {
	--bg: #f5f3ee;
	--floor: #e8e4dc;
	--wall-back: #ece8e0;
	--wall-left: #e0dcd4;
	--accent: #c5a420;
	--text: #2a2a3e;
	--text-muted: #6b6b80;
	--panel-bg: #f0ece4;
	--furniture-bg: #e4e0d6;
	--furniture-hover: #d8d4ca;
	--furniture-active: #ccc8be;
}

body {
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
	background: var(--bg);
	color: var(--text);
	transition: background-color 0.25s ease, color 0.25s ease;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	overflow-x: hidden;
}

/* === Theme Toggle === */
.theme-toggle {
	position: absolute;
	top: 50%;
	right: 1rem;
	transform: translateY(-50%);
	background: var(--furniture-bg);
	border: 2px solid var(--accent);
	color: var(--text);
	font-size: 1.2rem;
	width: 40px;
	height: 40px;
	border-radius: 8px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.25s ease, border-color 0.25s ease;
	line-height: 1;
}

.theme-toggle:hover {
	background: var(--furniture-hover);
}

/* === Header === */
header {
	text-align: center;
	padding: 2rem 1rem 1rem;
	position: relative;
}

header h1 {
	font-size: 1.8rem;
	font-weight: 700;
	color: var(--accent);
	letter-spacing: 0.05em;
}

.subtitle {
	color: var(--text-muted);
	font-size: 0.9rem;
	margin-top: 0.3rem;
}

/* === Office Room === */
main.office {
	flex: 1;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 1rem;
}

.room {
	position: relative;
	width: 800px;
	height: 520px;
	perspective: 800px;
}

/* Walls and floor */
.floor {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 340px;
	background: var(--floor);
	border-radius: 4px;
	transition: background-color 0.25s ease;
	background-image:
		linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
	background-size: 60px 60px;
}

.wall-back {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 200px;
	background: var(--wall-back);
	border-bottom: 3px solid var(--accent);
	border-radius: 4px 4px 0 0;
	transition: background-color 0.25s ease, border-color 0.25s ease;
}

.wall-left {
	display: none; /* keep simple for V1 */
}

/* === Furniture Items === */
.furniture {
	position: absolute;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 140px;
	height: 100px;
	background: var(--furniture-bg);
	border: 2px solid transparent;
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.25s ease;
	user-select: none;
}

.furniture:hover {
	background: var(--furniture-hover);
	border-color: var(--accent);
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.furniture.active {
	background: var(--furniture-active);
	border-color: var(--accent);
	box-shadow: 0 0 16px rgba(230, 200, 76, 0.15);
}

.furniture-icon {
	font-size: 2rem;
	line-height: 1;
	margin-bottom: 0.4rem;
}

.furniture-name {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--text);
}

.furniture-system {
	font-size: 0.65rem;
	color: var(--text-muted);
	margin-top: 0.15rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

/* === Furniture Positions === */

/* Back wall items (hung on wall) */
.task-board {
	top: 50px;
	left: 80px;
}

.bulletin-board {
	top: 50px;
	left: 260px;
}

.whiteboard {
	top: 50px;
	right: 260px;
}

.phone {
	top: 50px;
	right: 80px;
}

/* Floor items */
.filing-cabinet {
	bottom: 40px;
	left: 60px;
}

.diary {
	bottom: 40px;
	left: 260px;
}

.product-table {
	bottom: 40px;
	right: 260px;
}

.codebase {
	bottom: 40px;
	right: 60px;
}

/* === Info Panel === */
.info-panel {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--panel-bg);
	border-top: 2px solid var(--accent);
	padding: 1.2rem 2rem;
	transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.3s ease;
	transform: translateY(100%);
	transition: transform 0.3s ease;
	z-index: 10;
}

.info-panel.visible {
	transform: translateY(0);
}

.info-panel-content {
	max-width: 700px;
	margin: 0 auto;
}

.info-panel h2 {
	font-size: 1.1rem;
	color: var(--accent);
	margin-bottom: 0.4rem;
}

.info-panel p {
	font-size: 0.9rem;
	color: var(--text-muted);
	line-height: 1.5;
}

/* === Footer === */
footer {
	text-align: center;
	padding: 1rem;
	color: var(--text-muted);
	font-size: 0.75rem;
}

/* === Responsive === */
@media (max-width: 860px) {
	.room {
		width: 100%;
		max-width: 600px;
		height: auto;
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 1rem;
		padding: 1rem;
	}

	.wall-back, .floor {
		display: none;
	}

	.furniture {
		position: static;
		width: 100%;
		height: 90px;
	}
}

@media (max-width: 480px) {
	.room {
		grid-template-columns: 1fr;
	}

	header h1 {
		font-size: 1.4rem;
	}
}
