/* Sidebar flex container to push Discord tab to bottom */
.sidebar-flex {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.sidebar-flex .nav-menu {
  flex: 0 0 auto;
}
.sidebar-flex .discord-tab {
  margin-block-start: auto;
  margin-block-end: 1.2rem;
}
/* Sidebar open/close buttons (mobile only) */
@media (min-width: 768px) {
  .open-sidebar, .close-sidebar {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .open-sidebar {
    display: block !important;
    position: fixed;
    z-index: 100;
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    left: 8px;
    top: 16px;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 2px 8px #a259ff44;
  }
  .open-sidebar svg {
    width: 22px;
    height: 22px;
    display: block;
  }
  .close-sidebar {
    display: block !important;
    position: absolute;
    z-index: 101;
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    right: 8px;
    top: 16px;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 2px 8px #a259ff44;
  }
  .close-sidebar svg {
    width: 22px;
    height: 22px;
    display: block;
  }
}
/* Global Styles */
* {
  box-sizing: border-box;
}
html, body {
  overflow-x: hidden;
  margin: 0;
  font-family: 'Segoe UI', 'Arial', sans-serif;
  min-block-size: 100vh;
  background: #f7f8fa;
  color: #222;
  transition: background 0.3s, color 0.3s;
}
body.theme-dark {
  background: #181d21;
  color: #e9e9e9;
}

/* --- KILLS SECTION --- */
.kills-section {
  margin-block-start: 1.5rem;
  background: #fff;
  border-radius: 14px;
  border: 2px solid #a259ff22;
  box-shadow: 0 2px 8px #a259ff11;
  padding: 1.2rem 1.5rem;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.kills-section h2 {
  color: #a259ff;
  font-size: 1.6rem;
  margin-block-end: 1.1rem;
}
.kills-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-block-start: 0.1rem;
}
.kill-card {
  background: #fff;
  border-radius: 12px;
  border: 2px solid #a259ff44;
  box-shadow: 0 2px 8px #a259ff18;
  padding: 0.7rem 0.7rem 0.9rem 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  gap: 0.8rem;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1.2s cubic-bezier(.23,1.22,.59,.83), transform 1.2s cubic-bezier(.23,1.22,.59,.83);
  border-block-end: 6px solid #a259ff33;
}
.kill-card.fade-in {
  opacity: 1;
  transform: translateY(0);
  box-shadow: 0 4px 16px #a259ff22;
}
.kill-thumb-wrap {
  inline-size: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  block-size: 134px;
  background: #a259ff09;
  border-radius: 10px;
  margin-block-end: 0.3rem;
  border: 2px solid #a259ff22;
  box-shadow: 0 1px 6px #a259ff11;
}
.kill-thumb {
  inline-size: 194px;
  block-size: 109px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #a259ff33;
  background: #232136;
  box-shadow: 0 1px 9px #a259ff22;
  transition: border 0.2s;
  pointer-events: none;
}
.kill-thumb-unknown {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #a259ff;
  inline-size: 194px;
  block-size: 109px;
  background: #eee;
  border-radius: 8px;
  border: 2px solid #a259ff33;
}
.kill-info {
  inline-size: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.18rem;
}
.kill-title {
  font-size: 1.09rem;
  font-weight: bold;
  color: #a259ff;
  margin-block-end: 0.08rem;
  text-shadow: 0 1px 0 #a259ff11;
}
.kill-desc {
  font-size: 0.97rem;
  color: #2d2351;
}
.no-kills {
  font-size: 1.2rem;
  color: #a259ff;
  text-align: center;
  margin: 2rem 0;
  font-weight: bold;
  background: transparent;
}

/* Dark Theme for Kills */
body.theme-dark .kills-section {
  background: #232136;
  border: 2px solid #a259ff55;
  color: #e9e9e9;
}
body.theme-dark .kill-card {
  background: #232136;
  border: 2px solid #a259ff;
  color: #e9e9e9;
}
body.theme-dark .kill-thumb-wrap {
  background: #232136;
  border: 2px solid #a259ff44;
}
body.theme-dark .kill-thumb, body.theme-dark .kill-thumb-unknown {
  background: #232136;
  border: 2px solid #a259ff;
}
body.theme-dark .kill-title {
  color: #a259ff;
}
body.theme-dark .kill-desc {
  color: #c2f7e1;
}

/* --- KILL MODAL --- */
#kill-modal {
  display: none;
  /* Styles set via JS for position, etc. */
  /* This selector is used for modal overlay. */
}
#kill-modal[style*="display: flex"] {
  display: flex !important;
}
#kill-modal-content {
  /* Styles set via JS for modal content. */
  display: none;
}
#kill-modal-media-wrap {
  /* Filled dynamically by JS. */
  min-block-size: 1px;
}
#kill-modal-title {
  /* Styles set via JS for modal title. */
  min-block-size: 1px;
}
#kill-modal-desc {
  /* Styles set via JS for modal description. */
  min-block-size: 1px;
}
#close-kill-modal {
  /* Styles set via JS for close button. */
  min-inline-size: 1px;
}

