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

body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 40px;
}

header h1 {
  font-size: 2em;
  margin-bottom: 10px;
}

header p {
  font-size: 1.2em;
  color: #555;
}

main {
  max-width: 900px;
  margin: 0 auto;
}

section {
  background-color: #fff;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h2 {
  margin-bottom: 10px;
  color: #B69FD5;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

th, td {
  padding: 8px 12px;
  border: 1px solid #ddd;
  text-align: center;
}

/* Table header purple */
table#planet-table th {
  background-color: #B69FD5 !important;
  color: white !important;
  position: relative;
  user-select: none;
}

tr:nth-child(even) {
  background-color: #f9f9f9;
}

th.sortable {
  cursor: pointer;
  text-decoration: underline;
}

.sort-icons {
  margin-left: 5px;
  font-size: 0.8em;
  color: white;
}

/* Active sort arrow */
.sort-icons.active {
  color: #B69FD5 !important;
  font-weight: bold;
}

footer {
  text-align: center;
  margin-top: 40px;
  font-size: 0.9em;
  color: #777;
}

/* Planet name styling */
.planet-name {
  cursor: pointer;
}

.planet-name.selected {
  background-color: #B69FD5;
  color: white;
  padding: 2px 4px;
  border-radius: 4px;
}

/* Tooltip styling */
.tooltip {
  display: none;
  position: absolute;
  background-color: #fff;
  border: 1px solid #B69FD5;
  padding: 10px;
  max-width: 250px;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  z-index: 1000;
}

.tooltip img {
  max-width: 100%;
  height: auto;
  margin-bottom: 5px;
}

.tooltip-text {
  max-height: 150px;
  overflow-y: auto;
}