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

:root {
	--primary-color: #2c3e50;
	--secondary-color: #3498db;
	--danger-color: #e74c3c;
	--success-color: #27ae60;
	--bg-color: #ecf0f1;
	--card-bg: #ffffff;
	--text-color: #2c3e50;
	--border-color: #bdc3c7;
	--shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	line-height: 1.6;
	color: var(--text-color);
	background-color: var(--bg-color);
}

header {
	background-color: var(--primary-color);
	color: white;
	padding: 1rem 2rem;
	box-shadow: var(--shadow);
}

header h1 {
	margin: 0;
	font-size: 1.5rem;
}

header h1 a {
	color: white;
	text-decoration: none;
}

nav ul {
	list-style: none;
	display: flex;
	gap: 1.5rem;
	margin-top: 0.5rem;
}

nav a {
	color: white;
	text-decoration: none;
	transition: opacity 0.2s;
}

nav a:hover {
	opacity: 0.8;
}

main {
	max-width: 1200px;
	margin: 2rem auto;
	padding: 0 2rem;
	min-height: calc(100vh - 200px);
}

footer {
	background-color: var(--primary-color);
	color: white;
	text-align: center;
	padding: 1rem;
	margin-top: 2rem;
}

.dashboard {
	text-align: center;
}

.dashboard h2 {
	margin-bottom: 1rem;
	color: var(--primary-color);
}

.dashboard p {
	margin-bottom: 2rem;
	font-size: 1.1rem;
}

.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
	margin-top: 2rem;
}

.card {
	background-color: var(--card-bg);
	border-radius: 8px;
	padding: 2rem;
	box-shadow: var(--shadow);
	transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
	transform: translateY(-4px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card h3 {
	color: var(--primary-color);
	margin-bottom: 1rem;
}

.card p {
	margin-bottom: 1.5rem;
	color: #555;
}

.btn {
	display: inline-block;
	padding: 0.5rem 1.5rem;
	background-color: var(--border-color);
	color: var(--text-color);
	text-decoration: none;
	border-radius: 4px;
	border: none;
	cursor: pointer;
	font-size: 1rem;
	transition: background-color 0.2s;
}

.btn:hover {
	background-color: #95a5a6;
}

.btn-primary {
	background-color: var(--secondary-color);
	color: white;
}

.btn-primary:hover {
	background-color: #2980b9;
}

.btn-danger {
	background-color: var(--danger-color);
	color: white;
}

.btn-danger:hover {
	background-color: #c0392b;
}

.cheatsheet {
	background-color: var(--card-bg);
	border-radius: 8px;
	padding: 2rem;
	box-shadow: var(--shadow);
}

.cheatsheet h2 {
	color: var(--primary-color);
	margin-bottom: 2rem;
	border-bottom: 2px solid var(--secondary-color);
	padding-bottom: 0.5rem;
}

.rule-section {
	margin-bottom: 2rem;
}

.rule-section h3 {
	color: var(--secondary-color);
	margin-bottom: 1rem;
}

.rule-section ul {
	margin-left: 2rem;
}

.rule-section li {
	margin-bottom: 0.5rem;
}

.combat-tracker {
	background-color: var(--card-bg);
	border-radius: 8px;
	padding: 2rem;
	box-shadow: var(--shadow);
}

.combat-tracker h2 {
	color: var(--primary-color);
	margin-bottom: 1.5rem;
	border-bottom: 2px solid var(--secondary-color);
	padding-bottom: 0.5rem;
}

.tracker-controls {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
	padding: 1rem;
	background-color: var(--bg-color);
	border-radius: 4px;
}

.round-control {
	font-size: 1.2rem;
	font-weight: bold;
}

.round-control label {
	margin-right: 0.5rem;
}

.control-buttons {
	display: flex;
	gap: 1rem;
}

.form-container {
	background-color: var(--bg-color);
	border-radius: 4px;
	padding: 1.5rem;
	margin-bottom: 2rem;
}

.form-container.hidden {
	display: none;
}

.form-container h3 {
	margin-bottom: 1rem;
	color: var(--primary-color);
}

.form-group {
	margin-bottom: 1rem;
}

.form-group label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 500;
}

.form-group input,
.form-group select {
	width: 100%;
	padding: 0.5rem;
	border: 1px solid var(--border-color);
	border-radius: 4px;
	font-size: 1rem;
}

.form-buttons {
	display: flex;
	gap: 1rem;
	margin-top: 1rem;
}

.combatants-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.combatant-card {
	border: 2px solid var(--border-color);
	border-radius: 8px;
	padding: 1.5rem;
	background-color: white;
	transition: border-color 0.2s;
}

.combatant-card.active {
	border-color: var(--success-color);
	box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2);
}

.combatant-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

.combatant-name {
	font-size: 1.3rem;
	font-weight: bold;
	color: var(--primary-color);
}

.combatant-type {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	background-color: var(--secondary-color);
	color: white;
	border-radius: 12px;
	font-size: 0.85rem;
	font-weight: 500;
}

.combatant-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 1rem;
	margin-bottom: 1rem;
}

.stat-group {
	display: flex;
	flex-direction: column;
}

.stat-label {
	font-size: 0.85rem;
	color: #666;
	margin-bottom: 0.25rem;
}

.hp-controls {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.hp-btn {
	width: 30px;
	height: 30px;
	border: none;
	background-color: var(--secondary-color);
	color: white;
	border-radius: 4px;
	cursor: pointer;
	font-size: 1.2rem;
	font-weight: bold;
}

.hp-btn:hover {
	background-color: #2980b9;
}

.hp-display {
	font-size: 1.2rem;
	font-weight: bold;
	min-width: 80px;
	text-align: center;
}

.initiative-display {
	font-size: 1.2rem;
	font-weight: bold;
}

.statuses-section {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--border-color);
}

.statuses-label {
	font-size: 0.85rem;
	color: #666;
	margin-bottom: 0.5rem;
}

.statuses-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.status-tag {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.75rem;
	background-color: var(--danger-color);
	color: white;
	border-radius: 12px;
	font-size: 0.85rem;
}

.status-remove {
	margin-left: 0.5rem;
	background: none;
	border: none;
	color: white;
	cursor: pointer;
	font-weight: bold;
	font-size: 1rem;
}

.status-remove:hover {
	opacity: 0.8;
}

.add-status-controls {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.add-status-controls select,
.add-status-controls input {
	flex: 1;
	padding: 0.4rem;
	border: 1px solid var(--border-color);
	border-radius: 4px;
	font-size: 0.9rem;
}

.add-status-controls button {
	padding: 0.4rem 1rem;
}

.combatant-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--border-color);
}

.delete-btn {
	background-color: var(--danger-color);
	color: white;
	border: none;
	padding: 0.5rem 1rem;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.9rem;
}

.delete-btn:hover {
	background-color: #c0392b;
}

.empty-state {
	text-align: center;
	padding: 3rem;
	color: #999;
	font-size: 1.1rem;
}

.empty-state.hidden {
	display: none;
}

@media (max-width: 768px) {
	nav ul {
		flex-direction: column;
		gap: 0.5rem;
	}

	.card-grid {
		grid-template-columns: 1fr;
	}

	.tracker-controls {
		flex-direction: column;
		align-items: stretch;
		gap: 1rem;
	}

	.control-buttons {
		flex-direction: column;
	}

	.combatant-stats {
		grid-template-columns: 1fr;
	}
}
