/* ==========================================================================
   Design Tokens & CSS Variables (Theme Service Supported)
   ========================================================================== */
:root {
  /* Color Palettes - Dark Theme (Default) */
  --bg-primary: #080a0f;
  --bg-secondary: #0f131c;
  --bg-card: rgba(15, 19, 28, 0.7);
  --bg-card-hover: rgba(23, 29, 43, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(56, 189, 248, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #38bdf8;
  --accent-indigo: #6366f1;
  --accent-purple: #c084fc;
  --accent-emerald: #10b981;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);

  --pixel-glow: 0 0 25px rgba(56, 189, 248, 0.5), 0 0 50px rgba(129, 140, 248, 0.3);

  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);

  /* Fonts */
  --font-pixel: 'Pixelify Sans', cursive, sans-serif;
  --font-latin: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-japanese: 'Noto Sans JP', 'Outfit', sans-serif;
  --font-arabic: 'Noto Sans Arabic', 'Outfit', sans-serif;
  --font-persian: 'Vazirmatn', 'Noto Sans Arabic', 'Outfit', sans-serif;
  --font-current: var(--font-latin);

  /* Spacing & Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-glow: rgba(99, 102, 241, 0.3);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent-gradient: linear-gradient(135deg, #0284c7 0%, #4f46e5 50%, #9333ea 100%);
  --pixel-glow: 0 0 20px rgba(2, 132, 199, 0.3), 0 0 40px rgba(79, 70, 229, 0.2);

  --glass-shadow: 0 10px 30px 0 rgba(15, 23, 42, 0.06);
}

/* Language Dynamic Typography */
html[lang="ja"] {
  --font-current: var(--font-japanese);
}
html[lang="ar"] {
  --font-current: var(--font-arabic);
}
html[lang="fa"] {
  --font-current: var(--font-persian);
}

/* ==========================================================================
   Base & Reset (Logical Properties for LTR & RTL support)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color var(--transition-smooth),
              border-color var(--transition-smooth),
              color var(--transition-smooth);
}

html, body {
  min-height: 100vh;
  font-family: var(--font-current);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 100vh;
}

/* RTL Layout Alignment Overrides */
html[dir="rtl"] body {
  text-align: right;
}

/* ==========================================================================
   Background Canvas & Ambient Glows
   ========================================================================== */
#ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

.ambient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.ambient-orb-1 {
  width: 520px;
  height: 520px;
  top: -140px;
  left: -100px;
  background: radial-gradient(circle, var(--accent-cyan), transparent 70%);
}

.ambient-orb-2 {
  width: 560px;
  height: 560px;
  bottom: -160px;
  right: -120px;
  background: radial-gradient(circle, var(--accent-purple), transparent 70%);
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */
.site-header {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding: 1.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

.brand-logo:hover {
  transform: scale(1.06);
}

.brand-title {
  font-family: var(--font-pixel), var(--font-current);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-shadow: var(--pixel-glow);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Control Pills */
.control-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--glass-shadow);
}

.control-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-1px);
}

.icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* Language Dropdown */
.lang-dropdown-wrapper {
  position: relative;
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 175px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.4rem;
  box-shadow: var(--glass-shadow), 0 20px 25px -5px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.lang-dropdown-menu.active {
  display: flex;
}

.lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: start;
}

.lang-item:hover {
  background: rgba(99, 102, 241, 0.12);
  color: var(--text-primary);
}

.lang-item.active {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  font-weight: 600;
}

/* ==========================================================================
   Center Stage: Minimalist Center Text with Pixelify Sans
   ========================================================================== */
.center-stage {
  position: relative;
  z-index: 5;
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - 180px);
}

.center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem 1rem;
}

/* Line 1: Website Sedang Dalam Pengerjaan */
.pixel-main-title {
  font-family: var(--font-pixel), var(--font-current);
  font-size: clamp(2rem, 6vw, 4.25rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  max-width: 900px;
  text-shadow: var(--pixel-glow);
}

/* Line 2: Coming Soon with Retro Modern Vibe */
.pixel-sub-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.6rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-full);
  box-shadow: var(--pixel-glow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.pixel-sub-text {
  font-family: var(--font-pixel), var(--font-current);
  font-size: clamp(1.25rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pixel-cursor {
  font-family: var(--font-pixel), monospace;
  font-size: clamp(1.25rem, 3.5vw, 2.25rem);
  font-weight: 700;
  color: var(--accent-cyan);
  animation: blink 1s step-start infinite;
  margin-inline-start: 2px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.footer-separator {
  color: var(--text-muted);
  opacity: 0.6;
}

.license-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-smooth), text-shadow var(--transition-smooth);
}

.license-link:hover {
  color: var(--accent-purple);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   Hugeicons Styling Helper
   ========================================================================== */
.h-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.125em;
}

.h-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.6;
}
