/* ============================================================
   Nextra Xiter — Style Sheet
   Dark theme + light green accent
   ============================================================ */

:root {
  --bg: #0a0f0c;
  --bg-alt: #0e1511;
  --surface: #111a15;
  --surface-2: #15211a;
  --border: #1f2c24;
  --border-hi: #2b3d31;

  --accent: #4ade80;
  --accent-2: #22c55e;
  --accent-soft: rgba(74, 222, 128, 0.12);
  --accent-softer: rgba(74, 222, 128, 0.06);

  --text: #e9f2ec;
  --text-muted: #9db3a6;
  --text-dim: #6f8577;

  --grad: linear-gradient(135deg, #4ade80 0%, #22c55e 50%, #16a34a 100%);

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --shadow-accent: 0 10px 30px rgba(34, 197, 94, 0.25);

  --font: 'Poppins', 'Cairo', sans-serif;
  --font-ar: 'Cairo', 'Poppins', sans-serif;

  --nav-h: 74px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

html[lang="ar"] body,
html[lang="ar"] {
  font-family: var(--font-ar);
}

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

ul {
  list-style: none;
}

img, svg {
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

.container {
  width: min(1180px, 92%);
  margin-inline: auto;
}

::selection {
  background: var(--accent);
  color: #052e13;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border-hi);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-2);
}

/* ============================================================
   Language switch transition
   ============================================================ */
.lang-fade {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.lang-fade.active {
  opacity: 1;
  pointer-events: all;
}

/* ============================================================
   Preloader
   ============================================================ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preloader-logo {
  position: relative;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
}
.preloader-logo img {
  width: 66px;
  height: 66px;
  border-radius: 14px;
  object-fit: cover;
  animation: pop 1s ease infinite;
}
.preloader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}
.preloader-text {
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--text-muted);
  font-size: 14px;
  animation: pulse-soft 1.4s ease infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
@keyframes pulse-soft {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ============================================================
   Navbar
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: all 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(10, 15, 12, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
}
.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #000;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  box-shadow: var(--shadow-accent);
  transition: transform 0.3s var(--ease);
  overflow: hidden;
}
.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}
.logo:hover .logo-mark {
  transform: rotate(-8deg) scale(1.08);
}
.logo-accent {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-link {
  position: relative;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-muted);
  border-radius: 10px;
  transition: color 0.3s, background 0.3s;
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: 2px;
  inset-inline-start: 14px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transition: width 0.3s var(--ease);
}
.nav-link:hover {
  color: var(--text);
  background: var(--accent-softer);
}
.nav-link.active {
  color: var(--accent);
}
.nav-link.active::after {
  width: calc(100% - 28px);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switcher {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 3px;
  gap: 2px;
}
.lang-btn {
  box-sizing: border-box;
  width: 40px;
  height: 28px;
  min-width: 40px;
  max-width: 40px;
  margin: 0;
  padding: 0;
  border: none;
  flex: 0 0 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: 9px;
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
  letter-spacing: 0.5px;
}
.lang-btn:hover {
  color: var(--text);
}
.lang-btn.active {
  background: var(--grad);
  color: #052e13;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 2px 8px rgba(34, 197, 94, 0.35);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-auth-btn {
  box-sizing: border-box;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  padding: 8px 16px;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
  line-height: 1;
}
.nav-login {
  background: transparent;
  border: 1.5px solid var(--border-hi);
  color: var(--text);
}
.nav-login:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.nav-signup {
  background: var(--grad);
  color: #052e13;
}
.nav-signup:hover {
  box-shadow: var(--shadow-accent);
  transform: translateY(-1px);
}
.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.nav-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--grad);
  color: #052e13;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
}
.nav-user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-logout {
  background: transparent;
  border: 1.5px solid var(--border-hi);
  color: var(--text-muted);
  padding: 7px 12px;
  font-size: 12px;
}
.nav-logout:hover {
  border-color: #f87171;
  color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}
.nav-orders {
  background: transparent;
  border: 1.5px solid var(--border-hi);
  color: var(--accent);
  padding: 7px 12px;
  font-size: 12px;
}
.nav-orders:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.15);
}

.orders-modal-box {
  max-width: 460px;
  max-height: 80vh;
  overflow-y: auto;
}
.orders-section {
  margin-top: 6px;
}
.orders-section-head {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  margin: 18px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.orders-section-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.orders-list {
  display: grid;
  gap: 10px;
}
.order-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.order-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.order-item-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}
.order-item-sub {
  font-size: 12px;
  color: var(--text-muted);
  display: grid;
  gap: 3px;
}
.order-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.order-badge.pending {
  background: rgba(250, 204, 21, 0.12);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.35);
}
.order-badge.accepted {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.35);
}
.order-badge.rejected {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.35);
}
.order-badge.cancelled {
  background: rgba(148, 163, 184, 0.14);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.4);
  text-decoration: line-through;
}
.orders-empty {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 22px 0 10px;
}

/* Orders table */
.orders-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.orders-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
.orders-table th,
.orders-table td {
  padding: 13px 16px;
  font-size: 13px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.orders-table thead th {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}
.orders-table tbody tr:last-child td {
  border-bottom: none;
}
.orders-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}
.order-type {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}
.type-purchase {
  background: var(--accent-soft);
  color: var(--accent);
}
.type-report {
  background: rgba(129, 140, 248, 0.14);
  color: #818cf8;
}
.type-cancelled {
  background: rgba(148, 163, 184, 0.14);
  color: #94a3b8;
  text-decoration: line-through;
}
.order-account {
  display: block;
  font-weight: 800;
  color: var(--text);
}
.order-account-email {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  direction: ltr;
  text-align: right;
}
.order-msg-cell {
  color: var(--text);
  font-weight: 600;
}
.orders-table-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 26px 16px;
}

.buy-options {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.buy-options .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.buy-opt-title {
  font-weight: 800;
}
.buy-opt-best {
  font-size: 12px;
  font-weight: 800;
  opacity: 0.85;
}

.orders-wrap {
  max-width: 720px;
  margin: 0 auto;
}
.orders-empty-card {
  text-align: center;
  padding: 48px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.orders-empty-icon {
  font-size: 42px;
  margin-bottom: 12px;
}
.orders-empty-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
}
.orders-empty-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 22px;
}
.orders-login-actions {
  max-width: 320px;
  margin: 0 auto;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.hamburger span {
  width: 24px;
  height: 2.5px;
  border-radius: 3px;
  background: var(--text);
  transition: all 0.35s var(--ease);
}
.hamburger.open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Mobile drawer auth */
.drawer-auth {
  width: 100%;
  max-width: 320px;
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.drawer-auth-link {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  border-radius: 10px;
  padding: 12px 20px;
  text-align: center;
  transition: color 0.3s, background 0.3s;
}
.drawer-auth-link:hover {
  color: var(--accent);
  background: var(--accent-softer);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(74, 222, 128, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 222, 128, 0.04) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: float 9s ease-in-out infinite;
}
.orb-1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.5), transparent 70%);
  top: -120px;
  inset-inline-start: -120px;
}
.orb-2 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.4), transparent 70%);
  bottom: -80px;
  inset-inline-end: -80px;
  animation-delay: -3s;
}
.orb-3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(22, 163, 74, 0.45), transparent 70%);
  top: 40%;
  inset-inline-end: 30%;
  animation-delay: -6s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -24px) scale(1.06); }
}

