:root {
	--bg: #1e1e1e;
	--panel: #252526;
	--panel-2: #2d2d30;
	--activity: #333333;
	--tabs: #252526;
	--border: #3c3c3c;
	--text: #cccccc;
	--muted: #8b8b8b;
	--accent: #0a84ff;
	--run: #16825d;
	--run-hover: #1a9b6e;
	--font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
	--font-mono: "SF Mono", Menlo, Monaco, "Cascadia Code", monospace;
}

* {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
	margin: 0;
	overflow: hidden;
}

body {
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-ui);
	font-size: 12px;
}

button,
a {
	font-family: inherit;
}

.ide {
	display: grid;
	grid-template-columns: 48px 200px minmax(0, 1fr);
	height: 100vh;
}

.activity-bar {
	align-items: center;
	background: var(--activity);
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 8px 0;
}

.activity {
	align-items: center;
	background: transparent;
	border: 0;
	border-left: 2px solid transparent;
	color: #9d9d9d;
	cursor: pointer;
	display: flex;
	font-size: 20px;
	height: 44px;
	justify-content: center;
	text-decoration: none;
	width: 48px;
}

.activity:hover {
	color: #ffffff;
}

.activity.active {
	border-left-color: var(--accent);
	color: #ffffff;
}

.activity-spacer {
	flex: 1;
}

.sidebar {
	background: var(--panel);
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.sidebar-title {
	color: #bbbbbb;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	padding: 10px 14px;
	text-transform: uppercase;
}

.tree {
	flex: 1;
	padding: 2px 6px;
}

.tree-item {
	align-items: center;
	border-radius: 4px;
	color: #cccccc;
	display: flex;
	gap: 7px;
	padding: 4px 8px;
	white-space: nowrap;
}

.tree-item.folder {
	color: #e0e0e0;
	font-weight: 600;
}

.tree-item.file {
	padding-left: 24px;
}

.tree-item.active {
	background: #37373d;
	color: #ffffff;
}

.tree-item i {
	width: 14px;
}

.sidebar-footer {
	border-top: 1px solid var(--border);
	color: var(--muted);
	font-size: 10px;
	line-height: 1.5;
	padding: 10px 14px;
}

.sidebar-footer span {
	color: #6a9955;
}

.workspace {
	display: grid;
	grid-template-rows: 35px minmax(0, 1fr) 190px 22px;
	min-width: 0;
}

.tabs {
	align-items: stretch;
	background: var(--tabs);
	border-bottom: 1px solid var(--border);
	display: flex;
	overflow: hidden;
}

.tab {
	align-items: center;
	background: var(--bg);
	border-right: 1px solid var(--border);
	color: #ffffff;
	display: flex;
	gap: 7px;
	padding: 0 14px;
}

.tab-dot {
	background: var(--accent);
	border-radius: 50%;
	height: 6px;
	margin-left: 8px;
	width: 6px;
}

.editor {
	min-height: 0;
	width: 100%;
}

.panel {
	background: var(--panel);
	border-top: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.panel-header {
	align-items: center;
	display: flex;
	justify-content: space-between;
	padding: 0 10px;
}

.panel-tabs {
	display: flex;
	gap: 16px;
}

.panel-tab {
	background: transparent;
	border: 0;
	border-bottom: 1px solid transparent;
	color: var(--muted);
	cursor: pointer;
	font-size: 11px;
	letter-spacing: 0.04em;
	padding: 10px 0 8px;
	text-transform: uppercase;
}

.panel-tab.active {
	border-bottom-color: var(--accent);
	color: #ffffff;
}

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

.panel-actions button {
	background: #3a3d41;
	border: 1px solid #4a4d52;
	border-radius: 4px;
	color: #e0e0e0;
	cursor: pointer;
	font-size: 11px;
	padding: 4px 9px;
}

.panel-actions button:hover {
	background: #45494e;
}

.panel-actions .run-button {
	background: var(--run);
	border-color: var(--run);
	color: #ffffff;
}

.panel-actions .run-button:hover {
	background: var(--run-hover);
}

.output {
	color: #d4d4d4;
	flex: 1;
	font-family: var(--font-mono);
	font-size: 12px;
	line-height: 1.55;
	margin: 0;
	overflow: auto;
	padding: 8px 14px 12px;
	white-space: pre-wrap;
	word-break: break-word;
}

.output .error {
	color: #f48771;
}

.statusbar {
	align-items: center;
	background: #007acc;
	color: #ffffff;
	display: flex;
	font-size: 11px;
	justify-content: space-between;
	padding: 0 12px;
}

.statusbar .status-right {
	opacity: 0.85;
}

.loading-overlay {
	align-items: center;
	background: rgba(30, 30, 30, 0.92);
	display: flex;
	inset: 0;
	justify-content: center;
	position: fixed;
	transition: opacity 0.25s ease, visibility 0.25s ease;
	z-index: 20;
}

.loading-overlay.hidden {
	opacity: 0;
	visibility: hidden;
}

.loading-card {
	align-items: center;
	color: var(--text);
	display: flex;
	flex-direction: column;
	gap: 8px;
	text-align: center;
}

.loading-card strong {
	font-size: 14px;
}

.loading-card span {
	color: var(--muted);
}

.loading-spinner {
	animation: spin 0.8s linear infinite;
	border: 2px solid rgba(255, 255, 255, 0.18);
	border-top-color: var(--accent);
	border-radius: 50%;
	height: 28px;
	width: 28px;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

::-webkit-scrollbar {
	height: 10px;
	width: 10px;
}

::-webkit-scrollbar-track {
	background: transparent;
}

::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border: 2px solid transparent;
	background-clip: content-box;
	border-radius: 99px;
}

@media (max-width: 760px) {
	.ide {
		grid-template-columns: 42px minmax(0, 1fr);
	}

	.sidebar {
		display: none;
	}

	.workspace {
		grid-template-rows: 35px minmax(0, 1fr) 150px 22px;
	}
}
