    body {
      margin: 0;
      padding: 0;
      background-color: #000000;
      font-family: 'Courier New', monospace;
      color: #0D5A0D;
      min-height: 100vh;
      overflow-x: hidden;
      font-size: 16px;
    }

    body::before {
      content: "";
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.05) 50%);
      background-size: 100% 4px;
      pointer-events: none;
      z-index: 9999;
      animation: scanlines 0.5s linear infinite;
      opacity: 0.3;
    }
    @keyframes scanlines {
      0% { background-position: 0 0; }
      100% { background-position: 0 4px; }
    }

    .crt-flicker {
      animation: flicker 10s infinite;
    }
    @keyframes flicker {
      0%, 100% { opacity: 1; }
      25% { opacity: 0.98; }
      30% { opacity: 0.97; }
      33% { opacity: 0.96; }
      35% { opacity: 0.9; }
      35.5% { opacity: 1; }
      36% { opacity: 0.98; }
      45% { opacity: 1; }
      50% { opacity: 0.93; }
      55% { opacity: 1; }
      70% { opacity: 0.95; }
      72% { opacity: 0.93; }
      75% { opacity: 1; }
      95% { opacity: 0.96; }
    }

    /* Remove underlines from all links */
    a {
      text-decoration: none;
    }

    .glow-text {
	 color: #48ff48;
      text-shadow: 0 0 10px rgba(15, 160, 15, 0.9), 0 0 20px rgba(15, 160, 15, 0.5);
      animation: pulse-glow 4s infinite;
    }
    @keyframes pulse-glow {
      0%, 100% { text-shadow: 0 0 10px rgba(15, 160, 15, 0.9), 0 0 20px rgba(15, 160, 15, 0.5); }
      50% { text-shadow: 0 0 15px rgba(15, 160, 15, 1), 0 0 30px rgba(15, 160, 15, 0.7); }
    }

    .container {
      display: flex;
      flex-direction: column;
      width: 100%;
      max-width: 960px;
      margin: 0 auto;
      min-height: 100vh;
      background-color: #050505;
      position: relative;
      overflow: hidden;
      box-shadow: 0 0 20px rgba(15, 160, 15, 0.3) inset;
    }
	
	.status-line span:first-child {
  color: #48ff48;
  text-shadow: 0 0 10px rgba(15, 160, 15, 0.9),
               0 0 20px rgba(15, 160, 15, 0.5);
  animation: pulse-glow 4s infinite;
}

    .page-transition {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 900;
      background-color: black;
      display: flex;
      justify-content: center;
      align-items: center;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
    }
    .page-transition.active {
      opacity: 1;
      pointer-events: all;
    }
    .transition-text {
      color: #0fa00f;
      font-size: 20px;
      text-align: center;
      max-width: 80%;
    }

    .terminal-header {
      background-color: #0A0A08;
      padding: 15px 20px;
      border-bottom: 2px solid #0fa00f;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      position: relative;
      box-shadow: 0 0 15px rgba(15, 160, 15, 0.4);
    }
    .header-title {
      font-family: 'Times New Roman', serif;
      font-size: 22px;
      color: #0fa00f;
      text-shadow: 0 0 10px rgba(15, 160, 15, 1), 0 0 20px rgba(15, 160, 15, 0.7);
      letter-spacing: 1px;
    }
    .imperial-aquila {
      height: 60px;
      width: 60px;
      margin-bottom: 10px;
      position: relative;
      box-shadow: 0 0 15px rgba(15, 160, 15, 0.5);
      border-radius: 50%;
    }
    .imperial-aquila img {
      max-width: 100%;
      height: auto;
      border-radius: 50%;
    }
    .imperial-aquila::after {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.2) 50%);
      background-size: 100% 2px;
      z-index: 1;
      pointer-events: none;
      animation: scanlines 0.5s linear infinite;
      border-radius: 50%;
    }
    .data-readout {
      font-size: 12px;
      color: #0fa00f;
      opacity: 0.8;
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.5);
    }
    .readout-line {
      margin: 2px 0;
    }

    .sidebar {
      background-color: #080808;
      border-bottom: 1px solid #1A1A1A;
      padding: 10px;
      transition: height 0.3s ease;
      box-shadow: 0 0 10px rgba(15, 160, 15, 0.2) inset;
    }
    .sidebar-toggle {
      background-color: #0A0A08;
      border: 1px solid #1A1A1A;
      color: #0fa00f;
      padding: 8px 15px;
      cursor: pointer;
      font-family: 'Courier New', monospace;
      width: 100%;
      text-align: center;
      display: none;
      box-shadow: 0 0 8px rgba(15, 160, 15, 0.3);
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.7);
    }
    .sidebar-content {
      overflow: hidden;
      transition: max-height 0.3s ease;
    }
    .auth-panel {
      background-color: #0A0A08;
      border: 1px solid #1A1A1A;
      padding: 10px;
      margin-bottom: 20px;
      box-shadow: 0 0 10px rgba(15, 160, 15, 0.3) inset;
    }
    .auth-panel p {
      margin: 5px 0;
      font-size: 14px;
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.5);
    }

    .nav-items {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }
    .nav-item {
      flex: 1 1 100%;
      background-color: #050505;
      border: 1px solid #333333;
      padding: 10px;
      cursor: pointer;
      text-align: center;
      font-size: 14px;
      transition: all 0.2s;
      color: #19c019;
      position: relative;
      overflow: hidden;
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.5);
      text-decoration: none;
    }
    .nav-item:hover {
      background-color: #070B07;
      box-shadow: 0 0 15px rgba(15, 160, 15, 0.5);
      text-shadow: 0 0 8px rgba(15, 160, 15, 0.8);
      text-decoration: none;
    }
    .nav-item.active {
      background-color: #0D1A0D;
      border-color: #0fa00f;
      color: #0fa00f;
      font-weight: bold;
      box-shadow: 0 0 20px rgba(15, 160, 15, 0.6);
      text-shadow: 0 0 10px rgba(15, 160, 15, 1);
      text-decoration: none;
    }
    .nav-item::before {
      content: "";
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(15, 160, 15, 0.2), transparent);
      transition: left 0.5s ease;
    }
    .nav-item:hover::before {
      left: 100%;
    }

    .breadcrumb-nav {
      background-color: #070707;
      padding: 8px 15px;
      margin-bottom: 10px;
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      font-size: 14px;
      border-bottom: 1px solid #1A1A1A;
      box-shadow: 0 0 10px rgba(15, 160, 15, 0.2) inset;
    }
    .breadcrumb-item {
      color: #0fa00f;
      opacity: 0.7;
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.5);
    }
    .breadcrumb-item:after {
      content: ">";
      margin-left: 5px;
      color: #0fa00f;
    }
    .breadcrumb-item:last-child {
      opacity: 1;
      font-weight: bold;
      text-shadow: 0 0 8px rgba(15, 160, 15, 0.7);
    }
    .breadcrumb-item:last-child:after {
      content: "";
    }
    .breadcrumb-item.clickable {
      cursor: pointer;
    }
    .breadcrumb-item.clickable:hover {
      text-decoration: underline;
      text-shadow: 0 0 8px rgba(15, 160, 15, 0.8);
    }

    .main-content {
      padding: 20px;
      flex-grow: 1;
      background-color: #020403;
      box-shadow: 0 0 15px rgba(15, 160, 15, 0.1) inset;
      overflow-x: visible;
    }
      .page {
        display: block;
        opacity: 1;
      }
      .site-page {
        display: block;
      }
    .section-title {
      background-color: #080808;
      padding: 12px;
      margin-bottom: 20px;
      border: 1px solid #1A1A1A;
      font-family: 'Times New Roman', serif;
      font-size: 18px;
      color: #20e520;
      text-shadow: 0 0 8px rgba(15, 160, 15, 0.8);
      box-shadow: 0 0 15px rgba(15, 160, 15, 0.3) inset;
    }
    .section-title::before,
    .section-title::after {
      content: "";
    }

    .quick-jump {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 20px;
      background-color: #080808;
      padding: 10px;
      border: 1px solid #1A1A1A;
      box-shadow: 0 0 15px rgba(15, 160, 15, 0.2) inset;
    }
    .quick-jump-title {
      width: 100%;
      margin-bottom: 5px;
      color: #0fa00f;
      font-size: 14px;
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.6);
    }
    .jump-link {
      background-color: #050505;
      padding: 5px 10px;
      color: #19c019;
      cursor: pointer;
      font-size: 12px;
      border: 1px solid #333333;
      transition: all 0.2s;
      text-shadow: 0 0 3px rgba(15, 160, 15, 0.5);
    }
    .jump-link:hover {
      background-color: #070B07;
      box-shadow: 0 0 10px rgba(15, 160, 15, 0.5);
      text-shadow: 0 0 8px rgba(15, 160, 15, 0.7);
    }

    .content-box {
      background-color: #050707;
      border: 1px solid #1A1A1A;
      padding: 15px;
      margin-bottom: 20px;
      box-shadow: 0 0 15px rgba(15, 160, 15, 0.15) inset;
      overflow: visible;
    }
    .content-box h3 {
      color: #20e520;
      font-size: 18px; 
      margin-top: 0;
      margin-bottom: 10px;
      cursor: pointer;
      display: flex;
      justify-content: space-between;
      align-items: center;
      text-shadow: 0 0 8px rgba(15, 160, 15, 0.7);
    }
    .content-box h3:after {
      content: "▼";
      font-size: 12px;
      transition: transform 0.3s ease;
    }
    .content-box.collapsed h3:after {
      transform: rotate(-90deg);
    }
    .content-box-body {
      transition: max-height 0.5s ease, overflow 0s 0s;
      overflow: visible;
      max-height: 5000px;
    }
    .content-box.collapsed .content-box-body {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.5s ease, overflow 0s 0.5s;
    }
    .content-box p {
      font-size: 16px;
      line-height: 1.6;
      color: #19c019;
      text-shadow: 0 0 3px rgba(15, 160, 15, 0.4);
    }

    .page-header {
      text-align: center;
      margin-bottom: 20px;
      padding: 20px 0;
    }

    .page-header h2 {
      margin: 0 0 10px 0;
      font-size: 24px;
    }

    .page-description {
      margin: 0;
      font-size: 16px;
      color: #19c019;
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.6);
    }

    .terminal-search {
      display: flex;
      flex-direction: column;
      background-color: #030303;
      border: 1px solid #0fa00f;
      padding: 10px;
      margin: 15px 0;
      box-shadow: 0 0 15px rgba(15, 160, 15, 0.3) inset;
    }
    .search-prompt {
      color: #0fa00f;
      margin-bottom: 5px;
      font-weight: bold;
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.7);
    }
    .search-input {
      background-color: #050505;
      border: none;
      padding: 10px; 
      color: #1edb1e;
      font-family: 'Courier New', monospace;
      font-size: 16px; 
      position: relative;
      box-shadow: 0 0 10px rgba(15, 160, 15, 0.2) inset;
    }
    .search-input:focus {
      outline: none;
      box-shadow: 0 0 10px rgba(15, 160, 15, 0.5);
    }
    .search-suggestions {
      position: absolute;
      background-color: #050505;
      border: 1px solid #0fa00f;
      max-height: 150px;
      overflow-y: auto;
      width: calc(100% - 40px);
      z-index: 10;
      display: none;
      box-shadow: 0 0 15px rgba(15, 160, 15, 0.3);
    }
    .suggestion-item {
      padding: 8px 10px;
      color: #1edb1e;
      cursor: pointer;
      border-bottom: 1px solid rgba(15, 160, 15, 0.2);
      text-shadow: 0 0 3px rgba(15, 160, 15, 0.5);
    }
    .suggestion-item:hover,
    .suggestion-item.selected {
      background-color: #0A0A08;
      text-shadow: 0 0 8px rgba(15, 160, 15, 0.7);
    }
    .search-button {
      background-color: #0A0A08;
      border: 1px solid #20e520;
      color: #20e520;
      padding: 10px 15px; 
      cursor: pointer;
      font-family: 'Courier New', monospace;
      margin-top: 10px;
      align-self: flex-start;
      position: relative;
      overflow: hidden;
      transition: all 0.3s ease;
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.7);
      box-shadow: 0 0 10px rgba(15, 160, 15, 0.3);
    }
    .search-button:hover {
      background-color: #0D1A0D;
      box-shadow: 0 0 15px rgba(15, 160, 15, 0.6);
      text-shadow: 0 0 8px rgba(15, 160, 15, 0.9);
    }
    .search-button::before {
      content: "";
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(15, 160, 15, 0.3), transparent);
      transition: left 0.5s ease;
    }
    .search-button:hover::before {
      left: 100%;
    }
    .search-results {
      background-color: #030303;
      border: 1px solid #1A1A1A;
      margin-top: 10px;
      padding: 10px;
      max-height: 300px;
      overflow-y: auto;
      box-shadow: 0 0 10px rgba(15, 160, 15, 0.2) inset;
    }
    .search-filters, .relic-filters {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 10px;
      margin-bottom: 15px;
    }
    .filter-button {
      background-color: #050505;
      border: 1px solid #1A1A1A;
      color: #19c019;
      padding: 5px 10px;
      cursor: pointer;
      font-size: 12px;
      text-shadow: 0 0 3px rgba(15, 160, 15, 0.4);
    }
	.techmarine-icon {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="30" stroke="%230fa00f" stroke-width="3" fill="none"/><path d="M35 35 L65 65 M35 65 L65 35 M30 50 L70 50 M50 30 L50 70" stroke="%230fa00f" stroke-width="3"/><circle cx="50" cy="50" r="10" stroke="%230fa00f" stroke-width="3" fill="none"/></svg>');
}
    .filter-button.active {
      background-color: #0D1A0D;
      border-color: #0fa00f;
      color: #0fa00f;
      box-shadow: 0 0 10px rgba(15, 160, 15, 0.4);
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.7);
    }
    .results-header {
      color: #20e520;
      font-weight: bold;
      margin-bottom: 10px;
      padding-bottom: 5px;
      border-bottom: 1px solid #20e520;
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.7);
    }
    .results-content p {
      margin: 10px 0;
      font-style: italic;
      color: #19c019;
      text-shadow: 0 0 3px rgba(15, 160, 15, 0.4);
    }
    .results-line {
      padding: 5px 0; 
      border-bottom: 1px dotted rgba(15, 160, 15, 0.2);
    }
    .result-category {
      display: inline-block;
      background-color: #070B07;
      padding: 2px 5px;
      margin-right: 8px;
      font-size: 11px;
      color: #0fa00f;
      border: 1px solid rgba(15, 160, 15, 0.3);
      text-shadow: 0 0 3px rgba(15, 160, 15, 0.5);
      box-shadow: 0 0 5px rgba(15, 160, 15, 0.2);
    }


    .chapter-grid {
      display: flex;
      flex-direction: column;
      gap: 15px;
    }
    .chapter-card {
      background-color: #050707;
      border: 1px solid #1A1A1A;
      padding: 15px;
      text-align: center;
      position: relative;
      transition: all 0.3s ease;
      cursor: pointer;
      box-shadow: 0 0 10px rgba(15, 160, 15, 0.2) inset;
      text-decoration: none;
      display: block;
    }
    .chapter-card:hover {
      box-shadow: 0 0 20px rgba(15, 160, 15, 0.5);
      transform: translateY(-3px);
      text-decoration: none;
    }
    .chapter-card h3 {
      color: #0fa00f;
      font-size: 18px; 
      margin-bottom: 10px;
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.7);
    }
    .chapter-icon {
      width: 60px;
      height: 60px;
      border-radius: 50%;
      margin: 0 auto 10px;
      display: flex;
      justify-content: center;
      align-items: center;
      border: 1px solid #0fa00f;
      position: relative;
      box-shadow: 0 0 10px rgba(15, 160, 15, 0.4);
      overflow: hidden;
    }
    .chapter-icon::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
   background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.25) 50%
  );
  background-size: 100% 4px;
  opacity: 0.7;
  animation: scanlines 2s linear infinite;
}