/* ============================================================
   Page Hero (inner pages)
   ============================================================ */
.page-hero {
  position: relative;
  padding: calc(var(--nav-h) + 70px) 0 70px;
  text-align: center;
  overflow: hidden;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.page-hero-inner {
  position: relative;
}
.page-hero-title {
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 900;
  margin-bottom: 12px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-hero-sub {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 560px;
  margin-inline: auto;
}
.page-hero-sm {
  padding: calc(var(--nav-h) + 26px) 0 30px;
}
.page-hero-sm .page-hero-title {
  font-size: clamp(24px, 4vw, 34px);
  margin-bottom: 6px;
}
.page-hero-sm .page-hero-sub {
  font-size: 14px;
  max-width: 460px;
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
}

.hero-greeting {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}
.hero-greeting::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
}
html[dir="ltr"] .hero-greeting::before {
  order: -1;
}

.hero-name {
  font-size: clamp(40px, 6vw, 66px);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 6px;
}
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-role {
  font-size: clamp(18px, 2.6vw, 26px);
  font-weight: 600;
  color: var(--text-muted);
  min-height: 1.6em;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.hero-role .caret {
  display: inline-block;
  width: 3px;
  height: 1.05em;
  background: var(--accent);
  animation: blink 0.85s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-desc {
  color: var(--text-muted);
  max-width: 560px;
  font-size: 16.5px;
  margin-bottom: 30px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--grad);
  color: #052e13;
  box-shadow: var(--shadow-accent);
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 45%);
  transform: translateX(-120%);
  transition: transform 0.5s var(--ease);
}
html[dir="rtl"] .btn-primary::before {
  transform: translateX(120%);
}
.btn-primary:hover::before {
  transform: translateX(0);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(34, 197, 94, 0.4);
}
.btn-outline {
  border: 2px solid var(--border-hi);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-softer);
  transform: translateY(-3px);
}
.btn-sm {
  padding: 11px 22px;
  font-size: 14px;
}

