
:root {
  --bg-main: #0a0c16;
  --bg-surface: #101322;
  --bg-card: rgba(18, 22, 38, 0.85);
  --bg-card-hover: rgba(26, 32, 54, 0.95);
  --bg-glass: rgba(16, 20, 36, 0.7);
  --bg-code: #0b0d19;
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(88, 101, 242, 0.45);
  --border-glow: rgba(245, 166, 35, 0.35);

  --text-main: #f0f3fa;
  --text-muted: #9ba3be;
  --text-dim: #656d8a;

  --color-blurple: #5865f2;
  --color-blurple-hover: #4752c4;
  --color-gold: #f5a623;
  --color-gold-hover: #e09213;
  --color-green: #2ecc71;
  --color-red: #e74c3c;
  --color-purple: #9b59b6;
  --color-cyan: #00d2d3;
  --color-orange: #e67e22;

  --font-heading: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(88, 101, 242, 0.2);
  --shadow-gold: 0 0 25px rgba(245, 166, 35, 0.2);

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-blurple);
}

.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
}
.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--color-blurple), transparent 70%);
  top: -150px;
  left: -150px;
}
.orb-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--color-gold), transparent 70%);
  top: 30%;
  right: -150px;
}
.orb-3 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--color-purple), transparent 70%);
  bottom: -150px;
  left: 20%;
}

.navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 12, 22, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}
.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  cursor: pointer;
}
.brand-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(245, 166, 35, 0.25);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  overflow: visible;
}
.brand-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  display: block;
}
.online-indicator {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background-color: var(--color-green);
  border: 2px solid var(--bg-main);
  border-radius: 50%;
  z-index: 2;
}
.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.3px;
  color: var(--text-main);
  line-height: 1.2;
  white-space: nowrap;
}
.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.nav-search-wrap {
  position: relative;
  flex: 1;
  max-width: 460px;
  min-width: 180px;
  display: flex;
  align-items: center;
}
.nav-search-wrap input {
  width: 100%;
  padding: 0.65rem 4.5rem 0.65rem 2.6rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.nav-search-wrap input:focus {
  border-color: var(--color-blurple);
  box-shadow: 0 0 15px rgba(88, 101, 242, 0.3);
  background: rgba(18, 22, 38, 0.95);
}
.nav-search-wrap input::placeholder {
  color: var(--text-dim);
}
.search-icon {
  position: absolute;
  left: 0.95rem;
  color: var(--text-dim);
  pointer-events: none;
}
.search-shortcut {
  position: absolute;
  right: 0.85rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  pointer-events: none;
}
.clear-search-btn {
  position: absolute;
  right: 0.85rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem 0.5rem;
  border-radius: 50%;
}
.clear-search-btn:hover {
  color: #fff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  white-space: nowrap;
}
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-btn-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
  display: inline-block;
}
.nav-btn-outline {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}
.nav-btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
.nav-btn-primary {
  background: var(--color-blurple);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.35);
}
.nav-btn-primary:hover {
  background: var(--color-blurple-hover);
  transform: translateY(-1px);
}
.nav-btn-install {
  background: linear-gradient(135deg, #f5a623 0%, #ff5e36 100%);
  color: #fff;
  border: 1px solid rgba(245, 166, 35, 0.4);
  box-shadow: 0 4px 15px rgba(245, 166, 35, 0.3);
  font-weight: 700;
}
.nav-btn-install:hover {
  background: linear-gradient(135deg, #ff5e36 0%, #f5a623 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 166, 35, 0.5);
}
.mobile-toggle-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.mobile-toggle-btn span {
  width: 24px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: var(--transition);
}

.hero-section {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 1rem;
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-gold);
  margin-bottom: 1.25rem;
}
.hero-badge-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-gold);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--color-gold);
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}
.hero-title {
  font-family: var(--font-heading);
  font-size: 2.85rem;
  font-weight: 800;
  letter-spacing: -0.7px;
  line-height: 1.2;
  margin-bottom: 1rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.gradient-text {
  background: linear-gradient(135deg, #f5a623 0%, #ff6b81 50%, #5865f2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.rainbow-text {
  background: linear-gradient(
    90deg,
    #ff3b30, 
    #ff9500, 
    #ffcc00, 
    #34c759, 
    #00c7be, 
    #007aff, 
    #af52de, 
    #ff3b30  
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbowShift 3.5s linear infinite;
  display: inline-block;
  font-weight: 800;
}
@keyframes rainbowShift {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 300% 50%;
  }
}
.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 780px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}

.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}
.stat-card.stat-card-highlight {
  background: linear-gradient(165deg, rgba(88, 101, 242, 0.18) 0%, rgba(18, 22, 44, 0.95) 100%);
  border-color: rgba(88, 101, 242, 0.45);
  box-shadow: 0 0 25px rgba(88, 101, 242, 0.2);
}
.stat-card.stat-card-highlight:hover {
  border-color: var(--color-blurple);
  box-shadow: 0 0 35px rgba(88, 101, 242, 0.45);
  transform: translateY(-5px);
}
.stat-icon.blurple {
  color: #5865f2;
  filter: drop-shadow(0 0 10px rgba(88, 101, 242, 0.6));
}
.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition);
}
.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-md);
}
.stat-icon {
  font-size: 1.65rem;
  margin-bottom: 0.5rem;
}
.stat-value {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 0.2rem;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.app-layout {
  max-width: 1440px;
  margin: 1.5rem auto 4rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 2rem;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 85px;
  max-height: calc(100vh - 105px);
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}
.sidebar-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}
.sidebar-count {
  font-size: 0.76rem;
  font-family: var(--font-mono);
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.22), rgba(0, 242, 254, 0.12));
  border: 1px solid rgba(88, 101, 242, 0.45);
  color: #c7d2fe;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 0 12px rgba(88, 101, 242, 0.25);
  white-space: nowrap;
}
.count-pulse {
  display: inline-block;
  animation: pulseIcon 1.5s infinite;
}
@keyframes pulseIcon {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.75; }
}

