@font-face {
    font-family: 'SkirkFont';
    src: url('https://cdn.jsdelivr.net/gh/rajroy7/si@main/zh-cn.ttf') format('truetype');
}

@font-face {
    font-family: 'DripFont';
    src: url('https://cdn.jsdelivr.net/gh/rajroy7/si@main/drip.ttf') format('truetype');
}

body {
    margin: 0;
    font-family: 'SkirkFont', 'Segoe UI', system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg,#0c0c18,#070b22,#000000);
    color: #ffffff;
    min-height: 100vh;
}

body.sidebar-open {
    overflow: hidden;
}

/* Global layout */
.container { max-width: 1200px; margin: 0 auto; }

/* Top nav */
nav{
  display:flex;
  justify-content:flex-start;
  align-items:center;
  padding:12px 28px;
  gap: 30px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  
  background: linear-gradient(135deg, rgba(10, 10, 20, 0.95) 0%, rgba(20, 10, 35, 0.92) 100%);
  border-bottom: 1px solid rgba(124, 92, 255, 0.2);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 8px 32px rgba(124, 92, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  height: 60px;
}

.logo{ 
  font-family: 'DripFont', 'SkirkFont';
  font-size:18px; 
  font-weight:700; 
  letter-spacing:3px;
  background: linear-gradient(135deg, #7c5cff 0%, #a78bff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-accent {
  font-family: 'SkirkFont';
}

.nav-links{ 
  display:flex; 
  gap:28px; 
  flex:1; 
  align-items:center;
}

.nav-links a{ 
  color:#b8a8ff; 
  text-decoration:none; 
  transition:0.3s; 
  display:flex; 
  align-items:center; 
  height:24px;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover{ 
  color:#7c5cff;
  border-bottom-color: #7c5cff;
}

/* Top Nav Settings Button */
.nav-settings-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
  height: 24px;
}

.nav-settings-btn:hover {
  transform: scale(1.1);
}

.settings-icon {
  width: 20px;
  height: 20px;
  display: block;
  transition: 0.2s;
}

/* Top Nav Search Button */
.nav-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
  height: 24px;
}

.nav-search-btn:hover {
  transform: scale(1.1);
}

.search-icon {
  width: 20px;
  height: 20px;
  filter: brightness(1);
  transition: 0.2s;
}

.nav-search-btn:hover .search-icon {
  filter: brightness(1.5);
}

/* SEARCH MODAL */
.search-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
}

.search-modal.open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}

.search-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.search-container {
  background: #1a1a2e;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 70vh;
  overflow-y: auto;
  border: 2px solid #7c5cff;
  box-shadow: 0 0 30px rgba(124, 92, 255, 0.4);
}

.search-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(124, 92, 255, 0.3);
  gap: 12px;
  position: sticky;
  top: 0;
  background: #1a1a2e;
}

.search-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(124, 92, 255, 0.3);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: 0.2s;
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: #7c5cff;
  box-shadow: 0 0 15px rgba(124, 92, 255, 0.3);
}

.search-input::placeholder {
  color: #999;
}

.search-close {
  background: none;
  border: none;
  color: #7c5cff;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.search-close:hover {
  color: #00f0ff;
  transform: scale(1.2);
}

.search-results {
  padding: 12px;
}

.search-result-item {
  display: flex;
  gap: 16px;
  padding: 12px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(124, 92, 255, 0.2);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: 0.2s;
  cursor: pointer;
}

.search-result-item:hover {
  background: rgba(124, 92, 255, 0.15);
  border-color: rgba(124, 92, 255, 0.5);
  transform: translateX(4px);
}

.search-result-image {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(124, 92, 255, 0.1);
  flex-shrink: 0;
}

.search-result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.search-result-info h4 {
  margin: 0 0 4px 0;
  font-size: 16px;
  color: #7c5cff;
}

.search-result-info p {
  margin: 0;
  font-size: 13px;
  color: #aaa;
  margin-bottom: 4px;
}