.search-results .results-line {
  font-size: 16px;
  line-height: 1.6;
  color: #19c019;
  text-shadow: 0 0 3px rgba(15, 160, 15, 0.4);
}

@keyframes scanlines {
  0%   { background-position: 0 0; }
  100% { background-position: 0 4px; }
}
    .chapter-logo {
      width: 85%;
      height: 85%;
      object-fit: contain;
      filter: drop-shadow(0 0 3px rgba(15, 160, 15, 0.7));
    }
    .chapter-card p {
      color: #19c019;
      font-weight: 500;
      text-shadow: 0 0 3px rgba(15, 160, 15, 0.5);
    }

    .chapter-detail-page {
      display: block;
      opacity: 1;
    }
    .chapter-detail-header {
      display: flex;
      align-items: center;
      gap: 15px;
      margin-bottom: 20px;
    }
    .chapter-detail-icon {
      width: 80px;
      height: 80px;
      border: 2px solid #0fa00f;
      display: flex;
      justify-content: center;
      align-items: center;
      background-color: #050505;
      position: relative;
      box-shadow: 0 0 15px rgba(15, 160, 15, 0.5);
      overflow: hidden; /* Contain scan lines */
    }
    .chapter-detail-icon::after {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.2) 50%);
      background-size: 100% 2px;
      z-index: 1;
      pointer-events: none;
      animation: scanlines 0.5s linear infinite;
    }
    .chapter-detail-icon img {
      max-width: 85%;
      max-height: 85%;
      filter: drop-shadow(0 0 5px rgba(15, 160, 15, 0.7));
    }
    .chapter-detail-title {
      flex-grow: 1;
    }
    .chapter-detail-title h2 {
      color: #0fa00f;
      font-size: 22px;
      margin: 0 0 5px 0;
      text-shadow: 0 0 8px rgba(15, 160, 15, 0.8);
    }
    .chapter-detail-title p {
      color: #19c019;
      margin: 0;
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.6);
    }
    .chapter-detail-content {
      margin-top: 20px;
    }
    .chapter-status {
      margin-bottom: 15px;
      font-size: 14px;
      color: #0fa00f;
      letter-spacing: 0.5px;
    }
    .chapter-status.error {
      color: #ff6b6b;
    }
    .hidden {
      display: none !important;
    }
    .economy-login,
    .economy-panel {
      border: 1px solid rgba(15, 160, 15, 0.4);
      background: rgba(5, 8, 7, 0.8);
      padding: 16px;
      margin-top: 10px;
    }
    .economy-login-form {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 10px;
    }
    .economy-login input {
      flex: 1 1 220px;
      background: rgba(0, 0, 0, 0.6);
      border: 1px solid rgba(15, 160, 15, 0.6);
      color: #0fa00f;
      padding: 8px 10px;
      font-family: 'Share Tech Mono', monospace;
      text-transform: uppercase;
      letter-spacing: 1px;
    }
    .economy-login button,
    .auth-logout {
      background: rgba(15, 160, 15, 0.2);
      border: 1px solid rgba(15, 160, 15, 0.8);
      color: #0fa00f;
      padding: 8px 18px;
      cursor: pointer;
      font-family: 'Share Tech Mono', monospace;
      text-transform: uppercase;
      letter-spacing: 1px;
      transition: background 0.2s ease;
    }
    .economy-login button:hover,
    .auth-logout:hover {
      background: rgba(15, 160, 15, 0.35);
    }
    .auth-message {
      margin-top: 10px;
      font-size: 13px;
      color: #ffb347;
    }
    .auth-message.error {
      color: #ff6b6b;
    }
    .economy-panel .stat-line {
      display: flex;
      justify-content: space-between;
      margin-bottom: 8px;
      border-bottom: 1px dotted rgba(15, 160, 15, 0.2);
      padding-bottom: 6px;
    }
    .economy-panel .stat-line span:last-child {
      color: #0fa00f;
      font-weight: bold;
    }
    .economy-panel .transactions {
      margin-top: 15px;
    }
    .economy-panel .transactions ul {
      list-style: none;
      margin: 10px 0 0;
      padding: 0;
      max-height: 160px;
      overflow-y: auto;
    }
    .economy-panel .transactions li {
      margin-bottom: 6px;
      font-size: 13px;
      color: #d0f5d0;
    }
    .chapter-tab-navigation {
      display: flex;
      border-bottom: 1px solid rgba(15, 160, 15, 0.3);
      margin-bottom: 20px;
      overflow-x: auto;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    .chapter-tab-navigation::-webkit-scrollbar {
      display: none;
    }
    .chapter-tab {
      padding: 10px 15px;
      background-color: #050505;
      color: #19c019;
      cursor: pointer;
      border-top: 1px solid rgba(15, 160, 15, 0.3);
      border-left: 1px solid rgba(15, 160, 15, 0.3);
      border-right: 1px solid rgba(15, 160, 15, 0.3);
      border-bottom: none;
      margin-right: 5px;
      position: relative;
      top: 1px;
      text-shadow: 0 0 3px rgba(15, 160, 15, 0.5);
      transition: all 0.3s ease;
    }
    .chapter-tab:hover {
      background-color: #070B07;
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.7);
      box-shadow: 0 0 10px rgba(15, 160, 15, 0.3) inset;
    }
    .chapter-tab.active {
      background-color: #0D1A0D;
      color: #0fa00f;
      border-top: 1px solid #0fa00f;
      border-left: 1px solid #0fa00f;
      border-right: 1px solid #0fa00f;
      border-bottom: 1px solid #0D1A0D;
      text-shadow: 0 0 8px rgba(15, 160, 15, 0.8);
      box-shadow: 0 0 15px rgba(15, 160, 15, 0.3) inset;
    }
    .chapter-tab-content {
      display: none;
      padding: 10px;
      background-color: #060A06;
      border: 1px solid rgba(15, 160, 15, 0.3);
      animation: fadeIn 0.3s;
      box-shadow: 0 0 15px rgba(15, 160, 15, 0.2) inset;
    }
    .chapter-tab-content.active {
      display: block;
    }
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    .back-button {
      display: inline-block;
      background-color: #050505;
      border: 1px solid #0fa00f;
      color: #0fa00f;
      padding: 8px 15px;
      cursor: pointer;
      margin-bottom: 15px;
      transition: all 0.2s;
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.6);
      box-shadow: 0 0 10px rgba(15, 160, 15, 0.3);
    }
    .back-button:hover {
      background-color: #0D1A0D;
      box-shadow: 0 0 15px rgba(15, 160, 15, 0.5);
      text-shadow: 0 0 8px rgba(15, 160, 15, 0.8);
    }

    .ranks-container {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }
    .rank-list {
      list-style-type: none;
      margin: 0;
      padding: 0;
    }
    .rank-list li {
      font-size: 16px; 
      line-height: 1.6;
      margin-bottom: 5px;
	  color: #48a148;
  text-shadow: 0 0 3px rgba(50, 255, 50, 0.7);
    }
    .rank-list li strong {
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.6);
    }
    .rank-hierarchy {
      display: flex;
      flex-direction: column;
      align-items: center;
      position: relative;
      overflow: visible;
    }
    .rank-level {
      padding: 5px 10px;
      margin: 0;
      background-color: #070B07;
      border: 1px solid #0fa00f;
      width: 180px;
      text-align: center;
      font-size: 16px;
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.6);
      box-shadow: 0 0 10px rgba(15, 160, 15, 0.3);
      position: relative;
      z-index: 2;
    }
    .rank-line {
      width: 2px;
      height: 50px;
      background-color: #0fa00f;
      box-shadow: 0 0 8px rgba(15, 160, 15, 0.7);
      margin: -20px auto -20px;
      position: relative;
      z-index: 0;
    }
    .rank-horizontal-line {
      width: 20px;
      height: 2px;
      background-color: #0fa00f;
      box-shadow: 0 0 8px rgba(15, 160, 15, 0.7);
      align-self: center;
    }
    .rank-parallel {
      display: flex;
      flex-direction: column;
      gap: 10px;
      align-items: center;
      margin: 10px 0;
    }
    .rank-parallel-item {
      padding: 5px 10px;
      background-color: #070B07;
      border: 1px solid #0fa00f;
      font-size: 18px;
      text-align: center;
      width: 140px;
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.6);
      box-shadow: 0 0 10px rgba(15, 160, 15, 0.3);
    }

    .special-roles-container,
    .extra-roles-container {
      margin-top: 20px;
    }
    .role-buttons-container {
      display: flex;
      flex-wrap: wrap;
      gap: 15px;
      margin: 20px 0;
      justify-content: center;
    }
    .role-button {
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 12px 15px;
      background-color: #070B07;
      border: 1px solid #1A1A1A;
      color: #0fa00f;
      cursor: pointer;
      width: 120px;
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
      box-shadow: 0 0 10px rgba(15, 160, 15, 0.2);
      text-shadow: 0 0 3px rgba(15, 160, 15, 0.5);
    }
    .role-button:hover {
      background-color: #0A160A;
      border-color: #0fa00f;
      box-shadow: 0 0 15px rgba(15, 160, 15, 0.4);
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.7);
      transform: translateY(-2px);
    }
    .role-button::before {
      content: "";
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(15, 160, 15, 0.3), transparent);
      transition: left 0.5s ease;
    }
    .role-button:hover::before {
      left: 100%;
    }
    .role-button.active {
      background-color: #0D1A0D;
      border-color: #0fa00f;
      box-shadow: 0 0 20px rgba(15, 160, 15, 0.5);
      text-shadow: 0 0 8px rgba(15, 160, 15, 0.8);
    }
    .role-icon {
      width: 40px;
      height: 40px;
      margin-bottom: 8px;
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      filter: drop-shadow(0 0 3px rgba(15, 160, 15, 0.7));
    }