/* Header action button (All Apps / Back) — compact, matches lang-switcher height */
.nav-actions .btn {
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
  box-sizing: border-box;
  line-height: 1;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 12px;
}
.nav-actions .btn-primary {
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}
.nav-actions .btn-primary:hover {
  transform: none;
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
}
.btn-block {
  width: 100%;
}

/* ---------- Hero stats ---------- */
.hero-stats {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 90px;
}
.stat-num {
  font-size: 34px;
  font-weight: 800;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-plus, .stat-percent {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  margin-inline-start: 2px;
}
.stat-label {
  font-size: 13.5px;
  color: var(--text-muted);
}

/* ---------- Hero visual ---------- */
.hero-visual {
  display: flex;
  justify-content: center;
}
.avatar-wrap {
  position: relative;
  width: min(340px, 78vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--border-hi);
  animation: spin 18s linear infinite;
}
.avatar-ring::before,
.avatar-ring::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.6);
}
.avatar-ring::before {
  top: 6%;
  inset-inline-start: 22%;
}
.avatar-ring::after {
  bottom: 10%;
  inset-inline-end: 18%;
}
.avatar-ring-2 {
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  border: 1px dashed var(--border-hi);
  animation: spin 30s linear infinite reverse;
}
.avatar {
  width: 62%;
  height: 62%;
  border-radius: 50%;
  background: #000;
  border: 2px solid var(--border-hi);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow), inset 0 0 40px rgba(74, 222, 128, 0.08);
  position: relative;
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-badge {
  position: absolute;
  bottom: 14%;
  inset-inline-end: 8%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-accent);
}
.pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: pulse 1.6s ease-out infinite;
}
.pulse-dot.small {
  width: 9px;
  height: 9px;
}
@keyframes pulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ---------- Scroll down ---------- */
.scroll-down {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  transition: color 0.3s;
}
html[dir="rtl"] .scroll-down {
  left: auto;
  right: 50%;
  transform: translateX(50%);
}
.scroll-down:hover {
  color: var(--accent);
}
.mouse {
  width: 26px;
  height: 42px;
  border: 2px solid currentColor;
  border-radius: 16px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
}
.wheel {
  width: 3px;
  height: 8px;
  border-radius: 3px;
  background: var(--accent);
  animation: wheel 1.6s ease-in-out infinite;
}
@keyframes wheel {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ============================================================
   Sections
   ============================================================ */
.section {
  padding: 100px 0;
  position: relative;
}
.section.alt {
  background: var(--bg-alt);
}

.section-head {
  text-align: center;
  margin-bottom: 56px;
}
.section-tag {
  display: inline-block;
  padding: 7px 18px;
  border-radius: 30px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  border: 1px solid rgba(74, 222, 128, 0.2);
}
.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  margin-bottom: 14px;
}
.section-line {
  width: 70px;
  height: 4px;
  margin: 0 auto;
  border-radius: 4px;
  background: var(--grad);
  position: relative;
}
.section-line::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  background: var(--grad);
  opacity: 0.4;
  filter: blur(6px);
}
.section-sub {
  color: var(--text-muted);
  max-width: 520px;
  margin: 14px auto 0;
}

