/* Background image */
body {
  margin: 0;
  padding: 0;
  background: url("assets/backgroundfox.png") no-repeat center center fixed;
  background-size: cover;
  font-family: Arial, sans-serif;
  color: white;
}

/* Dark transparency overlay for background */
.page-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.8);
  z-index: 1;
  pointer-events: none;
}

/* Top bar - bigger to accommodate logo */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  height: 50px;
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  z-index: 5;
  box-sizing: border-box;
  gap: 10px;
}

.top-bar-logo {
  height: 35px;
  width: auto;
  max-width: min(200px, calc(50vw - 100px));
  object-fit: contain;
  flex-shrink: 1;
  min-width: 0;
}

.discord-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(88, 101, 242, 0.2);
  border: 1px solid rgba(88, 101, 242, 0.5);
  border-radius: 6px;
  color: white;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-right: 0;
  flex-shrink: 0;
  white-space: nowrap;
}

.discord-button:hover {
  background: rgba(88, 101, 242, 0.4);
  border-color: rgba(88, 101, 242, 0.8);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(88, 101, 242, 0.3);
}

@media (max-width: 600px) {
  .discord-button span {
    display: none;
  }
  
  .discord-button {
    padding: 6px;
  }
}

.discord-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* Left element - same level as sub-bar, smaller, darker */
.left-element {
  position: fixed;
  top: 50px; /* Below top bar (now 50px) */
  left: 0;
  width: 220px;
  height: 40px;
  background: rgba(19, 19, 19, 0.95);
  border-right: 1px solid rgba(25, 25, 25, 0.95);
  border-bottom: 1px solid rgba(25, 25, 25, 0.95);
  display: flex;
  align-items: center;
  padding-left: 15px;
  z-index: 4;
  box-sizing: border-box;
}

.left-element h3 {
  margin: 0;
  font-size: 14px;
}

/* Second bar (Wiki bar) - darker, intervenes with left element, same height */
.sub-bar {
  position: fixed;
  top: 50px; /* Same level as left element (below top bar 50px) */
  left: 220px; /* Aligned with content area start */
  right: 0;
  height: 40px; /* Same height as left element */
  background: rgba(24, 24, 24, 0.9);
  border-bottom: 1px solid rgba(35, 35, 35, 0.95);
  display: flex;
  align-items: center;
  padding: 0 15px;
  z-index: 4;
  font-size: 14px;
  box-sizing: border-box;
}

/* Navigation bar - same width as left element, right below it, darker */
.sidebar {
  position: fixed;
  top: 90px; /* Below left element and sub-bar (50px top-bar + 40px bars) */
  left: 0;
  width: 220px; /* Same width as left element */
  height: calc(100vh - 90px);
  overflow-y: auto;
  background: rgba(25, 25, 25, 0.9);
  padding: 12px;
  border-right: 1px solid rgba(25, 25, 25, 0.95);
  border-top: 1px solid rgba(25, 25, 25, 0.95);
  z-index: 3;
  box-sizing: border-box;
}

.sidebar h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 13px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  margin-bottom: 4px;
}

.sidebar a {
  text-decoration: none;
  color: #ddd;
  font-size: 13px;
  transition: color 0.2s;
}

.sidebar a:hover {
  color: white;
}

.sidebar a.active {
  color: white;
  font-weight: bold;
}

.section-title {
  margin-top: 12px;
  margin-bottom: 6px;
  font-size: 11px;
  text-transform: uppercase;
  color: #bbb;
  font-weight: bold;
}

.section {
  list-style: none;
  padding: 0;
  margin: 0;
}

.section li {
  margin-left: 10px;
  margin-bottom: 3px;
}

/* Content area - fills remaining screen space */
.content {
  position: fixed;
  top: 90px; /* Below bars (50px top-bar + 40px bars) */
  left: 220px; /* Starts right after sidebar (sidebar width 220px with border-box) */
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 20px;
  overflow-y: auto;
  background: rgba(20, 20, 20, 0.55);
  box-sizing: border-box;
}

.content h1 {
  margin-top: 0;
  font-size: 28px;
  margin-bottom: 20px;
  color: #fff;
}

.content h2 {
  font-size: 22px;
  margin-top: 40px;
  margin-bottom: 30px;
  color: #fff;
  border-bottom: 2px solid rgba(61, 107, 138, 0.6);
  padding-bottom: 10px;
}

.intro-text {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 20px;
  color: #e0e0e0;
  text-align: justify;
}

.about-section {
  margin-bottom: 50px;
}