.sidebar-filter-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.filter-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.role-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.role-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
}
.role-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}
.role-pill.active {
  background: var(--color-blurple);
  border-color: var(--color-blurple);
  color: #fff;
  box-shadow: 0 2px 10px rgba(88, 101, 242, 0.35);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}
.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
  min-width: 0;
  overflow: hidden;
}
.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  transform: translateX(3px);
}
.nav-link.active {
  background: rgba(88, 101, 242, 0.15);
  color: #fff;
  border-left: 3px solid var(--color-blurple);
  font-weight: 600;
}
.nav-link-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}
.nav-link-icon {
  font-size: 1rem;
  flex-shrink: 0;
  display: inline-block;
  line-height: 1;
}
.nav-link-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.nav-link-badge {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
}
.nav-link.active .nav-link-badge {
  background: var(--color-blurple);
  color: #fff;
}

.sidebar-tools {
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.tools-title {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}
.tool-btn {
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.2);
  color: var(--color-gold);
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
.tool-btn:hover {
  background: rgba(245, 166, 35, 0.18);
  border-color: var(--color-gold);
  transform: translateY(-2px);
}

.content-area {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  min-width: 0;
}

.filter-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.search-result-info {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.search-result-info .info-icon {
  font-size: 1rem;
}
.search-result-info .total-num {
  font-family: var(--font-heading);
  color: var(--text-dim);
  font-weight: 600;
}
.highlight-num {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--color-gold);
}
.type-filter-group {
  display: flex;
  gap: 0.4rem;
}
.type-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
}
.type-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}
.type-btn.active {
  background: var(--color-blurple);
  border-color: var(--color-blurple);
  color: #fff;
}

.category-section {
  scroll-margin-top: 100px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.category-section:hover {
  border-color: rgba(255, 255, 255, 0.12);
}
.category-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}
.category-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.category-icon {
  font-size: 2rem;
  line-height: 1;
}
.category-name {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-main);
}
.category-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}
.category-counter-badge {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  font-weight: 700;
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.12), rgba(88, 101, 242, 0.12));
  border: 1px solid rgba(245, 166, 35, 0.35);
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius-pill);
  color: var(--color-gold);
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.commands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 1.25rem;
}

.command-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.command-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.card-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.cmd-name-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.cmd-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}
.cmd-type-badge {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}
.cmd-type-badge.both {
  background: rgba(88, 101, 242, 0.2);
  color: #8da4ff;
  border: 1px solid rgba(88, 101, 242, 0.4);
}
.cmd-type-badge.prefix {
  background: rgba(245, 166, 35, 0.18);
  color: var(--color-gold);
  border: 1px solid rgba(245, 166, 35, 0.4);
}
.cmd-type-badge.slash {
  background: rgba(46, 204, 113, 0.18);
  color: var(--color-green);
  border: 1px solid rgba(46, 204, 113, 0.4);
}

.perm-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.perm-badge.member {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}
.perm-badge.admin {
  background: rgba(231, 76, 60, 0.18);
  color: #ff7675;
  border: 1px solid rgba(231, 76, 60, 0.35);
}
.perm-badge.server_owner {
  background: rgba(245, 166, 35, 0.2);
  color: var(--color-gold);
  border: 1px solid rgba(245, 166, 35, 0.4);
}
.perm-badge.bot_owner {
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.3), rgba(231, 76, 60, 0.3));
  color: #ff9ff3;
  border: 1px solid rgba(155, 89, 182, 0.5);
}

.copy-cmd-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.copy-cmd-btn:hover {
  background: var(--color-blurple);
  color: #fff;
  border-color: var(--color-blurple);
  transform: scale(1.06);
}

.aliases-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-dim);
}
.alias-tag {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.syntax-box {
  background: var(--bg-code);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.syntax-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
}
.syntax-code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--color-cyan);
  word-break: break-all;
}

.cmd-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.cmd-details-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-left: 1.1rem;
}
.cmd-details-list li {
  line-height: 1.45;
}

