/* ==========================================================================
   RUHAYA 3D Showcase Website Stylesheet
   Design Palette: Dark Obsidian, Deep Emerald, Luxury Metallic Gold, Glassmorphism
   ========================================================================== */

:root {
  --bg-dark: #050b14;
  --bg-card: rgba(13, 24, 38, 0.65);
  --bg-card-hover: rgba(20, 36, 56, 0.85);
  --gold-primary: #d4af37;
  --gold-light: #f6e08c;
  --gold-dark: #97781b;
  --emerald-primary: #10b981;
  --emerald-dark: #064e3b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-glass: rgba(212, 175, 55, 0.2);
  --border-glow: rgba(16, 185, 129, 0.4);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-arabic: 'Amiri', serif;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
}

body {
  line-height: 1.6;
  background: radial-gradient(circle at 50% 0%, #0c201a 0%, #050b14 70%);
}

/* Typography Helpers */
.gold-gradient-text {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.emerald-gradient-text {
  background: linear-gradient(135deg, #a7f3d0 0%, var(--emerald-primary) 50%, #047857 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glassmorphism Card Utility */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.glass-card:hover {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-gold {
  background: linear-gradient(135deg, #e6c86e 0%, var(--gold-primary) 50%, var(--gold-dark) 100%);
  color: #050b14;
  box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 35px rgba(212, 175, 55, 0.5);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--gold-primary);
  transform: translateY(-3px);
}

.btn-3d {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 18px 0;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(5, 11, 20, 0.85);
  backdrop-filter: blur(16px);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-glass);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-logo-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold-primary), var(--emerald-primary));
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.app-name {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--gold-light);
}

.app-tagline {
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--emerald-primary);
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--gold-light);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 24px 80px;
  overflow: hidden;
}

.canvas-3d-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(5, 11, 20, 0.2) 0%, #050b14 85%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 850px;
  text-align: center;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 30px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--border-glass);
  color: var(--gold-light);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 3.8rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 24px 32px;
  max-width: 650px;
  margin: 0 auto;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gold-light);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 35px;
  background: var(--border-glass);
}

/* Section Header */
.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 60px;
}

.section-title {
  font-size: 2.6rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Interactive 3D Demo Showcase */
.interactive-demo-section {
  padding: 100px 24px;
  perspective: 1200px;
}

.demo-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tab-btn.active, .tab-btn:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(16, 185, 129, 0.2));
  color: var(--gold-light);
  border-color: var(--gold-primary);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

/* 3D Tilting Phone Frame */
.phone-3d-container {
  width: 320px;
  height: 640px;
  margin: 0 auto;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
  cursor: grab;
}

.phone-frame {
  width: 100%;
  height: 100%;
  background: #090f1a;
  border-radius: 44px;
  border: 12px solid #1a2738;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 30px rgba(16, 185, 129, 0.15);
  position: relative;
  overflow: hidden;
}

.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 24px;
  background: #1a2738;
  border-radius: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.speaker {
  width: 45px;
  height: 4px;
  background: #090f1a;
  border-radius: 2px;
}

.camera {
  width: 10px;
  height: 10px;
  background: #090f1a;
  border-radius: 50%;
}

.phone-screen {
  width: 100%;
  height: 100%;
  padding-top: 45px;
  position: relative;
  background: linear-gradient(180deg, #091322 0%, #040914 100%);
}

.screen-view {
  position: absolute;
  inset: 45px 0 0 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: scale(0.95);
}

.screen-view.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* View: Audio Player */
.app-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.app-disc-art {
  width: 170px;
  height: 170px;
  margin: 10px auto 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.art-pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed var(--gold-primary);
  animation: spinRing 20s linear infinite;
}

@keyframes spinRing {
  100% { transform: rotate(360deg); }
}

.art-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald-dark), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--gold-light);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.app-track-info {
  text-align: center;
  margin-bottom: 16px;
}

.app-track-info h3 {
  font-size: 1.1rem;
  color: var(--gold-light);
}

.app-track-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.waveform-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 35px;
  margin-bottom: 20px;
}

.waveform-box .bar {
  width: 5px;
  background: var(--gold-primary);
  border-radius: 3px;
  animation: wavePulse 1.2s ease-in-out infinite alternate;
}