@media screen and (min-width: 1024px) {
  .container {
    max-width: 1200px;
    margin: 0 auto;
  }
  .sidebar-toggle {
    display: none;
  }
  .sidebar-content {
    max-height: none;
  }
  body {
    font-size: 18px;
  }
  .galaxy-map {
    height: 600px;
  }
  .role-button {
    width: 130px;
    padding: 15px;
  }
  .nav-items {
    flex-direction: row;
  }
}
    .chaplain-icon {
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50 10 L50 90 M25 25 L75 25 M20 45 L80 45" stroke="%230fa00f" stroke-width="3" fill="none"/><circle cx="50" cy="60" r="10" stroke="%230fa00f" stroke-width="3" fill="none"/></svg>');
    }
    .librarian-icon {
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="30" y="20" width="40" height="60" stroke="%230fa00f" stroke-width="3" fill="none"/><path d="M40 30 L60 30 M40 40 L60 40 M40 50 L60 50 M40 60 L60 60 M40 70 L60 70" stroke="%230fa00f" stroke-width="3"/></svg>');
    }
    .apothecary-icon {
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M30 50 L70 50 M50 30 L50 70" stroke="%230fa00f" stroke-width="3"/><circle cx="50" cy="50" r="30" stroke="%230fa00f" stroke-width="3" fill="none"/></svg>');
    }
    .leader-icon {
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M30 70 L50 30 L70 70 M30 50 L70 50" stroke="%230fa00f" stroke-width="3" fill="none"/><circle cx="50" cy="50" r="30" stroke="%230fa00f" stroke-width="3" fill="none" stroke-dasharray="5,5"/></svg>');
    }
    .deathwatch-icon {
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M20 20 L80 80 M80 20 L20 80" stroke="%230fa00f" stroke-width="3"/><circle cx="50" cy="50" r="30" stroke="%230fa00f" stroke-width="3" fill="none"/></svg>');
    }
    .champion-icon {
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50 20 L50 80 M30 30 L70 70 M70 30 L30 70" stroke="%230fa00f" stroke-width="3"/><circle cx="50" cy="50" r="30" stroke="%230fa00f" stroke-width="3" fill="none"/></svg>');
    }
    .arbites-icon {
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50 20 L50 55" stroke="%230fa00f" stroke-width="3" fill="none"/><path d="M30 40 L50 20 L70 40" stroke="%230fa00f" stroke-width="3" fill="none"/><rect x="35" y="55" width="30" height="25" stroke="%230fa00f" stroke-width="3" fill="none"/><path d="M35 65 L65 65 M35 75 L65 75" stroke="%230fa00f" stroke-width="2"/></svg>');
    }
    .sergeant-icon {
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M30 40 L50 30 L70 40 M30 55 L50 45 L70 55 M30 70 L50 60 L70 70" stroke="%230fa00f" stroke-width="3" fill="none"/><circle cx="50" cy="50" r="35" stroke="%230fa00f" stroke-width="2" fill="none" stroke-dasharray="3,3"/></svg>');
    }
    .lieutenant-icon {
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="42" y="35" width="16" height="30" stroke="%230fa00f" stroke-width="3" fill="none"/><circle cx="50" cy="50" r="35" stroke="%230fa00f" stroke-width="2" fill="none" stroke-dasharray="3,3"/></svg>');
    }
    .captain-icon {
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="32" y="35" width="14" height="30" stroke="%230fa00f" stroke-width="3" fill="none"/><rect x="54" y="35" width="14" height="30" stroke="%230fa00f" stroke-width="3" fill="none"/><circle cx="50" cy="50" r="35" stroke="%230fa00f" stroke-width="2" fill="none" stroke-dasharray="3,3"/></svg>');
    }
    .ancient-icon {

      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M40 20 L40 80" stroke="%230fa00f" stroke-width="3" fill="none"/><path d="M40 20 L65 30 L40 40 Z" stroke="%230fa00f" stroke-width="3" fill="none"/><path d="M40 45 L65 55 L40 65 Z" stroke="%230fa00f" stroke-width="3" fill="none"/></svg>');

    }

    .role-details-container {
      border: 1px solid #1A1A1A;
      background-color: #060A06;
      padding: 15px;
      box-shadow: 0 0 15px rgba(15, 160, 15, 0.2) inset;
    }
	
	.raid-icon {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50 20 L80 80 L50 60 L20 80 Z" stroke="%230fa00f" stroke-width="3" fill="none"/></svg>');
}
.wall-icon {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="20" y="40" width="60" height="40" stroke="%230fa00f" stroke-width="3" fill="none"/><path d="M30 40 L30 30 M50 40 L50 20 M70 40 L70 30" stroke="%230fa00f" stroke-width="3"/></svg>');
}
.vindicator-icon {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M20 60 L50 20 L80 60 L60 60 L60 80 L40 80 L40 60 Z" stroke="%230fa00f" stroke-width="3" fill="none"/></svg>');
}
.relic-icon {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="35" y="30" width="30" height="50" stroke="%230fa00f" stroke-width="3" fill="none"/><path d="M35 40 L65 40 M35 50 L65 50 M35 60 L65 60 M50 30 L50 20 L40 15 L60 15 L50 20" stroke="%230fa00f" stroke-width="3"/></svg>');
}
.wargear-icon {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M45 20 L55 20 L55 50 L70 50 L50 75 L30 50 L45 50 Z" stroke="%230fa00f" stroke-width="3" fill="none"/><rect x="42" y="15" width="16" height="10" stroke="%230fa00f" stroke-width="3" fill="none"/></svg>');
}
.alliance-icon {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="30" cy="30" r="15" stroke="%230fa00f" stroke-width="3" fill="none"/><circle cx="70" cy="30" r="15" stroke="%230fa00f" stroke-width="3" fill="none"/><circle cx="50" cy="70" r="15" stroke="%230fa00f" stroke-width="3" fill="none"/><path d="M30 45 L50 55 M70 45 L50 55" stroke="%230fa00f" stroke-width="3" fill="none"/></svg>');
}

