:root {
  color-scheme: dark;
  --background-image: url('../img/background-117-01.png');
  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --color-foreground: #f6f1e7;
  --color-foreground-muted: rgba(247, 241, 231, 0.84);
  --color-cta: #f9b03d;
  --color-cta-hover: #ffd27f;
  --color-cta-text: #1b1204;
  --shadow-soft: 0 25px 60px rgba(3, 4, 7, 0.75);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background-color: #04070f;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background-color: transparent;
  color: var(--color-foreground);
  position: relative;
}

.background-layer {
  position: fixed;
  inset: 0;
  margin: 20px;
  top: 55px;
  bottom: 40px;
  background-image:
    linear-gradient(135deg, rgba(2, 4, 8, 0.85), rgba(4, 5, 11, 0.9)),
    url('../img/background-117-01.png');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  background-attachment: fixed;
  z-index: -1;
  filter: blur(10px);
}

.game-anno1800 .background-layer {
  background-image:
    linear-gradient(135deg, rgba(2, 4, 8, 0.85), rgba(4, 5, 11, 0.9)),
    url('../img/background-1800-01.jpg');
}

.layout {
  display: flex;
  min-height: 100vh;
  padding-top: 55px;
  padding-bottom: 40px;
}

.layout__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-left: 160px;
  position: relative;
  height: calc(100vh - 55px - 40px);
  overflow-y: auto;
  padding-bottom: 2rem;
  overscroll-behavior: contain;
}

.page-indicator {
  padding: 0.75rem 2rem 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: none;
  background: transparent;
}

.game-sidebar {
  width: 160px;
  background: rgba(5, 8, 15, 0.92);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: fixed;
  top: 55px;
  bottom: 40px;
  left: 0;
  overflow-y: auto;
}

.game-sidebar__buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: auto 0;
}

.game-button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 0;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease;
}

.game-button img {
  display: block;
  width: 120px;
}

.game-button.active {
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.04);
}

.topbar {
  height: 55px;
  background: rgba(5, 8, 15, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 20;
}

.bottombar {
  height: 40px;
  background: rgba(5, 8, 15, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 20;
}

.bot-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.bot-indicator__dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: #f87171;
  display: inline-block;
}

.bot-indicator--online .bot-indicator__dot {
  background: #4ade80;
}

.bot-indicator--pending .bot-indicator__dot {
  background: #facc15;
}

.bot-indicator--error .bot-indicator__dot {
  background: #fb7185;
}

.letter-spaced {
  letter-spacing: 0.3rem;
}

.brand-banner {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.active-game-pill {
  padding: 0.3rem 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nav-center {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-center .nav-link {
  position: relative;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  padding-bottom: 0.2rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-center .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), #fff);
  opacity: 0;
  transition: width 0.25s ease, opacity 0.25s ease;
}

.nav-center .nav-link:hover,
.nav-center .nav-link:focus-visible {
  color: #fff;
  transform: translateY(-1px);
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}

.nav-center .nav-link:hover::after,
.nav-center .nav-link:focus-visible::after {
  width: 100%;
  opacity: 0.85;
}

.nav-center .nav-link.active {
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.nav-center .nav-link.active::after {
  width: 100%;
  opacity: 1;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.mobile-menu-toggle {
  display: none;
}

.mobile-game-button {
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  text-align: left;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 90;
}

.auth-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, 90vw);
  background: rgba(5, 8, 15, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.auth-modal__header h2 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-modal__hint {
  font-size: 0.75rem;
  color: var(--color-foreground-muted);
  margin: 0;
}

.auth-modal__status {
  font-size: 0.85rem;
  color: var(--color-foreground-muted);
}

.form-label-sm {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-foreground-muted);
}

.mobile-game-button.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
}

.day-modal-backdrop,
.event-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 65;
}

.day-modal,
.event-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, 92vw);
  background: rgba(6, 8, 15, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.4);
  padding: 1.5rem;
  z-index: 75;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event-modal {
  width: min(640px, 96vw);
  padding-bottom: 1.25rem;
}

.invite-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 70;
}

.invite-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, 90vw);
  background: rgba(6, 8, 15, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.invite-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.invite-modal__eyebrow {
  margin: 0;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--color-foreground-muted);
}

.invite-modal__title {
  margin: 0.15rem 0 0;
  text-transform: uppercase;
  font-size: 1.5rem;
}

.invite-modal__body {
  font-size: 0.95rem;
  color: var(--color-foreground-muted);
  min-height: 3rem;
}

.invite-modal__status {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.invite-modal__status--error {
  color: #f87171;
}

.invite-modal__footer {
  display: flex;
  justify-content: flex-end;
}

.invite-modal__footer .disabled {
  opacity: 0.6;
  pointer-events: none;
}

.day-modal__header,
.event-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.day-modal__game {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-foreground-muted);
}

.day-modal__date {
  margin: 0.15rem 0 0;
  font-size: 1.35rem;
  font-family: var(--font-display);
  text-transform: uppercase;
}

