/* Modern Design System - DCodeLabs App Showcase & Privacy Portal */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  /* Color Palette - Dark & Vibrant Accents */
  --bg-main: #0B0F17;
  --bg-card: rgba(18, 24, 38, 0.7);
  --bg-card-hover: rgba(26, 35, 54, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.03);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.18);
  
  --primary: #3B82F6;
  --primary-glow: rgba(59, 130, 246, 0.3);
  
  --accent-gold: #EAB308;
  --accent-gold-glow: rgba(234, 179, 8, 0.25);
  --accent-emerald: #10B981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-saffron: #F97316;
  --accent-saffron-glow: rgba(249, 115, 22, 0.25);
  
  --text-main: #F3F4F6;
  --text-muted: #9CA3AF;
  --text-dim: #6B7280;
  
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.15);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset & Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Background Lights */
body::before {
  content: '';
  position: fixed;
  top: -10%;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(0,0,0,0) 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(60px);
}

body::after {
  content: '';
  position: fixed;
  bottom: -10%;
  right: 15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, rgba(0,0,0,0) 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(60px);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #60A5FA;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 23, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.brand-logo img {
  height: 38px;
  width: auto;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.brand-badge {
  font-size: 0.7rem;
  background: linear-gradient(135deg, var(--primary), #8B5CF6);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn {
  background: linear-gradient(135deg, var(--primary), #2563EB);
  color: white;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--primary-glow);
  border: none;
  cursor: pointer;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
  color: white;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Views Management */
.view-section {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
  padding-bottom: 4rem;
}

.view-section.active-view {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero-section {
  padding: 4.5rem 0 3rem;
  text-align: center;
  position: relative;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60A5FA;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #FFFFFF 30%, #9CA3AF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

/* App Cards Showcase Grid */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.app-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.app-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-lg);
}

.app-card-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #111827;
}

.app-title-group h3 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.app-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-tafseer {
  background: rgba(234, 179, 8, 0.15);
  color: #FACC15;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.tag-mkm {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.app-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.app-card-features {
  list-style: none;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.app-card-features li {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.app-card-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #2563EB);
  color: white;
  flex: 1;
}

.btn-primary:hover {
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
  color: white;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

/* App Detail Hero Header */
.app-detail-header {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}

.app-detail-brand {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.app-detail-logo {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.app-detail-title h1 {
  font-size: 2.2rem;
  margin-bottom: 0.4rem;
}

.app-meta-pills {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.meta-pill {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}

/* Navigation Tabs inside App Detail */
.tab-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  color: white;
  background: var(--primary);
  box-shadow: var(--primary-glow);
}

.tab-btn.active.tafseer-active {
  background: var(--accent-gold);
  color: #0B0F17;
  box-shadow: var(--accent-gold-glow);
}

.tab-btn.active.mkm-active {
  background: var(--accent-emerald);
  color: #0B0F17;
  box-shadow: var(--accent-emerald-glow);
}

/* Tab Panels */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.tab-content.active-tab {
  display: block;
}

/* Feature Showcase Grid inside Tab */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.feature-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: var(--transition);
}

.feature-box:hover {
  border-color: var(--border-highlight);
  transform: translateY(-3px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.icon-gold {
  background: rgba(234, 179, 8, 0.15);
  color: var(--accent-gold);
}

.icon-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.feature-box h4 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.feature-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Document Container for Privacy Policy & Terms */
.policy-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-lg);
}

.policy-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.policy-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.policy-updated {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.policy-section {
  margin-bottom: 2.25rem;
}

.policy-section h3 {
  font-size: 1.3rem;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.policy-section p {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.policy-section ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.policy-section li {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

/* Callout Alert Boxes inside Policy */
.policy-callout {
  background: rgba(59, 130, 246, 0.08);
  border-left: 4px solid var(--primary);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.25rem 0;
}

.policy-callout.callout-gold {
  background: rgba(234, 179, 8, 0.08);
  border-left-color: var(--accent-gold);
}

.policy-callout.callout-emerald {
  background: rgba(16, 185, 129, 0.08);
  border-left-color: var(--accent-emerald);
}

.policy-callout p {
  color: var(--text-main);
  font-size: 0.92rem;
  margin-bottom: 0;
}

/* Back Link & Quick Nav */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.back-btn:hover {
  color: var(--primary);
  transform: translateX(-3px);
}

/* Footer */
.footer {
  background: #07090E;
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 1.2rem;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--text-main);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Quick Action Toast notification */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #1E293B;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .app-detail-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #0B0F17;
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .apps-grid {
    grid-template-columns: 1fr;
  }
  
  .policy-card {
    padding: 1.5rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
}