/* Alliance Network Enhanced Styles */
.alliance-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.alliance-stat-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(15, 160, 15, 0.3);
  padding: 15px;
  text-align: center;
  border-radius: 4px;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(15, 160, 15, 0.1) inset;
}

.alliance-stat-card:hover {
  border-color: rgba(15, 160, 15, 0.6);
  box-shadow: 0 0 15px rgba(15, 160, 15, 0.2) inset;
  transform: translateY(-2px);
}

.stat-label {
  color: #19c019;
  font-size: 11px;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-transform: uppercase;
  opacity: 0.8;
}

.stat-value {
  color: #20e520;
  font-size: 28px;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(32, 229, 32, 0.6);
  font-family: 'Courier New', monospace;
}

.alliance-controls {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(15, 160, 15, 0.2);
  padding: 15px;
  margin: 20px 0;
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.control-label {
  color: #19c019;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-right: 5px;
}

.control-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.alliance-filter-btn,
.alliance-action-btn {
  background: rgba(15, 160, 15, 0.1);
  border: 1px solid rgba(15, 160, 15, 0.4);
  color: #19c019;
  padding: 8px 16px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Courier New', monospace;
  border-radius: 2px;
}

.alliance-filter-btn:hover,
.alliance-action-btn:hover {
  background: rgba(15, 160, 15, 0.2);
  border-color: rgba(15, 160, 15, 0.8);
  box-shadow: 0 0 10px rgba(15, 160, 15, 0.3);
  color: #20e520;
}

.alliance-filter-btn.active {
  background: rgba(15, 160, 15, 0.3);
  border-color: #20e520;
  color: #20e520;
  box-shadow: 0 0 15px rgba(15, 160, 15, 0.4);
  text-shadow: 0 0 5px rgba(32, 229, 32, 0.5);
}

.alliance-graph-container {
  margin: 20px 0;
  position: relative;
  border: 1px solid rgba(15, 160, 15, 0.3);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0, 10, 0, 0.2);
  box-shadow: 0 0 20px rgba(15, 160, 15, 0.1) inset;
}

/* Green CRT color overlay - subtle */
.alliance-graph-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 160, 15, 0.08);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 9;
}

/* Horizontal scanlines - more visible */
.alliance-graph-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.3),
    rgba(0, 0, 0, 0.3) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 10;
}

