* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  background: #000;
  color: #e8e0d0;
  font-family: Georgia, "Times New Roman", serif;
}

/* Header */

.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  position: relative;
  padding: 2rem 1rem 0;
  border-bottom: 1px solid #3a0008;
  background: linear-gradient(to bottom, #120003, #000);
}

.account {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.character-select {
  max-width: 12rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.95rem;
}

.character-select option {
  background: #141414;
}

.login-btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  text-decoration: none;
  font-family: "New Rocker", Georgia, serif;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: #e8e0d0;
  background: linear-gradient(to bottom, #a00d25, #5a0009);
  border: 1px solid #ff3b3b;
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(200, 16, 46, 0.35);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.login-btn:hover {
  background: linear-gradient(to bottom, #c8102e, #6e0008);
  box-shadow: 0 0 18px rgba(255, 59, 59, 0.55);
}

.login-btn:focus-visible {
  outline: 2px solid #ff3b3b;
  outline-offset: 2px;
}

.login-notice {
  max-width: 960px;
  margin: 1.5rem auto 0;
  padding: 0.85rem 1.25rem;
  text-align: center;
  color: #ffd9d9;
  background: #2a0008;
  border: 1px solid #c8102e;
  border-radius: 6px;
}

@media (max-width: 992px) {
  .login-notice {
    margin: 1.5rem 1rem 0;
  }
}

/* On narrow screens, make room above the logo so the button doesn't overlap it. */
@media (max-width: 700px) {
  .site-header {
    padding-top: 4rem;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  text-decoration: none;
  border-radius: 8px;
  transition: filter 0.15s;
}

.brand:hover {
  filter: brightness(1.2);
}

.brand:focus-visible {
  outline: 2px solid #ff3b3b;
  outline-offset: 6px;
}

.logo {
  width: clamp(64px, 14vw, 110px);
  height: auto;
  filter: drop-shadow(0 0 16px rgba(200, 16, 46, 0.45));
}

h1 {
  font-family: "New Rocker", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2rem, 7vw, 4rem);
  letter-spacing: 0.04em;
  line-height: 1.1;
  background: linear-gradient(to bottom, #ff3b3b 0%, #c8102e 45%, #6e0008 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 #1a0003) drop-shadow(0 0 18px rgba(200, 16, 46, 0.5));
}

/* Tabs */

.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
}

.tab {
  padding: 0.75rem 1.75rem;
  font-family: "New Rocker", Georgia, serif;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  color: #9a8f7c;
  text-decoration: none;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  transition: color 0.15s, background 0.15s;
}

.tab:hover {
  color: #e8e0d0;
  background: #1a0005;
}

.tab.active {
  color: #ff3b3b;
  background: #000;
  border-color: #3a0008;
  margin-bottom: -1px;
}

/* Content */

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem; /* extra room at the bottom so the feedback button doesn't cover the last lines */
}

.panel h2 {
  font-family: "New Rocker", Georgia, serif;
  font-weight: 400;
  font-size: 2rem;
  color: #c8102e;
  margin-bottom: 1rem;
}

.panel p {
  line-height: 1.6;
  color: #bdb3a0;
}

/* Calendar */

.calendar {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.calendar-nav h2 {
  margin: 0;
  min-width: 12ch;
  text-align: center;
}

.cal-btn,
.cal-today {
  font-family: "New Rocker", Georgia, serif;
  color: #c8102e;
  background: #120003;
  border: 1px solid #3a0008;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.cal-btn {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.75rem;
  line-height: 1;
}

.cal-today {
  margin: 0.75rem 0 1.25rem;
  padding: 0.35rem 1rem;
  font-size: 1rem;
}

.cal-btn:hover,
.cal-today:hover {
  color: #ff3b3b;
  background: #1a0005;
  border-color: #6e0008;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  width: 100%;
}

.cal-weekdays div {
  padding: 0.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9a8f7c;
}

.cal-day {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  min-width: 0;
  min-height: 90px;
  padding: 0.4rem 0.5rem;
  font: inherit;
  text-align: left;
  color: inherit;
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.cal-day:hover {
  background: #160306;
  border-color: #4a000b;
}

.cal-day:focus-visible {
  outline: 2px solid #ff3b3b;
  outline-offset: 2px;
}

.cal-event {
  overflow: hidden;
  padding: 1px 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #ffd9d9;
  background: #6e0008;
  border-radius: 3px;
}

/* Tagged events (Blizzard and minor) are quieter than regular events.
   Blizzard events get a faint blue tint so the two tags can be told apart. */
.cal-event.tagged {
  font-size: 0.7rem;
  color: #a8a8a8;
  background: #222;
}

.cal-event.blizzard {
  color: #9fb3c8;
  background: #1a2129;
}

.cal-day.outside .cal-event {
  opacity: 0.45;
}

.cal-num {
  font-size: 0.95rem;
  color: #e8e0d0;
}

.cal-day.outside {
  background: #050505;
}

.cal-day.outside .cal-num {
  color: #444;
}

.cal-day.today {
  border-color: #c8102e;
  background: #1a0005;
  box-shadow: inset 0 0 12px rgba(200, 16, 46, 0.35);
}

.cal-day.today .cal-num {
  color: #ff3b3b;
  font-weight: bold;
}

/* Selected day is grey; today keeps its red border when it is also selected. */
.cal-day.selected,
.cal-day.selected:hover {
  background: #2e2e2e;
  border-color: #a0a0a0;
  box-shadow: 0 0 0 1px #a0a0a0;
}

.cal-day.today.selected {
  border-color: #c8102e;
  box-shadow: 0 0 0 1px #c8102e, inset 0 0 12px rgba(200, 16, 46, 0.35);
}

/* Selected day details */

.day-details {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #0a0a0a;
  border: 1px solid #3a0008;
  border-top: 3px solid #c8102e;
  border-radius: 6px;
}

.day-details h3 {
  font-family: "New Rocker", Georgia, serif;
  font-weight: 400;
  font-size: 1.5rem;
  color: #ff3b3b;
}

/* The home page's "Today" box reuses the calendar's day-details look. */
.day-details.home-today {
  margin-top: 0;
}

.home-section {
  margin-top: 2.5rem;
}

a.action-btn {
  display: inline-block;
  text-decoration: none;
}

.day-details-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.day-event + .day-event {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #1f1f1f;
}

.day-event h4 {
  font-size: 1.15rem;
  color: #e8e0d0;
}

.day-details .day-event-time {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: #c8102e;
}

.day-event.tagged h4 {
  font-size: 1rem;
  font-weight: normal;
  color: #a8a8a8;
}

.day-details .day-event-author {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: #7d7466;
}

.day-details .day-event.tagged .day-event-time,
.day-details .day-event.tagged .day-event-details {
  font-size: 0.9rem;
  color: #7d7d7d;
}

.event-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0 0.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: middle;
  color: #8a8a8a;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
}

.day-event.blizzard .event-tag {
  color: #8fa3b8;
  border-color: #2c3a48;
}

.day-details .day-event-details {
  white-space: pre-line;
}

.event-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.day-details .day-empty {
  font-style: italic;
  color: #6f675a;
}

/* Buttons and forms */

.action-btn {
  padding: 0.45rem 1.1rem;
  font: inherit;
  font-size: 0.95rem;
  color: #e8e0d0;
  background: linear-gradient(to bottom, #a00d25, #5a0009);
  border: 1px solid #c8102e;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.action-btn:hover {
  background: linear-gradient(to bottom, #c8102e, #6e0008);
}

.action-btn.secondary {
  background: #1a1a1a;
  border-color: #444;
}

.action-btn.secondary:hover {
  background: #2a2a2a;
  border-color: #777;
}

.action-btn.danger {
  color: #ff8080;
  background: transparent;
  border-color: #5a0009;
}

.action-btn.danger:hover {
  color: #fff;
  background: #5a0009;
}

.action-btn.small {
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
}

.action-btn:focus-visible {
  outline: 2px solid #ff3b3b;
  outline-offset: 2px;
}

.event-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #1f1f1f;
}

.event-form h4 {
  font-size: 1.15rem;
  color: #e8e0d0;
}

.event-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: #bdb3a0;
}

.event-form label.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.optional {
  color: #6f675a;
}

input[type="text"],
input[type="time"],
input[type="date"],
input[type="search"],
textarea,
select {
  padding: 0.5rem 0.65rem;
  font: inherit;
  font-size: 1rem;
  color: #e8e0d0;
  background: #141414;
  border: 1px solid #333;
  border-radius: 4px;
  color-scheme: dark;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #c8102e;
  box-shadow: 0 0 0 2px rgba(200, 16, 46, 0.35);
}

input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #c8102e;
}

textarea {
  resize: vertical;
}

.event-form input[type="time"],
.event-form input[type="date"],
.event-form select {
  max-width: 22rem;
}

.form-buttons {
  display: flex;
  gap: 0.6rem;
}

.day-details .form-error {
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  color: #ffd9d9;
  background: #2a0008;
  border: 1px solid #c8102e;
  border-radius: 4px;
}

/* Posts */

.posts-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.panel .posts-head h2 {
  margin-bottom: 0;
}

.panel .posts-hint {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-style: italic;
  color: #6f675a;
}

.post-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: #0a0a0a;
  border: 1px solid #3a0008;
  border-radius: 6px;
}

.post-form h4 {
  font-size: 1.15rem;
  color: #e8e0d0;
}

.post-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: #bdb3a0;
}

