/* --- ÚJ: DRAFT KÉPERNYŐ (FOLYÉKONY & RESPONSIVE DESIGN) --- */
#draft-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-in-out;
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  box-sizing: border-box;
  padding: 10px;
  overflow: hidden;
}
.draft-box {
  background:
    radial-gradient(circle at top left, rgba(60, 60, 80, 0.3), transparent), rgba(10, 10, 20, 0.4);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 2px solid rgba(197, 160, 89, 0.6);
  border-left: 2px solid rgba(197, 160, 89, 0.4);
  border-radius: 24px;
  padding: clamp(15px, 2.5vw, 30px);
  width: 98%;
  max-width: 1550px;
  max-height: 96vh;
  overflow-y: auto;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 1),
    inset 0 0 30px rgba(57, 162, 219, 0.05);
  text-align: center;
  box-sizing: border-box;
  margin: auto;
  display: flex;
  flex-direction: column;
}
.draft-box::-webkit-scrollbar {
  width: 6px;
}
.draft-box::-webkit-scrollbar-track {
  background: transparent;
}
.draft-box::-webkit-scrollbar-thumb {
  background: rgba(197, 160, 89, 0.3);
  border-radius: 10px;
}
.draft-box::-webkit-scrollbar-thumb:hover {
  background: rgba(197, 160, 89, 0.6);
}
.draft-box h2 {
  color: #f1c40f;
  margin-top: 0;
  margin-bottom: 8px;
  text-shadow: 0 0 10px rgba(241, 196, 15, 0.4);
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
}
.draft-box p {
  font-size: clamp(0.8rem, 1.3vw, 0.95rem);
  margin-bottom: 15px;
}
.draft-team-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: nowrap; /* Mindig szigorúan egy sorban vannak a kártyák */
  gap: clamp(6px, 1.2vw, 20px); /* Kisebb responsive köz a szűk helyért */
  margin: 15px auto;
  min-height: auto;
  padding: 10px;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
}
.draft-card.card {
  display: flex !important;
  flex-direction: column !important;
  width: clamp(140px, 18vw, 255px) !important; /* Dinamikusan nagyon kicsire is tud zsugorodni */
  flex-shrink: 1 !important; /* Engedélyezett a rugalmas zsugorodás */
  min-height: auto !important;
  padding: 10px !important;
  margin: 0 !important;
  cursor: grab;

  /* Gorgeous glassmorphic card design */
  background:
    radial-gradient(circle at top left, rgba(60, 60, 80, 0.3), transparent), rgba(10, 10, 20, 0.4) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-top: 2px solid rgba(197, 160, 89, 0.6) !important;
  border-left: 2px solid rgba(197, 160, 89, 0.4) !important;
  border-radius: 20px !important;
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.6),
    inset 0 0 20px rgba(0, 0, 0, 0.3) !important;
  overflow: visible !important;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease !important;
}
.draft-card.card:active {
  cursor: grabbing;
  transform: scale(1.03) !important;
  box-shadow:
    0 15px 35px rgba(233, 69, 96, 0.6),
    inset 0 0 20px rgba(233, 69, 96, 0.3) !important;
  z-index: 10 !important;
  border-color: #e94560 !important;
}
.draft-card.card.drag-over {
  border-color: #2ecc71 !important;
  transform: scale(1.03) !important;
  box-shadow:
    0 0 20px #2ecc71,
    inset 0 0 20px rgba(46, 204, 113, 0.3) !important;
}

.draft-card.card .card-body {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 2 / 3 !important; /* Szigorúan 2:3-as képarány a játékbeli hűségért */
  pointer-events: none;
  margin-bottom: 8px !important;
  padding: 0 !important;
  position: relative !important;

  /* Kártyatest fejléc nélküli lekerekítése */
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-radius: 12px 12px 0 0 !important;
  overflow: hidden !important; /* A HP bar és kép lekerekítésének biztosítása */
}
.draft-card.card .card-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 0 !important;
}
.draft-card.card .attacks {
  gap: 2.5px !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
  transform: none !important;
  margin: 4px 0 0 0 !important;
  width: 100% !important;
}
.draft-card.card .attacks button {
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  padding: 4px 6px !important;
}
.draft-card.card .btn-title {
  font-size: clamp(0.45rem, 0.75vw, 0.65rem) !important; /* Még jobban zsugorodó szövegek */
}
.draft-card.card .btn-row {
  font-size: clamp(0.38rem, 0.7vw, 0.58rem) !important; /* Még jobban zsugorodó szövegek */
}

