@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
	color-scheme: light;
	--bg: #0f1226;
	--panel: #171a33;
	--panel-light: #1e2240;
	--text: #f7f7fb;
	--muted: #a7adcf;
	--accent: #5dd6ff;
	--accent-strong: #2aa3ff;
	--success: #6ce27f;
	--warning: #ffb454;
	--border: #2d335c;
	--shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

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

body {
	font-family: "Inter", system-ui, sans-serif;
	background: radial-gradient(circle at top left, #1d2150, #0a0c1e);
	color: var(--text);
	min-height: 100vh;
}

.app {
	display: grid;
	grid-template-columns: 260px 1fr;
	min-height: 100vh;
}

.sidebar {
	background: var(--panel);
	padding: 32px 24px;
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
}

.brand__icon {
	width: 48px;
	height: 48px;
	display: grid;
	place-items: center;
	background: var(--panel-light);
	border-radius: 16px;
	font-size: 24px;
}

.brand__title {
	font-weight: 700;
	font-size: 18px;
}

.brand__subtitle {
	color: var(--muted);
	font-size: 13px;
}

.nav {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.nav__item {
	background: transparent;
	border: 1px solid transparent;
	color: var(--text);
	padding: 12px 16px;
	border-radius: 12px;
	cursor: pointer;
	text-align: left;
	font-weight: 500;
}

.nav__item:hover,
.nav__item.is-active {
	background: var(--panel-light);
	border-color: var(--border);
}

.status {
	background: var(--panel-light);
	padding: 16px;
	border-radius: 16px;
	border: 1px solid var(--border);
}

.status__label {
	color: var(--muted);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.status__value {
	font-weight: 700;
	font-size: 20px;
	margin: 8px 0 4px;
}

.status__hint {
	color: var(--muted);
	font-size: 12px;
}

.content {
	padding: 32px 40px 48px;
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.topbar h1 {
	font-size: 28px;
	margin-bottom: 6px;
}

.topbar p {
	color: var(--muted);
}

.topbar__actions {
	display: flex;
	gap: 12px;
}

.button {
	border: 1px solid var(--border);
	background: var(--panel-light);
	color: var(--text);
	padding: 10px 16px;
	border-radius: 12px;
	cursor: pointer;
	font-weight: 600;
}

.button--primary {
	background: var(--accent-strong);
	border-color: transparent;
}

.button--ghost {
	background: transparent;
}

.section {
	display: none;
}

.section.is-visible {
	display: block;
}

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 24px;
}

.card {
	background: var(--panel);
	padding: 24px;
	border-radius: 20px;
	border: 1px solid var(--border);
	box-shadow: var(--shadow);
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.card--collapsible {
	padding: 0;
	overflow: hidden;
}

.card__header {
	padding: 20px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
	user-select: none;
	transition: background 0.2s;
}

.card__header:hover {
	background: rgba(93, 214, 255, 0.05);
}

.card__content {
	padding: 0 24px 24px;
	max-height: 2000px;
	overflow: hidden;
	transition: max-height 0.5s ease, padding 0.5s ease, opacity 0.3s ease;
	opacity: 1;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.card__content.is-collapsed {
	max-height: 0;
	padding-top: 0;
	padding-bottom: 0;
	opacity: 0;
}

.toggle-icon {
	font-size: 14px;
	color: var(--accent);
	transition: transform 0.3s;
}

.toggle-icon.is-collapsed {
	transform: rotate(-90deg);
}

.card.is-blurred {
	position: relative;
	filter: blur(1px);
	opacity: 0.7;
}

.card.is-blurred::after {
	content: "Sota manteniment";
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: var(--text);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	background: rgba(10, 12, 30, 0.55);
	border-radius: 20px;
	filter: none;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.card__actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

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

.list {
	list-style: none;
	display: grid;
	gap: 12px;
}

.pill-group {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.pill {
	padding: 6px 10px;
	border-radius: 999px;
	background: rgba(93, 214, 255, 0.15);
	color: var(--accent);
	font-size: 12px;
}

.play-layout {
	display: grid;
	grid-template-columns: minmax(320px, 2fr) minmax(260px, 1fr);
	gap: 24px;
	align-items: start;
}

.board {
	display: flex;
	flex-direction: column;
	gap: 66px;
	align-items: center;
	width: 100%;
	margin: 0 auto;
	justify-self: center;
}

.board__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	width: 100%;
}

.turn {
	background: var(--panel);
	padding: 12px 16px;
	border-radius: 14px;
	border: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}

.board__grid {
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	border-radius: 16px;
	overflow: hidden;
	border: 1px solid var(--border);
	background: #101329;
	width: min(100%, 700px);
	aspect-ratio: 1;
	margin: 0 auto;
}

.cell {
	aspect-ratio: 1;
	display: grid;
	place-items: center;
	font-size: clamp(16px, 2vw, 22px);
}

.cell.is-dark {
	background: #0f1430;
}

.cell.is-light {
	background: #242a4f;
}

.sidepanel {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.role-picker {
	display: grid;
	gap: 10px;
}

.role-picker label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.timeline {
	list-style: none;
	display: grid;
	gap: 10px;
	font-size: 14px;
}

.emoji-bar {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.emoji {
	border: 1px solid var(--border);
	background: var(--panel-light);
	padding: 8px 12px;
	border-radius: 12px;
	font-size: 18px;
	cursor: pointer;
}

.player-list li {
	display: flex;
	align-items: center;
	gap: 10px;
}

.group-dot {
	width: 10px;
	height: 10px;
	border-radius: 999px;
	display: inline-block;
	border: 2px solid var(--text);
}

.group-dot--light {
	background: #f6f7ff;
	border-color: #f6f7ff;
	box-shadow: 0 0 0 3px rgba(246, 247, 255, 0.15);
}

.group-dot--dark {
	background: #0b0f24;
	border-color: #0b0f24;
	box-shadow: 0 0 0 3px rgba(11, 15, 36, 0.4);
}

.abilities-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}

.ability-card {
	background: linear-gradient(135deg, #1e2240 0%, #0f1328 100%);
	border: 2px solid transparent;
	background-clip: padding-box;
	position: relative;
	padding: 18px 12px;
	border-radius: 16px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-align: center;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ability-card::before {
	content: '';
	position: absolute;
	inset: -2px;
	border-radius: 16px;
	padding: 2px;
	background: linear-gradient(135deg, #5dd6ff, #2aa3ff, #1c7ed6);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	transition: opacity 0.3s;
}

.ability-card:hover::before {
	opacity: 1;
}

.ability-card:hover {
	transform: translateY(-4px) scale(1.02);
	box-shadow: 0 8px 24px rgba(93, 214, 255, 0.4), 0 0 20px rgba(93, 214, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ability-card:active {
	transform: translateY(-2px) scale(0.98);
}

.ability-icon {
	font-size: 32px;
	filter: drop-shadow(0 2px 8px rgba(93, 214, 255, 0.5));
	transition: transform 0.3s;
}

.ability-card:hover .ability-icon {
	transform: scale(1.1) rotate(5deg);
}

.ability-name {
	font-size: 13px;
	font-weight: 700;
	color: var(--text);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
	letter-spacing: 0.02em;
}

.ability-note {
	font-size: 9px;
	color: var(--accent);
	margin-top: -4px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.table th,
.table td {
	text-align: left;
	padding: 10px 8px;
	border-bottom: 1px solid var(--border);
}

.stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 16px;
}

.stat__label {
	color: var(--muted);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.stat__value {
	font-size: 20px;
	font-weight: 700;
}

.form {
	display: grid;
	gap: 14px;
}

.form label {
	display: grid;
	gap: 8px;
	font-size: 14px;
}

input[type="text"],
select {
	background: #0f1328;
	border: 1px solid var(--border);
	color: var(--text);
	padding: 10px 12px;
	border-radius: 10px;
}

.toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--muted);
}

.profile__header {
	display: flex;
	gap: 14px;
	align-items: center;
}

.avatar {
	width: 52px;
	height: 52px;
	display: grid;
	place-items: center;
	border-radius: 16px;
	background: var(--accent-strong);
	font-weight: 700;
}

.theme-light {
	--bg: #f4f5fb;
	--panel: #ffffff;
	--panel-light: #f0f2ff;
	--text: #1e2240;
	--muted: #5b6488;
	--accent: #2aa3ff;
	--accent-strong: #1c7ed6;
	--border: #e1e6ff;
	--shadow: 0 20px 40px rgba(20, 24, 61, 0.1);
	background: #f4f5fb;
}

.theme-light body {
	background: #f4f5fb;
}

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

	.sidebar {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: space-between;
	}

	.content {
		padding: 24px;
	}

	.play-layout {
		grid-template-columns: 1fr;
	}
}