.post-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.post-card {
  display: block;
  padding: 1rem 1.25rem;
  color: inherit;
  text-decoration: none;
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-left: 3px solid #c8102e;
  border-radius: 6px;
  transition: background 0.15s, border-color 0.15s;
}

.post-card:hover {
  background: #140306;
  border-color: #4a000b;
  border-left-color: #ff3b3b;
}

.post-card:focus-visible {
  outline: 2px solid #ff3b3b;
  outline-offset: 2px;
}

.post-card h3 {
  font-size: 1.2rem;
  color: #e8e0d0;
}

.panel .post-card .post-preview {
  margin: 0.35rem 0 0.6rem;
  color: #9a9080;
}

.panel .post-meta {
  font-size: 0.85rem;
  color: #7d7466;
}

.post-meta .reply-count {
  color: #c8102e;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: #c8102e;
  text-decoration: none;
}

.back-link:hover {
  color: #ff3b3b;
  text-decoration: underline;
}

.post-full {
  padding: 1.5rem;
  background: #0a0a0a;
  border: 1px solid #3a0008;
  border-top: 3px solid #c8102e;
  border-radius: 6px;
}

.panel .post-full h2 {
  margin-bottom: 0.3rem;
  color: #ff3b3b;
}

.post-body {
  margin-top: 1rem;
  line-height: 1.65;
  color: #d8d0c0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.post-replies {
  margin-top: 1.75rem;
}