/* ============================================================
   About
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: stretch;
}
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s;
}
.about-card::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 3px;
  background: var(--grad);
}
.about-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hi);
}
.about-icon {
  display: inline-grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: #000;
  border: 1px solid rgba(74, 222, 128, 0.25);
  margin-bottom: 20px;
  overflow: hidden;
}
.about-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-name {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
}
.about-text {
  color: var(--text-muted);
  margin-bottom: 14px;
}
.about-info {
  display: grid;
  gap: 10px;
  margin: 22px 0;
  padding: 18px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 14.5px;
}
.info-key {
  color: var(--text-dim);
  font-weight: 600;
}
.info-val {
  color: var(--text);
  font-weight: 600;
}
.info-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  transition: color 0.3s, text-shadow 0.3s;
}
.info-link:hover {
  color: var(--accent);
  text-shadow: 0 0 14px rgba(74, 222, 128, 0.6);
}
.info-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}

/* ---------- YouTube browser window ---------- */
.yt-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--ease), border-color 0.4s;
  min-height: 340px;
}
.yt-window:hover {
  transform: translateY(-6px);
  border-color: rgba(74, 222, 128, 0.45);
  box-shadow: var(--shadow), var(--shadow-accent);
}
.yt-chrome {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.yt-dots {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}
.yt-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.yt-dot.red { background: #ff5f57; }
.yt-dot.yellow { background: #febc2e; }
.yt-dot.green { background: #28c840; }
.yt-address {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  overflow: hidden;
  white-space: nowrap;
}
.yt-lock {
  font-size: 11px;
  flex-shrink: 0;
}
.yt-url {
  overflow: hidden;
  text-overflow: ellipsis;
  direction: ltr;
  text-align: left;
}
.yt-open {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 10px;
  background: var(--grad);
  color: #052e13;
  font-size: 12.5px;
  font-weight: 800;
  transition: all 0.3s var(--ease);
}
.yt-open:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}
.yt-body {
  position: relative;
  background: #000;
  flex: none;
}
.yt-grid {
  flex: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  padding: 0;
  align-content: start;
}
.yt-grid::-webkit-scrollbar {
  width: 6px;
}
.yt-grid::-webkit-scrollbar-thumb {
  background: #2a332c;
  border-radius: 6px;
}
.yt-grid::-webkit-scrollbar-thumb:hover {
  background: #3d4a40;
}
.yt-video {
  position: relative;
  background: #0c0f0d;
  overflow: hidden;
  transition: background 0.3s;
}
.yt-video:hover {
  background: #151a16;
}
.yt-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.yt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}
.yt-video:hover .yt-thumb img {
  transform: scale(1.08);
}
.yt-duration {
  position: absolute;
  bottom: 8px;
  inset-inline-end: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  direction: ltr;
}
.yt-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: all 0.3s var(--ease);
}
.yt-video:hover .yt-play {
  opacity: 1;
  background: var(--accent);
  color: #052e13;
}
.yt-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12.5px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 8px 6px;
  min-height: 38px;
  transition: color 0.3s;
}
.yt-video:hover .yt-title {
  color: var(--text);
}
.yt-channelbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #0c0f0d;
  border-top: 1px solid #1a211c;
  margin-top: auto;
}
.yt-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad);
  color: #052e13;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
}
.yt-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.yt-channelname {
  flex: 1;
  font-weight: 700;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.yt-subscribe {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--grad);
  color: #052e13;
  font-weight: 800;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s var(--ease);
  flex-shrink: 0;
}
.yt-subscribe:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

