/* ========================================
   Draft Pick/Ban Page Styles
   ======================================== */

/* Mode Selection Modal */
.mode-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
}

.mode-modal-content {
  background: #1a1e2a;
  border-radius: 16px;
  padding: 40px;
  max-width: 640px;
  width: 90%;
  text-align: center;
  border: 1px solid #2a3040;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.mode-modal-title {
  font-size: 24px;
  font-weight: 700;
  color: #f2f4f8;
  margin-bottom: 8px;
}

.mode-modal-desc {
  font-size: 14px;
  color: #8892a8;
  margin-bottom: 32px;
}

.mode-options {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.mode-option {
  flex: 1;
  background: #141820;
  border: 2px solid #2a3040;
  border-radius: 12px;
  padding: 28px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #f2f4f8;
  text-align: center;
  font-family: inherit;
}

.mode-option:hover {
  border-color: #3b82f6;
  background: #1a2236;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.mode-option .mode-icon {
  color: #3b82f6;
  margin-bottom: 16px;
}

.mode-option h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.mode-option p {
  font-size: 13px;
  color: #8892a8;
  line-height: 1.5;
}

/* Draft Container */
.draft-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(4px, 1vh, 10px) clamp(6px, 1vw, 16px);
  gap: clamp(4px, 0.8vh, 10px);
}

/* Draft Header */
.draft-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(4px, 0.6vh, 8px) clamp(8px, 1.2vw, 20px);
  background: #141820;
  border-radius: 10px;
  border: 1px solid #2a3040;
}

.draft-team {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-name-input {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: clamp(12px, 1.1vw, 16px);
  font-weight: 700;
  color: #f2f4f8;
  font-family: inherit;
  width: clamp(80px, 10vw, 160px);
  transition: border-color 0.2s;
}

.team-name-input:hover,
.team-name-input:focus {
  border-color: #2a3040;
  outline: none;
}

.blue-input {
  color: #3b82f6;
}

.red-input {
  color: #ef4444;
  text-align: right;
}

.team-score {
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 800;
  color: #f2f4f8;
  min-width: 24px;
  text-align: center;
}

.draft-info-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.draft-mode-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.15);
  padding: 2px 10px;
  border-radius: 4px;
}

.draft-game-label {
  font-size: 11px;
  color: #8892a8;
  font-weight: 500;
}

.draft-phase {
  font-size: clamp(11px, 1vw, 15px);
  font-weight: 600;
  color: #f2f4f8;
}

.draft-timer {
  font-size: clamp(16px, 1.5vw, 22px);
  font-weight: 800;
  color: #eab308;
  font-variant-numeric: tabular-nums;
}

.draft-timer.urgent {
  color: #ef4444;
  animation: pulse-timer 0.5s ease-in-out infinite alternate;
}

@keyframes pulse-timer {
  from { opacity: 1; }
  to { opacity: 0.5; }
}

/* Draft Board */
.draft-board {
  display: flex;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

/* Team Columns */
.team-column {
  width: clamp(120px, 14vw, 200px);
  min-width: 120px;
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.6vh, 8px);
}

.ban-row {
  display: flex;
  gap: 4px;
}