.day-modal__body {
  max-height: 55vh;
  overflow-y: auto;
}

.day-modal__empty {
  margin: 0;
  padding: 1rem;
  text-align: center;
  color: var(--color-foreground-muted);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
}

.day-modal__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.day-modal__event {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.day-modal__event-title {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.day-modal__event-meta {
  font-size: 0.85rem;
  color: var(--color-foreground-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.day-modal__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.day-modal__event-desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-foreground-muted);
}

.day-modal__footer {
  margin-top: 0.5rem;
}

.event-modal__eyebrow {
  margin: 0;
  letter-spacing: 0.22em;
  font-size: 0.75rem;
  color: var(--color-foreground-muted);
  text-transform: uppercase;
}

.event-modal__title {
  margin: 0.25rem 0 0;
  text-transform: uppercase;
  font-size: 1.8rem;
}

.event-modal__body {
  max-height: 55vh;
  overflow-y: auto;
}

.event-modal__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.event-modal__status {
  font-size: 0.85rem;
  color: var(--color-foreground-muted);
  min-height: 1.2em;
}

.event-modal__status--error {
  color: #f87171;
}

.event-modal__status--success {
  color: #4ade80;
}

@media (max-width: 640px) {
  .day-modal,
  .event-modal {
    width: calc(100% - 1.5rem);
    height: auto;
    max-height: 90vh;
    padding: 1.25rem;
  }

  .event-modal__body,
  .day-modal__body {
    max-height: 60vh;
  }

  .invite-modal {
    width: calc(100% - 2rem);
  }
}


.hero {
  flex: 1;
  padding: 2rem 1.5rem 2rem;
}

.hero__content {
  background: rgba(10, 12, 20, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: clamp(2rem, 4vw, 3.5rem);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.hero__eyebrow {
  margin: 0 0 0.75rem;
  letter-spacing: 0.28rem;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--color-foreground-muted);
}

.hero__title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 600;
  text-transform: uppercase;
}

.hero__body {
  margin: 0 0 0.75rem;
  color: var(--color-foreground-muted);
  line-height: 1.6;
}

.hero__cta {
  margin: 1.75rem 0 1rem;
  background: linear-gradient(90deg, var(--color-cta), #fdd45e);
  color: var(--color-cta-text);
  border: none;
  box-shadow: 0 12px 32px rgba(249, 176, 61, 0.35);
}

.hero__closer {
  margin: 0;
  font-style: italic;
  color: var(--color-foreground-muted);
}

.admin-panel {
  margin-top: 2rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.25rem;
}

.admin-panel__title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-panel__hint {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--color-foreground-muted);
}

.admin-panel__locked {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-panel__token-field {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.admin-panel__controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-panel__status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.admin-panel__status-value {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-panel__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-panel__feedback {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--color-foreground-muted);
  min-height: 1.2em;
}

@media (max-width: 991px) {
  .layout {
    flex-direction: column;
    padding-top: 55px;
    padding-bottom: 40px;
  }

  .game-sidebar {
    display: none;
  }

  .layout__main {
    margin-left: 0;
    height: auto;
    overflow: visible;
  }

  .page-indicator {
    padding: 0.5rem 1rem 0;
    text-align: center;
  }

  .game-sidebar__buttons {
    flex-direction: row;
  }

  .hero__content {
    border-radius: 18px;
  }

  .hero__cta {
    width: 100%;
  }

  .nav-center {
    display: none;
  }

  .desktop-discord {
    display: none !important;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .mobile-game-selector .game-button img {
    width: 80px;
  }
}

.theme-anno117 .hero__title {
  color: #f6efe0;
}

.theme-anno1800 .hero__title {
  color: #b8d6ff;
}

.theme-anno1800 .hero__cta {
  background: linear-gradient(90deg, #64c5ff, #9ae0ff);
  color: #03253b;
  box-shadow: 0 12px 32px rgba(100, 197, 255, 0.35);
}
.calendar-container {
  margin-top: 2rem;
}

.calendar-grid {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.calendar-grid__header,
.calendar-grid__weekdays {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.calendar-grid__weekdays {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.8;
}

.calendar-grid__weekdays div {
  flex: 1;
  text-align: center;
}

.calendar-grid__days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.05);
}

.calendar-grid__cell {
  min-height: 96px;
  background: rgba(8, 12, 22, 0.85);
  padding: 0.45rem 0.55rem 0.4rem;
  border: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: background 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.calendar-grid__cell--empty {
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.45);
}

.calendar-grid__cell:hover {
  background: rgba(24, 32, 52, 0.92);
}

.calendar-grid__cell:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.calendar-grid__day-number {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

.calendar-grid__event-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.calendar-grid__event-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.25rem 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  line-height: 1;
  min-height: 1.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-grid__event-pill--more {
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 768px) {
  .calendar-grid__cell {
    min-height: 80px;
    padding: 0.35rem 0.4rem;
  }

  .calendar-grid__event-pill {
    font-size: 0.68rem;
  }
}
