:root {
    --bg: #0f0f12;
    --panel: #1a1b20;
    --panel-2: #22232a;
    --accent: #ff9a1f;
    --accent-2: #ffb347;
    --text: #f6f6f6;
    --muted: #9da2ac;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 12px 40px rgba(0,0,0,0.35);
}

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

body {
	background: radial-gradient(circle at 15% 20%, rgba(255,154,31,0.08), transparent 35%), radial-gradient(circle at 80% 0%, rgba(255,179,71,0.08), transparent 30%), var(--bg);
	color: var(--text);
	font-family: 'Trebuchet MS', sans-serif;
	line-height: 1.5;
	min-height: 100vh;
}

h1 {
	text-align: center;
	letter-spacing: 0.5px;
}

hr {
	margin: 15px 0 20px;
	border: 0;
	border-top: 1px solid var(--border);
}

a {
	color: inherit;
}

.page-shell {
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 24px 60px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--panel);
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: var(--shadow);
    gap: 24px;
    flex-wrap: wrap;
}

.header .logo h1 {
    margin: 0;
}

.inner-menu {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
    overflow: visible;
    flex: 1 1 auto;
}

.header > .inner-menu > .menu-link {
    color: rgba(255, 187, 0, 0.8);
    text-decoration: none;
    transition: all .2s ease;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 150px;
    width: 200px;
}
.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3da0ff, #7a6bff);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
    transform: translateY(-1px);
}

.author-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.header > .inner-menu > .button {
    min-width: 150px;
    width: 200px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 14px;
}

.header > .inner-menu > .menu-link:hover {
    color: var(--accent);
    border-color: rgba(255, 154, 31, 0.25);
    background: rgba(255, 154, 31, 0.06);
}

#hint {
	font-size: 16px;
	color: var(--accent);
}

.modal {
	position: fixed;
	width: min(900px, 90%);
	max-height: 80%;
	background: var(--panel-2);
	border: 2px solid var(--accent);
	border-radius: 16px;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	padding: 24px;
	display: none;
	overflow: auto;
	box-shadow: var(--shadow);
}

.modal > .modal-header {
	display:flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

.modal > .modal-header > h1 {
	margin: 0;
	font-size: 24px;
}

.modal > .modal-header > a {
	min-width: 90px;
	text-align:center;
}

.modal > .inner-modal {
	font-size: 16px;
	line-height: 1.6;
}

.form {
	width: min(520px, 90%);
	margin: 0 auto;
	background: var(--panel);
	padding: 24px;
	border: 1px solid var(--border);
	border-radius: 12px;
	box-shadow: var(--shadow);
}

.projects {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 18px;
	margin: 20px auto 0;
	width: 100%;
	max-width: 1100px;
	padding: 0 16px;
}

.projects.page-narrow {
	max-width: 960px;
}

.project {
	display: block;
	color: var(--text);
	text-decoration: none;
	transition: transform .15s ease, box-shadow .15s ease, border-color .2s ease;
	border: 1px solid var(--border);
	padding: 14px;
	background: var(--panel);
	border-radius: 14px;
	min-height: 320px;
	box-shadow: var(--shadow);
}

.project > div > .logo {
	display: block;
	width: 100%;
	height: 180px;
	margin-bottom: 10px;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	border-radius: 10px;
	border: 1px solid var(--border);
}

.project:hover {
	transform: translateY(-4px);
	background: #25262f;
	box-shadow: 0 16px 45px rgba(0,0,0,0.45);
	border-color: rgba(255,154,31,0.35);
}

.project > div > img {
	display: block;
	width: 100%;
	height: 200px;
	margin-bottom: 5px;
}

.tutorial > div > em {
	color: red;
}

.content {
	padding: 20px 0;
	max-width: 1280px;
	margin: 0 auto;
}

#canvas {
	background-color: #c8c8c8;
	border: 10px solid white;
	border-radius: 14px;
	box-shadow: var(--shadow);
	width: 100%;
	max-width: 100%;
	height: auto;
}

.inner-canvas {
	display: grid;
	grid-template-columns: minmax(640px, 2fr) 1fr;
	grid-template-areas:
		"canvas sidebar"
		"menu sidebar";
	gap: 16px;
	align-items: start;
	width: 100%;
}

.canvas-holder {
	grid-area: canvas;
	width: 100%;
}

.canvas-holder #canvas {
	width: 100%;
	height: auto;
	display: block;
}

.canvas-actions {
	grid-area: menu;
	width: 100%;
}

.sidebar {
	padding: 14px;
	width: 340px;
	max-height: 820px;
	overflow: auto;
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 12px;
	box-shadow: var(--shadow);
	grid-area: sidebar;
}