.meta-chips {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.6rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.example-box {
  background: rgba(10, 13, 24, 0.9);
  border-left: 3px solid var(--color-blurple);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.6rem 0.8rem;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.example-title {
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--color-blurple);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.example-cmd {
  font-family: var(--font-mono);
  color: #fff;
}
.example-res {
  color: var(--text-dim);
  font-size: 0.78rem;
  font-style: italic;
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}
.empty-state h3 {
  font-size: 1.25rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.modal-wide {
  max-width: 860px;
}
@keyframes slideUp {
  from { transform: translateY(20px) scale(0.97); }
  to { transform: translateY(0) scale(1); }
}
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}
.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.modal-intro {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.calc-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.calc-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}
.calc-row input {
  padding: 0.65rem 0.85rem;
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  outline: none;
}
.calc-row input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 15px rgba(245, 166, 35, 0.25);
}
.calc-results {
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  text-align: center;
}
.calc-stat-box {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.calc-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}
.calc-stat-val {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-gold);
}

.calc-table-wrap {
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.calc-table-wrap h4 {
  font-size: 0.9rem;
  color: var(--text-main);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}
.data-table th, .data-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}
.data-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
}
.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.coop-info-box {
  background: rgba(155, 89, 182, 0.1);
  border: 1px solid rgba(155, 89, 182, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.coop-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.coop-chip {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}
.coop-chip.bonus {
  background: rgba(46, 204, 113, 0.2);
  color: var(--color-green);
  border: 1px solid rgba(46, 204, 113, 0.4);
}

.gacha-rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
}
.gacha-rate-card {
  padding: 0.85rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}
.gacha-rate-card.c { border-color: #bdc3c7; }
.gacha-rate-card.u { border-color: #2ecc71; }
.gacha-rate-card.r { border-color: #3498db; }
.gacha-rate-card.e { border-color: #9b59b6; }
.gacha-rate-card.l { border-color: #f1c40f; box-shadow: 0 0 10px rgba(241, 196, 15, 0.2); }
.gacha-rate-card.m { border-color: #e74c3c; box-shadow: 0 0 10px rgba(231, 76, 60, 0.25); }
.gacha-rate-card.s { border-color: #1abc9c; box-shadow: 0 0 12px rgba(26, 188, 156, 0.3); }

.rate-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}
.rate-val {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}
.rate-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}
.gacha-notice-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
}
.gacha-notice-box h4 {
  font-size: 0.88rem;
  color: var(--color-gold);
  margin-bottom: 0.5rem;
}
.gacha-notice-box ul {
  padding-left: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: rgba(18, 22, 38, 0.95);
  border: 1px solid var(--color-blurple);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1), toastOut 0.25s 2.2s forwards;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(10px); }
}

.footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 3rem 1.5rem 2rem;
}
.footer-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}
.footer-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--color-gold);
  margin-bottom: 0.4rem;
}
.footer-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.footer-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.footer-links a,
.footer-link-btn {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}
.footer-links a:hover,
.footer-link-btn:hover {
  color: var(--color-gold);
}
.footer-install-link {
  color: var(--color-gold) !important;
  font-weight: 700 !important;
}
.footer-install-link:hover {
  color: #ff5e36 !important;
  text-shadow: 0 0 10px rgba(245, 166, 35, 0.5);
}
.footer-bottom {
  max-width: 1440px;
  margin: 1.5rem auto 0;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
}

.install-section {
  max-width: 1440px;
  margin: 3rem auto 4rem;
  padding: 0 1.5rem;
}
.install-card {
  background: linear-gradient(135deg, rgba(26, 32, 54, 0.95) 0%, rgba(18, 22, 38, 0.95) 100%);
  border: 1px solid rgba(245, 166, 35, 0.35);
  border-radius: var(--radius-lg);
  padding: 2.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(245, 166, 35, 0.12);
}
.install-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.15), transparent 70%);
  pointer-events: none;
}
.install-info {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 720px;
  position: relative;
  z-index: 1;
}
.install-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-gold);
  background: rgba(245, 166, 35, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  width: fit-content;
  border: 1px solid rgba(245, 166, 35, 0.25);
}
.install-tag-dot {
  width: 7px;
  height: 7px;
  background: var(--color-gold);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-gold);
}
.install-heading {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}
.install-subtext {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.install-button-wrap {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.install-main-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.8rem;
  background: linear-gradient(135deg, #f5a623 0%, #ff5e36 100%);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 25px rgba(245, 166, 35, 0.35);
  transition: var(--transition);
  white-space: nowrap;
}
.install-main-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px rgba(245, 166, 35, 0.5);
  background: linear-gradient(135deg, #ff5e36 0%, #f5a623 100%);
}
@media (max-width: 900px) {
  .install-card {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
  }
  .install-tag {
    margin: 0 auto;
  }
  .install-main-btn {
    width: 100%;
    justify-content: center;
  }
}

.otp-modal-overlay {
  background: rgba(4, 6, 16, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  z-index: 2100;
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}

.otp-ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.55;
  animation: ambientFloat 8s ease-in-out infinite alternate;
  z-index: 0;
}
.otp-glow-gold {
  width: 320px;
  height: 260px;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.45), transparent 70%);
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
}
.otp-glow-cyan {
  width: 280px;
  height: 240px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.35), transparent 70%);
  bottom: 12%;
  left: 15%;
  animation-delay: -3s;
}
.otp-glow-purple {
  width: 300px;
  height: 260px;
  background: radial-gradient(circle, rgba(88, 101, 242, 0.4), transparent 70%);
  bottom: 15%;
  right: 15%;
  animation-delay: -5s;
}
@keyframes ambientFloat {
  0% { transform: translateY(0) scale(0.95); }
  100% { transform: translateY(-20px) scale(1.08); }
}