/* Links Section */
.links-section {
  margin-top: 50px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.link-card {
  background: rgba(30, 40, 50, 0.6);
  border: 2px solid rgba(61, 107, 138, 0.4);
  border-radius: 12px;
  transition: all 0.3s ease;
  overflow: hidden;
}

.link-card:hover {
  border-color: rgba(61, 107, 138, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(61, 107, 138, 0.3);
  background: rgba(30, 40, 50, 0.75);
}

.modrinth-link,
.discord-link,
.youtube-link,
.stats-link {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 0;
}

.link-card-content {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
}

.link-icon {
  font-size: 32px;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(61, 107, 138, 0.2);
  border-radius: 10px;
}

.link-info {
  flex: 1;
}

.link-info h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  color: #5b8fb8;
  font-weight: 600;
}

.link-info p {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #d0d0d0;
  line-height: 1.6;
}

.link-url {
  font-size: 12px;
  color: #888;
  font-family: 'Courier New', monospace;
}

.link-arrow {
  font-size: 24px;
  color: #5b8fb8;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.link-card:hover .link-arrow {
  transform: translateX(5px);
}

.modrinth-card:hover {
  border-color: rgba(27, 217, 106, 0.6);
  box-shadow: 0 8px 20px rgba(27, 217, 106, 0.2);
}

.modrinth-card:hover .link-info h3 {
  color: #1bd96a;
}

.modrinth-card:hover .link-arrow {
  color: #1bd96a;
}

.discord-card:hover {
  border-color: rgba(88, 101, 242, 0.6);
  box-shadow: 0 8px 20px rgba(88, 101, 242, 0.2);
}

.discord-card:hover .link-info h3 {
  color: #5865f2;
}

.discord-card:hover .link-arrow {
  color: #5865f2;
}

.youtube-card:hover {
  border-color: rgba(255, 0, 0, 0.6);
  box-shadow: 0 8px 20px rgba(255, 0, 0, 0.2);
}

.youtube-card:hover .link-info h3 {
  color: #ff0000;
}

.youtube-card:hover .link-arrow {
  color: #ff0000;
}

/* Team Section */
.team-section {
  margin-top: 50px;
}

.team-profiles {
  display: flex;
  gap: 60px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

.profile-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.profile-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
  margin-bottom: 20px;
}

.profile-circle:hover {
  transform: scale(1.05);
}

.profile-circle.spinning {
  animation: spin 0.6s ease-in-out;
}

@keyframes spin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1); }
}

.profile-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.neon-ring {
  position: absolute;
  top: -5px;
  left: -5px;
  width: calc(100% + 10px);
  height: calc(100% + 10px);
  border-radius: 50%;
  border: 3px solid transparent;
  background: linear-gradient(45deg, #2a4a5c, #3d6b8a, #4a7ca5, #5b8fb8, #3d6b8a, #2a4a5c);
  background-size: 400% 400%;
  animation: neonRotate 3s linear infinite;
  z-index: 1;
  opacity: 0.7;
  filter: blur(2px);
  box-shadow: 0 0 15px rgba(61, 107, 138, 0.6);
}

.profile-circle:hover .neon-ring {
  opacity: 1;
  filter: blur(1px);
  animation: neonRotate 1s linear infinite;
  box-shadow: 0 0 25px rgba(91, 143, 184, 0.8);
}

@keyframes neonRotate {
  0% {
    background-position: 0% 50%;
    transform: rotate(0deg);
  }
  100% {
    background-position: 100% 50%;
    transform: rotate(360deg);
  }
}

.profile-info {
  text-align: center;
  margin-top: 10px;
}

.profile-info h3 {
  font-size: 18px;
  margin: 5px 0;
  color: #fff;
}

.profile-info p {
  font-size: 14px;
  color: #bbb;
  margin: 0;
}

/* Info Modal */
.info-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
  backdrop-filter: blur(5px);
}

.info-modal.show {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.info-box {
  background: rgba(25, 35, 45, 0.95);
  border: 2px solid rgba(61, 107, 138, 0.8);
  border-radius: 10px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  position: relative;
  box-shadow: 0 0 30px rgba(61, 107, 138, 0.6);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 30px;
  height: 30px;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #5b8fb8;
}

#modal-content h3 {
  margin-top: 0;
  font-size: 24px;
  color: #5b8fb8;
  margin-bottom: 15px;
}

#modal-content p {
  font-size: 16px;
  line-height: 1.6;
  color: #e0e0e0;
  margin-bottom: 10px;
}

.member-links {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(61, 107, 138, 0.3);
}

.member-links strong {
  display: block;
  margin-bottom: 10px;
  color: #5b8fb8;
  font-size: 14px;
}

.member-links-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.member-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(61, 107, 138, 0.2);
  border: 1px solid rgba(61, 107, 138, 0.4);
  border-radius: 6px;
  color: #e0e0e0;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  width: fit-content;
}

.member-link:hover {
  background: rgba(61, 107, 138, 0.4);
  border-color: rgba(91, 143, 184, 0.6);
  color: #fff;
  transform: translateX(5px);
}

/* Plugin Page Styles */
.plugin-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(61, 107, 138, 0.6);
}

.plugin-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(30, 40, 50, 0.4);
  padding: 10px;
}

.plugin-title-section {
  flex: 1;
}

.plugin-title-section h1 {
  margin: 0 0 8px 0;
  font-size: 32px;
  color: #fff;
}