/* Kicsit kompaktabbá tesszük a kapszula statokat a kis draft kártyákon */
.draft-card.card .card-body-stats {
  top: 8px !important;
  right: 8px !important;
  gap: 4px !important;
}
.draft-card.card .stat-hp,
.draft-card.card .stat-ap {
  padding: 3px 8px !important;
  border-radius: 12px !important;
  font-size: clamp(0.65rem, 0.9vw, 0.75rem) !important;
}

.draft-actions {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
#ready-btn {
  padding: clamp(10px, 2vw, 14px) clamp(20px, 4vw, 40px);
  background-color: #2ecc71;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(46, 204, 113, 0.4);
  transition:
    transform 0.2s,
    background-color 0.2s;
}
#ready-btn:hover {
  transform: scale(1.04);
  background-color: #27ae60;
}
#ready-btn:disabled {
  background-color: #555;
  color: #888;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.draft-buttons-row {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

#draft-forge-btn,
#random-btn {
  padding: clamp(10px, 2vw, 14px) clamp(20px, 4vw, 40px);
  border-radius: 8px;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: bold;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-icon-inline {
  font-size: 1.2rem;
}

.btn-google {
  background-color: white;
  color: #555;
  border: 1px solid #ccc;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Roboto', sans-serif;
  font-size: clamp(0.85rem, 1.3vw, 1rem);
}
.btn-google:hover {
  background-color: #f8f9fa;
  box-shadow: 0 6px 15px rgba(255, 255, 255, 0.2);
  color: #333;
}

/* Kiválasztott kártyák és felszerelés sor */
.selected-deck-row {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 10px 0;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.deck-section {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.characters-deck {
  flex: 1.6;
  min-width: 320px;
}

.items-deck {
  flex: 1;
  min-width: 240px;
}

.deck-section h4 {
  margin: 0 0 10px 0;
  color: #8892b0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.deck-slots {
  display: flex;
  gap: 8px;
  justify-content: center;
  width: 100%;
  flex-wrap: wrap;
}

/* Kártya Slot / Placeholder */
.deck-slot {
  width: 68px;
  height: 96px;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.7rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}

.deck-slot:hover {
  border-color: rgba(197, 160, 89, 0.5);
  color: rgba(197, 160, 89, 0.6);
}

.deck-slot.filled {
  border-style: solid;
  border-color: rgba(197, 160, 89, 0.6);
}

.deck-slot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.deck-slot-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background: #e94560;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.deck-slot:hover .deck-slot-remove {
  opacity: 1;
}

/* Pool Tabs */
.pool-tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 12px;
}

.pool-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #8892b0;
  padding: 8px 20px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.8px;
}

.pool-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.pool-tab.active {
  background: rgba(197, 160, 89, 0.2);
  border-color: rgba(197, 160, 89, 0.6);
  color: #f1c40f;
  box-shadow: 0 0 15px rgba(197, 160, 89, 0.15);
}

/* Pool Container & Grid */
.pool-container {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 15px;
  max-height: 280px;
  overflow-y: auto;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
}

.pool-container::-webkit-scrollbar {
  width: 6px;
}
.pool-container::-webkit-scrollbar-track {
  background: transparent;
}
.pool-container::-webkit-scrollbar-thumb {
  background: rgba(197, 160, 89, 0.3);
  border-radius: 10px;
}

.pool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
  width: 100%;
}

/* Pool Card Item */
.pool-item {
  background: rgba(15, 17, 26, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.pool-item:hover {
  transform: translateY(-3px);
  border-color: rgba(197, 160, 89, 0.4);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.5);
}

.pool-item-img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: #090a0f;
  margin-bottom: 5px;
}

.pool-item-name {
  font-size: 0.62rem;
  font-weight: 800;
  color: white;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  letter-spacing: 0.2px;
}

.pool-item-stats {
  font-size: 0.55rem;
  color: #8892b0;
  font-weight: bold;
  margin-top: 2px;
}

/* Selected state in Pool */
.pool-item.selected {
  opacity: 0.35;
  border-color: rgba(46, 204, 113, 0.4);
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.pool-item.selected::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #2ecc71;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: bold;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  z-index: 10;
}