.post-replies h3 {
  margin-bottom: 0.75rem;
  font-family: "New Rocker", Georgia, serif;
  font-weight: 400;
  font-size: 1.35rem;
  color: #c8102e;
}

.post-reply {
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.6rem;
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  border-radius: 6px;
}

.post-reply .post-body {
  margin-top: 0.35rem;
}

.reply-form {
  margin-top: 1rem;
}

.post-form .form-error,
.panel > div > .form-error {
  padding: 0.5rem 0.75rem;
  color: #ffd9d9;
  background: #2a0008;
  border: 1px solid #c8102e;
  border-radius: 4px;
}

/* Leaderboard */

.leaderboard-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.difficulty-toggle {
  display: flex;
  gap: 0;
  border: 1px solid #3a0008;
  border-radius: 6px;
  overflow: hidden;
}

.difficulty-btn {
  padding: 0.4rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  color: #9a8f7c;
  background: #0d0d0d;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.difficulty-btn + .difficulty-btn {
  border-left: 1px solid #3a0008;
}

.difficulty-btn:hover {
  color: #e8e0d0;
  background: #1a0005;
}

.difficulty-btn[aria-pressed="true"] {
  color: #fff;
  background: linear-gradient(to bottom, #a00d25, #5a0009);
}

.difficulty-btn:focus-visible {
  outline: 2px solid #ff3b3b;
  outline-offset: -2px;
}

.leaderboard-raid-name {
  margin: 0.5rem 0 1rem;
  font-family: "New Rocker", Georgia, serif;
  font-weight: 400;
  font-size: 1.5rem;
  color: #ff3b3b;
}

.boss-card {
  margin-bottom: 1rem;
  padding: 1rem 1.25rem 1.1rem;
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-left: 3px solid #c8102e;
  border-radius: 6px;
}

.boss-card h4 {
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
  color: #e8e0d0;
}

.boss-roles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.boss-role h5 {
  margin-bottom: 0.4rem;
  padding-bottom: 0.25rem;
  font-size: 0.75rem;
  font-weight: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9a8f7c;
  border-bottom: 1px solid #1f1f1f;
}

.boss-role ol {
  list-style: none;
}

.boss-role li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.2rem 0;
  font-size: 0.92rem;
}

