/* ====== Reset & Basics ====== */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #888;
  color: #222;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 0.5rem;
}
#app {
  max-width: 950px;
  width: 100%;
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem 2rem;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
}
.Hider { display: none !important; }
.killed-character { color: red; font-weight: bold; }

/* ====== Headings ====== */
h1, h2 {
  color: #333;
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.03em;
}

/* ====== Info Panel ====== */
#info-btn {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1001;
  background: #333;
  color: #fff;
  border: none;
  font-size: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
#info-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  height: 100%;
  background: #fefefe;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);
  transition: right 0.3s ease-in-out;
  padding: 1.5rem;
  z-index: 1000;
  overflow-y: auto;
}
#info-panel.active { right: 0; }
#info-panel h2 { margin-top: 0; }
#info-panel section { margin-bottom: 1.5rem; }
#info-panel section h3 { margin-bottom: 0.25rem; color: #9900cc; }
#info-panel p { font-size: 0.95rem; line-height: 1.4; }
#close-info {
  position: absolute;
  top: 0.5rem;
  left: 0.75rem;
  font-size: 1.2rem;
  cursor: pointer;
  color: #555;
}

/* ====== Screens ====== */
.screen { display: none; }
.screen.active { display: block; }

/* ====== Setup Form ====== */
#setup-form label, fieldset {
  display: block;
  /* margin-bottom: 1rem; */
  font-size: 1rem;
  font-weight: 600;
  color: #444;
}
#setup-form input[type="number"],
#setup-form input[type="text"] {
  margin-top: 0.3rem;
  padding: 0.4rem 0.75rem;
  font-size: 1rem;
  width: 100%;
  max-width: 320px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fdfdfd;
  color: #333;
  font-weight: 500;
}
#setup-form input:focus {
  outline: none;
  border-color: #888;
}
fieldset {
  border: 1px solid #ccc;
  padding: 1rem;
  border-radius: 8px;
  background: #fafafa;
}
fieldset legend {
  font-weight: 700;
  color: #333;
  font-size: 1.05rem;
}
#setup-form label input[type="radio"] {
  margin-right: 0.4rem;
  vertical-align: middle;
}

/* ====== Buttons ====== */
.btn-primary {
  background: #222;
  color: #fff;
  border: none;
  padding: 0.55rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}
.btn-primary:hover:not(:disabled) { background: #444; }
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-secondary {
  background: transparent;
  border: 1.5px solid #999;
  color: #555;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
}
.btn-secondary:hover { background: #eee; }

/* ====== Draft Info ====== */
#draft-info {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  font-size: 1.05rem;
  font-weight: 600;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  background: #f4f4f4;
}
#draft-info > div {
  flex: 1 1 200px;
  background: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}
#draft-info > div strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
  color: #666;
  text-transform: uppercase;
}
#current-player, #current-role, #current-category {
  font-weight: 700;
  font-style: italic;
  color: #000;
}

/* ====== Scenario Box ====== */
#scenario-container {
  margin-bottom: 1.5rem;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  background: #f3f3f3;
  opacity: 0.85;
}
#scenario-container h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.3rem;
}
#scenario {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin-top: 0.6rem;
  opacity: 0;
  transition: opacity 0.6s ease;
}
#scenario.visible { opacity: 1; }

/* ====== Draft Table ====== */
#draft-table-wrapper {
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border-radius: 10px;
  border: 1px solid #ccc;
  background: #fdfdfd;
}
#draft-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 600px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #333;
}
#draft-table th,
#draft-table td {
  border: 1px solid #ddd;
  padding: 0.5rem 0.75rem;
  text-align: center;
  background: #fff;
}
#draft-table th {
  background: #eee;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
#draft-table th:first-child,
#draft-table td:first-child {
  width: 45%;
  min-width: 120px;
  text-align: left;
  font-size: 0.9rem;
}
#draft-table th.player-header,
#draft-table td:not(:first-child) {
  width: calc(55% / 5);
  font-size: 0.85rem;
  word-break: break-word;
  padding: 0.4rem 0.5rem;
}
#draft-table td.current-pick {
  background: #d4eaff;
  color: #000;
  font-style: italic;
  position: relative;
}
#draft-table td.current-pick::after {
  content: '🧤';
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 1.1rem;
}
.role-name {
  font-weight: 600;
  color: #555;
  font-style: italic;
  text-align: left !important;
  text-transform: lowercase !important;
}

/* ====== Pick Form ====== */
.pick-form {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.5rem;
}
.pick-form label {
  font-size: 1rem;
  color: #333;
}
#input-role {
  font-weight: 700;
  color: #000;
}
#character-input {
  flex-grow: 1;
  min-width: 200px;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #aaa;
  background: #fff;
  color: #222;
  font-size: 1rem;
  font-weight: 500;
}

/* ====== Final Crews ====== */
#final-crews { margin-bottom: 1.5rem; }
.crew-block {
  background: #fafafa;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid #ccc;
  margin-bottom: 1rem;
}
.crew-block h3 {
  margin: 0 0 0.5rem;
  color: #444;
  font-size: 1.2rem;
}
.crew-role {
  margin: 0.2rem 0;
  font-weight: 600;
  color: #666;
  font-style: italic;
  font-size: 0.95rem;
}
.crew-character {
  margin-left: 1rem;
  font-style: italic;
  color: #333;
  font-size: 0.95rem;
}

/* ====== ChatGPT Prompt ====== */
#chatgpt-prompt {
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 10px;
  font-family: monospace;
  border: 1px solid #ccc;
  font-size: 0.95rem;
  font-weight: 500;
  color: #222;
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
}

/* ====== Mobile Styles ====== */
@media (max-width: 700px) {
  #app { padding: 1rem; }
  h1, h2 { font-size: 1.2rem; margin-bottom: 0.75rem; }
  #setup-form label, fieldset { font-size: 0.9rem; }
  fieldset { padding: 0.75rem; }
  #setup-form input[type="text"],
  #setup-form input[type="number"] {
    font-size: 0.9rem;
    padding: 0.35rem 0.5rem;
  }
  .btn-primary, .btn-secondary {
    padding: 0.4rem 1rem;
    font-size: 0.95rem;
  }
  #draft-info {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0.5rem;
    gap: 0.5rem;
  }
  #draft-info > div {
    flex: 1 1 100px;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    text-align: center;
    border: 1px solid #ddd;
  }
  #draft-info > div strong {
    font-size: 0.75rem;
    margin-bottom: 0.15rem;
  }
  #scenario-container { padding: 0.5rem; font-size: 0.9rem; }
  .pick-form { flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
  #character-input { font-size: 0.95rem; padding: 0.45rem; width: 100%; }
  #draft-table-wrapper { overflow-x: scroll; max-width: 100%; }
  #draft-table { font-size: 0.85rem; min-width: 100%; }
  .crew-block { padding: 0.75rem; font-size: 0.9rem; }
  .crew-character, .crew-role { font-size: 0.85rem; }
  #chatgpt-prompt { font-size: 0.85rem; padding: 0.75rem; }
}