/* Dark theme for kill modal */
body.theme-dark #kill-modal #kill-modal-content {
  background: #232136 !important;
}
body.theme-dark #kill-modal #kill-modal-media-wrap video,
body.theme-dark #kill-modal #kill-modal-media-wrap img {
  background: #232136 !important;
  border-color: #a259ff !important;
}
body.theme-dark #kill-modal #kill-modal-title {
  color: #a259ff !important;
}
body.theme-dark #kill-modal #kill-modal-desc {
  color: #c2f7e1 !important;
}
body.theme-dark #kill-modal #close-kill-modal {
  background: #a259ff !important;
  color: #fff !important;
}

/* --- END KILLS SECTION CSS --- */

/* Sidebar */
.sidebar {
  inline-size: 220px;
  min-block-size: 100vh;
  block-size: 100vh;
  background: #fafafa;
  border-inline-end: 2px solid #d1d1d1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  height: 100vh;
  padding: 0;
  box-sizing: border-box;
  position: fixed;
  inset-inline-start: 0;
  inset-block-start: 0;
  z-index: 20;
  transition: background 0.3s, border-color 0.3s;
  overflow-y: auto;
  max-inline-size: 100vw;
  overflow-x: hidden;
}
body.theme-dark .sidebar {
  background: #232136;
  border-inline-end: 2px solid #a259ff;
}
.sidebar-top {
  inline-size: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem 1rem 1rem 1rem;
}
.clan-name {
  font-size: 2.2rem;
  font-weight: bold;
  letter-spacing: 2px;
  color: #a259ff;
  text-shadow: 0 2px 0 #2d2351;
}