.plugin-tagline {
  margin: 0;
  font-size: 16px;
  color: #bbb;
  font-style: italic;
}

.plugin-description,
.plugin-features,
.plugin-links-section,
.plugin-usage {
  margin-top: 40px;
  margin-bottom: 30px;
}

.plugin-features h2,
.plugin-links-section h2,
.plugin-usage h2 {
  font-size: 22px;
  margin-top: 0;
  margin-bottom: 20px;
  color: #fff;
  border-bottom: 2px solid rgba(61, 107, 138, 0.6);
  padding-bottom: 10px;
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

.features-list li {
  padding: 12px 15px;
  background: rgba(30, 40, 50, 0.4);
  border: 1px solid rgba(61, 107, 138, 0.3);
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 15px;
  line-height: 1.6;
  transition: all 0.3s ease;
}

.features-list li:hover {
  background: rgba(30, 40, 50, 0.6);
  border-color: rgba(61, 107, 138, 0.5);
  transform: translateX(5px);
}

.stats-card:hover {
  border-color: rgba(100, 150, 200, 0.6);
  box-shadow: 0 8px 20px rgba(100, 150, 200, 0.2);
}

.stats-card:hover .link-info h3 {
  color: #6496c8;
}

.stats-card:hover .link-arrow {
  color: #6496c8;
}

/* Config Section Styles */
.plugin-config-section {
  margin-top: 50px;
  margin-bottom: 50px;
}

.plugin-config-section h2 {
  font-size: 22px;
  margin-top: 0;
  margin-bottom: 20px;
  color: #fff;
  border-bottom: 2px solid rgba(61, 107, 138, 0.6);
  padding-bottom: 10px;
}

.config-container {
  background: rgba(20, 25, 30, 0.7);
  border: 2px solid rgba(61, 107, 138, 0.4);
  border-radius: 10px;
  padding: 20px;
  margin-top: 20px;
  overflow-x: auto;
}

.config-code {
  margin: 0;
  font-family: 'Courier New', monospace;
  font-size: 16px;
  line-height: 2;
  color: #e0e0e0;
  white-space: pre;
}

.config-code code {
  margin: 0;
  padding: 0;
  line-height: 2.0;
  display: block;
}

.config-code code > * {
  margin: 0;
  padding: 0;
  display: inline;
}

.config-line {
  display: inline;
  position: relative;
  cursor: pointer;
  padding: 0;
  border-radius: 4px;
  transition: background 0.2s ease;
  margin: 0;
  line-height: 2;
  vertical-align: baseline;
}

.config-line[data-key="minCost"],
.config-line[data-key="maxCost"] {
  display: inline;
  line-height: 2;
  margin: 0;
  padding: 0;
}

.config-line:hover {
  background: rgba(61, 107, 138, 0.2);
  padding: 2px 4px;
}

.info-icon {
  display: inline-block;
  margin-left: 8px;
  font-size: 14px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
  cursor: pointer;
  vertical-align: middle;
  background: rgba(61, 107, 138, 0.6);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  font-size: 12px;
}

.config-line:hover .info-icon {
  opacity: 1;
  transform: scale(1);
}

/* Placeholder Lines */
.placeholder-line {
  display: block;
  line-height: 2;
  margin: 0;
  padding: 0;
  color: #e0e0e0;
}

.placeholder-name {
  color: #5b8fb8;
  font-weight: 600;
}

/* Config Info Modal */
.config-info-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: transparent;
  z-index: 10001;
  cursor: pointer;
}

.config-info-modal.show {
  display: block;
}

.config-info-box {
  background: rgba(25, 35, 45, 0.98);
  border: 2px solid rgba(61, 107, 138, 0.8);
  border-radius: 8px;
  padding: 12px 18px;
  width: 650px;
  max-width: calc(100vw - 40px);
  position: fixed;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  animation: slideInRight 0.3s ease;
  cursor: default;
  z-index: 10002;
}

.config-close-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 24px;
  height: 24px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.config-close-btn:hover {
  color: #5b8fb8;
}

#config-modal-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 20px;
}

#config-modal-content h3 {
  margin: 0;
  font-size: 15px;
  color: #5b8fb8;
  font-weight: 600;
  display: inline-block;
  line-height: 1.3;
}

#config-modal-content p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #e0e0e0;
}

.optional-badge {
  display: inline-block;
  background: rgba(255, 193, 7, 0.2);
  border: 1px solid rgba(255, 193, 7, 0.5);
  color: #ffc107;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: bold;
  margin-left: 8px;
  cursor: help;
  position: relative;
  transition: all 0.3s ease;
  vertical-align: middle;
}

.optional-badge:hover {
  background: rgba(255, 193, 7, 0.3);
  border-color: rgba(255, 193, 7, 0.7);
  transform: scale(1.05);
}

.optional-badge::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 20, 0.95);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 193, 7, 0.5);
  z-index: 10;
}

.optional-badge:hover::after {
  opacity: 1;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
