/* Comparison Page Styles */
.comparison-container {
	overflow-x: auto;
	margin-bottom: 2rem;
	border-radius: 0.5rem;
	border: 1px solid var(--border-color);
	background-color: var(--card-bg);
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.comparison-legend {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-bottom: 1rem;
	padding: 0.75rem;
	background-color: var(--bg-secondary);
	border-radius: 0.5rem;
}

.comparison-legend-item {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.8rem;
}

.comparison-legend-color {
	width: 1rem;
	height: 1rem;
	border-radius: 0.25rem;
}

.comparison-table-container {
	min-width: 100%;
	width: max-content;
}

.comparison-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 0.9rem;
}

.comparison-table th,
.comparison-table td {
	padding: 0.75rem 1rem;
	text-align: left;
	border-bottom: 1px solid var(--border-color);
	min-width: 180px;
	position: relative;
}

.comparison-table th {
	font-weight: 600;
	background-color: var(--bg-secondary);
	position: sticky;
	left: 0;
	z-index: 2;
	min-width: 200px;
	border-right: 1px solid var(--border-color);
}

.comparison-table td {
	border-right: 1px solid var(--border-color);
}

/* Hover effect only for stat rows */
.comparison-table tr:not(.stat-category):hover td:not([colspan]) {
	outline: 2px solid var(--accent-color);
	outline-offset: -2px;
	position: relative;
	z-index: 1;
}

.comparison-table tr:not(.stat-category):hover th {
	outline: 2px solid var(--accent-color);
	outline-offset: -2px;
	position: relative;
	z-index: 1;
}

.comparison-table .stat-category {
	font-weight: bold;
	background-color: var(--bg-secondary-dark);
	text-transform: uppercase;
	letter-spacing: 1px;
	font-size: 0.8rem;
	color: var(--text-secondary);
	position: relative;
}

.comparison-table .stat-category td {
	padding-top: 1.5rem;
	padding-bottom: 0.75rem;
	border-top: 2px solid var(--border-color);
}

.comparison-table .stat-category:first-child td {
	border-top: none;
}

/* Stat coloring - 7-step gradient */
.comparison-table .stat-1 {
	background-color: rgba(76, 175, 80, 0.3);
}

/* Best */
.comparison-table .stat-2 {
	background-color: rgba(76, 175, 80, 0.25);
}

.comparison-table .stat-3 {
	background-color: rgba(76, 175, 80, 0.2);
}

.comparison-table .stat-4 {
	background-color: rgba(255, 235, 59, 0.2);
}

/* Middle */
.comparison-table .stat-5 {
	background-color: rgba(244, 67, 54, 0.2);
}

.comparison-table .stat-6 {
	background-color: rgba(244, 67, 54, 0.25);
}

.comparison-table .stat-7 {
	background-color: rgba(244, 67, 54, 0.3);
}

/* Worst */
.comparison-table .tank-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	padding: 1rem;
	position: relative;
}

.comparison-table .tank-header img {
	width: 100px;
	height: 75px;
	object-fit: contain;
	transition: transform 0.2s ease;
}

.comparison-table .tank-header:hover img {
	transform: scale(1.05);
}

.comparison-table .tank-header .tank-name {
	font-weight: 600;
	text-align: center;
	font-size: 1rem;
}

.comparison-table .tank-header .tank-meta {
	display: flex;
	gap: 0.75rem;
	font-size: 0.75rem;
	color: var(--text-secondary);
	flex-wrap: wrap;
	justify-content: center;
}

.comparison-table .remove-tank {
	background: none;
	border: none;
	color: var(--text-secondary);
	cursor: pointer;
	padding: 0.25rem;
	position: absolute;
	top: 0.25rem;
	right: 0.25rem;
	opacity: 0.7;
	transition: opacity 0.2s ease;
}

.comparison-table .remove-tank:hover {
	color: var(--accent-color);
	opacity: 1;
}
