/* Load your custom MinecraftTen font */
@font-face {
  font-family: "MinecraftTen";
  src: url("fonts/MinecraftTen.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

/* Global styling */
* {
  box-sizing: border-box;
  font-family: "MinecraftTen", sans-serif;
  text-transform: none;
  font-weight: normal;
}

body {
  margin: 0;
  background: #0b0c10;
  color: #f5f5f5;
}

/* Layout */
.app {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 16px 40px;
}

h1 {
  text-align: center;
  margin-bottom: 24px;
  font-size: 32px;
}

.card {
  background: #15171f;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 22px;
}

/* Form elements */
label {
  display: block;
  margin-bottom: 12px;
  font-size: 16px;
}

input,
select {
  width: 100%;
  padding: 8px 10px;
  margin-top: 4px;
  border-radius: 6px;
  border: 1px solid #33384a;
  background: #0f1118;
  color: #f5f5f5;
  font-size: 16px;
}

input:focus,
select:focus {
  outline: none;
  border-color: #4fd1c5;
}

/* Button */
button {
  margin-top: 10px;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  background: #4fd1c5;
  color: #0b0c10;
  cursor: pointer;
  font-size: 16px;
}

button:hover {
  background: #38b2ac;
}

/* Results grid */
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.result-item {
  background: #10121a;
  border-radius: 8px;
  padding: 10px 12px;
}

.result-item h3 {
  margin: 0 0 4px;
  font-size: 14px;
  color: #a0aec0;
}

.result-item p {
  margin: 0;
  font-size: 16px;
}

.small {
  font-size: 12px;
  color: #a0aec0;
  margin-top: 8px;
}

/* ⭐ TAB SYSTEM */
.tabs {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  justify-content: center;
}

.tab-btn {
  padding: 10px 18px;
  background: #1f2330;
  border: 1px solid #333;
  color: white;
  cursor: pointer;
  border-radius: 6px;
  transition: 0.2s;
  font-size: 16px;
}

.tab-btn:hover {
  background: #2a2f3f;
}

.tab-btn.active {
  background: #4fd1c5;
  color: black;
  font-weight: bold;
}

/* ⭐ OVERVIEW GRID */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 10px;
}

/* ⭐ OVERVIEW CARDS */
.overview-card {
  background: #15171f;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

.overview-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #4fd1c5;
}

.overview-stats {
  font-size: 14px;
  line-height: 1.4;
  color: #d0d0d0;
}

/* ⭐ MINI PROGRESS BAR */
.mini-progress {
  margin-top: 10px;
  height: 8px;
  background: #1a1c24;
  border-radius: 4px;
  overflow: hidden;
}

.mini-progress-fill {
  height: 100%;
  background: #4fd1c5;
  width: 0%;
  transition: width 0.4s ease;
}

.mini-progress {
  position: relative;
  height: 14px;
  background: #1a1c24;
  border-radius: 6px;
  margin-top: 6px;
  overflow: hidden;
}

.mini-progress-fill {
  height: 100%;
  background: #4fd1c5;
  border-radius: 6px;
}

.mini-progress-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: white;
  pointer-events: none;
}

.mini-progress-label {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  opacity: 0.9;
}

.progress-bar {
  height: 8px;
  width: 0%;
  background: linear-gradient(90deg, #ffcc00, #ff9900);
  border-radius: 4px;
  transition: width 0.8s ease-in-out;
}

.progress-container {
  width: 100%;
  background: #222;
  border-radius: 4px;
  overflow: hidden;
  height: 8px;
  margin-top: 6px;
}

.overview-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.overview-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.45);
}

.home-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-link {
  display: block;
  padding: 12px;
  background: #1f2330;
  border-radius: 8px;
  text-align: center;
  color: #4fd1c5;
  font-size: 18px;
  text-decoration: none;
  transition: 0.2s;
}

.home-link:hover {
  background: #2a2f3f;
}

.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.main-nav {
  display: flex;
  gap: 12px;
}

.nav-link {
  color: #f5f5f5;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  background: #1f2330;
  font-size: 14px;
}

.nav-link:hover {
  background: #2a2f3f;
}

.nav-link.active {
  background: #4fd1c5;
  color: #0b0c10;
}

.site-footer {
  text-align: center;
  opacity: 0.6;
  font-size: 12px;
  margin: 40px 0 20px;
  line-height: 1.6;
  color: #d0d0d0;
}

.footer-sub {
  font-size: 11px;
  opacity: 0.5;
  margin-top: 4px;
}

.site-logo {
  height: 3.6em; /* 1.2em × 3 */
  width: auto;
  opacity: 0.9;
}




.site-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

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

.lb-table th, .lb-table td {
  padding: 8px;
  border-bottom: 1px solid #2a2d36;
  text-align: left;
}

/* Dropdown Cards */
.dropdown-card {
  border: 1px solid #2a2d36;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  background: #1e2230;
}

.dropdown-header {
  padding: 14px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  background: #242837;
  transition: background 0.15s;
}

.dropdown-header:hover {
  background: #2b3042;
}

.dropdown-content {
  display: none;
  padding: 14px;
  border-top: 1px solid #2a2d36;
}