.ban-slot {
  width: clamp(24px, 2.5vw, 36px);
  height: clamp(24px, 2.5vw, 36px);
  border-radius: 6px;
  background: #1a1e2a;
  border: 1.5px solid #2a3040;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}

.ban-slot.active {
  border-color: #eab308;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.3);
}

.ban-slot.filled {
  border-color: #4b5563;
}

.ban-slot.filled::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.ban-slot.filled::before {
  content: '';
  position: absolute;
  width: 140%;
  height: 2px;
  background: #ef4444;
  top: 50%;
  left: -20%;
  transform: rotate(-45deg);
  z-index: 1;
}

.ban-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Pick Slots */
.pick-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.pick-slot {
  flex: 1;
  min-height: clamp(36px, 5vh, 60px);
  border-radius: 8px;
  background: #1a1e2a;
  border: 2px solid #2a3040;
  display: flex;
  align-items: center;
  gap: clamp(4px, 0.6vw, 10px);
  padding: clamp(4px, 0.5vh, 8px) clamp(6px, 0.8vw, 12px);
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
}

.pick-slot.active {
  border-color: #eab308;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.25);
}

.blue-column .pick-slot.active {
  border-color: #3b82f6;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.red-column .pick-slot.active {
  border-color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

.pick-slot.filled {
  border-color: #3b4860;
}

.blue-column .pick-slot.filled {
  background: linear-gradient(135deg, #1a2540 0%, #1a1e2a 100%);
  border-color: #2a4070;
}

.red-column .pick-slot.filled {
  background: linear-gradient(135deg, #2a1a1a 0%, #1a1e2a 100%);
  border-color: #5a2a2a;
}

.pick-slot .pick-champ-img {
  width: clamp(28px, 3.5vw, 48px);
  height: clamp(28px, 3.5vw, 48px);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #3b4860;
}

.blue-column .pick-slot .pick-champ-img {
  border-color: #3b82f6;
}

.red-column .pick-slot .pick-champ-img {
  border-color: #ef4444;
}

.pick-slot .pick-champ-name {
  font-size: clamp(10px, 1vw, 14px);
  font-weight: 600;
  color: #f2f4f8;
}

.pick-role {
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
}

.pick-slot.filled .pick-role {
  display: none;
}

/* Champion Pool */
.champion-pool {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.draft-champ-search {
  width: 100%;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #2a3040;
  background: #141820;
  color: #f2f4f8;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.draft-champ-search:focus {
  border-color: #3b82f6;
}

.role-filters {
  display: flex;
  gap: 4px;
}

.role-filter {
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid #2a3040;
  background: transparent;
  color: #8892a8;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.role-filter:hover {
  background: #1e2536;
  color: #c8d0e0;
}

.role-filter.active {
  background: #1e2a40;
  color: #3b82f6;
  border-color: #3b82f6;
}

.draft-champ-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(36px, 4vw, 64px), clamp(36px, 4vw, 64px)));
  gap: clamp(2px, 0.3vw, 4px);
  overflow-y: auto;
  padding: 4px 0;
  align-content: start;
  justify-content: center;
}

.draft-champ-grid::-webkit-scrollbar {
  width: 6px;
}

.draft-champ-grid::-webkit-scrollbar-track {
  background: transparent;
}

.draft-champ-grid::-webkit-scrollbar-thumb {
  background: #2a3040;
  border-radius: 3px;
}

.draft-champ-cell {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  position: relative;
  transition: all 0.15s;
  background: #141820;
}

.draft-champ-cell:hover {
  border-color: #3b82f6;
  transform: scale(1.08);
  z-index: 1;
}

.draft-champ-cell.selected {
  border-color: #eab308;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.3);
}

.draft-champ-cell.disabled {
  opacity: 0.25;
  pointer-events: none;
  filter: grayscale(1);
}

.draft-champ-cell.banned-out {
  opacity: 0.15;
  pointer-events: none;
  filter: grayscale(1);
}

.draft-champ-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.draft-champ-cell .champ-name-tooltip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.75);
  color: #f2f4f8;
  font-size: 9px;
  text-align: center;
  padding: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Draft Controls */
.draft-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 8px 0;
}

.draft-ctrl-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 8px;
  border: 1px solid #2a3040;
  background: #1a1e2a;
  color: #8892a8;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.draft-ctrl-btn:hover {
  background: #262d3d;
  color: #c8d0e0;
}

.draft-ctrl-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.lock-btn {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
  font-weight: 700;
  font-size: clamp(13px, 1.1vw, 16px);
  padding: clamp(8px, 1vh, 12px) clamp(24px, 3vw, 48px);
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.lock-btn:hover:not(:disabled) {
  background: #2563eb;
}

.lock-btn:disabled {
  background: #1e3a5f;
  border-color: #1e3a5f;
  color: #4b6a8f;
}

.next-game-btn {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
  font-weight: 600;
}

.next-game-btn:hover {
  background: #15803d;
}

/* Fearless History */
.fearless-history {
  padding: 8px 12px;
  background: #141820;
  border-radius: 8px;
  border: 1px solid #2a3040;
}

.fearless-history-title {
  font-size: 12px;
  font-weight: 600;
  color: #8892a8;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.fearless-champ-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.fearless-champ-list .fearless-champ {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0.35;
  filter: grayscale(1);
  border: 1px solid #4b5563;
}

.fearless-champ-list .fearless-champ img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Draft Complete Overlay */
.draft-complete-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.draft-complete-content {
  background: #1a1e2a;
  border-radius: 16px;
  padding: 32px 40px;
  text-align: center;
  border: 1px solid #2a3040;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.draft-complete-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: #f2f4f8;
  margin-bottom: 8px;
}

.draft-complete-content p {
  font-size: 14px;
  color: #8892a8;
  margin-bottom: 20px;
}

.draft-complete-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ========================================
   Share Draft Links Modal
   ======================================== */
.share-draft-modal {
  max-width: 560px;
  text-align: left;
}

.share-links-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.share-link-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.share-link-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #f2f4f8;
}

