:root {
  --bg: #0a0a0a;
  --bg-soft: #111111;
  --card: #1a1a1a;
  --text: #ffffff;
  --muted: #b0b0b0;
  --brand: #fb3a64;
  --brand-light: #ff5c83;
  --brand-dark: #d4294f;
  --border: #2a2a2a;
  --shadow: rgba(251, 58, 100, 0.15);
  --glow: rgba(251, 58, 100, 0.3);
}

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

html, body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Background gradient animation */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(251, 58, 100, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(251, 58, 100, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #0a0a0a 0%, #111111 100%);
  z-index: -1;
  pointer-events: none;
}

.app {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  color-scheme: dark;
}

/* Ensure main content doesn't hide behind fixed logo */
main,
.docs-container {
  position: relative;
  z-index: 1;
}

/* Header - Logo and nav are sticky */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(26, 26, 26, 0.95), rgba(26, 26, 26, 0.85));
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-content {
  width: min(1200px, 95%);
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Logo container - sticky, transparent, wide */
.logo-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Main content wrapper - includes non-sticky header content */
.page-header {
  width: min(1200px, 95%);
  margin: 0 auto;
  padding: 120px 16px 20px;
  text-align: center;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.brand .logo {
  width: 80px;
  height: 80px;
  border-radius: 0;
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(20px);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, opacity 0.3s ease;
  padding: 8px;
  border: 1px solid var(--border);
}

.brand .logo:hover {
  transform: translateY(-2px) scale(1.05);
  opacity: 0.9;
}

.brand .logo img,
.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: none;
  background: transparent;
}

.logo {
  width: auto;
  height: 80px;
  max-width: 100%;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: opacity 0.3s ease;
  padding: 0;
  border: none;
}

.logo:hover {
  opacity: 0.9;
}

.brand-text {
  width: 100%;
}

.brand-text h1 {
  margin: 0;
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text), var(--muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-text p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: clamp(14px, 2.5vw, 16px);
  line-height: 1.5;
}

/* Navigation - Responsive */
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 0;
  margin-top: 0;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.nav a::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: var(--brand);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
  opacity: 0.2;
  z-index: 0;
}

.nav a:hover::before,
.nav a.active::before {
  width: 300px;
  height: 300px;
}

.nav a:hover,
.nav a.active {
  border-color: var(--brand);
  color: var(--text);
  box-shadow: 0 4px 16px var(--shadow);
  transform: translateY(-2px);
}

.nav a span {
  position: relative;
  z-index: 1;
}

/* Container - Responsive */
.container {
  width: min(1200px, 95%);
  margin: 40px auto;
  padding: 0 16px;
  flex: 1;
}

/* Cards - Modern Material Design */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  margin: 24px 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-light), transparent);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

.card h2 {
  margin: 0 0 20px;
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 700;
  color: var(--text);
}

.card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--brand);
  font-weight: 600;
}

/* Grid - Responsive */
.grid {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Tiles */
.tile {
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(251, 58, 100, 0.08), rgba(251, 58, 100, 0.03));
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.tile:hover {
  border-color: var(--brand);
  background: linear-gradient(135deg, rgba(251, 58, 100, 0.12), rgba(251, 58, 100, 0.06));
  transform: translateY(-2px);
}

.tile code {
  display: block;
  word-break: break-all;
  font-size: 13px;
  color: var(--text);
  margin-top: 8px;
}

/* Card Links */
.card-link {
  display: block;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(251, 58, 100, 0.1), transparent);
  transition: left 0.5s ease;
}

.card-link:hover::before {
  left: 100%;
}

.card-link:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 24px var(--shadow);
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(251, 58, 100, 0.05), rgba(251, 58, 100, 0.02));
}

/* Lists */
.list {
  margin: 0;
  padding-left: 24px;
  list-style: none;
}

.list li {
  margin: 16px 0;
  padding-left: 8px;
  position: relative;
}

.list li::before {
  content: '▸';
  position: absolute;
  left: -20px;
  color: var(--brand);
  font-weight: bold;
}

/* Code blocks */
pre {
  overflow-x: auto;
  background: #0a0a0a;
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 12px;
  margin: 16px 0;
  position: relative;
}

pre code {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Fira Mono', 'Droid Sans Mono', 'Source Code Pro', monospace;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

/* Footer */
.footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  align-items: center;
  padding: 32px 16px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  text-align: center;
  font-size: 14px;
}

.footer a {
  transition: all 0.2s ease;
}

.footer a:hover {
  color: var(--brand-light);
  transform: translateY(-1px);
}

.footer-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.footer-github-link {
  color: #9d4edd;
  text-decoration: none;
  align-items: center;
  gap: 4px;
}

.footer-github-link:hover {
  color: #b980e6;
}

.footer-icon {
  display: inline-block;
  vertical-align: middle;
}

.footer-link {
  color: var(--brand);
  text-decoration: none;
}

.footer-link:hover {
  color: var(--brand-light);
}

.footer-text {
  color: var(--muted);
  font-size: 13px;
}

.footer-copyright {
  color: var(--muted);
  font-size: 11px;
  margin-top: 8px;
}

.footer-icon {
  display: inline-block;
}

