/* ============================================
   Nyxel Developer Portfolio — Pure B&W Design System
   ============================================ */

/* --- CSS Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* --- Theme Variables (Light — default) --- */
:root {
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Pure B&W Surfaces */
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-navbar: rgba(255, 255, 255, 0.88);
  --bg-hero: #ffffff;

  /* Divider line in hero */
  --hero-line: #000000;

  /* Text — pure neutrals only */
  --text-primary: #000000;
  --text-secondary: #444444;
  --text-muted: #888888;
  --text-inverse: #ffffff;

  /* Accent — strict black */
  --accent: #000000;
  --accent-hover: #222222;
  --accent-glow: rgba(0, 0, 0, 0.08);
  --accent-gradient: linear-gradient(135deg, #000000, #333333);

  /* Borders & Shadows — neutral only */
  --border-color: rgba(0, 0, 0, 0.10);
  --border-strong: rgba(0, 0, 0, 0.25);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.14);

  /* Glass */
  --glass-blur: 16px;
  --glass-border: 1px solid rgba(0, 0, 0, 0.08);

  /* Badge */
  --badge-bg: #000000;
  --badge-text: #ffffff;

  /* Footer */
  --footer-bg: #f0f0f0;
  --footer-border: rgba(0, 0, 0, 0.07);

  /* Skeleton */
  --skeleton-bg: #e8e8e8;
  --skeleton-shimmer: #f4f4f4;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Dark Theme --- */
[data-theme="dark"] {
  --bg-primary: #000000;
  --bg-secondary: #111111;
  --bg-card: rgba(18, 18, 18, 0.88);
  --bg-card-hover: rgba(26, 26, 26, 0.98);
  --bg-navbar: rgba(0, 0, 0, 0.90);
  --bg-hero: #000000;

  --hero-line: #ffffff;

  --text-primary: #ffffff;
  --text-secondary: #aaaaaa;
  --text-muted: #666666;
  --text-inverse: #000000;

  --accent: #ffffff;
  --accent-hover: #dddddd;
  --accent-glow: rgba(255, 255, 255, 0.08);
  --accent-gradient: linear-gradient(135deg, #ffffff, #cccccc);

  --border-color: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.20);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.30);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.40);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.50);
  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.30);
  --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.50);

  --glass-border: 1px solid rgba(255, 255, 255, 0.07);

  --badge-bg: #ffffff;
  --badge-text: #000000;

  --footer-bg: #0a0a0a;
  --footer-border: rgba(255, 255, 255, 0.05);

  --skeleton-bg: #1a1a1a;
  --skeleton-shimmer: #2a2a2a;
}

/* System preference auto-detect */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-primary: #000000;
    --bg-secondary: #111111;
    --bg-card: rgba(18, 18, 18, 0.88);
    --bg-card-hover: rgba(26, 26, 26, 0.98);
    --bg-navbar: rgba(0, 0, 0, 0.90);
    --bg-hero: #000000;

    --hero-line: #ffffff;

    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --text-muted: #666666;
    --text-inverse: #000000;

    --accent: #ffffff;
    --accent-hover: #dddddd;
    --accent-glow: rgba(255, 255, 255, 0.08);
    --accent-gradient: linear-gradient(135deg, #ffffff, #cccccc);

    --border-color: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.20);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.30);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.40);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.50);
    --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.30);
    --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.50);

    --glass-border: 1px solid rgba(255, 255, 255, 0.07);

    --badge-bg: #ffffff;
    --badge-text: #000000;

    --footer-bg: #0a0a0a;
    --footer-border: rgba(255, 255, 255, 0.05);

    --skeleton-bg: #1a1a1a;
    --skeleton-shimmer: #2a2a2a;
  }
}

/* --- Body --- */
body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-navbar);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-normal), border-color var(--transition-normal),
    box-shadow var(--transition-normal);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Brand */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}

.navbar-brand:hover {
  opacity: 0.72;
}

.navbar-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  /* The SVG itself provides the icon */
}

.navbar-header-img {
  /* Dynamic header SVG shown in navbar brand area */
  height: 28px;
  width: auto;
  display: block;
}

.navbar-brand-text {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

/* Nav links */
.navbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
  letter-spacing: 0.005em;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 16px;
  right: 16px;
  height: 1px;
  background: var(--text-primary);
  transform: scaleX(0);
  transition: transform var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--accent-glow);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px;
}

.theme-btn {
  all: unset;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: background var(--transition-fast), transform var(--transition-fast);
  color: var(--text-muted);
}

