@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

:root {
  /* Developer Docs / Stripe / Vercel Aesthetics */
  --bg-primary: #ffffff;
  --bg-secondary: #fafafa;
  --bg-tertiary: #f5f5f5;
  
  --card-bg: #ffffff;
  --card-border: #eaeaea;
  
  --text-main: #171717;
  --text-body: #666666;
  --text-muted: #888888;
  
  --brand-primary: #000000;
  --brand-secondary: #0070f3; /* Vercel/Next.js blue */
  --brand-accent: #f81ce5;
  
  --success: #0070f3;
  --danger: #e00;
  
  --glass-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.05);
  --glass-border: 1px solid #eaeaea;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-secondary);
  color: var(--text-body);
  font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, strong, b {
  color: var(--text-main);
  font-weight: 600;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--brand-secondary);
}

/* Developer Docs Navbar */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8%;
  height: 64px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(5px);
  -webkit-backdrop-filter: saturate(180%) blur(5px);
  border-bottom: var(--glass-border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-main);
}

.brand img {
  width: 24px;
  height: 24px;
}

.nav nav {
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 0.9rem;
}

.nav a:not(.brand):not(.admin) {
  color: var(--text-muted);
}

.nav a:not(.brand):not(.admin):hover {
  color: var(--text-main);
}

.admin {
  border: var(--glass-border);
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--bg-primary);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.admin:hover {
  background: var(--bg-tertiary);
  border-color: #ccc;
}

/* Hero Section */
.hero {
  min-height: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  text-align: center;
  padding: 40px 8%;
  background: var(--bg-primary);
  border-bottom: var(--glass-border);
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
}

.eyebrow {
  color: var(--brand-secondary);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 8px;
  display: block;
}

.hero h1 {
  font-size: clamp(24px, 3.5vw, 40px);
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 12px;
}

.hero p {
  color: var(--text-body);
  font-size: 0.95rem;
  max-width: 600px;
  margin: 0 auto 16px auto;
}

.section p {
  color: var(--text-body);
  font-size: 1.1rem;
  max-width: 600px;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.btn {
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--brand-primary);
  color: #fff !important;
  font-weight: 500;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0 24px;
  height: 48px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px 0 rgba(0,0,0,0.1);
}