/* ============================================================
   Skills
   ============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: all 0.35s var(--ease);
}
.skill-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: var(--shadow-accent);
}
.skill-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.skill-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(74, 222, 128, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  overflow: hidden;
}
.skill-icon-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  transition: transform 0.35s var(--ease);
}
.skill-card:hover .skill-icon-img {
  transform: scale(1.15) rotate(-6deg);
}
.skill-name {
  font-size: 16.5px;
  font-weight: 700;
}
.skill-track {
  height: 9px;
  background: var(--bg-alt);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.skill-fill {
  height: 100%;
  width: 0;
  border-radius: 10px;
  background: var(--grad);
  position: relative;
  transition: width 1.4s var(--ease);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.4);
}
.skill-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: shimmer 2.2s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
html[dir="rtl"] .skill-fill::after {
  animation-direction: reverse;
}
.skill-percent {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-dim);
  font-weight: 600;
}
.skill-percent b {
  color: var(--accent);
}

/* ============================================================
   Apps
   ============================================================ */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
}
.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease);
  transform-style: preserve-3d;
  display: flex;
  flex-direction: column;
}
.app-card.free {
  border-color: rgba(74, 222, 128, 0.45);
}
.app-card.free:hover {
  border-color: #4ade80;
  box-shadow: var(--shadow), 0 0 24px rgba(74, 222, 128, 0.2);
}
.app-card.soon {
  border-color: rgba(250, 204, 21, 0.45);
}
.app-card.soon:hover {
  border-color: #facc15;
  box-shadow: var(--shadow), 0 0 24px rgba(250, 204, 21, 0.2);
}
.app-card.premium {
  border-color: rgba(96, 165, 250, 0.45);
}
.app-card.premium:hover {
  border-color: #60a5fa;
  box-shadow: var(--shadow), 0 0 24px rgba(96, 165, 250, 0.2);
}
.app-card.premium .app-name,
.app-card.premium .app-desc,
.app-card.premium .app-icon,
.app-card.premium .premium-lock {
  transition: filter 0.4s var(--ease), opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.app-card.premium .premium-lock {
  position: absolute;
  inset: 30px;
  bottom: 84px;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  z-index: 2;
}
.app-card.premium:hover .premium-lock {
  opacity: 1;
}
.app-card.premium:hover .app-name,
.app-card.premium:hover .app-desc,
.app-card.premium:hover .app-icon {
  filter: blur(5px);
  opacity: 0.45;
}
.app-card.premium:hover .app-icon {
  transform: none;
}
.app-card.premium:hover .app-actions,
.app-card.premium:hover .app-link-buy {
  filter: none;
  opacity: 1;
}
.app-card.premium .premium-lock .lock-ring {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(96, 165, 250, 0.14);
  border: 1.5px solid rgba(96, 165, 250, 0.5);
  display: grid;
  place-items: center;
  font-size: 28px;
  color: #60a5fa;
  box-shadow: 0 0 24px rgba(96, 165, 250, 0.35);
  transform: scale(0.8);
  transition: transform 0.4s var(--ease);
}
.app-card.premium:hover .lock-ring {
  transform: scale(1);
}
.app-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(74, 222, 128, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.app-card:hover::before {
  opacity: 1;
}
.app-card:hover {
  transform: translateY(-8px);
  border-color: rgba(74, 222, 128, 0.45);
  box-shadow: var(--shadow), var(--shadow-accent);
}
.app-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.app-icon {
  width: 62px;
  height: 62px;
  border-radius: 17px;
  background: var(--grad);
  display: grid;
  place-items: center;
  font-size: 30px;
  color: #052e13;
  box-shadow: var(--shadow-accent);
  position: relative;
  transition: transform 0.4s var(--ease);
  overflow: hidden;
}
.app-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 17px;
}
.app-card:hover .app-icon {
  transform: scale(1.1) rotate(-6deg);
}
.app-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 30px;
  letter-spacing: 0.4px;
}
.app-card .app-badge {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  z-index: 3;
}
.app-badge.free {
  background: rgba(74, 222, 128, 0.14);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.4);
}
.app-badge.soon {
  background: rgba(250, 204, 21, 0.14);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.4);
}
.app-badge.premium {
  background: rgba(96, 165, 250, 0.14);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.4);
}
.app-badge.stable {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(74, 222, 128, 0.3);
}
.app-badge.beta {
  background: rgba(250, 204, 21, 0.12);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.3);
}
.app-name {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 10px;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}
.app-desc {
  color: var(--text-muted);
  font-size: 14.5px;
  margin-bottom: 16px;
  min-height: 3.4em;
  min-width: 0;
  overflow-wrap: break-word;
}
.app-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.app-feature {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 20px;
  transition: all 0.3s;
}
.app-card:hover .app-feature {
  color: var(--text);
  border-color: var(--border-hi);
}
.app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: auto;
}
.app-actions .btn {
  min-width: 0;
}
.app-link {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--grad);
  color: #052e13;
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.35s var(--ease);
}
.app-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 45%);
  transform: translateX(-120%);
  transition: transform 0.5s var(--ease);
}
html[dir="rtl"] .app-link::before {
  transform: translateX(120%);
}
.app-link:hover::before {
  transform: translateX(0);
}
.app-link:hover {
  box-shadow: var(--shadow-accent);
  transform: translateY(-2px);
}
.app-link-buy {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  color: #fff;
}
.app-link-soon {
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #3a2a00;
  border: none;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}
.app-link-soon::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.45), transparent 45%);
}

