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

body {
	background: #1a1a1a;
	color: #f0e6d2;
	font-family: 'Segoe UI', 'Arial', sans-serif;
	padding: 16px;
	max-width: 500px;
	margin: 0 auto;
	line-height: 1.4;
}

h1 {
	text-align: center;
	font-size: 1.3rem;
	margin-bottom: 6px;
	color: #c9a96e;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.subtitle {
	text-align: center;
	font-size: 0.85rem;
	margin-bottom: 20px;
	color: #9c8b7a;
	border-bottom: 1px solid #3a3329;
	padding-bottom: 10px;
}

/* Статистика */
.stats-bar {
	background: #2a241c;
	border: 1px solid #4a3f30;
	border-radius: 8px;
	padding: 8px 12px;
	margin-bottom: 16px;
	text-align: center;
	font-size: 0.9rem;
	color: #d4b16a;
	display: flex;
	justify-content: center;
	gap: 20px;
	flex-wrap: wrap;
}

.stat-item {
	display: flex;
	align-items: center;
	gap: 4px;
}

.stat-label {
	font-weight: bold;
}

.stat-value {
	color: #f0e6d2;
}

.victory-message {
	font-weight: bold;
	margin-top: 4px;
	width: 100%;
	color: #ffcc00;
}

#roles-container {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 20px;
}

.role-section {
	margin-bottom: 12px;
}

.section-title {
	font-size: 1.2rem;
	font-weight: bold;
	padding: 6px 12px;
	border-radius: 8px;
	margin-bottom: 8px;
	text-align: center;
	background: #2a241c;
	color: #d4b16a;
	border: 1px solid #4a3f30;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	user-select: none;
}

.collapse-arrow {
	margin-left: 8px;
	font-size: 1rem;
	transition: transform 0.2s;
}

.role-section.collapsed .role-list {
	display: none;
}

body.extended .section-title.drop-zone {
	background: #3e3528;
	border-color: #c9a96e;
}

.role-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.role-card {
	border-radius: 14px;
	padding: 12px 14px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 2px 8px rgba(0,0,0,0.5);
	transition: background 0.2s, filter 0.2s, opacity 0.2s;
	display: flex;
	flex-direction: column;
	cursor: default;
}

.role-card.faction-townsfolk,
.role-card.faction-outsider {
	background: #1e3a5f;
}
.role-card.faction-minion,
.role-card.faction-demon {
	background: #5f1e1e;
}

.role-card.dead-card {
	opacity: 0.6;
}

.role-card.poisoned-outline,
.role-card.drunk-outline {
	outline: 2px solid #6b8e23; /* болотный */
	outline-offset: 2px;
}

.role-main {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
}

.role-icon {
	font-size: 1.3rem;
	flex-shrink: 0;
}

.role-name {
	font-weight: 700;
	font-size: 1.1rem;
	color: #f0e6d2;
	transition: color 0.2s, font-weight 0.2s, font-style 0.2s;
	white-space: nowrap;
}

.player-name-input {
	background: rgba(255,255,255,0.1);
	border: 1px solid rgba(255,255,255,0.2);
	color: #f0e6d2;
	padding: 2px 8px;
	border-radius: 6px;
	font-size: 0.85rem;
	width: 120px;
	outline: none;
	margin-left: auto;
}
.player-name-input::placeholder {
	color: #8c8273;
	font-style: italic;
}

.role-desc {
	font-size: 0.85rem;
	color: #bcb09b;
	padding-left: 6px;
	border-left: 2px solid rgba(255,255,255,0.15);
	margin-top: 4px;
}

/* Расширенный режим */
.role-extras {
	display: none;
	margin-top: 10px;
	padding-top: 8px;
	border-top: 1px dashed rgba(255,255,255,0.2);
	justify-content: flex-start;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
}

body.extended .role-extras {
	display: flex;
}

.extra-item {
	font-size: 0.85rem;
	background: rgba(0,0,0,0.3);
	border-radius: 8px;
	padding: 4px 8px;
	cursor: pointer;
	user-select: none;
	transition: background 0.15s;
	display: flex;
	align-items: center;
	gap: 4px;
}
.extra-item:hover {
	background: rgba(255,255,255,0.15);
}

.night-order {
	cursor: default;
	background: rgba(0,0,0,0.5);
	font-weight: bold;
}
.night-order:hover {
	background: rgba(0,0,0,0.5);
}

.state-text {
	font-size: 0.8rem;
}

.life-status .state-text { color: #4caf50; }
.life-status.dead .state-text { color: #f44336; }

.voice-status .state-text { color: #e0c992; }
.voice-status.muted .state-text {
	text-decoration: line-through;
	color: #888;
}

.role-card.poisoned .role-name {
	color: #ff6666;
	font-weight: 900;
}
.role-card.drunk .role-name {
	color: #cc88ff;
	font-style: italic;
}

.poison-status .state-text { color: #aaa; }
.poison-status.poisoned .state-text { color: #ff4444; font-weight: bold; }
.poison-status.drunk .state-text { color: #bb77ff; font-style: italic; }

.group-status {
	background: rgba(255,255,255,0.1);
	font-weight: bold;
	text-transform: uppercase;
	font-size: 0.75rem;
}

.role-card.dragging {
	opacity: 0.5;
}

.footer {
	text-align: center;
	margin-top: 20px;
}

.toggle-btn {
	background: #3a3329;
	border: 1px solid #5a4e3a;
	color: #d4b16a;
	padding: 10px 20px;
	border-radius: 10px;
	font-size: 0.9rem;
	cursor: pointer;
	transition: background 0.2s;
	font-weight: bold;
	letter-spacing: 0.5px;
}
.toggle-btn:active {
	background: #4e4334;
}