.otp-modal-card {
  max-width: 530px;
  width: 100%;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 166, 35, 0.35) transparent;
  background: linear-gradient(165deg, rgba(20, 25, 48, 0.95) 0%, rgba(10, 13, 26, 0.98) 100%);
  border: 1px solid rgba(245, 166, 35, 0.45);
  border-radius: 24px;
  padding: 1.8rem 1.8rem 1.5rem;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85),
              0 0 50px rgba(245, 166, 35, 0.16),
              inset 0 1px 0 rgba(255, 255, 255, 0.12);
  position: relative;
  text-align: center;
  z-index: 10;
  transition: padding 0.4s ease, transform 0.4s ease;
}
.otp-modal-card::-webkit-scrollbar {
  width: 5px;
}
.otp-modal-card::-webkit-scrollbar-thumb {
  background: rgba(245, 166, 35, 0.35);
  border-radius: 4px;
}
.otp-modal-card.unlocked {
  padding: 2.2rem 2.2rem 1.8rem;
  max-width: 530px;
}
.otp-modal-card.unlocked .otp-header {
  margin-bottom: 1.2rem;
}
.otp-modal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00f2fe, #f5a623, #ff5e36, transparent);
  animation: borderGlowSweep 3s linear infinite;
}
@keyframes borderGlowSweep {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

.otp-particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 15;
}

.otp-close-btn {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
  z-index: 20;
}
.otp-close-btn:hover {
  background: rgba(231, 76, 60, 0.35);
  color: #ff7675;
  border-color: rgba(231, 76, 60, 0.6);
  transform: rotate(90deg);
}

.otp-header {
  margin-bottom: 1.6rem;
}
.otp-component-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid rgba(245, 166, 35, 0.35);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: 0.9px;
  margin-bottom: 0.8rem;
  box-shadow: 0 0 15px rgba(245, 166, 35, 0.15);
}
.otp-badge-dot {
  width: 7px;
  height: 7px;
  background-color: var(--color-gold);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-gold);
  animation: pulseDot 1.5s infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}
.otp-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  margin-bottom: 0.4rem;
}
.otp-title-deck {
  background: linear-gradient(135deg, #f5a623 0%, #ff5e36 50%, #00f2fe 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.otp-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.otp-author-highlight {
  color: var(--color-gold);
  font-weight: 700;
}

.otp-deck-wrap {
  position: relative;
  padding: 0.8rem 0 1.2rem;
  perspective: 1200px;
}
.otp-master-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}

.otp-scanline {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #00f2fe, #f5a623, #00f2fe, transparent);
  box-shadow: 0 0 16px #00f2fe, 0 0 25px #f5a623;
  opacity: 0;
  pointer-events: none;
  z-index: 12;
  transform: translateY(-50%);
}
.otp-scanline.active {
  opacity: 1;
  animation: scanlineSweep 0.9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes scanlineSweep {
  0% { top: 20%; opacity: 0; }
  25% { opacity: 1; }
  75% { opacity: 1; }
  100% { top: 80%; opacity: 0; }
}

.otp-cards-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.9rem;
  min-height: 144px;
  padding: 8px 4px;
  transform-style: preserve-3d;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.otp-card-slot {
  width: 86px;
  height: 126px;
  background: linear-gradient(155deg, rgba(28, 35, 66, 0.96) 0%, rgba(13, 16, 32, 0.98) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55),
              inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: 50% 110%;
  user-select: none;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.card-glow-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, rgba(245, 166, 35, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.otp-card-slot.active {
  border-color: var(--color-gold);
  background: linear-gradient(155deg, rgba(35, 45, 84, 0.98) 0%, rgba(18, 22, 44, 0.98) 100%);
  box-shadow: 0 0 26px rgba(245, 166, 35, 0.45),
              0 14px 32px rgba(0, 0, 0, 0.65),
              inset 0 0 12px rgba(245, 166, 35, 0.2);
  transform: translateY(-6px) scale(1.04);
}
.otp-card-slot.active .card-glow-bg {
  opacity: 1;
}

.otp-card-slot.filled {
  border-color: rgba(88, 101, 242, 0.7);
  background: linear-gradient(155deg, rgba(30, 38, 74, 0.98) 0%, rgba(14, 18, 38, 0.98) 100%);
  box-shadow: 0 0 20px rgba(88, 101, 242, 0.35),
              0 12px 28px rgba(0, 0, 0, 0.6);
}
.otp-card-slot.filled .card-glow-bg {
  opacity: 0.8;
  background: radial-gradient(circle at 50% 40%, rgba(88, 101, 242, 0.18), transparent 70%);
}

.card-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.5rem 0.55rem;
  position: relative;
  z-index: 2;
}

.card-header-meta,
.card-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  line-height: 1;
}
.card-corner {
  font-size: 0.9rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.45);
}
.card-corner.suit-red {
  color: #ff6b6b;
  text-shadow: 0 0 8px rgba(255, 107, 107, 0.4);
}
.card-tier,
.card-suit-label {
  font-size: 0.55rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.5px;
  font-family: var(--font-mono);
}
.card-corner.bottom-right {
  transform: rotate(180deg);
}

