/*style*/
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background: linear-gradient(135deg, #a67eea 0%, #764ba2 100%);
	min-height: 100vh;
	padding: 20px;
}

body.dark-mode {
	background: linear-gradient(135deg, #1a1a2e 0%, #26213e 100%);
}

body.dark-mode .engine-name {
	color: #e8e8e8;
}

body.dark-mode .elo-rating {
	color: #ff6b6b;
}

body.dark-mode .top-10 {
	background: linear-gradient(90deg, #2d4059 0%, #0f3460 100%);
}


.theme-toggle {
	position: fixed;
	top: 20px;
	right: 20px;
	background: #667eea;
	color: white;
	border: none;
	padding: 10px 20px;
	border-radius: 20px;
	cursor: pointer;
	font-size: 14px;
	transition: all 0.3s;
	z-index: 1000;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.theme-toggle:hover {
	background: #764ba2;
	transform: scale(1.05);
}

body.dark-mode .theme-toggle {
	background: #e94560;
}

body.dark-mode .theme-toggle:hover {
	background: #ff6b6b;
}

body.dark-mode .rankings-section {
	background: #3f346f;
	color: #e8e8e8;
}

body.dark-mode h1 {
	color: #e8e8e8;
}

body.dark-mode thead {
	background: linear-gradient(135deg, #e94560 0%, #0f3460 100%);
}

body.dark-mode td {
	border-bottom: 1px solid #333;
}



.container {
	max-width: 1200px;
	margin: 0 auto;
}

.rankings-section {
	background: white;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	padding: 30px;
}

h1 {
	text-align: center;
	color: #333;
	margin-bottom: 30px;
	font-size: 2em;
}

.table-wrapper {
	overflow-x: auto;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 20px;
}

thead {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
}

th {
	padding: 15px 10px;
	text-align: left;
	font-weight: 600;
	cursor: pointer;
	user-select: none;
	position: relative;
	transition: background 0.3s;
}

th:first-child,
th:nth-child(3),
th:nth-child(4),
th:nth-child(5),
th:nth-child(6),
th:nth-child(7),
th:nth-child(8),
th:nth-child(9) {
	text-align: right;
}

th:nth-child(2) {
	text-align: center;
}

th:hover {
	background: rgba(255, 255, 255, 0.1);
}

th.sortable::after {
	content: ' ⇅';
	opacity: 0.5;
	font-size: 0.8em;
}

th.sorted-asc::after {
	content: ' ▲';
	opacity: 1;
}

th.sorted-desc::after {
	content: ' ▼';
	opacity: 1;
}

td {
	padding: 6px 5px;
	border-bottom: 1px solid #eee;
	text-align: left;
}

td:first-child,
td:nth-child(3),
td:nth-child(4),
td:nth-child(5),
td:nth-child(6),
td:nth-child(7),
td:nth-child(8),
td:nth-child(9) {
	text-align: right;
	padding-right: 15px;
}

tbody tr {
	transition: all 0.3s;
}

tbody tr:hover {
	background: #f5f5f5;
	transform: scale(1.01);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.elo-rating {
	font-weight: bold;
	color: #764ba2;
	font-size: 1.1em;
}

.top-10 {
	background: linear-gradient(90deg, #ffd700 0%, #ffffff 100%);
}

body.dark-mode tbody tr:hover {
	background: #1a1a2e;
}

body.dark-mode .rank {
	color: #e94560;
}

.rank {
	font-weight: bold;
	color: #667eea;
}

.engine-name {
	font-weight: 600;
	color: #333;
}

.top-10 .rank {
	font-size: 1.2em;
}

@media (max-width: 768px) {
	.rankings-section {
		padding: 15px;
	}

	h1 {
		font-size: 1.5em;
	}

	th, td {
		padding: 8px 5px;
		font-size: 0.9em;
	}

	.theme-toggle {
		top: 10px;
		right: 10px;
		padding: 8px 15px;
		font-size: 12px;
	}
}

/* Tooltip container FOR HEADER OF FULL ELO LIST */
.tc-legend {
	background-color: #1e2a47; 
	border: 1px solid #3d4b7a;
	border-radius: 8px;
	padding: 15px;
	margin: 20px auto;
	max-width: 95%;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	color: #ffffff;
	box-shadow: 0px 4px 10px rgba(0,0,0,0.3);
}

.legend-title {
	font-size: 16px;
	font-weight: bold;
	margin-bottom: 10px;
	color: #ffcc00; 
	border-bottom: 1px solid #3d4b7a;
	padding-bottom: 5px;
}

.legend-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 10px;
}

.legend-item {
	font-size: 13px;
	line-height: 1.6;
}

.legend-tag {
	background-color: #2c3e6d;
	padding: 2px 6px;
	border-radius: 4px;
	font-weight: bold;
	color: #00d4ff;
	margin-right: 5px;
}
.baseline-info-box {
	margin: 20px 0;
	padding: 18px;
	border-left: 5px solid #e94560; 
	background: rgba(233, 69, 96, 0.05);
	border-radius: 4px;
	font-family: 'Segoe UI', Tahoma, sans-serif;
}

body.dark-mode .baseline-info-box {
	background: rgba(255, 255, 255, 0.03);
	border-left-color: #ff6b6b;
	border-top: 1px solid #16213e;
	border-right: 1px solid #16213e;
	border-bottom: 1px solid #16213e;
}

.baseline-header {
	font-weight: bold;
	font-size: 1.1rem;
	color: #e94560;
	margin-bottom: 8px;
	display: flex;
	align-items: center;
}

body.dark-mode .baseline-header {
	color: #ff6b6b;
}

.baseline-text {
	font-size: 0.95rem;
	line-height: 1.1;
	color: inherit;
}

.baseline-highlight {
	font-weight: bold;
	text-decoration: underline;
}

.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 2px dotted #ffff; 
  cursor: help;
  color: #2196F3; 
}

.tooltip .tooltiptext {
  border-radius: 6px;
  border-left: 3px solid #2196F3;
  background-color: #333;
  background-color: #1a1a1a;
  box-shadow: 0px 5px 15px rgba(0,0,0,0.3);
  box-shadow: 0px 8px 20px rgba(0,0,0,0.5);
  visibility: hidden;
  width: 450px;
  color: #fff;
  text-align: left;
  padding: 15px;
  position: absolute;
  z-index: 1;
  top: 125%; 
  left: 50%;
  margin-left: -225px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 14px;
  line-height: 1.5;
  font-family: sans-serif;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

th.tooltip {
  display: table-cell; 
  position: relative;
}

.tt-blue {
  color: #2196F3;
  font-weight: bold;
  text-transform: uppercase;
}

.tt-orange {
  color: #ff9800;
  background: #333;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 0.9em;
}

.info-icon {
  font-size: 0.5em; 
  vertical-align: middle; 
  color: #2196F3;
  margin-left: 5px;
  cursor: help;
}

