*{box-sizing:border-box}
html,body{margin:0;padding:0;scroll-behavior:smooth}
body{
  min-height:100vh;
  background:#05070c;
  color:#e7e9ea;
  font-family:'Inter',system-ui,-apple-system,sans-serif;
  line-height:1.5;
  -webkit-font-smoothing: antialiased;
}

.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -5;
  overflow: hidden;
  background: #080a10;
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: blob-move 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.bg-blob-1 {
  top: -10%;
  left: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, transparent 70%);
  animation-duration: 25s;
}

.bg-blob-2 {
  bottom: -10%;
  right: -10%;
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
  animation-duration: 30s;
  animation-direction: alternate-reverse;
}

.bg-blob-3 {
  top: 40%;
  left: 30%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.08) 0%, transparent 70%);
  animation-duration: 35s;
  animation-delay: -5s;
}

@keyframes blob-move {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
  100% { transform: translate(0, 0) scale(1); }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Scrollbar */
::-webkit-scrollbar {width: 8px;}
::-webkit-scrollbar-track {background: #05070c;}
::-webkit-scrollbar-thumb {background: #333; border-radius: 4px;}
::-webkit-scrollbar-thumb:hover {background: #444;}

/* Selection */
::selection {background: rgba(250, 204, 21, 0.2); color: #facc15;}

a{color:inherit;text-decoration:none}
.container{width:100%;max-width:1400px;margin:0 auto;padding:28px 40px 64px}

.topbar{
  position:sticky;top:0;z-index:50;
  background:rgba(5,7,12,0.8);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.topbar-inner{width:100%;max-width:1400px;margin:0 auto;padding:16px 40px;display:flex;align-items:center;justify-content:space-between;gap:14px; position: relative;}

.top-center-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.top-center-logo img {
  height: 90px;
  width: auto;
  cursor: pointer;
  animation: mega-pulse 1.5s infinite ease-in-out;
  transition: all 0.2s;
  filter: drop-shadow(0 0 15px rgba(250, 204, 21, 0.4));
}
.top-center-logo img:hover {
  transform: scale(1.3) rotate(10deg);
  filter: drop-shadow(0 0 25px rgba(250, 204, 21, 0.8));
}
.top-center-logo img:active {
  transform: scale(0.9);
}

@keyframes mega-pulse {
  0% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.2) rotate(-5deg); }
  50% { transform: scale(1) rotate(0deg); }
  75% { transform: scale(1.2) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.top-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px}

.brand-wrapper{display:flex;align-items:center;gap:14px}
.brand-logo{width:40px;height:40px;object-fit:contain;border-radius: 8px;}
.brand{display:flex;flex-direction:column;gap:2px}
.brand-title{font-size:16px;font-weight: 700;letter-spacing:-0.01em;color:#fff}
.brand-sub{font-size:12px;color:rgba(231,233,234,.6);font-weight: 500}

.pill{display:inline-flex;align-items:center;gap:8px;padding:6px 12px;border-radius:999px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.08)}
.pill-dot{width:8px;height:8px;border-radius:999px;background:#10b981;box-shadow: 0 0 10px rgba(16,185,129,0.5)}

.hero{padding:80px 0 60px;display:grid;grid-template-columns:1fr 1fr;gap:80px;align-items:center;position:relative}
.tmax-bg {
  position: absolute;
  bottom: 0;
  left: 5%;
  right: auto;
  width: 60%;
  height: 100%;
  background-image: url('/images/tmax.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom left;
  opacity: 0.4;
  pointer-events: none;
  z-index: -1;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0); }
}
.hero h1{margin:0;font-size:56px;letter-spacing:-.03em;line-height:1.1;font-weight: 800; background: linear-gradient(to right, #fff, #ccc); -webkit-background-clip: text; -webkit-text-fill-color: transparent;}
.hero p{margin:20px 0 0;color:rgba(231,233,234,.7);font-size:18px;max-width:48ch;font-weight: 400}

.hero-cta{margin-top:32px;display:flex;flex-wrap:wrap;gap:16px}
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:12px 24px;border-radius:12px;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.05);
  color:#fff;font-weight:600;font-size: 14px;
  transition:all .2s ease;
  cursor: pointer;
}
.btn:hover{background:rgba(255,255,255,.1);transform:translateY(-2px)}
.btn-sm{padding:8px 16px;font-size:13px;border-radius: 8px}

.btn-primary{
  background: #facc15;
  color: #000;
  border: 1px solid #facc15;
  box-shadow: 0 4px 20px rgba(250,204,21,0.3);
}
.btn-primary:hover{
  background: #eab308;
  border-color: #eab308;
  box-shadow: 0 8px 30px rgba(250,204,21,0.4);
}

.hero-art{
  position:relative;border-radius:24px;overflow:hidden;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(0,0,0,0.3);
  box-shadow:0 40px 100px -20px rgba(0,0,0,0.5);
}
.art-bg{position:absolute;inset:0;background-image:url("../../images/inspi.png");background-size:cover;background-position:center;opacity:.1;filter:blur(20px)}
.art-grid{position:relative;z-index:1;padding:20px;display:grid;grid-template-columns:1fr 1fr;gap:16px}
.art-tile{border-radius:16px;overflow:hidden;position:relative;border:1px solid rgba(255,255,255,.1);background:rgba(0,0,0,.4)}
.art-tile img{display:block;width:100%;height:180px;object-fit:cover;transition: transform 0.5s ease;}
.art-tile:hover img {transform: scale(1.05);}
.art-caption{position:absolute;left:12px;bottom:12px;right:12px;padding:8px 12px;border-radius:10px;background:rgba(0,0,0,.7);backdrop-filter:blur(8px);color:rgba(255,255,255,.9);font-size:12px;font-weight: 500}

.stats-bar {
  margin-top: 60px;
  display: flex;
  gap: 60px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 30px;
}
.stat-item {display: flex; flex-direction: column;}
.stat-value {font-size: 32px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; line-height: 1;}
.stat-label {margin-top: 6px; font-size: 13px; color: rgba(231,233,234,0.6); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600;}

.section{margin-top:80px}
.section-title{margin:0 0 20px;font-size:14px;letter-spacing:.1em;text-transform:uppercase;color:#facc15;font-weight: 700}

.commands{margin-top:80px;padding-top:40px;border-top:1px solid rgba(255,255,255,.08)}
.commands-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:24px;flex-wrap: wrap;}
.commands-head h2{margin:0;font-size:32px;letter-spacing:-.02em;font-weight: 700}
.commands-head .muted{color:rgba(231,233,234,.5);font-size:14px;margin-top: 4px}

.commands-toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.input{height:44px;min-width:260px;padding:0 16px;border-radius:12px;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.03);color:#fff;outline:none;font-size: 14px; transition: border-color 0.2s}
.input:focus{border-color: rgba(250,204,21,0.5); background: rgba(255,255,255,.05);}
.input::placeholder{color:rgba(231,233,234,.4)}

.tabs{display:flex;gap:8px;background: rgba(255,255,255,0.03); padding: 4px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.08);}
.tab{height:36px;padding:0 16px;border-radius:10px;border:none;background:transparent;color:rgba(231,233,234,.6);cursor:pointer;font-weight:600;font-size: 13px; transition: all 0.2s;}
.tab[aria-selected="true"]{background:rgba(255,255,255,0.1);color:#fff; box-shadow: 0 2px 8px rgba(0,0,0,0.2);}
.tab:hover:not([aria-selected="true"]) {color: #fff;}

.cmd-grid{margin-top:24px;display:grid;grid-template-columns:repeat(auto-fill, minmax(320px, 1fr));gap:16px}
.cmd{
  padding:20px;border-radius:20px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.02);
  cursor:pointer;
  transition:all .2s ease;
  position: relative;
  overflow: hidden;
}
.cmd:hover{
  background:rgba(255,255,255,.05);
  transform:translateY(-4px);
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.cmd-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom: 8px;}
.cmd-name{font-weight:700;font-size: 16px; color: #fff;}
.cmd-kind{font-size:10px;text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 8px; border-radius: 6px; background: rgba(255,255,255,0.05); color:rgba(255,255,255,.5)}
.cmd-desc{line-height: 1.5; color:rgba(231,233,234,.6);font-size:14px}
.cmd-aliases{margin-top:12px;display:flex;flex-wrap:wrap;gap:6px}
.chip{display:inline-flex;align-items:center;gap:6px;padding:2px 8px;border-radius:6px;background:rgba(255,255,255,.05);font-size:11px;color:rgba(255,255,255,.5)}

.category-header {
  grid-column: 1 / -1;
  margin: 40px 0 16px;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #facc15;
  display: flex;
  align-items: center;
  gap: 12px;
}
.category-header::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(255,255,255,0.1);
}

/* Footer Actions */
.footer-actions{display:flex;gap:16px;justify-content:center;padding:20px 0;}

.fixed-invite{position:fixed;right:20px;bottom:20px;z-index:40; display:flex;align-items:center;justify-content:center;pointer-events:none}
.fixed-invite .btn-primary{padding:14px 24px; pointer-events: auto; box-shadow: 0 10px 40px rgba(0,0,0,0.5);}
.invite-decor{position:absolute;z-index:-1;top:-90px;left:50%;transform:translateX(-50%);width:100px;max-width:none;transition:transform .2s cubic-bezier(0.175, 0.885, 0.32, 1.275)}
.btn-primary:hover + .invite-decor{transform:translateX(-50%) translateY(-8px) scale(1.1)}

.skiplink{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}
.skiplink:focus{left:20px;top:20px;width:auto;height:auto;z-index:100;padding:12px 20px;border-radius:12px;background:#05070c;border:1px solid #facc15;color: #facc15; font-weight: bold;}

#toast {
  visibility: hidden;
  min-width: 250px;
  background-color: rgba(31, 41, 55, 0.9);
  backdrop-filter: blur(10px);
  color: #fff;
  text-align: center;
  border-radius: 12px;
  padding: 14px 24px;
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#toast.show {visibility: visible; opacity: 1; transform: translateX(-50%) translateY(0);}

.reveal {opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);}
.reveal.active {opacity: 1; transform: translateY(0);}

.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0; transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 90;
  backdrop-filter: blur(10px);
}
.back-to-top:hover {background: rgba(255,255,255,0.1); transform: translateY(-4px);}
.back-to-top.visible {opacity: 1; transform: translateY(0);}

/* Clickable Stat */
.clickable {
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}
.clickable:hover {
  opacity: 0.8;
  transform: translateY(-2px);
}
.clickable:hover .stat-value {
  color: #facc15;
}

/* Marquee & Footer */
.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  padding-bottom: 20px;
}

.supporters-marquee {
  width: 100%;
  padding: 10px 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: transparent;
  opacity: 0.2; /* Very subtle */
  transition: opacity 0.3s;
}
.supporters-marquee:hover {
  opacity: 0.6;
}

.marquee-content {
  white-space: nowrap;
  animation: marquee 40s linear infinite;
  padding-left: 100%;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
}
.modal-content {
  position: relative;
  width: 90%;
  max-width: 400px;
  background: rgba(20, 25, 35, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal.active .modal-content {
  transform: scale(1);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modal-header h3 {
  margin: 0;
  font-size: 20px;
  color: #fff;
}
.modal-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.modal-close:hover {
  color: #fff;
}
.server-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.server-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.server-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
  border-color: rgba(255, 255, 255, 0.2);
}
.server-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.server-name {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}
.server-desc {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}
.server-icon {
  color: #facc15;
}

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
    padding-top: 40px;
  }
  .tmax-bg {
    left: 50%;
    width: 80%;
    opacity: 0.2;
    animation: float-mobile 6s ease-in-out infinite;
  }
  @keyframes float-mobile {
    0% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-20px); }
    100% { transform: translateX(-50%) translateY(0); }
  }
  .hero-cta {
    justify-content: center;
  }
  .hero p {
    margin-left: auto;
    margin-right: auto;
  }
  .art-tile img {
    height: 220px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 20px 20px 80px; /* More bottom padding for fixed elements */
  }
  .topbar-inner {
    padding: 12px 20px;
  }
  .top-center-logo img {
    height: 50px;
  }
  .hero h1 {
    font-size: 40px;
  }
  .stats-bar {
    flex-direction: column;
    gap: 30px;
    align-items: center;
    text-align: center;
    margin-top: 40px;
  }
  .commands-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .commands-toolbar {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .input {
    width: 100%;
    font-size: 16px; /* Prevents iOS zoom */
  }
  .tabs {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 8px; /* Scrollbar space */
    -webkit-overflow-scrolling: touch;
  }
  .tab {
    flex-shrink: 0;
  }
  .art-grid {
    grid-template-columns: 1fr;
  }
  .cmd-grid {
    grid-template-columns: 1fr; /* Full width cards on mobile */
  }
  .fixed-invite {
    width: 100%;
    right: 0;
    bottom: 0;
    padding: 16px;
    background: linear-gradient(to top, #05070c, transparent);
    justify-content: center;
  }
  .fixed-invite .btn-primary {
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  }
  .invite-decor {
    display: none; /* Hide decor on mobile to avoid clutter */
  }
  .back-to-top {
    left: auto;
    right: 20px;
    bottom: 90px; /* Above the fixed invite bar */
  }
  #toast {
    width: 90%;
    bottom: 90px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 32px;
  }
  .hero p {
    font-size: 16px;
  }
  .brand-title {
    display: none; /* Hide brand text, keep logo */
  }
  .brand-sub {
    display: none;
  }
  .brand-logo {
    width: 32px;
    height: 32px;
  }
  .top-actions .btn-sm {
    display: none; /* Hide "Buy me a coffee" on tiny screens */
  }
  .stat-value {
    font-size: 28px;
  }
}

/* Select Dropdown */
.select-wrapper {
  position: relative;
  min-width: 200px;
}
.select-wrapper::after {
  content: "▼";
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
select.input {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 32px;
}
select.input option {
  background: #141923;
  color: #fff;
}

/* Command Usage */
.cmd-usage {
  margin-top: 12px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 12px;
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.2);
  display: block;
  width: 100%;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Leaderboard Mini (Discreet) */
.leaderboard-mini .leaderboard-container {
  padding: 20px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  max-width: 600px; /* Limit width */
  margin: 24px auto 0; /* Center it */
}

.leaderboard-mini .leaderboard-header {
  margin-bottom: 16px;
  align-items: center;
}
.leaderboard-mini .leaderboard-header h2 {
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.8);
}

.leaderboard-mini .lb-item {
  padding: 10px 16px;
  border-radius: 10px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.leaderboard-mini .lb-item:last-child {
  border-bottom: none;
}
.leaderboard-mini .lb-item:hover {
  background: rgba(255, 255, 255, 0.02);
  transform: none;
}

.leaderboard-mini .lb-rank {
  font-size: 14px;
  width: 24px;
}

.leaderboard-mini .lb-avatar {
  width: 24px;
  height: 24px;
  margin-right: 12px;
}

.leaderboard-mini .lb-name {
  font-size: 14px;
  font-weight: 500;
}
.leaderboard-mini .lb-detail {
  display: none; /* Hide role for cleaner look */
}

.leaderboard-mini .lb-val {
  font-size: 13px;
  color: rgba(250, 204, 21, 0.8);
}

/* Rank Colors */
.lb-item[data-rank="1"] { border-color: rgba(250, 204, 21, 0.3); background: linear-gradient(90deg, rgba(250,204,21,0.05), transparent); }
.lb-item[data-rank="1"] .lb-rank { color: #facc15; }

.lb-item[data-rank="2"] { border-color: rgba(192, 192, 192, 0.3); }
.lb-item[data-rank="2"] .lb-rank { color: #c0c0c0; }

.lb-item[data-rank="3"] { border-color: rgba(205, 127, 50, 0.3); }
.lb-item[data-rank="3"] .lb-rank { color: #cd7f32; }

/* Skeleton */
.loading-skeleton {
  height: 74px;
  background: linear-gradient(90deg, rgba(255,255,255,0.02) 25%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}
@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