.tile p {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

.list-item-desc {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.list-item-desc-large {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}

.list-no-style {
  list-style: none;
}

/* Section divider - matches main page */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 80px 0;
}

/* Additional styles for docs-specific sections */
.verification-section {
  margin-top: 24px;
}

.troubleshooting-section {
  margin-top: 24px;
}

.intro-margin-bottom {
  margin-bottom: 32px;
}

.card-link-desc {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.card-link-code {
  background: rgba(251, 58, 100, 0.1);
  border-radius: 6px;
  padding: 8px;
  font-size: 12px;
  display: block;
  margin-top: 12px;
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .header-content {
    padding: 16px 12px;
  }
  
  .brand .logo {
    width: 100px;
    height: 100px;
  }
  
  .nav {
    gap: 6px;
  }
  
  .nav a {
    padding: 8px 14px;
    font-size: 13px;
  }
  
  .container {
    margin: 24px auto;
    padding: 0 12px;
  }
  
  .card {
    padding: 24px 20px;
    border-radius: 16px;
  }
  
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }
  
  pre {
    padding: 16px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .page-header {
    padding: 120px 12px 20px;
  }
  
  .logo {
    height: 50px;
  }
  
  .header-content {
    padding: 10px;
    gap: 10px;
  }
  
  .brand .logo {
    width: 80px;
    height: 80px;
  }
  
  .card {
    padding: 20px 16px;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeIn 0.6s ease-out;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

/* Packages Page Styles */
.search-box {
  width: 100%;
  max-width: 600px;
  margin: 24px 0;
  padding: 12px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.search-box::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.search-box:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 4px 16px var(--shadow);
  transform: translateY(-2px);
}

.search-box:hover:not(:focus) {
  border-color: var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.packages-table-wrapper {
  overflow-x: auto;
  margin-top: 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.packages-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
}

.packages-table thead {
  background: linear-gradient(135deg, rgba(251, 58, 100, 0.08), rgba(251, 58, 100, 0.03));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.packages-table th {
  padding: 16px 12px;
  text-align: left;
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.packages-table th:last-child {
  border-right: none;
}

.packages-table th:first-child {
  padding-left: 20px;
}

.packages-table th:last-child {
  padding-right: 20px;
  text-align: center;
}

.packages-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.packages-table tbody tr:last-child {
  border-bottom: none;
}

.packages-table tbody tr:hover {
  background: linear-gradient(135deg, rgba(251, 58, 100, 0.08), rgba(251, 58, 100, 0.03));
}

.packages-table tbody tr:not(:last-child):hover {
  border-bottom-color: rgba(251, 58, 100, 0.2);
}

.packages-table td {
  padding: 16px 12px;
  color: var(--text);
  font-size: 14px;
  vertical-align: top;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.packages-table td:last-child {
  border-right: none;
}

.packages-table td:first-child {
  padding-left: 20px;
}

.packages-table td:last-child {
  padding-right: 20px;
  text-align: center;
}

.package-name {
  font-weight: 600;
  color: var(--text);
  font-size: 15px;
}

.package-version {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.package-arch {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(251, 58, 100, 0.15);
  color: var(--brand-light);
  font-size: 10px;
  font-weight: 700;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.package-description {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  max-width: 500px;
  word-wrap: break-word;
  white-space: normal;
}

.package-section {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.package-size {
  color: var(--muted);
  font-size: 13px;
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
  font-weight: 500;
}

.download-btn {
  display: inline-block;
  padding: 10px 18px;
  color: var(--text);
  text-decoration: none;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.download-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: var(--brand);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
  opacity: 0.2;
  z-index: 0;
}

.download-btn:hover::before {
  width: 300px;
  height: 300px;
}

.download-btn:hover {
  border-color: var(--brand);
  color: var(--text);
  box-shadow: 0 4px 16px var(--shadow);
  transform: translateY(-2px);
}

.download-btn span {
  position: relative;
  z-index: 1;
}

.loading {
  text-align: center;
  padding: 60px;
  color: var(--muted);
  font-size: 16px;
}

.error {
  background: rgba(251, 58, 100, 0.1);
  border: 1px solid var(--brand);
  border-radius: 12px;
  padding: 24px;
  margin: 20px 0;
  color: var(--text);
}

.no-results {
  text-align: center;
  padding: 60px;
  color: var(--muted);
  font-size: 16px;
}

.package-count {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.pagination-hidden {
  display: none !important;
}

.pagination-btn {
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pagination-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: var(--brand);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
  opacity: 0.2;
  z-index: 0;
}

.pagination-btn:hover:not(:disabled)::before {
  width: 300px;
  height: 300px;
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--brand);
  color: var(--text);
  box-shadow: 0 4px 16px var(--shadow);
  transform: translateY(-2px);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  border-color: var(--brand);
  box-shadow: 0 4px 16px var(--shadow);
}

.pagination-info {
  color: var(--muted);
  font-size: 14px;
  margin: 0 16px;
}

@media (max-width: 768px) {
  .packages-table {
    font-size: 12px;
  }

  .packages-table th,
  .packages-table td {
    padding: 10px 8px;
  }

  .packages-table th:first-child,
  .packages-table td:first-child {
    padding-left: 12px;
  }

  .packages-table th:last-child,
  .packages-table td:last-child {
    padding-right: 12px;
  }

  .package-description {
    max-width: 250px;
    font-size: 12px;
  }

  .search-box {
    max-width: 100%;
    padding: 10px 16px;
    font-size: 13px;
  }
}