.card-body-center {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}
.card-watermark {
  position: absolute;
  font-size: 2.5rem;
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.otp-card-slot.active .card-watermark {
  opacity: 0.18;
  transform: scale(1.1);
}
.card-digit {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  position: relative;
  z-index: 3;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.5);
  animation: digitPopIn 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes digitPopIn {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.otp-card-slot.active:not(.filled) .card-digit::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 2rem;
  background-color: var(--color-gold);
  box-shadow: 0 0 8px var(--color-gold);
  animation: cursorBlink 0.8s infinite;
}
@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.otp-cards-row.fanned {
  gap: 0.75rem;
  padding-top: 10px;
  padding-bottom: 6px;
}
.otp-cards-row.fanned .otp-card-slot[data-index="0"] {
  transform: rotate(-12deg) translateY(-4px) translateX(-2px);
  z-index: 1;
  box-shadow: -6px 12px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(245, 166, 35, 0.25);
}
.otp-cards-row.fanned .otp-card-slot[data-index="1"] {
  transform: rotate(-4deg) translateY(-8px) translateX(-1px);
  z-index: 2;
  box-shadow: -3px 14px 28px rgba(0, 0, 0, 0.65), 0 0 20px rgba(245, 166, 35, 0.35);
}
.otp-cards-row.fanned .otp-card-slot[data-index="2"] {
  transform: rotate(4deg) translateY(-8px) translateX(1px);
  z-index: 3;
  box-shadow: 3px 14px 28px rgba(0, 0, 0, 0.65), 0 0 20px rgba(245, 166, 35, 0.35);
}
.otp-cards-row.fanned .otp-card-slot[data-index="3"] {
  transform: rotate(12deg) translateY(-4px) translateX(2px);
  z-index: 4;
  box-shadow: 6px 12px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(245, 166, 35, 0.25);
}

.otp-cards-row.success .otp-card-slot {
  border-color: #2ecc71;
  background: linear-gradient(155deg, rgba(20, 48, 35, 0.98) 0%, rgba(10, 26, 18, 0.98) 100%);
  box-shadow: 0 0 35px rgba(46, 204, 113, 0.6),
              0 14px 35px rgba(0, 0, 0, 0.8);
  animation: winningCardPulse 2s ease-in-out infinite alternate;
}
@keyframes winningCardPulse {
  0% { filter: drop-shadow(0 0 8px rgba(46, 204, 113, 0.4)); }
  100% { filter: drop-shadow(0 0 18px rgba(245, 166, 35, 0.6)); }
}
.otp-cards-row.success .card-digit {
  color: #2ecc71;
  text-shadow: 0 0 20px rgba(46, 204, 113, 0.9), 0 0 35px rgba(245, 166, 35, 0.6);
}
.otp-cards-row.success .card-corner {
  color: #2ecc71;
  text-shadow: 0 0 8px rgba(46, 204, 113, 0.7);
}
.otp-cards-row.success .card-corner.suit-red {
  color: #f5a623;
  text-shadow: 0 0 8px rgba(245, 166, 35, 0.8);
}
.otp-cards-row.success .card-tier,
.otp-cards-row.success .card-suit-label {
  color: rgba(46, 204, 113, 0.85);
  text-shadow: 0 0 6px rgba(46, 204, 113, 0.4);
}
.otp-cards-row.success .card-watermark {
  opacity: 1;
  font-size: 2.6rem;
  transform: scale(1.12);
  filter: drop-shadow(0 0 12px rgba(46, 204, 113, 0.85)) drop-shadow(0 0 22px rgba(245, 166, 35, 0.6));
  animation: victoryEmblemPulse 2s ease-in-out infinite alternate;
}
@keyframes victoryEmblemPulse {
  0% {
    transform: scale(1.08);
    filter: drop-shadow(0 0 8px rgba(46, 204, 113, 0.8)) drop-shadow(0 0 14px rgba(245, 166, 35, 0.4));
  }
  100% {
    transform: scale(1.18);
    filter: drop-shadow(0 0 16px rgba(46, 204, 113, 1)) drop-shadow(0 0 26px rgba(245, 166, 35, 0.75));
  }
}

.otp-cards-row.error {
  animation: cardErrorShake 0.45s ease-in-out;
}
.otp-cards-row.error .otp-card-slot {
  border-color: #e74c3c;
  background: linear-gradient(155deg, rgba(48, 20, 20, 0.98) 0%, rgba(26, 10, 10, 0.98) 100%);
  box-shadow: 0 0 30px rgba(231, 76, 60, 0.6);
}
.otp-cards-row.error .card-digit {
  color: #ff7675;
  text-shadow: 0 0 15px rgba(231, 76, 60, 0.8);
}
@keyframes cardErrorShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

.otp-status-msg {
  min-height: 26px;
  font-size: 0.86rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.3rem;
  margin-bottom: 0.4rem;
  transition: var(--transition);
}
.otp-status-msg.verifying {
  color: var(--color-gold);
}
.otp-status-msg.success {
  color: var(--color-green);
  text-shadow: 0 0 10px rgba(46, 204, 113, 0.4);
}
.otp-status-msg.error {
  color: var(--color-red);
}
.otp-loader {
  width: 15px;
  height: 15px;
  border: 2px solid var(--color-gold);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.otp-keyboard-guide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  margin-top: 0.6rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.otp-keyboard-guide .guide-icon {
  font-size: 1rem;
}
.otp-keyboard-guide .guide-pass-hint {
  color: var(--color-gold);
  font-family: var(--font-mono);
  letter-spacing: 0.8px;
}

.otp-success-reveal {
  padding-top: 0.4rem;
  animation: vault3DUnfold 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: 50% 0%;
}
@keyframes vault3DUnfold {
  0% {
    opacity: 0;
    transform: perspective(1000px) rotateX(-22deg) translateY(28px) scale(0.92);
    filter: blur(8px);
  }
  50% {
    opacity: 0.9;
    filter: blur(1.5px);
  }
  100% {
    opacity: 1;
    transform: perspective(1000px) rotateX(0deg) translateY(0) scale(1);
    filter: blur(0);
  }
}

.reveal-beam-connector {
  width: 2px;
  height: 20px;
  background: linear-gradient(180deg, #2ecc71, var(--color-gold), transparent);
  box-shadow: 0 0 10px #2ecc71, 0 0 16px var(--color-gold);
  margin: 0 auto 0.5rem;
  animation: connectorBeamPulse 1.5s ease-in-out infinite alternate;
}
@keyframes connectorBeamPulse {
  0% { opacity: 0.4; height: 14px; }
  100% { opacity: 1; height: 22px; }
}

.reveal-badge-box {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.18) 0%, rgba(245, 166, 35, 0.15) 100%);
  border: 1px solid rgba(46, 204, 113, 0.4);
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 800;
  color: #2ecc71;
  letter-spacing: 0.7px;
  margin-bottom: 0.6rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(46, 204, 113, 0.25);
  animation: badgeSlideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}
@keyframes badgeSlideDown {
  0% { opacity: 0; transform: translateY(-12px); }
  100% { opacity: 1; transform: translateY(0); }
}
.reveal-badge-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: badgeShimmer 2.5s infinite;
}
@keyframes badgeShimmer {
  0% { left: -100%; }
  50%, 100% { left: 150%; }
}
.reveal-badge-icon {
  font-size: 0.95rem;
}

