/* ==========================================================================
   Seitenspezifische Styles für Konsolen-Apps (console_apps)
   ========================================================================== */

:root {
  --primary-color: #000000;
  --secondary-color: #00D9FF;
  --text-light: #ffffff;
  --text-gray: #a1a1aa;
  --text-muted: #71717a;
  
  --bg-dark: #080808;
  --bg-darker: #050608;
  --bg-card: #12151d;
  --bg-card-hover: #161b26;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(0, 217, 255, 0.35);
  
  --shadow-card: 0 16px 40px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 0 1px rgba(0, 217, 255, 0.25), 0 20px 45px rgba(0, 217, 255, 0.15);
  --shadow-cyan-sm: 0 4px 16px rgba(0, 217, 255, 0.18);
}

/* --------------------------------------------------------------------------
   Body & Background Styling
   -------------------------------------------------------------------------- */
body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Dezent leuchtender Hintergrundverlauf & Mesh-Pattern */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 15%, rgba(0, 217, 255, 0.07), transparent 35%),
    radial-gradient(circle at 85% 65%, rgba(0, 217, 255, 0.05), transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(255, 255, 255, 0.02), transparent 50%),
    var(--bg-dark);
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.9), transparent 85%);
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.9), transparent 85%);
  opacity: 0.5;
  z-index: -1;
}

/* --------------------------------------------------------------------------
   Navbar Sticky Override & Blur
   -------------------------------------------------------------------------- */
nav#navbar {
  position: sticky;
  top: 0;
  background: transparent;
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
}

nav#navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.78);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  z-index: -1;
}

/* --------------------------------------------------------------------------
   Page Header Section
   -------------------------------------------------------------------------- */
.main-content {
  padding-bottom: 80px;
}

.page-head-container {
  padding: 40px 0 20px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-gray);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  margin-bottom: 24px;
  transition: all 0.25s ease;
}

.back-link:hover {
  color: var(--secondary-color);
  border-color: rgba(0, 217, 255, 0.3);
  background: rgba(0, 217, 255, 0.08);
  transform: translateX(-3px);
}

.back-link i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.back-link:hover i {
  transform: translateX(-2px);
}

.page-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.sub-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 217, 255, 0.08);
  border: 1px solid rgba(0, 217, 255, 0.25);
  color: var(--secondary-color);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

.page-title .highlight {
  color: var(--secondary-color);
  background: linear-gradient(135deg, #00D9FF 0%, #a5f3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-lead {
  font-size: clamp(15px, 1.8vw, 17px);
  color: var(--text-gray);
  max-width: 65ch;
  line-height: 1.6;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Cards Grid Layout
   -------------------------------------------------------------------------- */
.cards-section {
  padding-top: 24px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  align-items: stretch;
}

/* --------------------------------------------------------------------------
   App Card Base Styles (Glassmorphism & Neon Glow)
   -------------------------------------------------------------------------- */
.app-card {
  position: relative;
  background: linear-gradient(170deg, rgba(22, 27, 38, 0.85) 0%, rgba(12, 15, 22, 0.95) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 28px;
  padding: clamp(26px, 3.5vw, 36px);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s ease,
              box-shadow 0.35s ease,
              background 0.35s ease;
}

.app-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-glow);
  background: linear-gradient(170deg, rgba(26, 32, 46, 0.9) 0%, rgba(14, 18, 26, 0.98) 100%);
}

/* Feiner oberer Glanzrand */
.card-glow-effect {
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 217, 255, 0.5), transparent);
  pointer-events: none;
}

/* Card Header */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.badge-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.badge-cyan {
  background: rgba(0, 217, 255, 0.12);
  border: 1px solid rgba(0, 217, 255, 0.3);
  color: var(--secondary-color);
}

.badge-version {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-gray);
  font-family: 'JetBrains Mono', monospace;
}

.badge-github {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.badge-active {
  background: rgba(76, 175, 80, 0.12);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: #4ade80;
}

.card-icon-bubble,
.card-arrow-bubble {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--secondary-color);
  font-size: 18px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.app-card:hover .card-icon-bubble {
  background: rgba(0, 217, 255, 0.12);
  border-color: rgba(0, 217, 255, 0.35);
  transform: scale(1.08) rotate(3deg);
  box-shadow: 0 0 16px rgba(0, 217, 255, 0.25);
}

.app-card:hover .card-arrow-bubble {
  background: var(--secondary-color);
  color: #000000;
  border-color: var(--secondary-color);
  transform: scale(1.1) rotate(45deg);
  box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

/* Card Body & Typography */
.card-body {
  margin-bottom: 28px;
}

.card-title {
  font-size: clamp(22px, 2.5vw, 26px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: var(--text-light);
}

.card-description {
  color: var(--text-gray);
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 20px;
}

/* Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #d1d5db;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.chip i {
  color: var(--secondary-color);
  font-size: 11px;
}

.app-card:hover .chip {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

/* --------------------------------------------------------------------------
   Card 1: Download Section & Grid
   -------------------------------------------------------------------------- */
.download-section {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.download-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}

.dl-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dl-heading i {
  color: var(--secondary-color);
}

.dl-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* Download Button Styling */
.dl-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-light);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.dl-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.dl-btn:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 217, 255, 0.4);
  box-shadow: 0 6px 18px rgba(0, 217, 255, 0.15);
}