@keyframes scanline {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

.alliance-graph {
  min-height: 500px;
  width: 100%;
  position: relative;
  z-index: 5;
  filter: blur(0.5px) brightness(1.05);
}

.alliance-graph canvas {
  filter: blur(0.3px);
}

.alliance-scanline-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(15, 160, 15, 0.12) 50%,
    transparent 100%
  );
  animation: scanline 8s linear infinite;
  pointer-events: none;
  z-index: 20;
}

.alliance-legend {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(15, 160, 15, 0.2);
  padding: 15px;
  margin-top: 15px;
  border-radius: 4px;
}

.legend-title {
  color: #20e520;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
  text-align: center;
  text-shadow: 0 0 5px rgba(32, 229, 32, 0.5);
}

.legend-items {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 11px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #19c019;
}

.legend-color {
  width: 20px;
  height: 3px;
  border-radius: 2px;
  box-shadow: 0 0 5px currentColor;
}

@media (max-width: 768px) {
  .alliance-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .alliance-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .control-group {
    flex-direction: column;
    align-items: stretch;
  }

  .control-buttons {
    flex-direction: column;
  }

  .alliance-filter-btn,
  .alliance-action-btn {
    width: 100%;
  }
}

.war-room-icon {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M20 30 L50 20 L80 30 L80 70 L50 80 L20 70 Z" stroke="%230fa00f" stroke-width="3" fill="none"/><path d="M35 40 L65 40 M35 50 L65 50 M35 60 L65 60" stroke="%230fa00f" stroke-width="3"/></svg>');
}
	
    .role-details {
      display: none;
      opacity: 0;
      transition: opacity 0.3s ease;
    }
    .role-details.active {
      display: block;
      opacity: 1;
    }
    .role-title {
      color: #0fa00f;
      font-size: 20px; 
      margin-top: 0;
      margin-bottom: 15px;
      text-align: center;
      padding-bottom: 10px;
      border-bottom: 1px solid rgba(15, 160, 15, 0.3);
      text-shadow: 0 0 8px rgba(15, 160, 15, 0.8);
    }
    .role-section {
      margin-bottom: 20px;
    }
    .role-section h5 {
      color: #0fa00f;
      font-size: 16px; 
      margin-bottom: 8px;
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.7);
    }
    .role-section h5::before {
      content: "// ";
      color: #0fa00f;
    }
    .role-requirements,
    .role-benefits,
    .role-test-details,
    .role-process {
      list-style-type: none;
      padding-left: 15px;
      margin: 10px 0;
    }
    .role-requirements li,
    .role-benefits li,
    .role-test-details li,
    .role-process li {
      position: relative;
      padding-left: 15px;
      margin-bottom: 8px;
      font-size: 16px; 
	  color: #48a148;
	   text-shadow: 0 0 3px rgba(50, 255, 50, 0.7);
    }
    .role-requirements li::before,
    .role-benefits li::before,
    .role-test-details li::before,
    .role-process li::before {
      content: ">";
      position: absolute;
      left: 0;
      color: #0fa00f;
      text-shadow: 0 0 3px rgba(25, 192, 25, 0.5);
    }
    .oath-text {
      color: #19c019;
      font-weight: 500;
      background-color: rgba(15, 160, 15, 0.1);
      padding: 10px;
      border-left: 3px solid #0fa00f;
      font-size: 16px; 
      text-shadow: 0 0 3px rgba(15, 160, 15, 0.5);
      box-shadow: 0 0 10px rgba(15, 160, 15, 0.2) inset;
    }

    .terminal-footer {
      background-color: #0A0A08;
      padding: 10px;
      border-top: 1px solid #1A1A1A;
      text-align: center;
      font-size: 12px; 
      color: #0fa00f;
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.6);
      box-shadow: 0 0 15px rgba(15, 160, 15, 0.3) inset;
    }
	
    .audio-controls {
      position: fixed;
      bottom: 20px;
      right: 20px;
      z-index: 10;
      background-color: rgba(5, 10, 5, 0.8);
      border: 1px solid #0fa00f;
      border-radius: 5px;
      padding: 5px;
      display: flex;
      align-items: center;
      gap: 5px;
      color: #0fa00f;
      font-size: 12px;
      text-shadow: 0 0 5px rgba(15, 160, 15, 0.7);
      box-shadow: 0 0 15px rgba(15, 160, 15, 0.4);
    }
	.galaxy-map {
  position: relative;
  width: 100%;
  height: 400px; /* Reduced height for mobile */
  background-color: #030303;
  border: 1px solid #1A1A1A;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 0 15px rgba(15, 160, 15, 0.2) inset;
}

.sector-svg {
  pointer-events: none;
}

.sector-region {
  transition: fill-opacity 1s ease;
}

.galaxy-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at center, rgba(15, 160, 15, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background-color: #0fa00f;
  border-radius: 50%;
  opacity: 0.6;
}

.fortress-location {
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: #20e520;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(32, 229, 32, 0.7);
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s;
}

.fortress-location:hover {
  transform: scale(1.5);
  box-shadow: 0 0 12px rgba(32, 229, 32, 0.9);
}

.territory-location {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 9;
  transition: all 0.3s;
}

.territory-location:hover {
  transform: scale(1.8);
}

.sector-overlay {
  position: absolute;
  border-radius: 50%;
  z-index: 5;
  pointer-events: none;
  transition: all 0.5s ease;
  animation: pulse-overlay 4s ease-in-out infinite;
  opacity: 0.5;
}

@keyframes pulse-overlay {
  0%, 100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.6;
  }
}

.fortress-info {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.8);
  border: 1px solid #0fa00f;
  padding: 10px;
  color: #19c019;
  font-size: 12px;
  display: none;
  z-index: 20;
}

.fortress-info-close {
  position: absolute;
  top: 5px;
  right: 5px;
  background: none;
  border: none;
  color: #0fa00f;
  font-size: 20px;
  cursor: pointer;
}

.sector-label {
  position: absolute;
  color: rgba(15, 160, 15, 0.4);
  font-size: 12px;
  pointer-events: none;
  text-transform: uppercase;
}

/* Warp Rift - Eye of Terror effect near Cadia */
.warp-rift {
  position: absolute;
  width: 300px;
  height: 120px;
  pointer-events: none;
  z-index: 8;
  transform: rotate(-15deg);
}

/* Outer chaotic aura */
.warp-rift-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 80% 40% at 30% 50%,
      rgba(138, 43, 226, 0.12) 0%,
      transparent 50%
    ),
    radial-gradient(ellipse 70% 35% at 70% 50%,
      rgba(220, 20, 60, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(ellipse 100% 50% at 50% 50%,
      rgba(75, 0, 130, 0.08) 0%,
      transparent 60%
    );
  animation: warp-pulse 4s ease-in-out infinite;
  filter: blur(12px);
}

/* Main reality tear - elongated jagged scar */
.warp-rift-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 60%;
  background:
    linear-gradient(90deg,
      transparent 0%,
      rgba(138, 43, 226, 0.15) 10%,
      rgba(220, 20, 60, 0.18) 30%,
      rgba(148, 0, 211, 0.2) 50%,
      rgba(220, 20, 60, 0.18) 70%,
      rgba(138, 43, 226, 0.15) 90%,
      transparent 100%
    );
  clip-path: polygon(
    0% 50%,
    5% 45%, 8% 52%, 12% 48%, 15% 55%, 18% 47%, 22% 53%, 25% 46%,
    28% 54%, 32% 48%, 35% 52%, 38% 47%, 42% 55%, 45% 49%, 48% 53%,
    50% 48%, 52% 54%, 55% 49%, 58% 52%, 62% 47%, 65% 53%, 68% 48%,
    72% 54%, 75% 49%, 78% 52%, 82% 48%, 85% 54%, 88% 49%, 92% 53%,
    95% 48%, 100% 50%,
    95% 52%, 92% 47%, 88% 51%, 85% 46%, 82% 52%, 78% 48%, 75% 51%,
    72% 46%, 68% 52%, 65% 47%, 62% 53%, 58% 48%, 55% 51%, 52% 46%,
    50% 52%, 48% 47%, 45% 51%, 42% 45%, 38% 53%, 35% 48%, 32% 52%,
    28% 46%, 25% 54%, 22% 47%, 18% 53%, 15% 45%, 12% 52%, 8% 48%, 5% 55%
  );
  animation: warp-flicker 3s ease-in-out infinite;
  filter: blur(1px);
}

/* Inner tear - brighter core crack */
.warp-rift-core::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 100, 150, 0.25) 20%,
    rgba(200, 50, 200, 0.3) 50%,
    rgba(255, 100, 150, 0.25) 80%,
    transparent 100%
  );
  transform: translateY(-50%);
  box-shadow:
    0 0 4px rgba(200, 50, 200, 0.4),
    0 0 8px rgba(138, 43, 226, 0.3);
  animation: warp-crack 2s ease-in-out infinite;
}

