* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	text-align: center;
}

body {
	font-family: Roboto, sans-serif;
	font-size: medium;
	background: #2c3e50;
	padding: 20px;
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.main-container {
	max-width: 900px;
	margin: 0 auto;
}

h1 {
	margin-bottom: 30px;
	text-align: center;
}

h2 {
	margin-bottom: 15px;
	color: white;
	text-align: center;
}

h3 {
	margin-bottom: 15px;
	text-align: center;
}

.troop-pool {
	width: 400px;
	height: 400px;
	display: grid;
	grid-template-columns: repeat(2, 120px);
	align-items: center;
	justify-content: center;
	gap: 15px;
}

.troop-card {
	width: 100px;
	height: 100px;
	background: #3498db;
	border: 2px solid #2980b9;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: grab;
	user-select: none;
	font-weight: bold;
	transition: all 0.2s ease;
}

.troop-card:hover {
	transform: scale(1.05);
	background: #5dade2;
}

.troop-card.dragging {
	opacity: 0.7;
	cursor: grabbing;
	transform: scale(1.1);
}

.slot {
	width: 220px;
	height: 220px;
	aspect-ratio: 1 / 1;
	background: #34495e;
	border: 2px dashed #7f8c8d;
	border-radius: 8px;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	align-items: center;
	justify-content: center;
	color: #95a5a6;
	position: relative;
	min-height: 100px;
}

.slot.occupied {
	border: 2px solid #2ecc71;
	background: #27ae60;
	color: #ecf0f1;
}

.slot.hover {
	border: 2px solid #f39c12;
	background: #e67e22;
}

.info {
	background: #34495e;
	padding: 20px;
	border-radius: 8px;
	margin-bottom: 20px;
}

.text-info {
	text-align: justify;
}

button {
	background: #27ae60;
	color: white;
	border: none;
	padding: 10px 20px;
	border-radius: 6px;
	cursor: pointer;
	margin-top: 10px;
}

button:hover {
	background: #229954;
}

button:disabled,
button[disabled]{
	background-color: #cccccc;
	color: #666666;
	cursor: not-allowed;
}

button.danger {
	background: #bc261f;
}

.troop-card {
	display: grid;
	position: relative;
	text-align: center;
}

.troop-card.absolute-drag {
	position: fixed;
	z-index: 1000;
	pointer-events: none;
}

.region {
    stroke: #ffffff;
    stroke-width: 2;
    transition: all 0.2s ease;
}

.region:hover {
    stroke: #3498db;
    stroke-width: 2;
}

.region.selected {
    stroke: #2ecc71;
    stroke-width: 2;
}

.region.frozen {
    stroke: #666666;
    stroke-width: 2;
}

.health-indicator {
	display: inline-block;
}

.small-dialog {
	width: 30vw;
    height: 30vh;
	background: #16213e;
	color: white;
}

dialog {
    left: 50%;
    top: 50%;
	transform: translate(-50%, -50%);

	max-width: 90vw;
    max-height: 90vh;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.frozen {
    pointer-events: none;
    opacity: 0.6;
}

.frozen-overlay-text {
    white-space: pre-line;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    pointer-events: none;
	text-align: center;
    z-index: 10;
}

.give-order-button {
    white-space: pre-line;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    pointer-events: auto;
}

.slot.frozen {
	background-color: #cccccc;
}

.vbox {
	display: flex;
    flex-direction: row; 
    gap: 10px;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.hbox {
	display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.bold {
	font-weight:bold;
}

.strategy-option {
	padding: 10px;
	cursor: pointer;
	color: white;
	border-radius: 4px;
}

.strategy-option:hover {
    background: #34495e;
}

.strategy-box {
	width: 60px; 
	height: 60px; 
	border: 2px solid #ccc; 
	border-radius: 8px;
	cursor: pointer; 
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f5f5f5;
}

.strategy-menu {
	display: none; 
	position: fixed; 
	right: 0; 
	top: 0; 
	background: #2c3e50;
	border-left: 2px solid #34495e; 
	padding: 10px; 
}

.stat-info-text {
    white-space: pre-line;
}

.progress-container {
    position: relative;
    width: 200px;
    height: 20px;
    background: #34495e;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #2c3e50;
}

.progress-bar {
    position: absolute;
    height: 100%;
    background: #2ecc71;
    width: 0%;
}

.progress-bar-prev {
    position: absolute;
    height: 100%;
    background: #3498db;
    width: 0%;
    z-index: 1;
}

.tooltip {
    position: fixed;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    display: none;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 250px;
	z-index: 1001;
}

.additional-tooltip {
    position: absolute;
    background: #333;
	color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    display: none;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 250px;
}

.story-container {
	overflow: hidden;
}

.story-dialog {
	height: 500px;
	width: 800px;
	display: flex;
	flex-direction: column;
	background: #16213e;
}

.story-content {
	flex: 1;
	padding: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: hidden;
}

.story-text {
	color: #eee;
	font-size: 18px;
	line-height: 1.8;
	max-width: 100%;
	opacity: 0;
	animation: fadeIn 1.0s ease-in forwards;
}

@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.dialogue-container {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.message {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.message.from-a {
	flex-direction: row;
}

.message.from-b {
	flex-direction: row-reverse;
}

.portrait {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	color: white;
	font-size: 24px;
}

.portrait.person-a {
	background: #e94560;
}

.portrait.person-b {
	background: #00d4ff;
}

.dialogue-text {
	background: rgba(255, 255, 255, 0.1);
	padding: 12px 16px;
	border-radius: 8px;
	color: #eee;
	max-width: 60%;
	word-wrap: break-word;
	border-left: 3px solid #e94560;
}

.message.from-b .dialogue-text {
	border-left: none;
	border-right: 3px solid #00d4ff;
}

.info-story {
	color: #00d4ff;
	font-size: 12px;
	margin-top: 10px;
	font-family: monospace;
}

#goalInfo {
	text-align: left;
	font-weight: bold;
  	flex-grow: 1;
}

#warningInfo {
	text-align: right;
	font-weight: bold;
	color: #AA4A44;
  	flex-grow: 1;
}