/* ---------------- Soon modal ---------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 12, 8, 0.7);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.modal-overlay::-webkit-scrollbar {
  display: none;
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal-box {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: var(--radius);
  padding: 38px 30px 30px;
  text-align: center;
  transition: transform 0.35s var(--ease);max-height: calc(100vh - 40px);max-height: calc(100dvh - 40px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.modal-box::-webkit-scrollbar {
  display: none;
}
.modal-overlay.open .modal-box {
  animation: modalZoom 0.4s var(--ease);
}
@keyframes modalZoom {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.modal-overlay.open .modal-icon,
.modal-overlay.open .modal-title,
.modal-overlay.open .modal-text,
.modal-overlay.open .modal-btn {
  opacity: 0;
  animation: modalFadeIn 0.6s var(--ease) forwards;
}
.modal-overlay.open .modal-icon {
  animation-delay: 0.1s;
}
.modal-overlay.open .modal-title {
  animation-delay: 0.2s;
}
.modal-overlay.open .modal-text {
  animation-delay: 0.3s;
}
.modal-overlay.open .modal-btn {
  animation-delay: 0.4s;
}
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.3s;
  z-index: 5;
}
.modal-close:hover {
  color: var(--text);
}
.confirm-box {
  max-width: 360px;
}
.confirm-icon {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.4);
  color: #f43f5e;
}
.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}
.confirm-actions .btn-outline {
  color: var(--text-muted);
}
.modal-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(250, 204, 21, 0.14);
  border: 1.5px solid rgba(250, 204, 21, 0.4);
  display: grid;
  place-items: center;
  font-size: 30px;
  color: #facc15;
  overflow: hidden;
}
.modal-icon.auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.modal-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}
.modal-text {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.modal-btn {
  width: 100%;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.modal-btn::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 45%);
}
.app-more {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--border-hi);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: all 0.3s;
}
.app-more:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.app-glow {
  position: absolute;
  top: -50px;
  inset-inline-end: -50px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.14), transparent 70%);
}

/* ============================================================
   Articles
   ============================================================ */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
}
.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.4s var(--ease);
}
.article-card:hover {
  transform: translateY(-8px);
  border-color: rgba(74, 222, 128, 0.45);
  box-shadow: var(--shadow), var(--shadow-accent);
}
.article-cover {
  height: 190px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 54px;
  background: #000;
}
.article-cover-link {
  display: block;
}
.article-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.article-card:hover .article-cover-img {
  transform: scale(1.07);
}
.article-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, var(--surface) 100%);
}
.article-body {
  padding: 24px 26px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 12px;
}
.article-cat {
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.article-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.5;
  margin-bottom: 10px;
  transition: color 0.3s;
}
.article-card:hover .article-title {
  color: var(--accent);
}
.article-excerpt {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 18px;
  flex: 1;
}
.article-read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  transition: gap 0.3s;
}
.article-card:hover .article-read {
  gap: 13px;
}
.article-read svg {
  transition: transform 0.3s;
}
html[dir="ltr"] .article-card:hover .article-read svg {
  transform: translateX(4px);
}
html[dir="rtl"] .article-card:hover .article-read svg {
  transform: translateX(-4px);
}
.articles-more {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

/* ============================================================
   Article Page
   ============================================================ */
.article-page {
  padding: calc(var(--nav-h) + 50px) 0 80px;
  min-height: 70vh;
}
.article-page-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.article-page-head {
  padding: 30px 34px 8px;
}
.article-page-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.5;
  color: var(--text);
}
.article-page-media {
  padding: 22px 34px 4px;
}
.vid-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.vid-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.article-page-content {
  padding: 16px 34px 6px;
}
.article-para {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.9;
  margin-bottom: 14px;
}
.article-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 20px 34px 34px;
}
@media (max-width: 480px) {
  .article-page-head,
  .article-page-media,
  .article-page-content,
  .article-page-actions {
    padding-inline: 18px;
  }
  .article-page-title {
    font-size: 21px;
  }
}

/* ============================================================
   App Page
   ============================================================ */
.app-page {
  padding: calc(var(--nav-h) + 50px) 0 80px;
  min-height: 70vh;
}
.app-page-card {
  background: rgba(17, 26, 21, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.app-page-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  padding: 40px;
}
.app-page-main {
  min-width: 0;
}
.app-page-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding-inline-start: 40px;
  border-inline-start: 1px solid var(--border);
}

/* ---------- Header ---------- */
.app-page-top {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: start;
  gap: 24px;
  margin-bottom: 26px;
  overflow: hidden;
}
.app-page-logo {
  width: 96px;
  height: 96px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  font-size: 44px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(74, 222, 128, 0.22);
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.app-page-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.app-page-head {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-top: 4px;
}
.app-page-name {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.app-page-tagline {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--accent);
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}
.app-page-tagline:empty {
  display: none;
}

/* ---------- Description ---------- */
.app-page-desc {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.95;
  margin-bottom: 28px;
  padding: 22px 24px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

/* ---------- Actions ---------- */
.app-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 36px;
}
.app-page-actions .btn {
  min-width: 0;
  max-width: 100%;
}
.app-btn-download {
  flex: 1 1 170px;
}
.app-btn-copy,
.app-btn-all {
  flex: 1 1 150px;
  padding-inline: 20px;
}
.app-btn-copy svg {
  flex-shrink: 0;
}

/* ---------- Sections ---------- */
.app-page-section {
  min-width: 0;
}
.app-page-section + .app-page-section {
  margin-top: 0;
}
.app-page-section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.app-page-label {
  color: var(--accent);
  font-size: 15px;
  font-weight: 800;
  margin: 0;
}
.app-page-section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-hi), transparent);
}
html[dir="rtl"] .app-page-section-line {
  background: linear-gradient(-90deg, var(--border-hi), transparent);
}