.parse-pct {
  flex: 0 0 1.8rem;
  font-weight: bold;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.parse-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: bold;
  text-decoration: none;
}

a.parse-name:hover {
  text-decoration: underline;
}

.parse-amount {
  flex: 0 0 auto;
  font-size: 0.8rem;
  color: #7d7466;
  font-variant-numeric: tabular-nums;
}

.panel .leaderboard-empty {
  font-size: 0.85rem;
  font-style: italic;
  color: #5a534a;
}

@media (max-width: 700px) {
  .boss-roles {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }
}

/* Roster */

.roster-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.roster-controls input[type="search"] {
  flex: 1 1 220px;
}

.roster-controls select {
  flex: 0 1 auto;
}

.roster-active {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 1rem;
  font-size: 0.95rem;
  cursor: pointer;
}

/* Puts the checkboxes on their own row under the search and dropdowns. */
.roster-controls .roster-break {
  flex-basis: 100%;
  height: 0;
}

.roster-table .achievement,
.roster-table .score {
  text-align: center;
}

.roster-table td.score {
  font-weight: bold;
  font-variant-numeric: tabular-nums;
}

.roster-table td.achievement {
  font-size: 1.1rem;
  color: #3fd16b;
}

.roster-table .inactive {
  color: #6f675a;
}

.panel .roster-summary {
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: #9a8f7c;
}

.roster-table-wrap {
  overflow-x: auto;
  border: 1px solid #3a0008;
  border-radius: 6px;
}

.roster-table {
  width: 100%;
  border-collapse: collapse;
}

.roster-table th {
  position: sticky;
  top: 0;
  padding: 0.6rem 0.9rem;
  font-weight: normal;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  color: #9a8f7c;
  background: #120003;
  border-bottom: 1px solid #3a0008;
}

.roster-table td {
  padding: 0.5rem 0.9rem;
  border-bottom: 1px solid #1a1a1a;
  white-space: nowrap;
}

.roster-table tbody tr:nth-child(even) {
  background: #0a0a0a;
}

.roster-table tbody tr:hover {
  background: #1a0005;
}

.roster-table a {
  font-weight: bold;
  text-decoration: none;
}

.roster-table a:hover {
  text-decoration: underline;
}

.roster-table .num {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
  .cal-day {
    min-height: 52px;
    padding: 0.25rem;
  }

  /* Too narrow for titles: show each event as a small dot instead. */
  .cal-event {
    width: 6px;
    height: 6px;
    padding: 0;
    font-size: 0;
    border-radius: 50%;
    background: #ff3b3b;
  }

  .cal-event.tagged {
    background: #666;
  }

  .cal-event.blizzard {
    background: #5a7590;
  }

  .cal-weekdays div {
    font-size: 0.7rem;
    letter-spacing: 0;
  }
}

/* Bug report / feature request button and form */

.feedback-btn {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 10;
  padding: 0.4rem 0.85rem;
  font: inherit;
  font-size: 0.8rem;
  color: #bdb3a0;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid #3a0008;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.feedback-btn:hover {
  color: #e8e0d0;
  border-color: #c8102e;
}

.feedback-btn:focus-visible {
  outline: 2px solid #ff3b3b;
  outline-offset: 2px;
}

.feedback-dialog {
  width: min(32rem, calc(100% - 2rem));
  margin: auto;
  padding: 0;
  color: #e8e0d0;
  background: transparent;
  border: none;
}

.feedback-dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
}

.feedback-dialog .post-form {
  margin: 0;
}

.feedback-dialog .post-form[hidden] {
  display: none;
}

.feedback-dialog .action-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