.theme-btn:hover {
  background: var(--accent-glow);
  transform: scale(1.1);
  color: var(--text-primary);
}

.theme-btn.active {
  background: var(--accent);
  color: var(--text-inverse);
}

/* ============================================
   HERO SECTION — Dynamic Header Image
   ============================================ */
.hero {
  margin-top: 70px;
  background: var(--bg-hero);
  position: relative;
  overflow: hidden;
}

/* Animated decorative line */
.hero::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color);
}

/* Dynamic header image banner */
.hero-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.hero-banner-img {
  width: 100%;
  height: clamp(220px, 28vw, 420px);
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform var(--transition-slow);
}

.hero-banner:hover .hero-banner-img {
  transform: scale(1.015);
}

/* Gradient overlay on banner */
.hero-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      transparent 40%,
      var(--bg-hero) 100%);
  pointer-events: none;
}

/* Hero content below banner */
.hero-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 28px 80px;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* Icon in hero */
.hero-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 28px;
  animation: iconFloat 5s ease-in-out infinite;
  border-radius: var(--radius-lg);
  display: block;
}

@keyframes iconFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-9px);
  }
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.08;
  color: var(--text-primary);
  margin-bottom: 20px;
}

/* Thin horizontal rule under h1 */
.hero-rule {
  width: 48px;
  height: 2px;
  background: var(--hero-line);
  margin: 0 auto 20px;
  border: none;
  border-radius: 1px;
  opacity: 0.35;
}

.hero-tagline {
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto;
  font-weight: 400;
}

/* ============================================
   SECTION COMMON
   ============================================ */
.section {
  padding: 88px 28px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border-radius: 100px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.15;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
}

/* Decorative rule under section header */
.section-rule {
  width: 40px;
  height: 2px;
  background: var(--text-primary);
  border: none;
  margin: 18px auto 0;
  border-radius: 1px;
  opacity: 0.2;
}

/* ============================================
   PORTFOLIO GRID
   ============================================ */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* ============================================
   CARD
   ============================================ */
.card {
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 30px;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-normal),
    box-shadow var(--transition-normal),
    border-color var(--transition-normal),
    background var(--transition-normal);
  position: relative;
  overflow: hidden;
}

/* Left accent bar on card */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: var(--text-primary);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--transition-normal);
  border-radius: 0 0 0 var(--radius-lg);
}

/* Top accent strip */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-normal);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.card:hover::before {
  transform: scaleY(1);
}

.card:hover::after {
  transform: scaleX(1);
}

/* Card icon — uses SVG or emoji */
.card-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