/* ---------- Features ---------- */
.app-page-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.app-feature-card {
  background: var(--bg-alt);
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: 12px;
  padding: 10px 8px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  min-width: 0;
  box-shadow: 0 4px 16px rgba(74, 222, 128, 0.18);
  transition: border-color 0.3s, transform 0.3s, background 0.3s, box-shadow 0.3s;
}
.app-feature-card:hover {
  border-color: rgba(74, 222, 128, 0.6);
  background: var(--accent-softer);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(74, 222, 128, 0.35);
}
.app-feature-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 15px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.app-feature-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.app-feature-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
}
.app-feature-desc {
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Info ---------- */
.app-page-info {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.app-info-item {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  transition: all 0.3s;
}
.app-info-item:hover {
  border-color: rgba(74, 222, 128, 0.4);
  background: var(--accent-softer);
}
.app-info-key {
  color: var(--text-dim);
  font-size: 11.5px;
  font-weight: 700;
}
.app-info-val {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: break-word;
}

/* ---------- Install ---------- */
.app-page-install {
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.app-page-install .app-page-section-head {
  margin-bottom: 16px;
}
.app-page-install-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn-ghost-install {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 1px solid var(--border-hi);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 13.5px;
  font-weight: 700;
  transition: all 0.3s;
}
.btn-ghost-install:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-softer);
  transform: translateY(-2px);
}

/* ---------- Version card ---------- */
.app-version-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(74, 222, 128, 0.4);
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.14), rgba(16, 185, 129, 0.05) 60%, var(--surface));
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.app-version-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 13px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.app-version-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.app-version-kicker {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
}
.app-version-value {
  font-size: 21px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: 0.5px;
  line-height: 1.15;
}
.app-version-note {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
}
.app-version-badge {
  margin-inline-start: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  color: #052e16;
  background: var(--accent);
  box-shadow: 0 4px 12px rgba(74, 222, 128, 0.4);
  transition: background 0.3s, box-shadow 0.3s;
}
.app-version-badge svg {
  flex-shrink: 0;
}
.app-version-badge-label {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 900;
  transition: max-width 0.3s ease, opacity 0.3s ease;
}
.app-version-badge:hover {
  box-shadow: 0 6px 18px rgba(74, 222, 128, 0.55);
}
.app-version-badge:hover .app-version-badge-label {
  max-width: 90px;
  opacity: 1;
}

