/* ROOT VARIABLES*/
:root {
  --bg-color: #fff6f6;       /* Body background color */
  --card-bg: #ede7f6;        /* Card background color */
  --accent-purple: #d5c6f3;  /* Accent color for tabs/buttons */
  --text-color: #333;        /* Default text color */
  --rarity-3: #90d8e9;       /* 3★ pull color */
  --rarity-4: #d1c4e9;       /* 4★ pull color */
  --rarity-5: #e6ce9d;       /* 5★ pull color */
  --rarity-5-dark: #ddbb7a;  /* Highlighted 5★ color */
}

/* BODY & CONTAINER */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  display: flex;
  justify-content: center;
  padding: 40px 20px; 
}

.container {
  width: 100%;
  max-width: 800px;
}

/* HEADER AND TABS*/
header {
  text-align: center;
  margin-bottom: 30px;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 10px; 
}

.tab {
  padding: 10px 30px;
  border: none;
  border-radius: 10px;
  background: var(--accent-purple);
  cursor: pointer;
  font-weight: bold;
  opacity: 0.6; 
}

.tab.active {
  opacity: 1; 
}

/* DASHBOARD GRID*/
.dashboard {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
}

h3 {
  font-size: 0.9rem;
  margin-bottom: 10px;
  margin-top: 0;
}

/* CARDS*/
.stats-card,
.history-card,
.add-pull-card {
  background: transparent;
}

.card-content,
.history-list,
.add-pull-card {
  background: var(--card-bg);
  border-radius: 15px;
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* HISTORY LIST */
.history-list {
  height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pull-item {
  padding: 12px;
  border-radius: 10px;
  font-weight: bold;
  font-size: 0.9rem;
}

/* ADD PULL CARD */
.add-pull-card {
  grid-column: span 2;
}

.character-add-pull-box {
  background: #d5c6f3;
  height: 100px;
  margin: 10px 0 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #333;
  font-weight: bold;
  border-radius: 10px;
}

/* RARITY COLORS */
.blue {
  background-color: var(--rarity-3);
}

.purple {
  background-color: var(--rarity-4);
}

.gold {
  background-color: var(--rarity-5);
}

.active-gold {
  background-color: var(--rarity-5-dark);
  border: 2px solid #b5955a;
}

/* Win/Loss button style */
.outcome-btn {
  background-color: var(--rarity-5); 
}

/* MODALS */
.modal {
  display: none;
  position: fixed;
  inset: 0; 
  background: rgba(0, 0, 0, 0.4); 
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #e6d9ff;
  width: 600px;
  max-height: 80vh;
  border-radius: 15px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow-y: auto;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  border: none;
  background: #c9b6ff;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
}

/* Search input in modal */
.search-input {
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: #d8c7ff;
}

/* Grid for selecting characters/weapons */
.character-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.character-card {
  background: #d8c7ff;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
}

.character-card img {
  width: 80px;
}

.character-card.selected {
  border: 2px;
  background: #c9b6ff;
}

.character-card:hover {
  transform: scale(1.05); 
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Modal variant for centered smaller content */
.modal-content.center {
  width: 400px;
  text-align: center;
}

/* RARITY GRID BUTTONS */
.rarity-grid {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.rarity-grid button {
  padding: 20px 30px;
  border-radius: 12px;
  border: none;
  font-weight: bold;
  cursor: pointer;
}