/* Warp tendrils extending from the rift */
.warp-rift-core::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(105deg,
      transparent 0%,
      rgba(138, 43, 226, 0.08) 45%,
      transparent 50%
    ),
    linear-gradient(75deg,
      transparent 50%,
      rgba(220, 20, 60, 0.06) 55%,
      transparent 100%
    );
  animation: warp-tendrils 5s ease-in-out infinite;
  filter: blur(2px);
}

@keyframes warp-pulse {
  0%, 100% {
    opacity: 0.7;
    transform: scaleY(1) scaleX(1);
  }
  50% {
    opacity: 0.9;
    transform: scaleY(1.1) scaleX(1.05);
  }
}

@keyframes warp-flicker {
  0%, 100% {
    opacity: 0.8;
    filter: blur(1px) brightness(1);
  }
  15% {
    opacity: 0.6;
    filter: blur(1.5px) brightness(0.9);
  }
  30% {
    opacity: 0.85;
    filter: blur(1px) brightness(1.1);
  }
  50% {
    opacity: 0.7;
    filter: blur(2px) brightness(0.95);
  }
  75% {
    opacity: 0.9;
    filter: blur(1px) brightness(1.05);
  }
}

@keyframes warp-crack {
  0%, 100% {
    opacity: 0.6;
    transform: translateY(-50%) scaleX(1);
  }
  25% {
    opacity: 0.8;
    transform: translateY(-50%) scaleX(0.98);
  }
  50% {
    opacity: 0.9;
    transform: translateY(-50%) scaleX(1.02);
  }
  75% {
    opacity: 0.7;
    transform: translateY(-50%) scaleX(0.99);
  }
}

@keyframes warp-tendrils {
  0%, 100% {
    opacity: 0.5;
    transform: skewX(0deg);
  }
  33% {
    opacity: 0.7;
    transform: skewX(2deg);
  }
  66% {
    opacity: 0.6;
    transform: skewX(-2deg);
  }
}

    .audio-toggle {
      cursor: pointer;
      padding: 3px 8px;
      border: 1px solid #0fa00f;
      border-radius: 3px;
      background-color: rgba(15, 160, 15, 0.1);
      transition: all 0.3s ease;
    }
    .audio-toggle:hover {
      background-color: rgba(15, 160, 15, 0.3);
      box-shadow: 0 0 10px rgba(15, 160, 15, 0.5);
      text-shadow: 0 0 8px rgba(15, 160, 15, 0.9);
    }

    