.search-result-type {
  display: inline-block;
  background: rgba(124, 92, 255, 0.3);
  color: #7c5cff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  width: fit-content;
}

.nav-settings-btn:hover .settings-icon {
  filter: brightness(1.5);
}

/* Hamburger Menu Button */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: #ffffff;
  border-radius: 2px;
  transition: 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translateY(12px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translateY(-12px);
}

/* HERO */
.hero{ text-align:center; padding:48px 20px 24px; }
.hero img{ width:72px; margin-bottom:12px; }
.hero h1{ font-size:32px; letter-spacing:3px; margin:6px 0; font-weight:700; }
.hero p{ opacity:0.78; font-size:14px; }

/* CARDS */
.cards{ display:flex; justify-content:center; gap:20px; flex-wrap:wrap; margin:24px 20px; }
.cards-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; margin: 24px 0; }
.card-link{ text-decoration:none; color:inherit; display:block; }

/* Small cards section */
.cards-small {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 32px 20px;
}

.cards-small .card {
  width: 180px;
  height: 160px;
}

/* Reduce size for Abyss, Theater, and Stygian cards specifically */
.cards-small .abyss-card,
.cards-small .theater-card,
.cards-small .stygian-card {
  width: 110px;
  height: 127px;
}
.char-card a { display: block; text-decoration: none; color: inherit; width: 100%; height: 100%; }
.card{ width:200px; height:auto; background:rgba(255,255,255,0.04); border-radius:18px; padding:16px; backdrop-filter:blur(10px); transition:0.32s; box-sizing:border-box; }
.card-link .card:hover{ transform:translateY(-8px); box-shadow:0 8px 30px rgba(124,92,255,0.12); }
.card img{ width:100%; height:150px; object-fit:cover; border-radius:10px; margin-bottom:12px; }

/* Blurred background character card */
.character-card {
  position: relative;
  padding: 0;
  background: rgba(0, 0, 0, 0.4);
  overflow: hidden;
  width: 200px;
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 2px solid #7c5cff;
  box-shadow: 0 0 20px rgba(124, 92, 255, 0.6), inset 0 0 20px rgba(124, 92, 255, 0.1);
  box-sizing: border-box;
}

.character-card:hover {
  box-shadow: 0 0 30px rgba(124, 92, 255, 0.8), inset 0 0 30px rgba(124, 92, 255, 0.2);
}

.cycling-card-img-blurred {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150%;
  height: 150%;
  object-fit: cover;
  filter: blur(4.8px);
  opacity: 0.6;
  z-index: 0;
  transition: opacity 0.3s ease;
}

.card-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px;
}

.card-content h3,
.card-content p {
  margin: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.card-content h3 {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 700;
}

.card-content p {
  font-size: 13px;
  opacity: 0.95;
}

/* Weapons and Artifacts cards - same blurred style */
.weapons-card,
.artifacts-card {
  position: relative;
  padding: 0;
  background: rgba(0, 0, 0, 0.4);
  overflow: hidden;
  width: 200px;
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 2px solid #7c5cff;
  box-shadow: 0 0 20px rgba(124, 92, 255, 0.6), inset 0 0 20px rgba(124, 92, 255, 0.1);
  transition: box-shadow 0.3s ease;
  box-sizing: border-box;
}

.weapons-card:hover,
.artifacts-card:hover {
  box-shadow: 0 0 30px rgba(124, 92, 255, 0.8), inset 0 0 30px rgba(124, 92, 255, 0.2);
}

.cycling-card-img-fade {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150%;
  height: 150%;
  object-fit: cover;
  filter: blur(4.8px);
  opacity: 0.6;
  z-index: 0;
  transition: opacity 0.3s ease;
}

/* Override height for small cards */
.cards-small .abyss-card,
.cards-small .theater-card,
.cards-small .stygian-card {
  height: 127px;
  position: relative;
  padding: 0;
  overflow: hidden;
  border: 2px solid #7c5cff;
  box-shadow: 0 0 20px rgba(124, 92, 255, 0.6), inset 0 0 20px rgba(124, 92, 255, 0.1);
  transition: box-shadow 0.3s ease;
}

.small-card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(1px);
  opacity: 0.7;
  z-index: 0;
}