.reveal-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.3rem;
  letter-spacing: -0.2px;
  animation: titlePop 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}
@keyframes titlePop {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}
.reveal-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.reveal-password-card {
  background: linear-gradient(145deg, rgba(14, 18, 38, 0.98) 0%, rgba(8, 10, 22, 0.98) 100%);
  border: 1.5px solid rgba(245, 166, 35, 0.6);
  border-radius: 16px;
  padding: 1.15rem 1.45rem;
  margin-bottom: 1.1rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6),
              0 0 30px rgba(245, 166, 35, 0.25);
  transition: all 0.3s ease;
  animation: cardExpand 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}
@keyframes cardExpand {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(15px);
    box-shadow: 0 0 0 rgba(245, 166, 35, 0);
  }
  50% {
    box-shadow: 0 0 45px rgba(245, 166, 35, 0.5), 0 0 25px rgba(46, 204, 113, 0.4);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 30px rgba(245, 166, 35, 0.25);
  }
}
.reveal-password-card:hover {
  border-color: var(--color-gold);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7),
              0 0 35px rgba(245, 166, 35, 0.35);
}
.reveal-card-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00f2fe, var(--color-gold), #2ecc71, transparent);
  animation: laserScanDown 2.5s ease-in-out infinite;
}
@keyframes laserScanDown {
  0% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(85px); opacity: 0.3; }
  100% { transform: translateY(0); opacity: 0.8; }
}