.dropdown-card.active .dropdown-content {
  display: block;
}

.lb-table tr:hover {
  background: #1f2330;
}
.grid-3col {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 16px;
  padding-left: 0;
  list-style: none;
}

.grid-3col li {
  background: #1f2330;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #2a2d36;
}

/* Clean Wide Player Card */
.player-card-wide {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: center;
  background: #1a1c24;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #2a2d36;
}

.pc-left {
  flex: 0 0 350px;
}

.pc-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pc-stat {
  font-size: 18px;
  color: #d0d0d0;
}

.autocomplete-list {
  position: absolute;
  background: #1a1a1a;
  border: 1px solid #333;
  width: 250px;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 20;
}

.autocomplete-item {
  padding: 8px;
  cursor: pointer;
}

.autocomplete-item:hover {
  background: #333;
}

.skin-fallback {
  width: 350px;
  height: 450px;
  background: #222;
  border: 1px solid #444;
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gm-icon {
  width: 32px;
  height: 32px;
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 6px;
}

.sort-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.sort-row select {
  padding: 6px 10px;
  border-radius: 6px;
  background: #1a1a1a;
  color: white;
  border: 1px solid #333;
}

.stats-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.hide-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-dir {
  padding: 5px 10px;
  background: #1a1a1a;
  border: 1px solid #333;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

.highlights-card {
  margin-top: 15px;
}

.highlights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
  margin-top: 10px;
}

.highlights-grid div {
  font-size: 14px;
  opacity: 0.9;
}

.global-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 15px;
  margin-top: 10px;
}

.pc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.share-btn {
  background: #1a1c24;
  border: 1px solid #4fd1c5;
  color: #4fd1c5;
  padding: 6px 12px;
  font-size: 12px;
  margin-top: 0; /* Override your global button margin */
  transition: 0.2s;
}

.share-btn:hover {
  background: #4fd1c5;
  color: #0b0c10;
}

.session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

#startSessionBtn {
  margin-top: 0;
  font-size: 12px;
  padding: 6px 12px;
}

#sessionCard {
  border: 1px solid #ffcc00; /* Give it a "Gold" border to show it's a special feature */
}

/* Layout for the header */
.session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.session-controls {
  display: flex;
  gap: 10px;
}

/* Base style for both buttons (ensures same size) */
.session-btn {
  padding: 8px 16px; /* Controls the height and width */
  font-size: 14px;
  margin: 0;         /* Removes default top-margins from your global button styles */
  cursor: pointer;
  border-radius: 6px;
  border: none;
  font-family: "MinecraftTen", sans-serif;
  transition: opacity 0.2s;
}

.session-btn:hover {
  opacity: 0.9;
}

/* Specific colors for "Start Session" (matches your theme) */
#startSessionBtn {
  background: #4fd1c5;
  color: #0b0c10;
}

/* Specific colors for "Reset" */
.session-btn.reset {
  background: #e53e3e;
  color: white;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85); /* Dims the rest of the site */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

/* Modal Box */
.modal-content {
  max-width: 500px;
  width: 100%;
  animation: modalSlideUp 0.3s ease-out;
  border: 2px solid #4fd1c5;
}

@keyframes modalSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

#closeSummaryBtn {
  background: #4fd1c5;
  color: #0b0c10;
  padding: 10px 25px;
  font-weight: bold;
}

.auto-refresh-container {
  margin-top: 20px;
  display: flex;
  justify-content: center; /* Centers the whole group */
  width: 100%;
}

.refresh-label {
  display: flex;
  align-items: center; /* Vertically aligns checkbox with text */
  gap: 10px;           /* Space between checkbox and text */
  cursor: pointer;
  padding: 5px 10px;
  transition: opacity 0.2s;
}

.refresh-label:hover {
  opacity: 0.8;
}

#autoRefreshToggle {
  width: 18px;  /* Makes the checkbox a bit bigger */
  height: 18px;
  cursor: pointer;
  accent-color: #4fd1c5; /* Colors the checkbox to match your theme */
}

.refresh-text {
  font-family: "MinecraftTen", sans-serif; /* Keeps the theme consistent */
  font-size: 14px;
  color: #a0aec0; /* Slightly dimmed so it doesn't distract from stats */
}

/* ============================
   ⭐ CHART LAYOUT (FINAL CLEAN VERSION)
   ============================ */

.charts-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.chart-container {
  width: 320px;          /* perfect circle size */
  height: 360px;         /* extra height for title */
  display: flex;
  flex-direction: column; /* title on top, chart below */
  align-items: center;
  justify-content: flex-start; /* NO vertical centering */
  padding: 10px 0;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 12px;
}

.chart-container h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: #4fd1c5;
  text-align: center;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 300px;
  max-height: 300px;
}

.theme-dark { background: #1a1a2e; color: #fff; }
.theme-neon { background: #000; color: #0ff; }
.theme-pastel { background: #f9e0f0; color: #333; }
.theme-gradient { background: linear-gradient(45deg, #4fd1c5, #63b3ed); }

.border-rounded { border-radius: 12px; }
.border-glowing { box-shadow: 0 0 10px var(--accent-color); }
.border-pixelated { image-rendering: pixelated; border: 4px solid var(--accent-color); }