.bar-1 { height: 15px; animation-delay: 0.1s; }
.bar-2 { height: 28px; animation-delay: 0.3s; }
.bar-3 { height: 35px; animation-delay: 0.5s; }
.bar-4 { height: 20px; animation-delay: 0.2s; }
.bar-5 { height: 30px; animation-delay: 0.4s; }

@keyframes wavePulse {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1); }
}

.app-player-controls {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-bottom: 16px;
}

.ctrl-btn {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.1rem;
  cursor: pointer;
}

.ctrl-btn.play-main {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold-primary);
  color: #050b14;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-ambient-pill {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--emerald-primary);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.75rem;
  text-align: center;
  color: #a7f3d0;
}

/* View: Adhan */
.adhan-banner {
  text-align: center;
  padding: 16px 0;
}

.arabic-calligraphy {
  font-family: var(--font-arabic);
  font-size: 1.8rem;
  color: var(--gold-light);
}

.adhan-banner h2 {
  font-size: 1.2rem;
  margin: 6px 0;
}

.prayer-time-clock {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--emerald-primary);
}

.prayer-location {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.prayer-schedule-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.schedule-row.active-row {
  background: rgba(212, 175, 55, 0.18);
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  font-weight: 700;
}

/* View: Browse */
.app-header-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  padding: 10px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  font-size: 0.8rem;
}

.app-header-search input {
  background: none;
  border: none;
  color: var(--text-main);
  outline: none;
  width: 100%;
}

.surah-list-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.surah-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
}

.surah-num {
  width: 28px;
  height: 28px;
  background: var(--gold-primary);
  color: #050b14;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.surah-details {
  flex-grow: 1;
}

.surah-details h4 {
  font-size: 0.85rem;
}

.surah-details span {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.arabic-name {
  font-family: var(--font-arabic);
  color: var(--gold-light);
  font-size: 1.1rem;
}

/* View: Ambient Grid */
.ambient-header {
  text-align: center;
  margin-bottom: 20px;
}

.ambient-header h3 { font-size: 1.1rem; }
.ambient-header p { font-size: 0.75rem; color: var(--text-muted); }

.ambient-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ambient-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}

.ambient-card i {
  font-size: 1.5rem;
  color: var(--gold-primary);
}

.ambient-card.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald-primary);
}

/* Features Grid */
.features-section {
  padding: 100px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.feature-card {
  padding: 36px 28px;
  text-align: left;
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
}

.gold-icon {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
  border: 1px solid var(--border-glass);
}

.emerald-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #a7f3d0;
  border: 1px solid var(--border-glow);
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

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

/* Live Audio Sampler */
.audio-sampler-section {
  padding: 80px 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.sampler-container {
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.sampler-info {
  max-width: 480px;
}

.sampler-info h2 {
  font-size: 2.2rem;
  margin: 16px 0;
}

.sampler-toggles {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.toggle-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 30px;
  font-size: 0.85rem;
  cursor: pointer;
}

.toggle-chip.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald-primary);
  color: #a7f3d0;
}

.sampler-player {
  background: rgba(5, 11, 20, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 320px;
}

.player-disk {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold-primary);
  color: #050b14;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.player-details h4 {
  font-size: 1rem;
}

.reciter-name {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-play-large {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  padding: 0;
  margin-left: auto;
}

/* Gallery Section */
.gallery-section {
  padding: 100px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.gallery-item {
  overflow: hidden;
}

.mockup-header {
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border-glass);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-light);
}

.mockup-body {
  height: 240px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.home-preview .hero-card-preview {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(212, 175, 55, 0.2));
  border-radius: var(--radius-md);
  width: 100%;
}

.quick-surah-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  font-size: 0.75rem;
}

.adhan-overlay-preview {
  text-align: center;
}

.adhan-overlay-preview h2 {
  font-family: var(--font-arabic);
  font-size: 2rem;
  color: var(--gold-light);
}

/* Download Section */
.download-section {
  padding: 100px 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.download-card {
  padding: 60px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.glow-border {
  border-color: var(--gold-primary);
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.2);
}

.download-content h2 {
  font-size: 2.8rem;
  margin-bottom: 16px;
}

.download-content p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 40px;
}

.download-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

.version-badge {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-glass);
  padding: 60px 24px 30px;
  background: #03070d;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  text-align: center;
}

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

.footer-links {
  display: flex;
  gap: 24px;
}

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

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
  .nav-links { display: none; }
  .sampler-container { flex-direction: column; }
}
