/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem;
}

main {
  background: rgba(0,0,0,0.7);
  border-radius: 12px;
  max-width: 900px;
  width: 100%;
  padding: 2rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.7);
}

h1 {
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

h2, h3 {
  margin-bottom: 0.8rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}

.row {
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

label {
  flex: 0 0 180px;
  font-weight: 600;
  font-size: 1rem;
  color: #dcdcdc;
  user-select: none;
}

input[type="number"],
input[type="text"] {
  flex: 1;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 6px;
  border: none;
  outline: none;
  transition: box-shadow 0.3s ease;
  background-color: #222;
  color: #eee;
  box-shadow: inset 0 0 5px rgba(255,255,255,0.15);
}

input[type="number"]:focus,
input[type="text"]:focus {
  box-shadow: 0 0 8px 2px #a29bfe;
  background-color: #333;
}

button {
  cursor: pointer;
  background: #6c5ce7;
  border: none;
  padding: 0.8rem 1.8rem;
  font-size: 1.1rem;
  border-radius: 8px;
  color: white;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(108,92,231,0.7);
  transition: background 0.3s ease, transform 0.2s ease;
  margin-top: 1rem;
  user-select: none;
}
button2 {
  cursor: pointer;
  background: #00b894;;
  border: none;
  padding: 0.8rem 1.8rem;
  font-size: 1.1rem;
  border-radius: 8px;
  color: white;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(108,92,231,0.7);
  transition: background 0.3s ease, transform 0.2s ease;
  margin-top: 1rem;
  user-select: none;
}

button:hover:not(:disabled) {
  background: #4834d4;
  transform: scale(1.05);
}

button:disabled {
  background: #999;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Players container */
#playersContainer {
  margin-bottom: 1.2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(180px,1fr));
  gap: 1rem;
}

.playerNameInput {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: none;
  outline: none;
  background-color: #222;
  color: #eee;
  font-size: 1rem;
  text-align: center;
  box-shadow: inset 0 0 5px rgba(255,255,255,0.15);
  transition: box-shadow 0.3s ease;
  width: 100%;
}

.playerNameInput:focus {
  box-shadow: 0 0 8px 2px #a29bfe;
  background-color: #333;
}

/* Draft section */
#draftInfo {
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
}

#draftArea {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.playerDraft {
  background: #342e7e;
  border-radius: 10px;
  padding: 1rem;
  min-width: 250px;
  flex: 1 1 250px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
}

.playerDraft h4 {
  text-align: center;
  margin-bottom: 0.7rem;
  font-size: 1.2rem;
  border-bottom: 2px solid #a29bfe;
  padding-bottom: 0.3rem;
}

.draftList {
  flex-grow: 1;
  margin-bottom: 0.8rem;
  max-height: 250px;
  overflow-y: auto;
  background: #2d27a0;
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  color: #dcdcdc;
  font-size: 0.95rem;
  box-shadow: inset 0 0 6px #1a1580;
}

.draftList li {
  padding: 0.3rem 0.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
}

.draftList li:last-child {
  border-bottom: none;
}

.draftList .pos {
  font-style: italic;
  color: #a29bfe;
  margin-left: 6px;
  flex-shrink: 0;
}

.draftForm {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.draftForm input[type="text"] {
  padding: 0.3rem 0.6rem;
  font-size: 0.9rem;
  border-radius: 5px;
  border: none;
  outline: none;
  background-color: #222;
  color: #eee;
  flex: 1 1 120px;
  box-shadow: inset 0 0 5px rgba(255,255,255,0.15);
}

.draftForm input[type="text"]:focus {
  box-shadow: 0 0 7px 1px #a29bfe;
  background-color: #333;
}

.draftForm button {
  flex: 0 0 auto;
  padding: 0.4rem 1rem;
  font-size: 1rem;
  border-radius: 6px;
  margin-left: 0.3rem;
  background: #00b894;
  box-shadow: 0 3px 10px rgba(0,184,148,0.6);
  transition: background 0.3s ease;
}

.draftForm button:hover:not(:disabled) {
  background: #019875;
  transform: scale(1.05);
}

.draftForm button:disabled {
  background: #444;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Prompt Output */
#promptOutput {
  width: 100%;
  height: 200px;
  padding: 1rem;
  border-radius: 10px;
  background-color: #222;
  color: #eee;
  font-family: monospace, monospace;
  font-size: 1rem;
  resize: vertical;
  box-shadow: inset 0 0 10px #1a1580;
  margin-bottom: 1rem;
}


/* Individual Button Colors */
#copyPromptBtn {
  background: #6c5ce7;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.6);
}

#copyPromptBtn:hover {
  background: #5a4bd1;
}


/* Utility */
.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 700px) {
  main {
    padding: 1rem;
  }
  #playersContainer {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .playerDraft {
    min-width: 100%;
  }.alt-draft-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .alt-draft-label {
    font-size: 1.2rem;
    margin-right: 0;
  }

  .alt-draft-buttons {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem;
  }

  .alt-draft-buttons a {
    flex: 1 1 auto;
  }

  .heist-button,
  .random-button {
    width: 100%;
    font-size: 1rem;
    padding: 0.6rem 1rem;
  }
}
.battingOrder {
  font-weight: bold;
  color: #0066cc;
  margin-left: 8px;
}
.remainingPositions {
  font-size: 0.9em;
  color: #fc0000;
  margin-top: 4px;
}
textarea:focus {
  border-color: #007bff;
  outline: none;
  background-color: #f9f9f9;
}
.alt-draft-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  gap: 1rem;
}

.alt-draft-label {
  color: white;
  font-size: 1.3rem;
  margin-right: 0.8rem;
  white-space: nowrap;
}

.alt-draft-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.heist-button {
  background-color: #b36464;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 5px;
  cursor: pointer;
}

.random-button {
  background-color: #3564b4;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 5px;
  cursor: pointer;
}


#startDraftBtn {
    display: block;
    margin: 2rem auto 1rem;
    font-size: 1.3rem;
    border-radius: 10px;
}
#startDraftBtn:hover:not(:disabled) {
  background: #4834d4;
  transform: scale(1.07);
}
