@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Raleway:wght@300;400;500;600&display=swap');

:root {
  --bg: #2a2a2a;
  --bg-header: #0a0a0a;
  --bg-menu: rgba(10, 10, 10, 0.85);
  --bg-panel: rgba(20, 20, 20, 0.8);
  --text: #d0d0d0;
  --text-muted: #888;
  --border: #3a3a3a;
  --white: #e8e8e8;

  --font-heading: 'Cinzel', 'Georgia', serif;
  --font-body: 'Raleway', 'Segoe UI', sans-serif;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 14px;
  height: 100%;
}

body {
  font-family: var(--font-body);
  background-color: transparent;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  top: -150px;
  left: -50px;
  right: -50px;
  bottom: -150px;
  background-color: var(--bg);
  background-image: linear-gradient(rgba(15, 15, 15, 0.85), rgba(10, 10, 10, 0.95)), url('../assets/images/bg-main.png');
  background-size: cover;
  background-position: center;
  z-index: -1;
  /* animation: bg-breathe 10s ease-in-out infinite alternate; */
  /* will-change: transform; */
}

@keyframes bg-breathe {
  0% { transform: scale(1) translateZ(0); }
  100% { transform: scale(1.1) translateZ(0); }
}

a {
  color: var(--text);
  text-decoration: none;
}

/* ── Header ── */
.header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.header-left,
.header-right {
  flex: 1;
  display: flex;
  align-items: center;
}

.header-left {
  justify-content: flex-start;
}

.header-right {
  justify-content: flex-end;
}

/* Logo */
.logo {
  flex-shrink: 0;
}

.logo-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

/* Burger */
.burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: all 0.2s ease;
}

.burger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.open span:nth-child(2) {
  opacity: 0;
}

.burger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 3px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background: var(--white);
  color: var(--bg-header);
}

.lang-btn:hover:not(.active) {
  color: var(--white);
}

/* Header Socials */
.header-links-top {
  display: flex;
  gap: 15px;
  margin-right: 20px;
}

.header-links-top a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s;
}

.header-links-top a:hover {
  color: var(--white);
}

/* Burger dropdown menu */
.burger-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  visibility: hidden;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  background: var(--bg-menu);
  border-bottom: 1px solid transparent;
  padding: 0 20px;
  transition: all 0.3s ease-out;
}

.burger-menu.open {
  visibility: visible;
  opacity: 1;
  max-height: 500px;
  border-bottom: 1px solid var(--border);
  padding: 8px 20px;
}

.menu-link {
  display: block;
  padding: 10px 16px;
  margin-bottom: 4px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.menu-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

/* ── Main ── */
.main {
  flex: 1;
}

.page-title {
  text-align: center;
  margin-top: 50px;
  margin-bottom: 20px;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--white);
}