.cards-small .card-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 8px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.cards-small .card-content h3 {
  margin: 0 0 3px 0;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

.cards-small .card-content p {
  margin: 0;
  font-size: 9px;
  opacity: 0.95;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.cards-small .abyss-card:hover,
.cards-small .theater-card:hover,
.cards-small .stygian-card:hover {
  box-shadow: 0 0 30px rgba(124, 92, 255, 0.8), inset 0 0 30px rgba(124, 92, 255, 0.2);
}

/* COUNTDOWN */
.countdown-wrapper{ text-align:center; margin:24px 20px; }
.countdown-header{ display:flex; justify-content:center; align-items:center; gap:12px; margin-bottom:12px; }
.countdown-title{ font-size:12px; color:#7c5cff; letter-spacing:2px; font-weight:600; margin:0; padding:0; }
.countdown-toggle{ background:rgba(124, 92, 255, 0.15); border:1px solid rgba(124, 92, 255, 0.3); border-radius:6px; width:24px; height:24px; display:flex; align-items:center; justify-content:center; cursor:pointer; transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1); color:#7c5cff; font-size:10px; padding:0; }
.countdown-toggle:hover{ background:rgba(124, 92, 255, 0.25); border-color:rgba(124, 92, 255, 0.5); }
.toggle-arrow{ display:inline-block; transition:transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.countdown-toggle.collapsed .toggle-arrow{ transform:rotate(180deg); }
.countdown{ display:flex; justify-content:center; gap:9px; flex-wrap:nowrap; background:linear-gradient(135deg, rgba(124, 92, 255, 0.08) 0%, rgba(124, 92, 255, 0.04) 100%); padding:14px 17px; border-radius:12px; border:1px solid rgba(124, 92, 255, 0.15); width:fit-content; margin:0 auto; max-height:1000px; overflow:hidden; transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.countdown.hidden{ max-height:0; padding:0 20px; opacity:0; }
.time-box{ background:rgba(124, 92, 255, 0.12); padding:9px 11px; border-radius:8px; backdrop-filter:blur(8px); min-width:48px; border:1px solid rgba(124, 92, 255, 0.2); transition:0.3s; }
.time-box:hover{ background:rgba(124, 92, 255, 0.18); border-color:rgba(124, 92, 255, 0.4); }
.time-box span{ font-size:14px; color:#7c5cff; display:block; font-weight:700; }
.time-box p{ font-size:9px; color:#b8a8ff; margin:4px 0 0 0; letter-spacing:1px; }

/* UPCOMING BIRTHDAYS */
.upcoming-birthdays-section{ margin:48px 20px; padding:20px; background:rgba(255,255,255,0.02); border-radius:12px; border:1px solid rgba(124,92,255,0.2); }
.birthdays-container{ display:flex; justify-content:center; gap:12px; flex-wrap:wrap; }
.birthday-card{ display:flex; flex-direction:column; align-items:center; gap:6px; padding:8px; background:rgba(124,92,255,0.1); border-radius:10px; border:1px solid rgba(124,92,255,0.3); min-width:80px; transition:0.2s; cursor:pointer; text-decoration:none; color:inherit; }
.birthday-card:hover{ background:rgba(124,92,255,0.2); transform:translateY(-4px); box-shadow:0 4px 16px rgba(124,92,255,0.15); }
.birthday-card img{ width:64px; height:64px; border-radius:8px; object-fit:cover; background:rgba(255,255,255,0.05); }
.birthday-card .date{ font-size:11px; font-weight:bold; color:#7c5cff; }
.birthday-card .name{ font-size:10px; text-align:center; opacity:0.8; }

/* SCROLL TO TOP BUTTON */
#scrollToTopBtn {
  position: fixed;
  bottom: 40px;
  right: 30px;
  z-index: 999;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.2) 0%, rgba(124, 92, 255, 0.1) 100%);
  border: 2px solid rgba(124, 92, 255, 0.4);
  color: #7c5cff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(124, 92, 255, 0.15);
}

#scrollToTopBtn.visible {
  opacity: 1;
  visibility: visible;
}

#scrollToTopBtn:hover {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.4) 0%, rgba(124, 92, 255, 0.2) 100%);
  border-color: rgba(124, 92, 255, 0.6);
  box-shadow: 0 8px 32px rgba(124, 92, 255, 0.3);
  transform: translateY(-5px);
}

#scrollToTopBtn:active {
  transform: translateY(-2px);
}

/* FOOTER */
.footer {
    background: linear-gradient(180deg, #0a0a18 0%, #1a1a2e 50%, #050510 100%);
    padding: 30px 20px;
    margin-top: 40px;
    text-align: center;
    border-top: 1px solid rgba(124, 92, 255, 0.2);
    position: relative;
    box-shadow: inset 0 2px 10px rgba(124, 92, 255, 0.1);
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer h2 {
    font-family: 'DripFont', 'SkirkFont';
    font-size: 18px;
    letter-spacing: 3px;
    margin-bottom: 10px;
    color: #7c5cff;
    text-transform: uppercase;
    font-weight: 700;
}

.footer h2 .logo-accent {
    font-family: 'SkirkFont';
}

.footer-credit {
    font-size: 14px;
    color: #e0d4ff;
    margin: 8px 0;
    font-weight: 500;
}

.footer-credit strong {
    color: #7c5cff;
}

.footer-memorial {
    font-size: 12px;
    color: #c8b8ff;
    margin: 6px 0 10px;
    font-style: italic;
    letter-spacing: 1px;
}

.footer-memorial strong {
    color: #7c5cff;
    font-style: normal;
}

.footer-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #7c5cff, transparent);
    margin: 12px auto;
}

.footer-copyright {
    font-size: 12px;
    color: #aaa;
    margin-top: 16px;
    letter-spacing: 0.5px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: #7c5cff;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.footer-links a:hover {
    color: #00f0ff;
}

.footer-bottom {
    font-size: 11px;
    color: #999;
    margin-top: 12px;
    letter-spacing: 0.5px;
    border-top: 1px solid rgba(124, 92, 255, 0.2);
    padding-top: 10px;
}

/* Sidebar - Mobile Menu */
.sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    height: 100vh;
    width: 280px;
    background: linear-gradient(180deg, rgba(10, 10, 20, 0.98) 0%, rgba(15, 8, 30, 0.98) 100%);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 8px 0 32px rgba(124, 92, 255, 0.2), inset -1px 0 0 rgba(124, 92, 255, 0.1);
    z-index: 999;
    padding-top: 80px;
    border-right: 1px solid rgba(124, 92, 255, 0.15);
}

/* WebKit browsers: hide the scrollbar */
.sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
    background: transparent;
}

/* Show sidebar when open */
.sidebar.open {
    left: 0;
}

.sidebar ul {
    list-style: none;
    padding: 8px 6px;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.sidebar ul li {
    margin: 6px 0;
}

.sidebar ul li a {
    display: flex;
    align-items: center;
    padding: 11px 14px;
    text-decoration: none;
    color: #b8a8ff;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    margin-left: 6px;
    font-size: 13px;
    gap: 10px;
}

.sidebar ul li a:hover {
    background: rgba(124, 92, 255, 0.15);
    border-left-color: #7c5cff;
    color: #7c5cff;
    padding-left: 17px;
}

.icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.text {
    margin-left: 0;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 200px;
}

/* Main content - full width by default */
.main-content {
    padding: 80px 20px 20px 20px;
    transition: margin-left 0.28s ease;
}

/* Overlay when sidebar is open */
.sidebar.open ~ .main-content::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

/* Responsive: Tablet screens */
@media (max-width: 1024px) and (min-width: 769px) {
    .nav-links {
        gap: 16px;
        flex-wrap: wrap;
    }
    
    .nav-links a {
        font-size: 13px;
    }
    
    .logo {
        font-size: 16px;
        letter-spacing: 2px;
    }
}

/* Responsive: Show hamburger on smaller screens */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero {
        padding: 36px 16px 18px;
    }
    
    .hero img {
        width: 56px;
        margin-bottom: 10px;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .hero p {
        font-size: 12px;
    }
    
    .cards {
        gap: 14px;
        margin: 18px 10px;
    }
    
    .card {
        width: 120px;
    }
    
    .character-card,
    .weapons-card,
    .artifacts-card {
        width: 120px !important;
        height: 138px !important;
    }
    
    .card img {
        height: 120px;
    }

    /* Mobile sizing for small cards */
    .cards-small {
        gap: 14px;
        margin: 20px 10px;
    }

    .cards-small .abyss-card,
    .cards-small .theater-card,
    .cards-small .stygian-card {
        width: 100px;
        height: 115px;
    }

    .cards-small .card-content h3 {
        font-size: 13px;
    }

    .cards-small .card-content p {
        font-size: 10px;
    }
    
    .countdown {
        gap: 7px;
        padding: 10px 14px;
        max-width: 90vw;
    }
    
    .time-box {
        min-width: 42px;
        padding: 7px 9px;
    }
    
    .time-box span {
        font-size: 12px;
    }
    
    .time-box p {
        font-size: 8px;
    }

    .countdown-title {
        font-size: 12px;
    }

    .countdown-toggle {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    /* Mobile birthday card sizing */
    .birthdays-container {
        gap: 10px;
    }

    .birthday-card {
        min-width: 70px;
        gap: 4px;
        padding: 6px;
    }

    .birthday-card img {
        width: 56px;
        height: 56px;
    }

    .birthday-card .date {
        font-size: 10px;
    }

    .birthday-card .name {
        font-size: 9px;
    }

    /* Mobile footer sizing */
    .footer {
        padding: 20px 15px;
        margin-top: 30px;
    }

    .footer h2 {
        font-size: 16px;
        letter-spacing: 2px;
        margin-bottom: 8px;
    }

    .footer-credit {
        font-size: 12px;
        margin: 6px 0;
    }

    .footer-memorial {
        font-size: 11px;
        margin: 4px 0 8px;
    }

    .footer-divider {
        width: 50px;
        margin: 10px auto;
    }

    .footer-links {
        gap: 12px;
        margin: 12px 0;
    }

    /* Mobile cards grid - fit more columns on small screens */
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
        gap: 8px;
        margin: 16px 0;
    }

    /* Mobile settings modal */
    .modal {
        padding: 10px;
    }

    .modal-content {
        max-width: 95vw;
        margin-top: 10px;
        max-height: 85vh;
        overflow-y: auto;
    }

    .modal-header {
        padding: 12px 14px;
    }

    .modal-header h2 {
        font-size: 16px;
    }

    .modal-close {
        font-size: 18px;
    }

    .modal-body {
        padding: 12px 14px;
        max-height: calc(85vh - 120px);
        overflow-y: auto;
    }

    .settings-section {
        margin-bottom: 16px;
    }

    .settings-section h3 {
        font-size: 10px;
        margin: 0 0 8px 0;
    }

    .settings-row {
        margin-bottom: 8px;
    }

    .settings-row label {
        font-size: 12px;
    }

    .settings-row select,
    .settings-row input[type="checkbox"] {
        font-size: 11px;
        min-width: 80px;
        padding: 4px 6px;
    }

    .settings-info {
        padding: 8px 10px;
        font-size: 10px;
        margin-top: 8px;
    }

    .modal-footer {
        padding: 10px 14px;
    }

    .save-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* SETTINGS MODAL */
.settings-menu-item {
    margin: 6px 0;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: list-item;
    visibility: visible;
    opacity: 1;
}

.settings-menu-btn {
    width: 100%;
    padding: 11px 14px;
    background: transparent;
    border: none;
    border-left: 3px solid transparent;
    color: #ffffff !important;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    border-radius: 8px;
    margin-left: 6px;
    padding-left: 14px;
    box-sizing: border-box;
    max-width: 268px;
    min-height: 44px;
    position: relative;
    visibility: visible;
    opacity: 1;
}

.settings-menu-btn:hover {
    background: rgba(124, 92, 255, 0.15);
    border-left-color: #7c5cff;
    color: #7c5cff;
    padding-left: 17px;
}

.settings-menu-btn .icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.settings-menu-btn .text {
    margin-left: 0;
    white-space: nowrap;
    flex: 1;
    color: #ffffff !important;
    visibility: visible;
    opacity: 1;
    display: inline;
}

/* About Developer Button */
.about-menu-item {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
    padding-top: 14px;
}

.about-menu-btn {
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #c8b6ff;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: 0.2s;
    text-align: left;
    border-radius: 8px;
    text-decoration: none;
}

.about-menu-btn:hover {
    color: #7c5cff;
    background: rgba(124, 92, 255, 0.1);
}

.about-menu-btn .icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    padding: 20px;
    overflow-y: auto;
}
.modal.open { display: flex; align-items: flex-start; justify-content: center; }

.modal-content {
    background: #1e1b2e;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    margin-top: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    color: white;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.modal-header h2 { margin: 0; color: #7c5cff; font-size: 20px; }
.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.settings-section {
    margin-bottom: 24px;
}
.settings-section h3 {
    color: #aaa;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.settings-row label { font-size: 14px; }

.settings-row select,
.settings-row input[type="checkbox"] {
    background: #2b2545;
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    min-width: 100px;
    cursor: pointer;
}
.settings-row select:hover { border-color: rgba(255,255,255,0.2); }
.settings-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.settings-info {
    background: rgba(220, 100, 100, 0.15);
    border-left: 3px solid #dc6464;
    padding: 12px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.5;
    opacity: 0.9;
    margin-top: 12px;
}

/* SETTINGS DISPLAY STYLES */
/* Hide unreleased content if disabled */
html[data-unreleased="hidden"] [data-unreleased="true"] {
    display: none;
}

/* Apply display style variations */
html[data-display-style="Slider"] {
    --display-style: slider;
}
html[data-display-style="Input"] {
    --display-style: input;
}
html[data-display-style="Dropdown"] {
    --display-style: dropdown;
}

/* Region-specific styling can go here */
html[data-region="Europe"] {
    --region-color: #7c5cff;
}
html[data-region="North America"] {
    --region-color: #00d4ff;
}
html[data-region="Asia"] {
    --region-color: #ff6b9d;
}
html[data-region="South America"] {
    --region-color: #ffc107;
}

/* Twin-specific styling for pronouns/appearance */
html[data-twin="Male"] {
    --twin-pronoun: "he/him";
}
html[data-twin="Female"] {
    --twin-pronoun: "she/her";
}

/* Decimal precision styling */
html[data-default-decimal="0"] {
    --decimal-places: 0;
}
html[data-default-decimal="1"] {
    --decimal-places: 1;
}
html[data-default-decimal="2"] {
    --decimal-places: 2;
}
html[data-default-decimal="3"] {
    --decimal-places: 3;
}

/* explicit save button inside modal */
.save-btn {
    background: #7c5cff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
}
.save-btn:hover {
    background: #6a4dff;
}

/* modal footer alignment */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 12px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* WEAPON CARDS */
.weapon-card {
    background: linear-gradient(135deg, rgba(60, 40, 80, 0.4), rgba(40, 30, 60, 0.3));
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 280px;
}

.weapon-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(124, 92, 255, 0.3);
    border-color: rgba(124, 92, 255, 0.5);
}

.weapon-card.rarity-3 {
    border-color: rgba(0, 200, 100, 0.4);
}

.weapon-card.rarity-3:hover {
    box-shadow: 0 12px 30px rgba(0, 200, 100, 0.3);
    border-color: rgba(0, 200, 100, 0.6);
}

.weapon-card.rarity-4 {
    border-color: rgba(124, 92, 255, 0.4);
}

.weapon-card.rarity-4:hover {
    box-shadow: 0 12px 30px rgba(124, 92, 255, 0.3);
    border-color: rgba(124, 92, 255, 0.6);
}

.weapon-card.rarity-5 {
    border-color: rgba(255, 200, 50, 0.4);
}

.weapon-card.rarity-5:hover {
    box-shadow: 0 12px 30px rgba(255, 200, 50, 0.3);
    border-color: rgba(255, 200, 50, 0.6);
}

.weapon-image-container {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, rgba(30, 20, 50, 0.6), rgba(20, 15, 40, 0.5));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    overflow: hidden;
    position: relative;
}

.weapon-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.weapon-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weapon-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.weapon-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.weapon-stat-row {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ddd;
}

.weapon-stat-label {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 30px;
}

.weapon-stat-icon {
    font-size: 14px;
}

.weapon-stat-value {
    color: #00f0ff;
    font-weight: 600;
}

/* ARTIFACT CARDS */
.artifact-card {
    background: linear-gradient(135deg, rgba(60, 40, 80, 0.4), rgba(40, 30, 60, 0.3));
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 280px;
}

.artifact-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(124, 92, 255, 0.3);
    border-color: rgba(124, 92, 255, 0.5);
}

.artifact-card.rarity-3 {
    border-color: rgba(74, 158, 255, 0.4);
}

.artifact-card.rarity-3:hover {
    box-shadow: 0 12px 30px rgba(74, 158, 255, 0.3);
    border-color: rgba(74, 158, 255, 0.6);
}

.artifact-card.rarity-4 {
    border-color: rgba(178, 145, 220, 0.4);
}

.artifact-card.rarity-4:hover {
    box-shadow: 0 12px 30px rgba(178, 145, 220, 0.3);
    border-color: rgba(178, 145, 220, 0.6);
}

.artifact-card.rarity-5 {
    border-color: rgba(255, 193, 7, 0.4);
}

.artifact-card.rarity-5:hover {
    box-shadow: 0 12px 30px rgba(255, 193, 7, 0.3);
    border-color: rgba(255, 193, 7, 0.6);
}

.artifact-image-container {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, rgba(30, 20, 50, 0.6), rgba(20, 15, 40, 0.5));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(124, 92, 255, 0.15);
}

.artifact-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.artifact-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.artifact-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.artifact-rarity {
    font-size: 14px;
    letter-spacing: 1px;
    color: #ffc107;
}

.artifact-set-bonus {
    font-size: 12px;
    color: #aaa;
    line-height: 1.4;
}

/* Filter Buttons */
.filter-btn {
    padding: 8px 16px;
    background: rgba(124, 92, 255, 0.1);
    border: 2px solid rgba(124, 92, 255, 0.3);
    border-radius: 8px;
    color: #aaa;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter-btn:hover {
    background: rgba(124, 92, 255, 0.2);
    border-color: rgba(124, 92, 255, 0.6);
    color: #ddd;
}

.filter-btn.active {
    background: rgba(124, 92, 255, 0.3);
    border-color: rgba(124, 92, 255, 0.8);
    color: #9370db;
    box-shadow: 0 0 12px rgba(124, 92, 255, 0.4);
}