.share-link-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.blue-dot { background: #3b82f6; }
.red-dot { background: #ef4444; }
.spec-dot { background: #8892a8; }

.share-link-field {
  display: flex;
  gap: 6px;
}

.share-link-field .share-link-input {
  flex: 1;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid #2a3040;
  background: #0d1018;
  color: #c8d0e0;
  font-size: 12px;
  font-family: monospace;
  outline: none;
}

.share-link-field .copy-link-btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid #2a3040;
  background: #1a1e2a;
  color: #8892a8;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
}

.share-link-field .copy-link-btn:hover {
  background: #262d3d;
  color: #c8d0e0;
}

.share-link-field .copy-link-btn.copied {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

/* Role Banner */
.role-banner {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  border-radius: 0 0 8px 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  z-index: 2500;
  pointer-events: none;
}

.role-banner.blue-role {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-top: none;
}

.role-banner.red-role {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-top: none;
}

.role-banner.spectator-role {
  background: rgba(136, 146, 168, 0.2);
  color: #8892a8;
  border: 1px solid rgba(136, 146, 168, 0.3);
  border-top: none;
}

/* Spectator/wrong-turn overlay on controls */
.draft-controls.locked {
  pointer-events: none;
  opacity: 0.4;
}

/* Waiting indicator */
.waiting-indicator {
  text-align: center;
  padding: 6px 12px;
  font-size: 13px;
  color: #8892a8;
  font-style: italic;
}

/* Locked champion grid (spectator or not your turn) */
.draft-champ-grid.locked-grid .draft-champ-cell:not(.disabled) {
  pointer-events: none;
  opacity: 0.65;
}

/* ========================================
   Ready Check Screen
   ======================================== */
.ready-screen-content {
  max-width: 440px;
}

.ready-mode-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.ready-players {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 8px;
}

.ready-player {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  border-radius: 10px;
  border: 2px solid #2a3040;
  background: #141820;
  transition: all 0.3s ease;
}

.ready-player .ready-player-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.ready-player .ready-player-name {
  font-size: 14px;
  font-weight: 600;
  color: #f2f4f8;
}

.ready-status {
  font-size: 12px;
  font-weight: 500;
  color: #8892a8;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(136, 146, 168, 0.12);
  transition: all 0.3s ease;
}

.ready-player.is-ready {
  border-color: #16a34a;
  background: rgba(22, 163, 74, 0.08);
}

.ready-player.is-ready .ready-status {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
}

.blue-ready-player.is-ready {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
}

.blue-ready-player.is-ready .ready-status {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.15);
}

.red-ready-player.is-ready {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.red-ready-player.is-ready .ready-status {
  color: #f87171;
  background: rgba(248, 113, 113, 0.15);
}

.ready-btn {
  font-size: 16px;
  padding: 12px 24px;
  letter-spacing: 0.5px;
}

.ready-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ready-wait-msg {
  text-align: center;
  font-size: 13px;
  color: #8892a8;
  margin-top: 10px;
  font-style: italic;
}

/* ========================================
   Responsive Adjustments
   ======================================== */

/* Small height screens (laptop at 150% scaling, etc.) */
@media (max-height: 700px) {
  .draft-container {
    padding: 2px 8px;
    gap: 2px;
  }

  .draft-header {
    padding: 3px 10px;
  }

  .draft-controls {
    padding: 3px 0;
  }

  .draft-ctrl-btn {
    padding: 5px 14px;
    font-size: 12px;
  }

  .pick-column {
    gap: 3px;
  }

  .ban-row {
    gap: 2px;
  }

  .fearless-history {
    padding: 4px 8px;
  }

  .fearless-champ-list .fearless-champ {
    width: 24px;
    height: 24px;
  }
}

/* Narrow screens */
@media (max-width: 900px) {
  .team-column {
    width: clamp(90px, 12vw, 140px);
    min-width: 90px;
  }

  .draft-board {
    gap: 6px;
  }

  .mode-options {
    flex-direction: column;
  }

  .mode-modal-content {
    padding: 24px 20px;
    width: 95%;
  }

  .draft-champ-search {
    padding: 6px 10px;
    font-size: 12px;
  }

  .role-filter {
    padding: 3px 8px;
    font-size: 11px;
  }
}

/* Very small screens */
@media (max-width: 700px) {
  .team-column {
    width: clamp(70px, 10vw, 100px);
    min-width: 70px;
  }

  .team-name-input {
    display: none;
  }

  .draft-team {
    gap: 4px;
  }

  .draft-info-center {
    gap: 0;
  }

  .share-draft-modal {
    max-width: 95vw;
  }

  .share-link-field .share-link-input {
    font-size: 10px;
  }

  .ready-screen-content {
    max-width: 95vw;
    padding: 20px 16px;
  }

  .ready-players {
    gap: 8px;
  }

  .ready-player {
    padding: 12px 8px;
  }
}