@media screen and (max-width: 768px) {
  .rank-hierarchy {
    width: 100%;
    margin: 0 auto;
    padding: 0 10px;
  }

  .rank-level, .special-roles-toggle, .special-roles-item {
    width: 100% !important;
    max-width: 280px;
    font-size: 14px;
    padding: 10px 8px;
    box-sizing: border-box;
  }

  .rank-row {
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .rank-row .rank-level {
    width: 100%;
    max-width: 280px;
    margin: 3px auto;
  }

  .special-roles-grid {
    flex-direction: column;
    align-items: center;
    padding: 5px;
  }

  .special-roles-item {
    width: 100%;
    max-width: 260px;
    margin: 3px auto;
  }

  .rank-horizontal-line {
    display: none;
  }

  .leadership-row {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .leadership-row .rank-level {
    width: 100%;
    max-width: 280px;
  }

  .legendary-warrior-toggle, .first-company-toggle {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    flex-direction: column;
  }

  .legendary-warrior-toggle .rank-level,
  .first-company-toggle .rank-level {
    width: 100%;
  }

  .branching-section {
    display: none;
  }

  .equal-peerage {
    flex-direction: column;
    gap: 20px;
    width: 100%;
    align-items: center;
  }

  .peerage-separator {
    width: 2px;
    height: 20px;
    display: block;
  }

  .special-roles-container-inline {
    width: 100%;
    max-width: 280px;
  }

  .special-roles-container-inline .special-roles-btn {
    width: 100%;
  }

  .special-roles-container-inline .special-roles-toggle {
    width: 100%;
  }

  .right-hand-connector,
  .right-hand-connector::before,
  .right-hand-connector::after {
    display: none;
  }

  .chapter-titles-grid {
    padding: 10px 5px;
  }

  .chapter-title-item {
    width: 100%;
    max-width: 260px;
    font-size: 12px;
  }

  .rank-line {
    height: 30px;
    margin: -10px auto;
  }
}
	  .hierarchy-note {
    background-color: #050707;
    border: 1px solid #0fa00f;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 0 10px rgba(15, 160, 15, 0.2) inset;
  }
  
  .note-title {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 5px;
    text-shadow: 0 0 5px rgba(15, 160, 15, 0.7);
  }
  
  /* Row layout for parallel ranks */
  .rank-row {
    display: flex;
    justify-content: center;
    gap: 0;
    width: 100%;
    align-items: center;
  }

  .rank-row .rank-level {
    width: 180px;
  }

  .rank-row .rank-horizontal-line {
    width: 80px;
    height: 2px;
    background-color: #0fa00f;
    box-shadow: 0 0 8px rgba(15, 160, 15, 0.7);
  }

  /* Half-height line for Special Roles positioning */
  .half-line {
    height: 5px; /* Half the regular height */
  }
  
  /* Special roles row */
  .special-roles-row {
    display: flex;
    justify-content: center;
    width: 100%;
  }
  
  /* Special roles toggle and content */
  .special-roles-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: 180px;
    padding: 5px 10px;
    background-color: #070B07;
    border: 1px solid #0fa00f;
    color: #0fa00f;
    text-shadow: 0 0 5px rgba(15, 160, 15, 0.6);
    box-shadow: 0 0 10px rgba(15, 160, 15, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.2s;
    margin: 0;
    z-index: 2;
  }
  
  .special-roles-toggle:hover {
    background-color: #070B07;
    box-shadow: 0 0 20px rgba(15, 160, 15, 0.6);
    text-shadow: 0 0 10px rgba(15, 160, 15, 1);
  }
  
  .toggle-icon {
    margin-left: 10px;
    transition: transform 0.3s ease;
    color: #0fa00f;
  }
  
  .special-roles-toggle.active .toggle-icon {
    transform: rotate(180deg);
  }
  
  .special-roles-content {
    max-height: 0;
    overflow: hidden;
    width: 100%;
    margin: 0;
    position: relative;
    z-index: 3;
    background-color: #020403;
    transition: max-height 0.3s ease, margin 0.3s ease;
  }

  .special-roles-content.active {
    max-height: 500px;
    margin: 10px 0;
  }
  
  .special-roles-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 3;
  }

  .special-roles-item {
    padding: 8px 10px;
    width: 140px;
    text-align: center;
    background-color: #050707;
    border: 1px solid #0fa00f;
    color: #0fa00f;
    text-shadow: 0 0 8px rgba(15, 160, 15, 0.8);
    box-shadow: 0 0 15px rgba(15, 160, 15, 0.4);
    position: relative;
    z-index: 3;
  }

  .legendary-warrior-toggle .toggle-icon,
  .first-company-toggle .toggle-icon,
  .special-roles-toggle .toggle-icon {
    transition: transform 0.3s ease;
    color: #0fa00f;
    margin-left: 10px;
  }

  .legendary-warrior-toggle.active .toggle-icon,
  .first-company-toggle.active .toggle-icon,
  .special-roles-toggle.active .toggle-icon {
    transform: rotate(180deg);
  }

  .legendary-warrior-toggle:hover .rank-level,
  .first-company-toggle:hover .rank-level {
    background-color: #070B07;
    box-shadow: 0 0 20px rgba(15, 160, 15, 0.6);
  }

  .legendary-warrior-content,
  .first-company-content {
    max-height: 0;
    overflow: hidden;
    width: 100%;
    margin: 0;
    position: relative;
    z-index: 3;
    background-color: #020403;
    transition: max-height 0.3s ease, margin 0.3s ease;
  }

  .legendary-warrior-content.active,
  .first-company-content.active {
    max-height: 500px;
    margin: 10px 0;
  }

  .chapter-titles-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    position: relative;
    z-index: 3;
  }

  .chapter-title-item {
    padding: 8px 10px;
    width: 140px;
    text-align: center;
    background-color: #050707;
    border: 1px solid #0fa00f;
    color: #0fa00f;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    transition: all 0.3s ease;
    text-shadow: 0 0 8px rgba(15, 160, 15, 0.8);
    box-shadow: 0 0 15px rgba(15, 160, 15, 0.4);
    position: relative;
    z-index: 3;
  }

  .chapter-title-item:hover {
    background-color: #070B07;
    box-shadow: 0 0 10px rgba(15, 160, 15, 0.4);
  }

  .chapter-title-item strong {
    color: #1FC61F;
  }

  .rank-level.terminator {
    background-color: #0D1A0D;
    box-shadow: 0 0 18px rgba(15, 160, 15, 0.5);
    text-shadow: 0 0 8px rgba(15, 160, 15, 0.8);
    border: 1px solid #0fa00f;
  }

  .leadership-row {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 0;
    margin: 0 auto;
    position: relative;
  }

  .leadership-row .rank-level {
    width: 180px;
  }

  .leadership-row .rank-level:first-child {
    position: relative;
  }

  .leadership-row .rank-horizontal-line {
    width: 80px;
  }

  .first-company-toggle,
  .legendary-warrior-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    cursor: pointer;
  }

  .first-company-toggle .rank-level,
  .legendary-warrior-toggle .rank-level {
    width: 180px;
  }

  /* Right Hand connector that goes left then down to Special Roles */
  .right-hand-connector {
    position: absolute;
    left: calc(50% - 306px);  /* Start from left edge of RIGHT HAND box */
    top: 50%;
    transform: translateY(-50%);
    width: 135px;  /* Horizontal line to the left */
    height: 2px;
    background-color: #0fa00f;
    box-shadow: 0 0 8px rgba(15, 160, 15, 0.7);
  }

  /* Vertical line going down from the horizontal connector */
  .right-hand-connector::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 179px;  /* Goes down to Special Roles level */
    background-color: #0fa00f;
    box-shadow: 0 0 8px rgba(15, 160, 15, 0.7);
  }

  /* Horizontal line from vertical to Special Roles box */
  .right-hand-connector::before {
    content: "";
    position: absolute;
    left: 0;
    top: 177px;
    width: 161px;  /* Connect to left edge of Special Roles box */
    height: 2px;
    background-color: #0fa00f;
    box-shadow: 0 0 8px rgba(15, 160, 15, 0.7);
  }

  .equal-peerage {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    width: 100%;
    margin: 10px 0;
  }

  .equal-peerage .peerage-separator {
    width: 80px;
    height: 2px;
    background-color: #0fa00f;
    opacity: 1;
    box-shadow: 0 0 8px rgba(15, 160, 15, 0.7);
  }

  .special-roles-container-inline {
    display: flex;
    align-items: center;
    width: 180px;
  }

  .special-roles-container-inline .special-roles-btn {
    border: none;
    background: none;
    color: #0fa00f;
    text-align: center;
    font-size: 16px;
    text-shadow: 0 0 5px rgba(15, 160, 15, 0.6);
    padding: 0;
    margin: 0;
  }

  .special-roles-container-inline .special-roles-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border: 1px solid #0fa00f;
    background-color: #070B07;
    width: 180px;
    height: auto;
    box-shadow: 0 0 10px rgba(15, 160, 15, 0.3);
    margin: 0;
    position: relative;
    z-index: 2;
  }

  .special-roles-container-inline .special-roles-toggle:hover {
    box-shadow: 0 0 20px rgba(15, 160, 15, 0.6);
    text-shadow: 0 0 10px rgba(15, 160, 15, 1);
  }

  .special-roles-container-inline .special-roles-toggle:hover .special-roles-btn {
    background-color: #0D1A0D;
  }

  .peerage-separator {
    width: 80px;
    height: 2px;
    background-color: #0fa00f;
    opacity: 1;
    box-shadow: 0 0 8px rgba(15, 160, 15, 0.7);
  }

  /* Different glow levels based on role type */
  .rank-level.high-lord {
    border: 2px solid #0fa00f;
    box-shadow: 0 0 25px rgba(15, 160, 15, 0.8);
    text-shadow: 0 0 12px rgba(15, 160, 15, 1);
    font-weight: bold;
  }
  
  .rank-level.champion {
    background-color: #0D1A0D;
    box-shadow: 0 0 20px rgba(15, 160, 15, 0.6);
    text-shadow: 0 0 10px rgba(15, 160, 15, 0.9);
    border: 1px solid #0fa00f;
  }
  
  /* Legend styling */
  .hierarchy-legend {
    background-color: #050707;
    border: 1px solid #0fa00f;
    padding: 15px;
    margin-top: 20px;
    box-shadow: 0 0 10px rgba(15, 160, 15, 0.2) inset;
  }
  
  .legend-title {
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 0 5px rgba(15, 160, 15, 0.7);
  }
  
  .legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
  }
  
  .legend-box {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    background-color: #050505;
    border: 1px solid #0fa00f;
  }
  
  .high-lord-legend {
    border: 2px solid #0fa00f;
    box-shadow: 0 0 15px rgba(15, 160, 15, 0.8);
  }
  
  .champion-legend {
    background-color: #0D1A0D;
    box-shadow: 0 0 12px rgba(15, 160, 15, 0.6);
  }
  
  .special-legend {
    background-color: #070B07;
    box-shadow: 0 0 8px rgba(15, 160, 15, 0.5);
  }
  
  .special-roles-legend {
    background-color: #050707;
    border: 1px solid #0fa00f;
    box-shadow: 0 0 10px rgba(15, 160, 15, 0.5) inset;
  }

  /* Server rules styling */
  .rule-list {
    list-style-type: decimal;
    padding: 0;
    margin: 0;
  }

  .rule-item {
    background-color: #050707;
    border: 1px solid #1A1A1A;
    padding: 12px 15px;
    margin-bottom: 12px;
    box-shadow: 0 0 8px rgba(15, 160, 15, 0.2) inset;
    transition: background-color 0.2s ease, transform 0.2s ease,
      box-shadow 0.2s ease;
    color: #1edb1e;
    text-shadow: 0 0 3px rgba(15, 160, 15, 0.4);
  }

  .rule-item:hover {
    background-color: #070B07;
    box-shadow: 0 0 12px rgba(15, 160, 15, 0.5);
    transform: translateY(-2px);
  }

  .rules-tip {
    margin-top: 15px;
    color: #19c019;
    text-shadow: 0 0 3px rgba(15, 160, 15, 0.4);
  }
@keyframes scan {
  0% { left: -100%; }
  100% { left: 100%; }
}
/* Relics Grid Styling */
.relics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.relic-card {
  background-color: #050707;
  border: 1px solid #1A1A1A;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(15, 160, 15, 0.2) inset;
}

.relic-card:hover {
  background-color: #070B07;
  border-color: #0fa00f;
  box-shadow: 0 0 20px rgba(15, 160, 15, 0.5);
  transform: translateY(-3px);
}

.relic-card.owned {
  background-color: #0A160A;
  border-color: #0fa00f;
  box-shadow: 0 0 15px rgba(15, 160, 15, 0.3) inset;
}

.relic-card.owned::after {
  content: "\2713";
  position: absolute;
  top: 5px;
  right: 5px;
  color: #0fa00f;
  font-size: 16px;
  text-shadow: 0 0 5px rgba(15, 160, 15, 0.8);
}

.relic-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.relic-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 3px rgba(15, 160, 15, 0.7));
}

.relic-card h6 {
  color: #0fa00f;
  margin: 5px 0;
  font-size: 14px;
  text-shadow: 0 0 5px rgba(15, 160, 15, 0.7);
}

.relic-cost {
  color: #19c019;
  font-size: 12px;
  margin: 0;
  text-shadow: 0 0 3px rgba(15, 160, 15, 0.5);
}

/* Relic Popup */
.relic-popup {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  animation: fadeIn 0.3s;
  overflow-y: auto;
}

.relic-popup-content {
  position: relative;
  background-color: #050707;
  margin: 50px auto;
  padding: 20px;
  border: 2px solid #0fa00f;
  width: 80%;
  max-width: 400px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 0 30px rgba(15, 160, 15, 0.6);
  animation: slideIn 0.3s;
}

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

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.relic-popup-close {
  color: #0fa00f;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  text-shadow: 0 0 5px rgba(15, 160, 15, 0.8);
}

.relic-popup-close:hover {
  color: #20e520;
  text-shadow: 0 0 10px rgba(32, 229, 32, 1);
}

.relic-popup-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 15px;
}

.relic-popup-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 5px rgba(15, 160, 15, 0.8));
}

#popup-title {
  color: #0fa00f;
  font-size: 20px;
  margin-bottom: 10px;
  text-shadow: 0 0 8px rgba(15, 160, 15, 0.8);
}