.reveal-key-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.reveal-key-icon {
  font-size: 1rem;
}
.reveal-key-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 1px;
  font-family: var(--font-mono);
  flex: 1;
  text-align: left;
  margin-left: 0.5rem;
}
.reveal-key-status {
  font-size: 0.68rem;
  font-weight: 800;
  color: #2ecc71;
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid rgba(46, 204, 113, 0.35);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.5px;
}

.reveal-code-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.reveal-pass-code {
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f5a623 0%, #ff7675 50%, #00f2fe 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
  text-shadow: 0 0 25px rgba(245, 166, 35, 0.4);
  user-select: all;
  transition: all 0.3s ease;
}
.reveal-pass-code.decrypting {
  filter: drop-shadow(0 0 10px #00f2fe);
}

.reveal-copy-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  background: linear-gradient(135deg, var(--color-blurple), #4752c4);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.35);
  position: relative;
}
.reveal-copy-btn:hover {
  background: linear-gradient(135deg, #6775f4, #5865f2);
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.5);
  border-color: rgba(255, 255, 255, 0.35);
}
.reveal-copy-btn:active {
  transform: scale(0.92);
}
.reveal-copy-btn .copy-icon-default {
  display: block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.reveal-copy-btn .copy-icon-success {
  display: none;
  color: #fff;
}
.reveal-copy-btn.copied {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  border-color: rgba(46, 204, 113, 0.8);
  box-shadow: 0 0 22px rgba(46, 204, 113, 0.6);
  transform: scale(1.06);
}
.reveal-copy-btn.copied .copy-icon-default {
  display: none;
}
.reveal-copy-btn.copied .copy-icon-success {
  display: block;
  animation: checkPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes checkPop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.reveal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: center;
  animation: actionsFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}
@keyframes actionsFadeIn {
  0% { opacity: 0; transform: translateY(18px); }
  100% { opacity: 1; transform: translateY(0); }
}
.reveal-install-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.98rem 1.6rem;
  background: linear-gradient(135deg, #f5a623 0%, #ff5e36 100%);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(245, 166, 35, 0.4),
              0 0 20px rgba(255, 94, 54, 0.25);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}
.reveal-install-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 30px rgba(245, 166, 35, 0.55),
              0 0 28px rgba(255, 94, 54, 0.4);
  background: linear-gradient(135deg, #ff5e36 0%, #f5a623 100%);
}
.reveal-install-btn .btn-shine {
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(30deg);
  animation: btnShineSweep 3.5s infinite;
}
@keyframes btnShineSweep {
  0% { left: -60%; }
  35%, 100% { left: 160%; }
}

.reveal-replay-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.reveal-replay-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 540px) {
  .otp-modal-card {
    padding: 1.5rem 1rem 1.2rem;
  }
  .otp-cards-row {
    gap: 0.45rem;
    min-height: 120px;
  }
  .otp-card-slot {
    width: 68px;
    height: 104px;
    border-radius: 12px;
    transform-origin: 50% 110%;
  }
  .otp-cards-row.fanned {
    gap: 0.35rem;
  }
  .otp-cards-row.fanned .otp-card-slot[data-index="0"] {
    transform: rotate(-9deg) translateY(-2px) translateX(-1px);
  }
  .otp-cards-row.fanned .otp-card-slot[data-index="1"] {
    transform: rotate(-3deg) translateY(-5px);
  }
  .otp-cards-row.fanned .otp-card-slot[data-index="2"] {
    transform: rotate(3deg) translateY(-5px);
  }
  .otp-cards-row.fanned .otp-card-slot[data-index="3"] {
    transform: rotate(9deg) translateY(-2px) translateX(1px);
  }
  .otp-cards-row.success .card-watermark {
    font-size: 2rem;
  }
  .card-digit {
    font-size: 2rem;
  }
  .card-corner {
    font-size: 0.75rem;
  }
  .card-tier,
  .card-suit-label {
    display: none;
  }
  .reveal-code-display {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
  }
  .reveal-pass-code {
    font-size: 1.3rem;
  }
  .reveal-copy-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s;
  pointer-events: none;
}
.sidebar-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sidebar-close-btn {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}
.sidebar-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ff6b6b;
  border-color: rgba(239, 68, 68, 0.45);
}

.sidebar-mobile-links {
  display: none;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-subtle);
}
.sidebar-mobile-sublinks {
  display: flex;
  gap: 0.6rem;
}