/* ── Footer ── */
.footer {
  background: var(--bg-header);
  border-top: 1px solid var(--border);
  padding: 12px 24px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.footer-links a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a svg {
  width: 18px;
  height: 18px;
}

.footer-links a:hover {
  color: var(--white);
}

/* ── Colored Social Icons ── */
.header-links-top a,
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.header-links-top a[aria-label="Discord"] svg,
.footer-links a[aria-label="Discord"] svg {
  color: #505cd1;
}

.header-links-top a[aria-label="YouTube"] svg,
.footer-links a[aria-label="YouTube"] svg {
  color: #cc1e1e;
}

.header-links-top a[aria-label="Patreon"] svg,
.footer-links a[aria-label="Patreon"] svg {
  color: #d85104;
}

.header-links-top a[aria-label]:hover svg,
.footer-links a[aria-label]:hover svg {
  filter: drop-shadow(0 0 5px currentColor) brightness(1.2);
}

@media (max-width: 768px) {
  .soc-text {
    display: none;
  }

  .header-inner {
    justify-content: flex-start;
    gap: 15px;
  }

  .logo {
    order: 1;
    margin-right: auto;
  }

  .header-left {
    order: 2;
  }

  .header-right {
    order: 3;
    margin-left: 0;
  }

  .header-links-top {
    gap: 10px;
    margin-right: 15px;
  }
}

/* ── Calendar ── */
.calendar-container {
  max-width: 1000px;
  margin: 40px auto;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.cal-btn {
  background: var(--bg);
  color: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background 0.2s;
}

.cal-btn:hover {
  background: #333;
}

#month-year-display {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--white);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: bold;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
  color: var(--text-muted);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.calendar-day {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 4px;
  min-height: 100px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.calendar-day.empty {
  background: transparent;
  border: none;
}

.calendar-day.no-games {
  background: repeating-linear-gradient(45deg,
      var(--bg-menu),
      var(--bg-menu) 10px,
      var(--bg-header) 10px,
      var(--bg-header) 20px);
  border-color: #444;
}

.day-num {
  text-align: right;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.day-events {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.event-tag {
  background: #3a3222;
  border: 1px solid #5a4a2a;
  border-left: 3px solid #a88a42;
  padding: 6px;
  font-size: 0.85rem;
  border-radius: 3px;
  color: var(--white);
  cursor: default;
  position: relative;
}

.event-tag .event-name {
  color: #e6c57a;
}

.event-tag em {
  color: #aaa;
  font-size: 0.75rem;
}

.no-games-tag {
  background: transparent;
  border: none;
  border-left: 3px solid #666;
  color: #888;
  font-style: italic;
  text-align: center;
}

.event-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: max-content;
  max-width: 280px;
  z-index: 10;
  font-size: 0.85rem;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: opacity 0.15s, visibility 0.15s;
  pointer-events: auto;
}


.event-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 20px;
}

.event-tag:hover .event-tooltip {
  visibility: visible;
  opacity: 1;
  bottom: 110%;
}

.mobile-wd {
  display: none;
}

@media (max-width: 768px) {
  .calendar-weekdays {
    display: none;
  }

  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .calendar-day.empty {
    display: none;
  }

  .calendar-day {
    min-height: auto;
    flex-direction: row;
    align-items: flex-start;
  }

  .day-num {
    width: 60px;
    text-align: left;
    margin: 0;
    font-size: 1.2rem;
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 5px;
  }

  .mobile-wd {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
  }

  .event-title,
  .event-system {
    display: block;
  }
}


/* EVENT THEMES */
.event-tag.theme-default {
  background: #3a3222;
  border-color: #5a4a2a;
  border-left-color: #a88a42;
  --theme-color: #e6c57a;
}

.event-tag.theme-red {
  background: #331a1a;
  border-color: #5a1a1a;
  border-left-color: #8b0000;
  --theme-color: #ffaaaa;
}

.event-tag.theme-blue {
  background: #1a2333;
  border-color: #1a355a;
  border-left-color: #0c6bd1;
  --theme-color: #aac8ff;
}

.event-tag.theme-aquamarine {
  background: #1a3331;
  border-color: #1a5a54;
  border-left-color: #008b82;
  --theme-color: #aafffa;
}

.event-tag.theme-green {
  background: #1a331c;
  border-color: #1a5a22;
  border-left-color: #008b1a;
  --theme-color: #aaffb3;
}

.event-tag.theme-violet {
  background: #2b1a33;
  border-color: #4a1a5a;
  border-left-color: #6b008b;
  --theme-color: #deaaff;
}

.event-tag.theme-yellow {
  background: #332d1a;
  border-color: #5a4b1a;
  border-left-color: #8b7100;
  --theme-color: #ffe6aa;
}

@media (max-width: 768px) {
  .calendar-day.sunday {
    margin-bottom: 30px;
    border-bottom: 2px dashed #444;
    padding-bottom: 15px;
  }
}

.event-tag strong {
  color: #ffffff;
}

.event-tag .event-name {
  font-weight: bold;
  color: var(--theme-color);
}

.tooltip-header {
  font-size: 1.05rem;
  font-weight: bold;
  text-align: center;
  color: #fff;
  padding: 8px 10px;
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px 5px 0 0;
}

.tooltip-body {
  padding: 10px;
}

.event-tag.theme-default .tooltip-header {
  background: #3a3222;
}

.event-tag.theme-red .tooltip-header {
  background: #331a1a;
}

.event-tag.theme-blue .tooltip-header {
  background: #1a2333;
}

.event-tag.theme-aquamarine .tooltip-header {
  background: #1a3331;
}

.event-tag.theme-green .tooltip-header {
  background: #1a331c;
}

.event-tag.theme-violet .tooltip-header {
  background: #2b1a33;
}

.event-tag.theme-yellow .tooltip-header {
  background: #332d1a;
}

/* Tooltip flip for edges */
.event-tag.tooltip-bottom .event-tooltip {
  bottom: auto;
  top: 120%;
}

.event-tag.tooltip-bottom .event-tooltip::after {
  top: auto;
  bottom: 100%;
}

.event-tag.tooltip-center .event-tooltip {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  z-index: 10000 !important;
}

.event-tag.tooltip-center .event-tooltip::after {
  display: none !important;
}
.event-tag .theme-link {
  color: var(--theme-color);
}

.event-tag.tooltip-is-below .event-tooltip::after {
  top: auto !important;
  bottom: 100% !important;
}

/* ── Recordings ── */
.recordings-container {
  max-width: 900px;
  margin: 0 auto 40px;
  padding: 20px;
}

.recordings-container h2,
.recordings-container h3,
.recordings-container h4,
.recordings-container h5,
.recordings-container h6 {
  font-family: var(--font-heading);
  color: var(--white);
  margin-top: 30px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 5px;
}

.recordings-container h2 { font-size: 2rem; }
.recordings-container h3 { font-size: 1.6rem; color: #dcdcdc; }

.recordings-container ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.recordings-container li {
  background: var(--bg-header);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 15px;
  color: var(--text);
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.recordings-container blockquote {
  background: #2b2b2b;
  border-left: 4px solid var(--border);
  padding: 15px;
  margin-bottom: 30px;
  font-style: italic;
  color: var(--text-muted);
  border-radius: 4px;
}

/* ── Accordion Folders ── */
.folder-details {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
  margin-left: 20px; /* Indent each folder level */
}
/* First level folders shouldn't be indented */
.recordings-container > .folder-details {
  margin-left: 0;
}

.folder-summary {
  padding: 15px;
  cursor: pointer;
  font-weight: 600;
  color: var(--white);
  list-style: none; /* Hide default arrow in some browsers */
  user-select: none;
  display: flex;
  align-items: center;
}
.folder-summary::-webkit-details-marker {
  display: none; /* Hide default arrow in WebKit */
}
.folder-summary:hover {
  background: rgba(255, 255, 255, 0.05);
}
.folder-summary::before {
  content: '';
  display: inline-block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-right: 10px;
  background-color: var(--theme-color, #e0a96d);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z'/%3E%3C/svg%3E") no-repeat center;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z'/%3E%3C/svg%3E") no-repeat center;
  transition: transform 0.2s, background-color 0.2s;
}
.folder-details[open] > .folder-summary::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z'/%3E%3C/svg%3E") no-repeat center;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z'/%3E%3C/svg%3E") no-repeat center;
}

.folder-content {
  padding: 10px 15px 15px 15px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

/* ── File List ── */
.file-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 20px; /* Indent files inside folders */
}

.file-item {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--bg-panel);
  border-radius: 6px;
  margin-bottom: 8px;
  transition: background 0.2s;
}
.file-item:last-child {
  margin-bottom: 0;
}
.file-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.file-info {
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-bottom: 10px; /* Space between title and player */
}
.file-info .icon {
  margin-right: 12px;
  font-size: 1.2rem;
}
.file-info .name {
  color: var(--text);
  font-weight: 500;
  word-break: break-word; /* Allow long words to wrap */
}

.file-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn-play, .btn-download {
  background: var(--border);
  color: var(--white);
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.btn-play:hover, .btn-download:hover {
  background: var(--white);
  color: var(--bg);
}

/* Global Audio Player */
.global-player {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--bg-header);
  border-top: 2px solid var(--border);
  padding: 15px 20px;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 9999;
  transition: transform 0.3s ease;
}

.global-player.hidden {
  transform: translateY(100%);
}

.player-info {
  margin-bottom: 10px;
  text-align: center;
  max-width: 800px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.player-title {
  color: var(--white);
  font-weight: 600;
  padding-right: 30px;
}

#main-audio {
  width: 100%;
  max-width: 800px;
  height: 40px;
  outline: none;
}
#main-audio::-webkit-media-controls-panel {
  background-color: #333;
}
#main-audio::-webkit-media-controls-current-time-display,
#main-audio::-webkit-media-controls-time-remaining-display {
  color: #fff;
}

.player-close {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}
.player-close:hover {
  color: var(--white);
}

@media (max-width: 768px) {
  .file-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .file-actions {
    margin-top: 10px;
    align-self: flex-end;
  }
}