/* ---------- Empty states ---------- */
.app-page-section:has(.app-page-info:empty) {
  display: none;
}
.app-page-info:empty {
  display: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .app-page-body {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 30px;
  }
  .app-page-side {
    padding-inline-start: 0;
    border-inline-start: none;
    border-top: 1px solid var(--border);
    padding-top: 30px;
  }
  .app-page-info {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}
@media (max-width: 480px) {
  .app-page {
    padding: calc(var(--nav-h) + 30px) 0 60px;
  }
  .app-page-body {
    padding: 24px 18px;
  }
  .app-page-top {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 18px;
  }
  .app-page-logo {
    width: 88px;
    height: 88px;
    font-size: 40px;
  }
  .app-page-head {
    align-items: center;
    text-align: center;
  }
  .app-page-name {
    font-size: 24px;
  }
  .app-page-actions {
    flex-direction: column;
  }
  .app-btn-download,
  .app-btn-copy,
  .app-btn-all {
    flex: none;
    width: 100%;
  }
  .app-page-features {
    grid-template-columns: 1fr;
  }
  .app-page-info {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  .app-page-install-links {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .btn-ghost-install {
    flex: 1 1 140px;
  }
}

/* ============================================================
   Contact
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.contact-heading {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
}
.contact-text {
  color: var(--text-muted);
  margin-bottom: 26px;
}
.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.social-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: 14.5px;
  transition: all 0.35s var(--ease);
}
.social-btn svg {
  color: var(--sc, var(--text));
  flex-shrink: 0;
}
.social-btn:hover {
  border-color: var(--sc, var(--accent));
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  background: var(--surface-2);
}
.social-btn:hover svg {
  filter: drop-shadow(0 0 8px var(--sc, var(--accent)));
}

.contact-actions {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.contact-note {
  text-align: center;
  padding: 8px 0 14px;
}
.contact-note-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1.5px solid rgba(74, 222, 128, 0.35);
  display: grid;
  place-items: center;
  font-size: 24px;
  color: var(--accent);
}
.contact-note-icon.logo {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: none;
  border: none;
  overflow: hidden;
}
.contact-note-icon.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.contact-note h4 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
}
.contact-note p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-muted);
}
.contact-note.logged {
  padding-bottom: 6px;
}
.btn-discord {
  background: #5865F2;
  color: #fff;
  border: 1px solid #5865F2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-discord:hover {
  background: #4752c4;
  border-color: #4752c4;
  box-shadow: 0 10px 26px rgba(88, 101, 242, 0.35);
  transform: translateY(-2px);
}
.btn-block {
  width: 100%;
}
.auth-box {
  max-width: 400px;
  padding-bottom: 24px;
}
.auth-tabs {
  display: flex;
  gap: 8px;
  padding: 5px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 13px;
  margin-bottom: 20px;
}
.auth-tab {
  flex: 1;
  padding: 10px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}
.auth-tab.active {
  background: var(--grad);
  color: #052e13;
}
#authForm {
  display: grid;
  gap: 14px;
}
#authName {
  display: none;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border-hi);
}
.btn-google:hover {
  border-color: var(--text);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}
.form-group {
  position: relative;
}
.form-input {
  width: 100%;
  padding: 15px 18px;
  border-radius: 13px;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: all 0.3s;
}
.form-input::placeholder {
  color: var(--text-dim);
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  background: var(--bg);
}
.form-input:focus::placeholder {
  opacity: 0.5;
}
textarea.form-input {
  resize: vertical;
  min-height: 120px;
}
.form-note {
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
  min-height: 1.2em;
}
.form-note.error {
  color: #f87171;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 46px 0 36px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.footer-logo {
  font-size: 19px;
}
.footer-tagline {
  color: var(--text-muted);
  font-size: 14px;
}
.footer-social {
  display: flex;
  gap: 14px;
}
.footer-social a {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: all 0.3s var(--ease);
}
.footer-social a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-accent);
}
.footer-copy {
  color: var(--text-dim);
  font-size: 13.5px;
}

/* ============================================================
   Scroll top
   ============================================================ */
.scroll-top {
  position: fixed;
  bottom: 26px;
  inset-inline-end: 26px;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--grad);
  color: #052e13;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-accent);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s var(--ease);
  z-index: 900;
}
.scroll-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(34, 197, 94, 0.45);
}

/* ============================================================
   Reveal animations
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-greeting {
    justify-content: center;
  }
  .hero-desc {
    margin-inline: auto;
  }
  .hero-cta {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .hero-visual {
    order: -1;
  }
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .scroll-down {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 64px;
  }
  .hamburger {
    order: -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1.5px solid var(--border-hi);
    border-radius: 11px;
    background: var(--surface);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
  }
  .nav-inner {
    justify-content: space-between;
    gap: 10px;
  }
  .logo {
    order: 1;
  }
  .nav-actions {
    order: 0;
    gap: 8px;
  }
  .nav-actions .btn {
    display: none;
  }
  .nav-auth {
    display: flex;
    gap: 6px;
  }
  .nav-auth-btn {
    display: none;
  }
  .nav-user {
    padding: 3px;
  }
  .nav-user-name {
    display: none;
  }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    inset-inline: 0;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(10, 15, 12, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 24px 16px 30px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-130%);
    opacity: 0;
    max-height: calc(100vh - var(--nav-h));
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: all 0.45s var(--ease);
    z-index: 990;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
  }
  .nav-link {
    font-size: 16px;
    padding: 12px 20px;
    width: 100%;
    max-width: 320px;
    text-align: center;
  }
  .section {
    padding: 72px 0;
  }
  .social-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .apps-grid,
  .articles-grid {
    grid-template-columns: 1fr;
  }
  .lang-switcher .lang-btn {
    width: 36px;
    height: 26px;
    min-width: 36px;
    max-width: 36px;
    flex-basis: 36px;
  }
  .nav-user {
    padding: 3px;
  }
  .form-input {
    font-size: 16px;
  }
  .orders-table th,
  .orders-table td {
    padding: 11px 12px;
    font-size: 12px;
  }
  .orders-table {
    min-width: 560px;
  }
  .order-account-email {
    font-size: 10px;
  }
  .hero {
    padding: calc(var(--nav-h) + 24px) 0 56px;
  }
}
