/* 1. Global Reset & Body */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #0d1117;
  color: #c9d1d9;
  margin: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

#container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

#header_section {
  text-align: center;
  margin-bottom: 20px;
  width: 100%;
}

h1 {
  font-size: 2rem;
  color: #f0f6fc;
  margin-bottom: 5px;
}

#latest_date {
  font-size: 0.9rem;
  color: #8b949e;
}

.selector-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  width: 100%;
}

select {
  width: 100%;
  max-width: 400px;
  padding: 12px;
  font-size: 1rem;
  background-color: #161b22;
  color: white;
  border: 2px solid #30363d;
  border-radius: 8px;
  cursor: pointer;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
}

.grid-card {
  background: #161b22;
  border: 2px solid #30363d;
  border-radius: 12px;
  padding: 20px;
  height: 350px; /* Fixed height for consistent grid */
  display: flex;
  flex-direction: column;
}

/* Thematic Border Colors */
.image-placeholder { border-color: #2ea043; } /* Status - Green */
#moves-container     { border-color: #58a6ff; } /* Added - Blue */
#abilities-container { border-color: #f0883e; } /* Removed - Orange */
#items-container     { border-color: #f2cc60; } /* Kept - Yellow */

h3 {
  margin-top: 0;
  border-bottom: 1px solid #30363d;
  padding-bottom: 10px;
  font-size: 1.1rem;
  color: #f0f6fc;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #21262d;
  font-size: 1rem;
}

.stat-percent {
  font-weight: bold;
  color: #58a6ff;
}

/* Scrollbar Styling */
.scroll-body {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: #30363d transparent;
}

.scroll-body::-webkit-scrollbar { width: 6px; }
.scroll-body::-webkit-scrollbar-track { background: transparent; }
.scroll-body::-webkit-scrollbar-thumb {
  background-color: #30363d;
  border-radius: 20px;
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: 1fr; }
  .grid-card { height: 300px; }
}



/* 1. Adjust the Grid to 3 Columns */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 equal columns */
  gap: 20px;
  width: 100%;
}

/* 2. Status Card - Placed under the dropdown, spanning the full width */
.status-card {
  background: #161b22;
  border: 2px solid #2ea043; /* Kept your Green border color */
  border-radius: 12px;
  padding: 15px 20px;
  margin-bottom: 20px; /* Space between status and the 3-column grid */
  width: 100%;
  box-sizing: border-box;
}

/* 3. Ensure the move cards have a fixed height for the 3-column look */
.grid-card {
  background: #161b22;
  border: 2px solid #30363d;
  border-radius: 12px;
  padding: 20px;
  height: 450px; /* Increased height since they are narrower now */
  display: flex;
  flex-direction: column;
}

/* Individual card colors */
#moves-container     { border-color: #58a6ff; } 
#abilities-container { border-color: #f0883e; } 
#items-container     { border-color: #f2cc60; } 

/* 4. Mobile Responsiveness - Stack them on small screens */
@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: 1fr; /* 1 column on tablets/phones */
  }
}