.dl-btn:hover::before {
  opacity: 1;
}

.dl-os-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.dl-os-icon.win {
  color: #38bdf8;
}

.dl-os-icon.mac {
  color: #f3f4f6;
}

.dl-os-icon.linux {
  color: #fb923c;
}

.dl-btn:hover .dl-os-icon {
  background: rgba(0, 217, 255, 0.15);
  border-color: rgba(0, 217, 255, 0.3);
  transform: scale(1.08);
}

.dl-btn-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex-grow: 1;
}

.dl-os-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
  line-height: 1.2;
}

.dl-os-arch {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.dl-arrow {
  color: var(--text-muted);
  font-size: 12px;
  transition: all 0.25s ease;
  margin-left: auto;
  flex-shrink: 0;
}

.dl-btn:hover .dl-arrow {
  color: var(--secondary-color);
  transform: translateY(2px);
}

/* --------------------------------------------------------------------------
   Card 2: GitHub Showcase Card (Clickable)
   -------------------------------------------------------------------------- */
.github-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  justify-content: space-between;
}

/* Großes, edles GitHub-Hintergrund-Wasserzeichen */
.github-watermark {
  position: absolute;
  right: -30px;
  bottom: -30px;
  font-size: 210px;
  color: #ffffff;
  opacity: 0.03;
  pointer-events: none;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}

.github-card:hover .github-watermark {
  opacity: 0.08;
  color: var(--secondary-color);
  transform: scale(1.06) rotate(-8deg);
  filter: drop-shadow(0 0 25px rgba(0, 217, 255, 0.3));
}

/* Interaktives Banner am Fuß der GitHub-Karte */
.github-action-banner {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(0, 217, 255, 0.04) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.github-card:hover .github-action-banner {
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.12) 0%, rgba(0, 217, 255, 0.04) 100%);
  border-color: rgba(0, 217, 255, 0.4);
  box-shadow: 0 8px 24px rgba(0, 217, 255, 0.15);
  transform: translateY(-2px);
}

.github-profile-preview {
  display: flex;
  align-items: center;
  gap: 14px;
}

.github-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.github-card:hover .github-avatar-circle {
  transform: scale(1.08) rotate(6deg);
  box-shadow: 0 0 18px rgba(0, 217, 255, 0.6);
}

.github-meta-text {
  display: flex;
  flex-direction: column;
}

.github-user {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-light);
  line-height: 1.2;
}

.github-note {
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}

.github-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--secondary-color);
  color: #000000;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.github-open-btn i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.github-card:hover .github-open-btn {
  background: #ffffff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.4);
  transform: translateX(2px);
}

.github-card:hover .github-open-btn i {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .app-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .download-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .github-action-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .github-profile-preview {
    justify-content: center;
  }

  .github-open-btn {
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   Mobile Navigation
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .mobile-menu-container {
    display: block;
    position: fixed;
    top: -3px;
    right: -3px;
    z-index: 1005;
    width: min(300px, calc(100vw - 32px));
  }

  .menu-toggle {
    display: inline-flex;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 8, 12, 0.65);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 1001;
  }

  .nav-backdrop.active {
    opacity: 1;
    visibility: visible;
  }

  nav ul.nav-menu {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 32px);
    background: rgba(12, 15, 20, 0.95);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 8px;
    padding: 72px 18px 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: translateY(-10px) scale(0.96);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.25s ease;
    z-index: 1;
  }

  nav ul.nav-menu.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
  }

  nav ul.nav-menu li {
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  nav ul.nav-menu li a {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 13px 18px;
    margin: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.2s ease;
  }

  nav ul.nav-menu li a:hover,
  nav ul.nav-menu li a:focus {
    background: rgba(0, 217, 255, 0.12);
    border-color: rgba(0, 217, 255, 0.3);
    color: var(--secondary-color);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 217, 255, 0.15);
  }
}