.card:hover .card-icon {
  background: var(--accent);
  border-color: var(--accent);
  /* icon emoji/SVG color override in dark */
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.card-desc {
  font-size: 0.91rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.card-platform {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.77rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  letter-spacing: 0.02em;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: gap var(--transition-fast), opacity var(--transition-fast);
}

.card-link:hover {
  gap: 10px;
  opacity: 0.65;
}

.card-link-arrow {
  transition: transform var(--transition-fast);
  font-size: 1.1em;
}

.card-link:hover .card-link-arrow {
  transform: translateX(4px);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  padding: 44px 28px;
  text-align: center;
  transition: background var(--transition-normal), border-color var(--transition-normal);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.footer-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: block;
}

.footer-brand-text {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  letter-spacing: 0.01em;
}

.footer-link:hover {
  color: var(--text-primary);
}

/* ============================================
   LOADING / SKELETON
   ============================================ */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.skeleton-card {
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 30px;
}

.skeleton-line {
  height: 13px;
  border-radius: 7px;
  background: linear-gradient(90deg,
      var(--skeleton-bg) 25%,
      var(--skeleton-shimmer) 50%,
      var(--skeleton-bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

.skeleton-line.icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.skeleton-line.title {
  width: 68%;
  height: 20px;
  margin-bottom: 12px;
}

.skeleton-line.desc {
  width: 100%;
  margin-bottom: 8px;
}

.skeleton-line.desc-short {
  width: 58%;
  margin-bottom: 20px;
}

.skeleton-line.badge {
  width: 80px;
  height: 22px;
  border-radius: 100px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ============================================
   ANIMATIONS — Entrance
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.55s var(--transition-normal) both;
}

.animate-in:nth-child(1) {
  animation-delay: 0.04s;
}

.animate-in:nth-child(2) {
  animation-delay: 0.11s;
}

.animate-in:nth-child(3) {
  animation-delay: 0.18s;
}

.animate-in:nth-child(4) {
  animation-delay: 0.25s;
}

.animate-in:nth-child(5) {
  animation-delay: 0.32s;
}

.animate-in:nth-child(6) {
  animation-delay: 0.39s;
}

/* ============================================
   SECTION DIVIDER
   ============================================ */
.section-divider {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

.section-divider hr {
  border: none;
  border-top: 1px solid var(--border-color);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .navbar-inner {
    padding: 0 18px;
    height: 62px;
  }

  .navbar-brand-text {
    font-size: 0.95rem;
  }

  .nav-link {
    font-size: 0.82rem;
    padding: 6px 10px;
  }

  .theme-toggle {
    margin-left: 6px;
    padding: 3px;
  }

  .theme-btn {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }

  .hero {
    margin-top: 62px;
  }

  .hero-banner-img {
    height: clamp(140px, 32vw, 260px);
  }

  .hero-content {
    padding: 36px 20px 64px;
  }

  .hero-icon {
    width: 62px;
    height: 62px;
  }

  .section {
    padding: 60px 18px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .skeleton-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .navbar-links .nav-link {
    display: none;
  }

  .hero h1 {
    font-size: 2rem;
    letter-spacing: -0.035em;
  }

  .hero-tagline {
    font-size: 0.92rem;
  }

  .section-title {
    font-size: 1.5rem;
  }
}

/* ============================================
   SCROLLBAR (Webkit)
   ============================================ */
::-webkit-scrollbar {
  width: 7px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-primary);
}

/* ============================================
   SELECTION
   ============================================ */
::selection {
  background: var(--text-primary);
  color: var(--text-inverse);
}

/* =========================================================================
   ROUTER AND APP DETAIL PAGE
   ========================================================================= */

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.router-main {
  flex-grow: 1;
  min-height: 100vh;
}

.app-detail-page {
  max-width: 1000px;
  margin: 80px auto;
  padding: 0 20px;
  animation: slideUpFade 0.6s ease forwards;
}

/* PRO, ELEGANT RESPONSIVE HEADER LAYOUT */
.app-detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 25px 35px;
  background: var(--bg-card);
  border: var(--glass-border);
  padding: 30px 40px;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  margin-bottom: 40px;
}

/* 1. KIRI: LOGO */
.app-detail-icon {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.app-detail-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

/* 2. TENGAH-ATAS/BAWAH RATA KIRI: NAMA & DESC */
.app-detail-info {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
}

.app-detail-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.app-detail-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  max-width: 500px;
}

/* 3. TENGAH-ATAS RATA KANAN: VERSION & BUILD */
.app-detail-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
}

.meta-version,
.meta-build {
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* 4. KANAN: Tombol PlayStore */
.app-detail-action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.btn-playstore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  background-color: var(--text-primary);
  color: var(--text-inverse);
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s ease;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-playstore:hover {
  transform: translateY(-2px);
  opacity: 0.9;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .btn-playstore:hover {
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
}

/* --- RESPONSIVITAS HEADER --- */
@media (max-width: 900px) {
  .app-detail-header {
    padding: 25px;
    gap: 20px;
  }
  .app-detail-icon {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 768px) {
  .app-detail-header {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .app-detail-meta {
    flex-direction: row;
    align-items: center;
    width: 100%;
    margin-right: 0;
    gap: 12px;
  }
  .app-detail-action {
    width: 100%;
    margin-top: 10px;
  }
  .btn-playstore {
    width: 100%;
  }
}

/* RULES */
.app-detail-rule {
  margin: 20px 0;
}

/* =========================================================================
   CHANGELOG & LANG TABS
   ========================================================================= */

.changelog-header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

@media (min-width: 768px) {
  .changelog-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.changelog-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.lang-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lang-tab {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: 30px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.lang-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.lang-tab.active {
  background: var(--text-primary);
  color: var(--text-inverse);
  border-color: var(--text-primary);
}

/* =========================================================================
   MARKDOWN BODY (CHANGELOG)
   ========================================================================= */

.markdown-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.markdown-body h2 {
  color: var(--text-primary);
  font-size: 1.4rem;
  margin: 40px 0 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
}

.markdown-body h2:first-child {
  margin-top: 0;
}

.markdown-body ul {
  padding-left: 20px;
  margin-bottom: 20px;
}

.markdown-body li {
  margin-bottom: 10px;
  position: relative;
}

.markdown-body li::marker {
  color: var(--text-primary);
}

.markdown-body p {
  margin-bottom: 15px;
}

.not-found,
.loading-state {
  text-align: center;
  font-size: 1.5rem;
  color: var(--text-secondary);
  padding: 100px 20px;
}