/* ====================
   Base Layout
==================== */
body {
  font-family: 'Dosis', sans-serif;
  background-color: #181818;
  color: #fff;
  margin: 0;
  padding: 0;
}

h1 {
  text-align: center;
}

/* ====================
   Header & Navigation
==================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: #111;
}

.logo img {
  width: 80px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  padding-left: 0;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

/* ====================
   Card Grid & Cards
==================== */
.cards-grid {
  display: flex;
  height: calc(100vh - 80px);
}

.card {
  flex: 1;
  background-color: #222;
  padding: 20px;
  overflow-y: auto;
  border-right: 1px solid #333;
  display: flex;
  flex-direction: column;
  align-items: center; /* Center all child content */
}

.card:last-child {
  border-right: none;
}

/* ====================
   Experience Gauge Layers
==================== */
.circle-container {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto 20px;
}

.background-image,
.foreground-image,
.overlay-mask,
.overlay-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
  border-radius: 50%;
  mask-size: cover;
  -webkit-mask-size: cover;
}

.background-image {
  background-image: url("/images/CircularProgress002White.png");
  z-index: 1;
}

.overlay-preview {
  background: conic-gradient(
    transparent 0deg,
    transparent var(--preview-progress),
    black var(--preview-progress),
    black 360deg
  );
  mask-image: url("/images/CircularProgress002White.png");
  -webkit-mask-image: url("/images/CircularProgress002White.png");
  z-index: 3;
  transform: rotate(180deg);
  pointer-events: none;
}

.foreground-image {
  background-image: url("/images/SciFi_Circle02Blue_02.png");
  z-index: 4;
}

/* ====================
   Experience Text
==================== */
.current-experience {
  height: 1.5em;
  line-height: 1.5em;
  text-align: center;
  font-size: 1.2em;
  margin: 10px 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.current-experience.show {
  opacity: 1;
}

/* ====================
   Table Styling
==================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

td {
  border: 1px solid #444;
  padding: 8px;
  text-align: center;
}

tr.exp-row:hover {
  background-color: #333;
  cursor: pointer;
}

/* ====================
   Scrollable Table Wrapper
==================== */
.table-scroll {
  display: block;
  max-height: 45.5%;
  overflow-y: auto;
  margin: 0;
  padding: 0;
}

.table-scroll table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 0;
  padding: 0;
}

/* ====================
   Scrollbar Styling
==================== */
.table-scroll::-webkit-scrollbar {
  width: 8px;
}

.table-scroll::-webkit-scrollbar-thumb {
  background-color: #444;
  border-radius: 4px;
}

.card-content {
  display: flex;
  flex-direction: column;
  align-items: center; /* Center horizontally inside the card */
  gap: 20px;
  margin-top: 20px;
  width: 100%;
}

.experience-section {
  display: flex;
  flex-direction: column;
  align-items: center; /* Gauge and XP number centered within section */
}

.experience-text {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.experience-table-wrapper{
  max-height: 100%;
  overflow-x: auto;
  margin: 0;
  padding: 0;
}

.experience-table-wrapper table {
  width: 100%;
  margin: 0;
  padding: 0;
}

.experience-table-wrapper td {
  padding: 6px 10px;
  font-size: 14px;
  text-align: left;
}

.win {
  color: limegreen;
  font-weight: bold;
}

.loss {
  color: red;
  font-weight: bold;
}

/* ====================
   Light Mode Theme
==================== */
#themeToggle {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 20px;
  cursor: pointer;
}

body.light-mode {
  background-color: #f5f5f5;
  color: #000;
}

body.light-mode header {
  background-color: #e0e0e0;
}

body.light-mode nav ul li a {
  color: #000;
}

body.light-mode .card {
  background-color: #fff;
  border-right: 1px solid #ccc;
}

body.light-mode .card:last-child {
  border-right: none;
}

body.light-mode td {
  border: 1px solid #bbb;
}

body.light-mode tr.exp-row:hover {
  background-color: #ddd;
}

body.light-mode .table-scroll::-webkit-scrollbar-thumb {
  background-color: #aaa;
}

/* Light mode adjustments for experience UI */
body.light-mode .current-experience {
  color: #333;
}

body.light-mode .win {
  color: #2e7d32; /* dark limegreen */
}

body.light-mode .loss {
  color: #b71c1c; /* darker red */
}

body.light-mode .overlay-preview {
  background: conic-gradient(
    transparent 0deg,
    transparent var(--preview-progress),
    white var(--preview-progress),
    white 360deg
  );
}

body.light-mode .background-image {
  filter: invert(1);
}
