@font-face {
  font-family: 'Pokemon DP Pro';
  src: url('FONTS/pokemon-dp-pro.woff2') format('woff2'),
       url('FONTS/pokemon-dp-pro.otf.woff') format('woff'),
       url('fonts/pokemon_dp_pro.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body {
  margin: 0;
  padding: 0;
  background-image: url(TEAM/bg.png);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  image-rendering: pixelated;
  font-family: 'Pokemon DP Pro', sans-serif;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-screen {
  width: 500px;
  max-height: 100vh;
  background: #a0c8a0;
  border: 4px solid #406848;
  padding: 10px;
  box-shadow: 0 0 0 4px #5c8c5c;
  position: relative;
  overflow-y: auto;
}

.pokemon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

/* === Updated Pokémon Slot === */
.pokemon-slot {
  display: flex;
  background: #207020;                  /* Dark green base */
  border: 2px solid #104010;           /* Darker border */
  border-radius: 4px;                   /* Slight rounding */
  color: white;
  padding: 4px;
  height: 64px;
  font-size: 12px;
  box-shadow:
    inset -2px -2px 0 #103010,          /* top-left highlight */
    inset 2px 2px 3px #305030;          /* bottom-right shadow */
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.pokemon-slot:hover {
  background: #2b8b2b;
  border: solid 5px #d60000;
  box-shadow:
    inset -2px -2px 0 #204020,
    inset 2px 2px 3px #407040;
}

/* Sprite Image */
.sprite {
  width: 70px;
  height: 70px;
  margin-right: 6px;                   /* Slightly bigger spacing */
  image-rendering: pixelated;          /* crisp pixel look */
}

/* Info Container */
.info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 10px;                     /* slightly smaller font */
}

/* Pokémon Name and gender */
.name {
  display: flex;
  align-items: center;
  font-weight: bold;
  font-size: 10px;
  letter-spacing: 0.03em;
  text-shadow:
    1px 1px 0 #103010;                /* subtle dark outline for clarity */
}

.name .ball-icon {
  width: 20px;
  height: 20px;
  margin-right: 4px;
  image-rendering: pixelated;
}

.gender {
  margin-left: 4px;
  font-size: 11px;
}

.female {
  color: #ff70b0;
  text-shadow: 1px 1px 1px #700040;
}

.male {
  color: #60a0ff;
  text-shadow: 1px 1px 1px #204080;
}

/* Status icon */
.status-icon {
  width: 12px;
  height: 12px;
  margin-left: 4px;
  image-rendering: pixelated;
}

/* HP Bar Container */
.hp-bar {
  background: #444;
  height: 6px;
  width: 100%;
  border: 1px solid #222;
  margin: 2px 0;
  position: relative;
  border-radius: 2px;
  box-shadow: inset 1px 1px 1px #666;
}

/* HP Bar Fill */
.hp-fill {
  height: 100%;
  width: 100%; /* dynamically updated */
  background: linear-gradient(to right, #60c060, #207020);
  border-radius: 2px;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.2);
}

/* Stats (level, etc.) */
.stats {
  font-size: 9px;
  display: flex;
  justify-content: space-between;
  letter-spacing: 0.05em;
  text-shadow: 1px 1px 0 #103010;
}

/* Choose Text */
.choose-text {
  font-size: 14px;
  background: #fff;
  padding: 4px;
  border: 2px solid #888;
  margin-top: 8px;
  text-align: left;
  height: 28px;
  box-shadow: inset 2px 2px #ccc;
}

/* Cancel Button Container */
.cancel-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
}

/* === Updated Cancel Button === */
.cancel-btn a {
  display: inline-block;
  text-decoration: none;
  color: white;
  font-weight: 600;
  font-size: 14px;
  background: linear-gradient(to bottom, #5172d6 0%, #3d59b5 100%);
  padding: 4px 12px;
  border: 2px solid #1f3a7a;
  border-radius: 6px;
  box-shadow: inset -2px -2px 3px rgba(83, 114, 214, 0.7),
              inset 2px 2px 3px rgba(23, 41, 92, 0.8);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.cancel-btn a:hover {
  background: linear-gradient(to bottom, #6485e3 0%, #4a6ac3 100%);
  box-shadow: inset -1px -1px 4px rgba(110, 142, 242, 0.8),
              inset 1px 1px 4px rgba(36, 61, 110, 0.9);
}

.cancel-btn a:active {
  box-shadow: inset 2px 2px 5px rgba(23, 41, 92, 0.9),
              inset -2px -2px 5px rgba(83, 114, 214, 0.9);
}
.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 320px;
  transform: translate(-50%, -50%);
  background-color: #c8d0d8; /* DS-style bluish-gray */
  border: 4px solid #103070; /* outer dark blue border */
  box-shadow: 0 0 0 2px #000000, 0 0 12px #000 inset;
  font-family: 'Pokemon DP Pro', sans-serif;
  font-size: 14px;
  z-index: 1000;
  image-rendering: pixelated;
  border-radius: 4px;
  background-image: 
    linear-gradient(to right, rgba(0,0,0,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.05) 1px, transparent 1px);
  background-size: 8px 8px;
}

.popup-box {
  padding: 8px 10px;
}

.popup-header {
  font-size: 16px;
  font-weight: bold;
  background-color: #305090;
  color: white;
  padding: 4px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 2px inset #203060;
  margin-bottom: 6px;
  border-radius: 2px;
}

.popup-body {
  display: flex;
  align-items: flex-start;
}

.popup-sprite {
  width: 80px;
  height: 80px;
  image-rendering: pixelated;
  margin-right: 10px;
}

.popup-info {
  flex: 1;
}

.popup-hp-bar {
  height: 10px;
  background: #b0b0b0;
  border: 1px solid #505050;
  margin: 4px 0;
  border-radius: 2px;
  overflow: hidden;
}

#popup-hp-fill {
  height: 100%;
  transition: width 0.3s;
  background: linear-gradient(
    to right,
    #28d030 0%,
    #30e030 25%,
    #48ff48 50%,
    #30e030 75%,
    #28d030 100%
  );
  border-radius: 0 2px 2px 0;
}

.popup-close {
  margin-top: 10px;
  text-align: center;
  background: #203050;
  color: white;
  border: 2px outset #4060a0;
  padding: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 12px;
  border-radius: 2px;
}

.stat-table {
  font-size: 13px;
  margin-top: 6px;
  width: 100%;
  border-collapse: collapse;
}

.stat-table td {
  padding: 2px 4px;
  border-bottom: 1px dotted #708090;
  color: #202020;
}

.stat-table td:first-child {
  font-weight: bold;
  text-align: left;
  width: 60%;
}

.stat-table td:last-child {
  text-align: right;
}

.gender-type-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.type-icon {
  width: 32px;
  height: 14px;
  image-rendering: pixelated;
}
.hidden {
  display: none;
}