.mobile-quick-strip {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.mobile-tools-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.mobile-tools-bar::-webkit-scrollbar {
  display: none;
}
.mobile-tool-pill {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
  white-space: nowrap;
}
.mobile-tool-pill:hover,
.mobile-tool-pill:active {
  background: rgba(88, 101, 242, 0.2);
  border-color: var(--color-blurple);
  color: #fff;
}
.mobile-categories-scroll {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.mobile-categories-scroll::-webkit-scrollbar {
  display: none;
}
.mobile-cat-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.mobile-cat-chip:hover,
.mobile-cat-chip.active {
  background: rgba(88, 101, 242, 0.22);
  border-color: var(--color-blurple);
  color: #fff;
  box-shadow: 0 0 12px rgba(88, 101, 242, 0.25);
}
.mobile-cat-chip .chip-badge {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  color: var(--text-dim);
}
.mobile-cat-chip.active .chip-badge {
  background: var(--color-blurple);
  color: #fff;
}

.filter-status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
}
.mobile-role-bar {
  display: none;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.8rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  width: 100%;
}
.mobile-bar-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 600;
  white-space: nowrap;
}
.mobile-role-bar .role-pills {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.mobile-role-bar .role-pill {
  font-size: 0.72rem;
  padding: 0.35rem 0.65rem;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 1180px) {
  .brand-subtitle {
    display: block; 
  }
  .nav-search-wrap {
    max-width: 320px;
  }
}

@media (max-width: 1024px) {
  .app-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .sidebar {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 330px;
    max-width: 86vw;
    height: 100vh;
    max-height: 100vh;
    z-index: 1001;
    overflow-y: auto;
    background: rgba(13, 16, 28, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: -10px 0 45px rgba(0, 0, 0, 0.85);
    border-left: 1px solid var(--border-subtle);
    border-radius: 0;
    transform: translateX(105%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 1.25rem 1rem 2rem;
  }
  .sidebar.open-mobile {
    transform: translateX(0);
  }
  .sidebar-close-btn {
    display: inline-flex;
  }
  .sidebar-mobile-links {
    display: flex;
  }

  .mobile-quick-strip {
    display: flex;
  }
  .mobile-role-bar {
    display: flex;
  }
  .mobile-toggle-btn {
    display: flex;
  }

  .commands-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.2rem 0;
  }
  .nav-container {
    flex-wrap: wrap;
    padding: 0.65rem 1rem 0.75rem;
    gap: 0.65rem 0.5rem;
  }
  .nav-brand {
    order: 1;
    gap: 0.65rem;
  }
  .brand-avatar-wrap {
    width: 38px;
    height: 38px;
  }
  .brand-title {
    font-size: 1.12rem;
  }
  .brand-subtitle {
    font-size: 0.7rem;
    max-width: 140px;
  }

  .nav-actions {
    order: 2;
    gap: 0.45rem;
  }
  .nav-actions .nav-btn-outline,
  .nav-actions .nav-btn-primary {
    display: none;
  }
  .nav-btn-install {
    padding: 0.45rem 0.75rem;
    font-size: 0.78rem;
    gap: 0.35rem;
  }

  .nav-search-wrap {
    order: 3;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    display: flex !important;
    margin-top: 0.15rem;
  }
  .nav-search-wrap input {
    padding: 0.65rem 2.5rem 0.65rem 2.6rem;
    font-size: 0.86rem;
  }
  .search-shortcut {
    display: none !important; 
  }
  .clear-search-btn {
    right: 0.65rem;
    font-size: 1rem;
  }

  .hero-section {
    padding: 1.75rem 1rem 1.25rem;
  }
  .hero-badge {
    font-size: 0.74rem;
    padding: 0.35rem 0.85rem;
  }
  .hero-title {
    font-size: 1.75rem;
    letter-spacing: -0.5px;
  }
  .hero-desc {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .hero-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    margin-top: 1.5rem;
  }
  .stat-card {
    padding: 0.8rem 0.65rem;
  }
  .stat-icon {
    font-size: 1.35rem;
    margin-bottom: 0.25rem;
  }
  .stat-value {
    font-size: 1.25rem;
  }
  .stat-label {
    font-size: 0.72rem;
  }

  .app-layout {
    padding: 1rem 0.75rem 3rem;
  }
  .filter-status-bar {
    padding: 0.75rem 0.85rem;
  }
  .search-result-info {
    font-size: 0.82rem;
  }
  .type-filter-group {
    width: 100%;
    display: flex;
    gap: 0.35rem;
  }
  .type-btn {
    flex: 1;
    padding: 0.4rem 0.35rem;
    font-size: 0.74rem;
    text-align: center;
    white-space: nowrap;
  }

  .category-header {
    padding: 0.75rem 0.85rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .category-title {
    font-size: 1.15rem;
  }
  .cmd-card {
    padding: 1rem;
    border-radius: var(--radius-md);
  }
  .cmd-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .cmd-title-wrap {
    width: 100%;
    justify-content: space-between;
  }
  .cmd-name {
    font-size: 1.05rem;
  }
  .cmd-badges {
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .cmd-meta {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    font-size: 0.8rem;
  }
  .syntax-box {
    font-size: 0.78rem;
    padding: 0.65rem 0.75rem;
  }
  .example-block {
    padding: 0.65rem 0.75rem;
    font-size: 0.78rem;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
  }
  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .hero-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stat-card-highlight {
    grid-column: span 2;
  }
  .install-card {
    padding: 1.5rem 1rem;
  }
  .install-heading {
    font-size: 1.4rem;
  }
  .install-btn-cta {
    width: 100%;
    justify-content: center;
  }
}

