body {
  background-image: url('images/bg.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: #2b263f;
  font-family: sans-serif;
  text-align: center;
  padding: 50px;
  min-height: 100vh;
  margin: 0;
  color: white;
}

h1 {
  color: white;
}

#page-layout {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
}

/* Shared box styling for expedition, timer, checklist */
#expedition-ui,
#storm-timer,
#boss-checklist {
  background-color: rgba(0, 0, 0, 0.6);
  padding: 20px;
  border-radius: 10px;
  color: white;
  max-width: 900px;
  width: 100%;
  text-align: center;
}

#expedition-ui h2,
#storm-timer h2,
#boss-checklist h2 {
  margin-bottom: 20px;
  font-size: 28px;
  text-align: center;
}

#expedition-flex {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

#expedition-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  flex: 1;
  min-width: 200px;
  max-width: 300px;
}

#expedition-details {
  flex: 2;
  min-width: 250px;
  text-align: left;
}

.expedition-placeholder {
  border: 1px dashed rgba(255, 255, 255, 0.3);
  padding: 20px;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.05);
  min-height: 100px;
  margin-bottom: 15px;
}

.checklist-placeholder {
  border: 1px dashed rgba(255, 255, 255, 0.3);
  padding: 20px;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.05);
  min-height: 100px;
}

.nightlord-name {
  text-align: center;
  font-weight: bold;
  text-decoration: underline;
  margin-bottom: 8px;
}

.effective-label {
  color: #00ff88;
  font-weight: bold;
}

.ineffective-label {
  color: #ff6666;
  font-weight: bold;
}

.phase-entry {
  padding: 8px 16px;
  border-left: 4px solid transparent;
  transition: all 0.2s ease;
  text-align: center;
  width: 100%;
  max-width: 280px;
  cursor: pointer;
  background-color: transparent;
}

.phase-entry:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.phase-entry.active {
  background-color: rgba(255, 255, 255, 0.2);
  border-left: 4px solid #7700ff;
}

.phase-entry.complete {
  opacity: 0.5;
  text-decoration: line-through;
}

#timer-container {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 20px;
}

#left-ui {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#right-ui {
  flex: 1;
  min-width: 260px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  padding: 20px;
}

#vertical-divider {
  width: 4px;
  background: linear-gradient(to bottom, #7700ff, #2b263f);
  border-radius: 2px;
  margin: 0 10px;
}

#current-phase {
  font-weight: bold;
  font-size: 20px;
  margin: 10px 0;
}

.big-timer {
  font-size: clamp(40px, 10vw, 100px);
  font-weight: bold;
  color: #00ff88;
  transition: color 0.3s ease;
  width: 100%;
  text-align: center;
}

.big-timer.critical {
  color: #ff3333;
}

#controls {
  margin-bottom: 20px;
}

button {
  padding: 10px 20px;
  margin: 5px;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

button.green {
  background-color: #4CAF50;
  color: white;
}

button.red {
  background-color: #c0392b;
  color: white;
}

button.yellow {
  background-color: #f1c40f;
  color: black;
}

button:disabled {
  background-color: #555;
  cursor: not-allowed;
}

#phase-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  align-items: center;
}

.phase-group {
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Boss Checklist Styles */
.boss-category {
  margin-bottom: 20px;
  text-align: left;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 8px;
}

.boss-category summary {
  font-weight: bold;
  font-size: 18px;
  cursor: pointer;
  margin-bottom: 10px;
}

.boss-list {
  margin-top: 10px;
  padding-left: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.boss-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}

.boss-entry input[type="checkbox"] {
  transform: scale(1.2);
  cursor: pointer;
}

.boss-entry span {
  cursor: default;
}

.icon {
  width: 1em;
  height: 1em;
  vertical-align: text-bottom;
  margin-right: 4px;
}

.expedition-icon {
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  margin-right: 10px;
  border-radius: 4px;
}

.nightlord-img {
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 4px;
}

/* Fancy toggle switch */
.switch-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  justify-content: center;
}

.switch-label {
  font-weight: bold;
}

.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #444;
  transition: 0.4s;
  border-radius: 28px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #7700ff;
}

input:checked + .slider:before {
  transform: translateX(24px);
}

/* Everdark styling */
.everdark {
  background-color: #290037;
  animation: pulse-purple 3s infinite ease-in-out;
}

@keyframes pulse-purple {
  0% { background-color: #290037; }
  50% { background-color: #3d0052; }
  100% { background-color: #290037; }
}

.resist-low {
  color: #00ff88;
  font-weight: bold;
}

.resist-mid {
  color: #f1c40f;
  font-weight: bold;
}

.resist-high {
  color: #ff5555;
  font-weight: bold;
}

.resist-immune {
  color: #ccc;
  font-weight: bold;
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.effect-tag, .ineffect-tag, .resist-tag {
  background-color: rgba(255, 255, 255, 0.08);
  padding: 6px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  white-space: nowrap;
}

.effect-tag {
  border-left: 4px solid #00ff88;
}

.ineffect-tag {
  border-left: 4px solid #ff6666;
}

.resist-tag {
  border-left: 4px solid #f1c40f;
}

.resist-tag.immune {
  border-left: 4px solid #888;
}

.section-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
  position: relative;
}

.toggle-btn {
  background-color: #444;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 18px;
  width: 30px;
  height: 30px;
  cursor: pointer;
}

.section-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
  position: relative;
}

.section-header h2 {
  font-size: 28px;
  margin: 0;
  padding: 0;
  text-align: center;
}

.section-header .switch {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.section-header .switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.section-header .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #444;
  transition: 0.4s;
  border-radius: 28px;
}

.section-header .slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.section-header input:checked + .slider {
  background-color: #7700ff;
}

.section-header input:checked + .slider:before {
  transform: translateX(24px);
}

/* Fix inline alignment of section header switches */
.section-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
  position: relative;
}

.section-header h2 {
  font-size: 28px;
  margin: 0;
  padding: 0;
  text-align: center;
}

.header-switch {
  flex-shrink: 0;
  margin-left: 16px;
}

.section-header .switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.section-header input:checked + .slider {
  background-color: #47239b;
}


.section-header .header-switch {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