.list-elem {
	display: block;
	text-decoration: none;
	margin-bottom: 5px;
	color: var(--text);
}

.list-elem:hover {
	border-bottom: 1px solid var(--text);
}

.object_settings {
	width: 100%;
	display: none;
}

input, select, textarea {
	padding: 10px 12px;
	width: 100%;
	background: var(--panel-2);
	margin-bottom: 10px;
	border: 1px solid var(--border);
	color: var(--text);
	font-weight: 600;
	border-radius: 10px;
	outline: none;
	transition: border-color .2s ease, box-shadow .2s ease;
}

input:focus, select:focus, textarea:focus {
	border-color: rgba(255,154,31,0.5);
	box-shadow: 0 0 0 3px rgba(255,154,31,0.15);
}

.menu {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 10px;
	margin: 14px 0 4px;
	justify-content: flex-start;
}

.menu-button {
	width: 100%;
}

.variable {
	font-weight: bold;
	color: var(--accent);
}

.small-button {
	display: block;
	width: 100%;
	color: var(--accent);
	text-decoration: none;
	font-weight: 600;
	padding: 6px 0;
}

.small-button:hover {
	font-weight: bold;
}
.button,
.menu-button,
.update-button,
.delete-button {
	padding: 12px 18px;
	font-size: 16px;
	color: white;
	font-weight: 700;
	border: 2px solid var(--accent);
	background: linear-gradient(135deg, #202123, #1b1c20);
	width: 100%;
	text-decoration:none;
	border-radius: 12px;
	transition: transform .1s ease, box-shadow .2s ease, background .2s ease;
}

.button {
	max-width: 100%;
    margin-bottom: 10px;
};

.button:hover,
.menu-button:hover,
.update-button:hover {
	background: linear-gradient(135deg, #25262c, #1f2026);
	transform: translateY(-1px);
	box-shadow: var(--shadow);
}

.delete-button {
	border-color: #ff5f5f;
	color: #ff8a8a;
}

.delete-button:hover {
	background: linear-gradient(135deg, #2a1111, #321616);
	color: white;
}

.menu-button.active {
	background-color: #2f3038;
	border-color: rgba(255,154,31,0.7);
}

.user-menu {
	position: relative;
	overflow: visible;
}

.user-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	background: rgba(255,255,255,0.05);
	border: 1px solid var(--border);
	border-radius: 12px;
	color: var(--text);
	cursor: pointer;
	border: none;
	outline: none;
	border: 1px solid var(--border);
	border-radius: 12px;
	color: var(--text);
	cursor: pointer;
}

.user-chip .user-avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	overflow: hidden;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	background: #333;
}

.user-chip .user-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.user-chip .user-avatar-initial {
	font-weight: 700;
	color: #fff;
}

.user-dropdown {
	position: absolute;
	right: 0;
	top: calc(100% + 6px);
	background: var(--panel-2);
	border: 1px solid var(--border);
	border-radius: 12px;
	min-width: 190px;
	box-shadow: var(--shadow);
	padding: 6px;
	display: none;
	z-index: 20;
}

.user-dropdown.is-open {
	display: block;
}

.user-dropdown-item {
	display: block;
	padding: 10px 12px;
	color: var(--text);
	text-decoration: none;
	border-radius: 8px;
	font-weight: 600;
}

.user-dropdown-item:hover {
	background: rgba(255,255,255,0.05);
}

.user-dropdown-item.danger {
	color: #ff8a8a;
}

.rename-input {
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	font-size: 23px;
	display: inline;
	width: 100%;
}

.update-button {
	margin-bottom: 10px;
}

.delete-button {
	margin-bottom: 10px;
}

select {
	height: 42px;
}

option {
	background: #111;
	font-weight: bold;
	color: white;
}

@media screen and (max-width: 1200px) {
	.page-shell {
		padding: 0 16px 50px;
	}
	.header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}
	.inner-menu {
		width: 100%;
		justify-content: flex-start;
		flex-wrap: wrap;
	}
}

@media screen and (max-width: 980px) {
	.inner-canvas {
		grid-template-columns: 1fr;
		grid-template-areas:
			"canvas"
			"menu"
			"sidebar";
	}
	.sidebar {
		width: 100%;
		order: -1;
	}
}

@media screen and (max-width: 720px) {
	body {
		font-size: 15px;
	}
	.header > .inner-menu > .menu-link {
		padding: 8px 10px;
	}
	.modal {
		padding: 16px;
	}
}

@media screen and (max-width: 520px) {
	.projects {
		grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	}
	.project {
		min-height: 0;
	}
}
