/* 0x21 Style Dark Theme + Space Particles + Download Cards */
:root {
  --bg-main: #030304;
  --bg-sidebar: #060709;
  --bg-card: #0b0d12;
  --bg-card-hover: #121620;
  --bg-inner: #07080b;
  --border-color: rgba(255, 255, 255, 0.07);
  --border-card: rgba(255, 255, 255, 0.09);
  --border-active: rgba(255, 255, 255, 0.35);
  
  --accent-white: #ffffff;
  --accent-green: #22c55e;
  --accent-discord: #5865f2;
  
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #4b5563;
  
  --sidebar-width: 250px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ==================== MOVING SPACE STARS CANVAS ==================== */
#spaceCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

/* App Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ==================== LEFT SIDEBAR ==================== */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(6, 7, 9, 0.85);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.25rem 0.85rem;
  flex-shrink: 0;
  z-index: 50;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.6rem 1.25rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

.sidebar-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: contain; background: #000; padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  overflow-y: auto;
}

.menu-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin: 1rem 0.6rem 0.35rem;
  text-transform: uppercase;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.menu-item i {
  font-size: 0.95rem;
  width: 18px;
  text-align: center;
  color: #6b7280;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.menu-item:hover i {
  color: #ffffff;
}

.menu-item.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.menu-item.active i {
  color: #ffffff;
}

.badge-count {
  margin-left: auto;
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  color: #cbd5e1;
}

.sidebar-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 0.85rem;
  padding-left: 0.5rem;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.status-indicator.online {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
}

/* ==================== RIGHT MAIN WRAPPER ==================== */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: transparent;
}

/* Top Navigation Bar */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 60px;
  background: rgba(3, 3, 4, 0.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  gap: 1.5rem;
}

.top-nav-search {
  flex: 1;
  max-width: 440px;
  position: relative;
  display: flex;
  align-items: center;
}

.top-nav-search i {
  position: absolute;
  left: 0.9rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.top-nav-search input {
  width: 100%;
  padding: 0.55rem 0.9rem 0.55rem 2.4rem;
  background: rgba(9, 11, 14, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #fff;
  font-size: 0.82rem;
  outline: none;
  transition: all 0.2s ease;
}

.top-nav-search input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: #0e1117;
}

.search-kbd {
  position: absolute;
  right: 0.75rem;
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: var(--text-muted);
}

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Transparent Discord Button */
.discord-transparent-btn {
  background: transparent;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.discord-transparent-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #ffffff;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.discord-transparent-btn i {
  color: #5865f2;
  font-size: 0.95rem;
}

/* Content Body */
.content-body {
  flex: 1;
  padding: 2.5rem 3rem 5rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* Section Common Headers */
.section-header {
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
  color: #ffffff;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Hero Section */
.hero-banner {
  text-align: center;
  padding-top: 5rem;
  padding-bottom: 3rem;
}

.hero-logo-box {
  margin-bottom: 1.5rem;
}

.hero-logo-large {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 35px rgba(255, 255, 255, 0.15);
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 600px;
  margin: 0.75rem auto 1.5rem;
  line-height: 1.55;
}

/* Password Notice Banner */
.password-notice-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 25px;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  color: #e2e8f0;
  cursor: pointer;
  margin-bottom: 2rem;
  transition: all 0.2s ease;
}

.password-notice-banner:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  transform: translateY(-1px);
}

.password-notice-banner i {
  color: #facc15;
}

.pwd-highlight {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: underline;
}

/* 0x21 Style Stats Row */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin: 1.5rem auto 2.5rem;
  max-width: 520px;
}

.stat-box {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-align: center;
}

.stat-num {
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.stat-num .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  display: inline-block;
}

.stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.25rem;
}

/* Vault Pill Tabs */
.vault-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.vault-badge-item {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
}

.vault-badge-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.25);
}

.vault-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.tag-free { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.tag-prem { background: rgba(255, 255, 255, 0.15); color: #ffffff; }

/* ==================== DOWNLOAD ITEM CARDS WITH PHOTOS ==================== */
.download-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.5rem;
}

.download-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.download-item-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 255, 255, 0.05);
}

.download-card-media {
  position: relative;
  width: 100%;
  height: 270px;
  background: #020203;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain; background: #000; padding: 6px;
  transition: transform 0.3s ease;
}

.download-item-card:hover .download-card-media img {
  transform: scale(1.05);
}

.media-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.download-item-card:hover .media-overlay {
  opacity: 1;
}

.download-card-info {
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.download-card-info h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  word-break: break-all;
}

.pwd-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  width: fit-content;
}

.pwd-tag i {
  color: #facc15;
}

/* ==================== ALL FILES TABLE ==================== */
.files-directory-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  overflow: hidden;
}

.files-directory-table th {
  text-align: left;
  padding: 1rem 1.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border-color);
}

.files-directory-table td {
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.files-directory-table tr:hover td {
  background: var(--bg-card-hover);
  color: #fff;
}

.cat-pill {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: #cbd5e1;
}

.pwd-pill {
  font-family: monospace;
  font-size: 0.82rem;
  background: rgba(250, 204, 21, 0.1);
  color: #facc15;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
}

.btn-download-sm {
  background: #ffffff;
  color: #030304;
  border: none;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.btn-download-sm:hover {
  background: #cbd5e1;
}

/* ==================== WEB TOOLS HUB ==================== */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 1.25rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.15s ease;
}

.tool-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.25);
}

.tool-card-icon {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 0.85rem;
  color: #ffffff;
}

.tool-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #fff;
}

.tool-card p {
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.45;
  margin-bottom: 1rem;
}

.tool-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 0.65rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.tool-category-tag {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Tool View Container */
.tool-view-container {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 1.75rem;
}

.tool-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}

.btn-back {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.active-tool-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

/* Forms and Inputs */
.tool-ui-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tool-input-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.tool-form-control {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tool-form-control label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
}

.tool-form-control input,
.tool-form-control select,
.tool-form-control textarea {
  background: var(--bg-inner);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}

.tool-form-control input:focus,
.tool-form-control select:focus,
.tool-form-control textarea:focus {
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-primary {
  background: #ffffff;
  color: #030304;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.btn-primary:hover {
  background: #e2e8f0;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.result-box {
  background: var(--bg-inner);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
}

.result-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.result-output {
  font-family: monospace;
  font-size: 0.88rem;
  color: #ffffff;
  white-space: pre-wrap;
  word-break: break-all;
}

/* About Section */
.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  max-width: 750px;
  margin: 0 auto;
  text-align: center;
}

.about-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  margin-bottom: 1.25rem;
}

.about-card h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.about-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.75rem;
  font-size: 0.9rem;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
}

.feat-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 0.8rem 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  background: rgba(6, 7, 9, 0.9);
  padding: 1.25rem;
  text-align: center;
  margin-top: auto;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.footer-logo {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #ffffff;
  color: #030304;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }
}