.relic-popup-cost {
  color: #20e520;
  font-size: 16px;
  margin-bottom: 15px;
  text-shadow: 0 0 5px rgba(32, 229, 32, 0.7);
}

#popup-description {
  color: #19c019;
  line-height: 1.6;
  text-shadow: 0 0 3px rgba(15, 160, 15, 0.5);
}

.lore-button {
  background-color: #050505;
  border: 1px solid #0fa00f;
  color: #0fa00f;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 12px;
  margin-top: 10px;
  text-shadow: 0 0 5px rgba(15, 160, 15, 0.6);
  box-shadow: 0 0 10px rgba(15, 160, 15, 0.3);
}
.lore-button:hover {
  background-color: #0D1A0D;
  box-shadow: 0 0 15px rgba(15, 160, 15, 0.5);
  text-shadow: 0 0 8px rgba(15, 160, 15, 0.8);
}

@media screen and (max-width: 768px) {
  .relics-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
  }

  .relic-card {
    padding: 10px;
  }

  .relic-icon {
    width: 50px;
    height: 50px;
  }

  .relic-popup-content {
    width: 90%;
    margin: 30px auto;
    max-height: calc(100vh - 60px);
  }

  .role-buttons-container {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .role-button {
    width: 100%;
    max-width: 280px;
  }

  .extra-roles-container {
    overflow: visible;
  }

  .role-details-container {
    padding: 10px;
  }
}


/* ==================== ANNALS VERTICAL CAROUSEL ==================== */

/* Main carousel container */
.annals-carousel-container {
  position: relative;
  display: flex;
  gap: 20px;
  min-height: 600px;
  margin-top: 20px;
}

/* Left side - vertical carousel */
.annals-carousel {
  flex: 0 0 300px;
  position: relative;
  height: 600px;
  overflow: hidden;
  background-color: #030303;
  border: 1px solid #0fa00f;
  box-shadow: 0 0 15px rgba(15, 160, 15, 0.3) inset;
}

.annals-carousel-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.annal-carousel-item {
  width: 100%;
  padding: 15px;
  margin-bottom: 10px;
  background-color: #050707;
  border: 1px solid #1A1A1A;
  cursor: pointer;
  transition: all 0.3s ease;
  max-height: 150px;
  overflow-y: auto;
  overflow-x: hidden;
}

.annal-carousel-item:hover {
  background-color: #0a1010;
  border-color: #0fa00f;
  box-shadow: 0 0 10px rgba(15, 160, 15, 0.3);
}

.annal-carousel-item.active {
  background-color: #0D1A0D;
  border-color: #0fa00f;
  box-shadow: 0 0 15px rgba(15, 160, 15, 0.5);
}

.annal-carousel-item.fading-top,
.annal-carousel-item.fading-bottom {
  opacity: 0.3;
  transform: scale(0.95);
  filter: blur(1px);
}

/* Scroll zones for hover controls */
.annals-scroll-up,
.annals-scroll-down {
  position: absolute;
  width: 100%;
  height: 80px;
  z-index: 10;
  cursor: pointer;
  opacity: 0.15;
  transition: opacity 0.3s ease, background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0fa00f;
  font-size: 24px;
  text-shadow: 0 0 10px rgba(15, 160, 15, 0.8);
}

.annals-scroll-up {
  top: 0;
  background: linear-gradient(to bottom, rgba(15, 160, 15, 0.08), transparent);
}

.annals-scroll-down {
  bottom: 0;
  background: linear-gradient(to top, rgba(15, 160, 15, 0.08), transparent);
}

.annals-scroll-up:hover,
.annals-scroll-down:hover {
  opacity: 1;
  text-shadow: 0 0 15px rgba(15, 160, 15, 1);
}

.annals-scroll-up:hover {
  background: linear-gradient(to bottom, rgba(15, 160, 15, 0.25), transparent);
}

.annals-scroll-down:hover {
  background: linear-gradient(to top, rgba(15, 160, 15, 0.25), transparent);
}

.annals-carousel:hover .annals-scroll-up,
.annals-carousel:hover .annals-scroll-down {
  opacity: 0.35;
}

/* Right side - expanded detail panel */
.annals-detail-panel {
  flex: 1;
  background-color: #050707;
  border: 1px solid #0fa00f;
  padding: 0;
  box-shadow: 0 0 15px rgba(15, 160, 15, 0.3) inset;
  min-height: 600px;
  max-height: 600px;
  overflow-y: auto;
  position: relative;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.annals-detail-panel.active {
  opacity: 1;
  transform: translateX(0);
}

/* Annals Filters */
.annals-filters {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
  background-color: #050707;
  border: 1px solid #0fa00f;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 0 10px rgba(15, 160, 15, 0.2);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-label {
  color: #0fa00f;
  font-weight: bold;
  font-size: 0.9em;
  text-shadow: 0 0 5px rgba(15, 160, 15, 0.5);
}

.filter-select {
  background-color: #0a1010;
  color: #0fa00f;
  border: 1px solid #0fa00f;
  padding: 8px 12px;
  font-size: 0.9em;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px rgba(15, 160, 15, 0.2);
}

.filter-select:hover {
  background-color: #0D1A0D;
  box-shadow: 0 0 10px rgba(15, 160, 15, 0.4);
}

.filter-select:focus {
  box-shadow: 0 0 15px rgba(15, 160, 15, 0.6);
}

.filter-reset-btn {
  background-color: #0a1010;
  color: #0fa00f;
  border: 1px solid #0fa00f;
  padding: 8px 16px;
  font-size: 0.9em;
  font-weight: bold;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px rgba(15, 160, 15, 0.2);
}

.filter-reset-btn:hover {
  background-color: #0D1A0D;
  box-shadow: 0 0 10px rgba(15, 160, 15, 0.5);
  text-shadow: 0 0 5px rgba(15, 160, 15, 0.7);
}

.filter-reset-btn:active {
  transform: scale(0.98);
}

.annals-detail-panel::-webkit-scrollbar {
  width: 8px;
}

.annals-detail-panel::-webkit-scrollbar-track {
  background: #030303;
}

.annals-detail-panel::-webkit-scrollbar-thumb {
  background: #0fa00f;
  box-shadow: 0 0 8px rgba(15, 160, 15, 0.7);
}

/* Fade animations for carousel items */
@keyframes carousel-fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile responsive */
@media screen and (max-width: 768px) {
  .annals-carousel-container {
    flex-direction: column !important;
    min-height: auto !important;
    width: 100% !important;
    gap: 0 !important;
  }

  .annals-carousel {
    flex: 1 1 auto !important;
    height: 500px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    margin-bottom: 20px;
    overflow-y: scroll !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
  }

  .annals-carousel-track {
    width: 100% !important;
    padding: 80px 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    transform: none !important;
  }

  /* Mobile: Subtle scroll buttons */
  .annals-scroll-up,
  .annals-scroll-down {
    opacity: 0.5 !important;
    height: 60px !important;
    width: 100% !important;
    font-size: 0.85em !important;
    background-color: rgba(5, 7, 7, 0.9) !important;
    border: 1px solid rgba(15, 160, 15, 0.3) !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
  }

  .annals-scroll-up {
    top: 0 !important;
    background: linear-gradient(to bottom, rgba(15, 160, 15, 0.15), rgba(5, 7, 7, 0.9)) !important;
  }

  .annals-scroll-down {
    bottom: 0 !important;
    background: linear-gradient(to top, rgba(15, 160, 15, 0.15), rgba(5, 7, 7, 0.9)) !important;
  }

  .annals-scroll-up:active,
  .annals-scroll-down:active {
    opacity: 0.7 !important;
    background-color: rgba(15, 160, 15, 0.25) !important;
  }

  /* Mobile: Larger carousel items for easier tapping */
  .annal-carousel-item {
    padding: 20px 10px !important;
    min-height: 110px !important;
    max-height: 180px !important;
    font-size: 1.05em !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    word-wrap: break-word !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .annal-carousel-item.active {
    /* No special styling on mobile - all items equal */
    border-width: 1px !important;
    box-shadow: none !important;
  }

  .annal-carousel-item.fading-top,
  .annal-carousel-item.fading-bottom {
    /* Remove fading effect on mobile */
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .annal-carousel-item:active {
    /* Visual feedback when tapping */
    background-color: #0D1A0D !important;
    border-color: #0fa00f !important;
  }

  .annals-detail-panel {
    display: none !important;
  }

  /* Mobile: Better text readability */
  .annals-detail-content {
    font-size: 1.05em !important;
    line-height: 1.7 !important;
    padding: 20px !important;
  }
}