.btn:hover {
  background: rgba(0, 0, 0, 0.8);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn.ghost {
  background: var(--bg-primary);
  color: var(--text-main) !important;
  border: 1px solid var(--card-border);
  box-shadow: none;
}

.btn.ghost:hover {
  background: var(--bg-tertiary);
  border-color: #ccc;
}

/* Premium Cards & Containers */
.heroCard, .card, .about, .contact, .panel, .contactPageCard {
  background: var(--card-bg);
  border: var(--glass-border);
  border-radius: 8px;
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}

.heroCard {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.heroCard strong {
  font-size: 4rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
  margin-bottom: 8px;
}

.heroCard span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.heroCard p {
  font-size: 0.9rem;
  margin-top: 16px;
  color: var(--text-body);
}

/* Sections */
.section {
  padding: 80px 8%;
  background: var(--bg-secondary);
}

.sectionHead {
  margin-bottom: 40px;
}

.sectionHead h2 {
  font-size: 2rem;
  font-weight: 700;
}

/* Grid System */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* App/Website Cards */
.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border-color: #ddd;
}

.card .cover {
  height: 180px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: var(--glass-border);
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.appIcon {
  width: 80px !important;
  height: 80px !important;
  border-radius: 18px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.cardBody {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.desc {
  font-size: 0.9rem;
  margin-bottom: 20px;
  flex: 1;
}

.meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-main);
  background: var(--bg-tertiary);
  border: 1px solid var(--card-border);
  padding: 2px 8px;
  border-radius: 4px;
}

.links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.linkBtn {
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--bg-primary);
  border: 1px solid var(--card-border);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.linkBtn:hover {
  background: var(--bg-tertiary);
  border-color: #ccc;
}

.screens {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  margin-top: 16px;
  padding-bottom: 8px;
}

.screens img {
  height: 100px;
  border-radius: 6px;
  border: 1px solid var(--card-border);
}

/* About & Contact Mini Sections */
.about, .contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 60px 8%;
  background: var(--bg-primary);
  border-top: var(--glass-border);
  border-bottom: var(--glass-border);
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  list-style: none;
}

.chips li {
  background: var(--bg-tertiary);
  border: 1px solid var(--card-border);
  color: var(--brand-secondary);
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: var(--glass-shadow);
  transition: all 0.3s ease;
}
.chips li:hover {
  background: var(--brand-secondary);
  color: #fff;
  transform: translateY(-2px);
}

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

/* Forms & Inputs (Doc Style) */
input, textarea, select {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--text-main);
  box-shadow: 0 0 0 1px var(--text-main);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.smartForm label {
  display: block;
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.formStatus {
  min-height: 24px;
  margin-top: 8px;
  font-size: 0.85rem;
}

.formStatus.success { color: var(--success); }
.formStatus.error { color: var(--danger); }

/* Admin & Misc */
.adminPage { padding: 40px 8%; background: var(--bg-secondary); }
.panel { padding: 32px; margin-bottom: 24px; }
.adminGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; }

.listItem {
  background: var(--bg-primary);
  border: var(--glass-border);
  border-radius: 6px;
  padding: 16px;
  margin: 12px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.danger { color: var(--danger); border-color: rgba(221,0,0,0.2); }
.ok { color: var(--success); }
.muted { color: var(--text-muted); }
.hidden { display: none !important; }

.skeleton {
  padding: 40px;
  background: var(--bg-tertiary);
  border: var(--glass-border);
  border-radius: 8px;
  color: var(--text-muted);
  text-align: center;
}

footer {
  text-align: center;
  color: var(--text-muted);
  padding: 32px;
  font-size: 0.9rem;
  background: var(--bg-primary);
  border-top: var(--glass-border);
}

/* Contact Page Specific */
.contactHero { 
  padding: 60px 8% 20px; 
  text-align: right; 
  background: var(--bg-primary); 
  border-bottom: none;
}
.contactHero h1 { font-size: clamp(32px, 4vw, 48px); margin-bottom: 12px; }

.contactPageCard {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 0;
  margin: 0 8% 80px;
  padding: 0;
  background: var(--bg-primary);
}

.smartForm {
  padding: 40px;
}

.contactInfo {
  background: var(--bg-secondary);
  border-right: var(--glass-border); /* RTL left border essentially */
  padding: 40px;
}

.contactInfo h2 {
  font-size: 1.25rem;
  margin-bottom: 16px;
}

.vertical { list-style: none; }
.vertical li { 
  margin: 16px 0; 
  font-size: 0.95rem; 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  color: var(--text-body);
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    padding-top: 30px;
    gap: 30px;
  }
  
  .heroCard {
    margin: 0 auto;
    width: 100%;
  }
  
  .about, .contact, .adminGrid, .contactPageCard {
    grid-template-columns: 1fr;
  }
  
  .contactInfo {
    border-right: none;
    border-top: var(--glass-border);
  }
  
  .nav {
    flex-wrap: wrap;
    gap: 16px;
    height: auto;
    padding: 16px 5%;
  }
  
  .nav nav {
    width: 100%;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  
  .section { padding: 60px 5%; }
}

/* --- Enhanced App Cards & Sliders --- */
.app-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.app-card .cardBody {
  padding: 24px;
}
.app-banner {
  width: 100%;
  aspect-ratio: 2 / 1;
  background: #f0f0f0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.app-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}
.app-header .appIcon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.screens-slider {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 12px;
  margin: 16px 0;
  scrollbar-width: thin;
}
.screens-slider::-webkit-scrollbar { height: 6px; }
.screens-slider::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.screens-slider img {
  height: 180px;
  width: auto;
  max-width: 80%;
  border-radius: 8px;
  scroll-snap-align: start;
  object-fit: contain;
  background: #fafafa;
  border: 1px solid var(--border);
}
.app-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

/* --- App Details Page --- */
.app-details-page {
  padding-top: 100px;
  max-width: 1000px;
  margin: 0 auto;
}
.app-details-header {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 32px;
}
.app-details-header .appIcon {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.app-details-info h1 {
  font-size: 2.5rem;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.app-details-page .screens-slider img {
  height: 360px;
  max-width: 90%;
}
.app-stats {
  display: flex;
  gap: 32px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 32px;
  box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.05);
}
.stat-item {
  display: flex;
  flex-direction: column;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}
.store-buttons {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}
.btn-play {
  background: #000;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-play:hover { background: #333; }
.btn-apple {
  background: #007aff;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-apple:hover { background: #005bb5; }
.full-desc {
  line-height: 1.8;
  font-size: 1.1rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  background: #fff;
  padding: 32px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