/* Tab bar (nav-menu) */
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  inline-size: 100%;
  margin-block-end: 1.2rem;
  padding-inline-start: 0.5rem;
  overflow-x: hidden;
  flex: 1 1 auto;
}
.nav-tab {
  background: none;
  border: none;
  color: #2d2351;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.29rem 0.5rem 0.29rem 0.4rem;
  border-radius: 8px;
  text-align: start;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4em;
  max-inline-size: 99%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-tab .nav-text {
  max-inline-size: 125px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}
.nav-tab.active, .nav-tab:hover {
  background: #a259ff22;
  color: #a259ff;
}
body.theme-dark .nav-tab {
  color: #fff;
}
body.theme-dark .nav-tab.active, body.theme-dark .nav-tab:hover {
  background: #a259ff33;
  color: #a259ff;
}

/* Discord tab (bottom of sidebar) */
.discord-tab {
  font-size: 0.98rem;
  padding: 0.29rem 0.5rem 0.29rem 0.4rem;
  color: #5865f2;
  margin-block-end: 1.2rem;
  margin-block-start: auto;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  gap: 0.4em;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
  max-inline-size: 99%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.discord-tab:hover {
  background: #5865f222;
  color: #a259ff;
}
body.theme-dark .discord-tab {
  color: #a259ff;
  background: none;
}
body.theme-dark .discord-tab:hover {
  background: #a259ff33;
  color: #fff;
}

/* Theme switcher (fixed top right) */
.theme-switcher {
  position: fixed;
  inset-block-start: 16px;
  inset-inline-end: 26px;
  font-size: 1.4rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #a259ff;
  border-radius: 8px;
  box-shadow: none;
  z-index: 120;
  transition: background 0.2s, color 0.2s;
}
.theme-switcher:hover {
  background: #a259ff44;
  color: #fff;
}
body.theme-dark .theme-switcher {
  color: #fff;
  background: none;
}
body.theme-dark .theme-switcher:hover {
  background: #a259ff44;
  color: #a259ff;
}

/* Main Content */
.content {
  max-inline-size: calc(100vw - 220px);
  inline-size: 100%;
  margin: 40px auto 80px 220px;
  padding: 1.5rem;
  background: transparent;
  transition: background 0.3s;
}
body.theme-dark .content {
  background: #181d21;
}
@media (max-width: 700px) {
  .sidebar {
    inline-size: 100vw;
    min-inline-size: 0;
    max-inline-size: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
  }
  .content {
    margin-inline-start: 0;
    margin-block-start: 40px;
    padding: 1rem;
    max-inline-size: 100vw;
    inline-size: 100vw;
  }
}

/* Info Section */
.info-section {
  margin-block-start: 1rem;
  background: #fff;
  border-radius: 14px;
  border: 2px solid #a259ff22;
  box-shadow: 0 2px 8px #a259ff11;
  padding: 1.2rem 1.5rem;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.info-section h2 {
  color: #a259ff;
  font-size: 1.6rem;
  margin-block-end: 0.7rem;
}
body.theme-dark .info-section {
  background: #232136;
  border: 2px solid #a259ff55;
  color: #e9e9e9;
}
body.theme-dark .info-section h2 {
  color: #a259ff;
}

/* Events Section */
.events-section {
  margin-block-start: 1rem;
}
.events-section h2 {
  color: #a259ff;
  font-size: 1.6rem;
  margin-block-end: 0.7rem;
}
.event-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.event-card {
  background: #fff;
  border-radius: 14px;
  border: 2px solid #a259ff22;
  box-shadow: 0 2px 8px #a259ff11;
  padding: 1.2rem 1.5rem;
  margin-block-end: 0.6rem;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.event-card h3 {
  margin-block-start: 0.2rem;
  color: #a259ff;
}
.event-date {
  color: #2d2351;
  font-weight: bold;
  font-size: 1rem;
  margin-block-start: 0.7rem;
  display: inline-block;
}
body.theme-dark .event-card {
  background: #232136;
  border: 2px solid #a259ff55;
  color: #e9e9e9;
}
body.theme-dark .event-card h3 {
  color: #a259ff;
}
body.theme-dark .event-date {
  color: #a259ff;
}
.no-events {
  font-size: 1.3rem;
  color: #a259ff;
  text-align: center;
  margin: 2rem 0;
  font-weight: bold;
  background: transparent;
}

/* Members Section */
.members {
  margin-block-start: 1rem;
}
.members h2 {
  font-size: 1.7rem;
  color: #a259ff;
  margin-block-end: 1.2rem;
  text-shadow: 0 2px 0 #2d2351;
  letter-spacing: 1px;
}
.member-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.member {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: opacity 1.1s cubic-bezier(.23,1.22,.59,.83), transform 1.1s cubic-bezier(.23,1.22,.59,.83);
  background: #fff;
  border-radius: 14px;
  border: 2px solid #a259ff70;
  box-shadow: 0 2px 8px #a259ff22;
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.member.fade-in {
  opacity: 1;
  transform: translateY(0) scale(1.03);
  box-shadow: 0 4px 14px #a259ff55;
}
body.theme-dark .member {
  background: #232136;
  border: 2px solid #a259ff;
  box-shadow: 0 2px 8px #a259ff33;
  color: #e9e9e9;
}
body.theme-dark .member.fade-in {
  box-shadow: 0 4px 14px #a259ff77;
}
.member-avatar {
  inline-size: 64px;
  block-size: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #a259ff55;
  box-shadow: 0 2px 8px #a259ff22;
  background: #f7f8fa;
  margin-inline-end: 0.5rem;
}
body.theme-dark .member-avatar {
  background: #232136;
  border: 2px solid #a259ff;
}
.member-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.member-name {
  font-weight: bold;
  font-size: 1.2rem;
  color: #2d2351;
  text-shadow: 0 1px 0 #a259ff22;
}
body.theme-dark .member-name {
  color: #e9e9e9;
}
.roles-badges {
  display: flex;
  gap: 0.5rem;
  margin: 0.3rem 0;
}
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.25em 1.2em;
  background: #a259ff;
  color: #fff;
  border-radius: 999px;
  font-size: 0.97rem;
  font-weight: 500;
  box-shadow: 0 1px 4px #a259ff44;
  border: 2px solid #a259ff;
  margin-block-end: 0.1em;
  margin-inline-end: 0.15em;
}
.inline-icon {
  block-size: 16px;
  inline-size: 16px;
  vertical-align: middle;
  image-rendering: pixelated;
  margin-inline-end: 0.15em;
  margin-block-end: -2px;
}
.member-desc {
  color: #666;
  font-size: 1rem;
}
body.theme-dark .member-desc {
  color: #c2f7e1;
}

/* Achievements Section */
.achievements-section {
  margin-block-start: 1rem;
}
.achievements-section h2 {
  color: #a259ff;
  font-size: 1.6rem;
  margin-block-end: 0.7rem;
}
.achievement-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.achievement-card {
  background: #fff;
  border-radius: 14px;
  border: 2px solid #a259ff22;
  box-shadow: 0 2px 8px #a259ff11;
  padding: 1.2rem 1.5rem;
  margin-block-end: 0.6rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1.2s cubic-bezier(.23,1.22,.59,.83), transform 1.2s cubic-bezier(.23,1.22,.59,.83);
}
.achievement-card.fade-in {
  opacity: 1;
  transform: translateY(0);
}
.achievement-img {
  inline-size: 110px;
  block-size: 110px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #a259ff66;
  box-shadow: 0 2px 8px #a259ff22;
  background: #f7f8fa;
  cursor: pointer;
}
.achievement-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.achievement-info h3 {
  color: #a259ff;
  margin: 0;
  font-size: 1.2rem;
}
.achievement-info p {
  color: #2d2351;
  margin: 0;
  font-size: 1rem;
}
body.theme-dark .achievement-card {
  background: #232136;
  border: 2px solid #a259ff55;
  color: #e9e9e9;
}
body.theme-dark .achievement-img {
  background: #232136;
  border: 2px solid #a259ff;
}
body.theme-dark .achievement-info h3 {
  color: #a259ff;
}
body.theme-dark .achievement-info p {
  color: #c2f7e1;
}

/* FAQ Section */
.faq-section {
  margin-block-start: 0.5rem;
  margin-inline-start: 15rem; /* shift it to the right */
  background: #fff;
  border-radius: 14px;
  border: 2px solid #a259ff22;
  box-shadow: 0 2px 8px #a259ff11;
  padding: 1.2rem 1.5rem;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.faq-section h2 {
  color: #a259ff;
  font-size: 1.8rem;
  margin-block-end: 1.4rem;
  letter-spacing: 1px;
  font-weight: bold;
}
.faq-item {
  margin-block-end: 2.2rem;
  padding-block-end: 1.3rem;
  border-block-end: 1px solid #a259ff22;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1.2s cubic-bezier(.23,1.22,.59,.83), transform 1.2s cubic-bezier(.23,1.22,.59,.83);
}
.faq-item.fade-in {
  opacity: 1;
  transform: translateY(0);
}
.faq-title {
  font-size: 1.25rem;
  color: #a259ff;
  font-weight: 600;
  margin-block-end: 0.5rem;
  letter-spacing: 0.5px;
}
.faq-desc {
  font-size: 1rem;
  color: #2d2351;
  margin-block-end: 0.7rem;
}
.faq-footer {
  font-size: 0.94rem;
  color: #5865f2;
  margin-block-end: 0.5rem;
  margin-block-start: 0.2rem;
  font-style: italic;
}
body.theme-dark .faq-section {
  background: #232136;
  border: 2px solid #a259ff55;
  color: #e9e9e9;
}
body.theme-dark .faq-title {
  color: #a259ff;
}
body.theme-dark .faq-desc {
  color: #c2f7e1;
}
body.theme-dark .faq-footer {
  color: #a259ff;
}

/* Fade-in animation for scroll */
.show-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1.2s cubic-bezier(.23,1.22,.59,.83), transform 1.2s cubic-bezier(.23,1.22,.59,.83);
}
.show-on-scroll.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* Event card fade-in */
.event-card,
.no-events {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1.2s cubic-bezier(.23,1.22,.59,.83), transform 1.2s cubic-bezier(.23,1.22,.59,.83);
}
.event-card.fade-in,
.no-events.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* Achievement Modal ("thingy thing") */
#achievement-modal {
  /* Styles set via JS for achievement modal overlay. */
  display: none;
}
#achievement-modal[style*="display: flex"] {
  display: flex !important;
}
#modal-content {
  /* Styles set via JS for achievement modal content. */
  display: none;
}
#modal-img {
  /* Styles set via JS for achievement modal image. */
  min-inline-size: 1px;
}
#modal-title {
  /* Styles set via JS for achievement modal title. */
  min-block-size: 1px;
}
#modal-desc {
  /* Styles set via JS for achievement modal description. */
  min-block-size: 1px;
}
#close-modal {
  /* Styles set via JS for achievement modal close button. */
  min-inline-size: 1px;
}

/* Dark theme for modal */
body.theme-dark #achievement-modal #modal-content {
  background: #232136 !important;
}
body.theme-dark #achievement-modal #modal-img {
  background: #232136 !important;
  border-color: #a259ff !important;
}
body.theme-dark #achievement-modal #modal-title {
  color: #a259ff !important;
}
body.theme-dark #achievement-modal #modal-desc {
  color: #c2f7e1 !important;
}
body.theme-dark #achievement-modal #close-modal {
  background: #a259ff !important;
  color: #fff !important;
}
