/* ==========================================================================
   BAXEX SOFTWARE - CYBER DARK DESIGN SYSTEM (STYLES.CSS)
   Aesthetic: Dark mode, Cyber Cyan & Emerald Green accents, Glassmorphism cards,
   Glowing torrent badges, and high-performance layout.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@700;800;900&display=swap');

:root {
  --bg-primary: #060913;
  --bg-secondary: #0d1222;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(26, 38, 66, 0.9);
  
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.35);
  --accent-green: #10b981;
  --accent-purple: #8b5cf6;
  --accent-yellow: #facc15;
  --accent-red: #ef4444;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-glow: rgba(6, 182, 212, 0.2);
  --border-light: rgba(255, 255, 255, 0.08);

  --font-heading: 'Outfit', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(6, 182, 212, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.12) 0%, transparent 40%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

/* 1. Top Ecosystem Nav */
.ecosystem-bar {
  background: rgba(4, 7, 15, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.ecosystem-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.eco-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.eco-link {
  color: var(--text-muted);
  transition: color 0.2s ease;
  font-weight: 500;
}

.eco-link:hover {
  color: #ffffff;
}

.eco-active {
  color: var(--accent-cyan);
  font-weight: 700;
}

/* 2. Main Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 9, 19, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glow);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.logo-badge {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #ffffff;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.search-box {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.search-input {
  width: 100%;
  background: rgba(13, 18, 34, 0.9);
  border: 1px solid var(--border-glow);
  padding: 10px 16px 10px 42px;
  border-radius: 99px;
  color: #ffffff;
  font-size: 0.9rem;
  outline: none;
  font-family: var(--font-body);
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px var(--accent-cyan-glow);
  background: rgba(20, 29, 54, 0.95);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

/* 3. Category Filter Bar */
.filter-bar {
  max-width: 1280px;
  margin: 24px auto 0;
  padding: 0 20px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.35);
}

/* 4. Hero Banner */
.hero-banner {
  max-width: 1280px;
  margin: 24px auto;
  padding: 0 20px;
}

.hero-card {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(139, 92, 246, 0.15));
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  backdrop-filter: blur(10px);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 8px;
  background: linear-gradient(to right, #ffffff, #67e8f9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* 5. Main Software Grid Container */
.main-container {
  max-width: 1280px;
  margin: 32px auto;
  padding: 0 20px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.software-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  backdrop-filter: blur(12px);
}

.software-card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.25);
}

.card-img-wrap {
  width: 100%;
  height: 160px;
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.software-card:hover .card-img {
  transform: scale(1.06);
}

.card-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(6, 9, 19, 0.85);
  backdrop-filter: blur(8px);
  color: var(--accent-cyan);
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  border: 1px solid var(--border-glow);
}

.card-version-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
}

.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.3;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 16px;
  color: var(--text-muted);
  border-top: 1px dashed var(--border-light);
  padding-top: 12px;
}

.seeders-badge {
  color: var(--accent-green);
  font-weight: 700;
}

.leechers-badge {
  color: var(--accent-red);
  font-weight: 600;
}

.size-badge {
  color: var(--accent-yellow);
  font-weight: 600;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

.btn-magnet {
  background: linear-gradient(135deg, var(--accent-cyan), #0284c7);
  color: #ffffff;
  border: none;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-magnet:hover {
  box-shadow: 0 0 15px var(--accent-cyan-glow);
  transform: scale(1.02);
}

.btn-details {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.btn-details:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* 6. Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(4, 6, 12, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #0d1322;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: var(--accent-red);
}

/* 7. Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  background: var(--accent-green);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* 8. Footer */
.footer {
  background: rgba(4, 7, 15, 0.95);
  border-top: 1px solid var(--border-light);
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 60px;
}

.footer a {
  color: var(--text-main);
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--accent-cyan);
}
