@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  /* HSL Tailored Color Palette */
  --bg-primary: 260, 24%, 4%;     /* #09070d */
  --bg-secondary: 260, 20%, 8%;   /* #120e1a */
  --bg-surface: 260, 16%, 12%;    /* #1a1526 */
  
  --accent-pink: 345, 100%, 58%;  /* #ff2a5f */
  --accent-pink-glow: 345, 100%, 58%, 0.35;
  --accent-purple: 270, 95%, 60%; /* #9b30ff */
  --accent-green: 150, 100%, 45%; /* #00e676 */
  
  --text-primary: 0, 0%, 100%;     /* #ffffff */
  --text-secondary: 260, 15%, 75%; /* #bab5c6 */
  --text-muted: 260, 10%, 50%;     /* #7f7a8c */
  
  --border-glass: 255, 255, 255, 0.08;
  --border-glow: 345, 100%, 58%, 0.2;
  
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-elastic: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Reset and Core Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: hsl(var(--bg-primary));
  background-image: 
    radial-gradient(circle at 10% 20%, hsla(var(--accent-purple), 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, hsla(var(--accent-pink), 0.08) 0%, transparent 40%);
  background-attachment: fixed;
  color: hsl(var(--text-primary));
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: hsl(var(--bg-primary));
}
::-webkit-scrollbar-thumb {
  background: hsla(var(--text-muted), 0.3);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: hsla(var(--accent-pink), 0.5);
}

/* App Layout Shell - Optimized for mobile viewports */
.app-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 500px; /* Force premium mobile phone container width on desktop */
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 16px 120px 16px; /* Huge bottom padding to clear floating CTA */
  position: relative;
  background-color: hsla(var(--bg-primary), 0.7);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  border-left: 1px solid hsla(var(--border-glass), 0.5);
  border-right: 1px solid hsla(var(--border-glass), 0.5);
}

/* Navigation / Header Section */
header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid hsla(var(--border-glass), 0.7);
  margin-bottom: 24px;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-heart {
  font-size: 1.5rem;
  color: hsl(var(--accent-pink));
  filter: drop-shadow(0 0 6px hsla(var(--accent-pink), 0.6));
  animation: logo-pulse 1.6s infinite alternate cubic-bezier(0.4, 0, 0.6, 1);
}

.logo-text {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 30%, hsla(var(--text-secondary), 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.2);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #00e676;
}

.status-dot {
  width: 6px;
  height: 6px;
  background-color: hsl(var(--accent-green));
  border-radius: 50%;
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: hsl(var(--accent-green));
  border-radius: 50%;
  animation: pulse-ring 1.8s infinite;
}

/* Language Selection Drawer/Dropdown */
.lang-switcher-container {
  position: relative;
  z-index: 100;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: hsla(var(--bg-surface), 0.6);
  border: 1px solid hsla(var(--border-glass), 1);
  color: hsl(var(--text-primary));
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.lang-btn:hover {
  background: hsla(var(--bg-surface), 0.9);
  border-color: hsla(var(--accent-pink), 0.5);
  box-shadow: 0 0 10px hsla(var(--accent-pink), 0.15);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: hsla(var(--bg-surface), 0.95);
  border: 1px solid hsla(var(--border-glass), 1);
  border-radius: 12px;
  padding: 6px;
  min-width: 140px;
  display: none;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  animation: dropdown-fade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: hsl(var(--text-secondary));
  cursor: pointer;
  transition: var(--transition-smooth);
}

.lang-option:hover {
  background: hsla(var(--accent-pink), 0.1);
  color: hsl(var(--text-primary));
}

.lang-option.selected {
  color: hsl(var(--accent-pink));
  background: hsla(var(--accent-pink), 0.05);
  font-weight: 700;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 28px;
  width: 100%;
}

.hero-tag {
  display: inline-block;
  background: linear-gradient(90deg, hsla(var(--accent-pink), 0.1), hsla(var(--accent-purple), 0.1));
  border: 1px solid hsla(var(--accent-pink), 0.25);
  color: hsl(var(--accent-pink));
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 6px 14px;
  border-radius: 30px;
  margin-bottom: 12px;
  box-shadow: 0 0 15px hsla(var(--accent-pink), 0.05);
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 40%, hsla(var(--text-secondary), 0.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: hsl(var(--text-secondary));
  max-width: 90%;
  margin: 0 auto;
}

/* Infinite Scrolling Marquee Profiles */
.marquee-container {
  width: calc(100% + 32px); /* Stretch past container padding */
  margin-left: -16px;
  margin-right: -16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
  padding: 10px 0;
  position: relative;
}

/* Dark fading edges for marquee */
.marquee-container::before,
.marquee-container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 48px;
  z-index: 10;
  pointer-events: none;
}
.marquee-container::before {
  left: 0;
  background: linear-gradient(to right, hsl(var(--bg-primary)) 10%, transparent 100%);
}
.marquee-container::after {
  right: 0;
  background: linear-gradient(to left, hsl(var(--bg-primary)) 10%, transparent 100%);
}

.marquee-track {
  display: flex;
  gap: 14px;
  width: max-content;
}

.marquee-track-left {
  animation: scroll-left 25s linear infinite;
}

.marquee-track-right {
  animation: scroll-right 25s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

/* Glassmorphism Profile Cards */
.profile-card {
  width: 140px;
  height: 200px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: hsla(var(--bg-surface), 0.4);
  border: 1px solid hsla(var(--border-glass), 0.7);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  transition: var(--transition-elastic);
  cursor: pointer;
}

.profile-card:hover {
  transform: translateY(-8px) scale(1.03);
  border-color: hsla(var(--accent-pink), 0.4);
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.6),
    0 0 20px hsla(var(--accent-pink), 0.15);
}

.profile-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-card.loaded-fallback {
  border-color: hsla(var(--border-glass), 0.5);
}

/* Custom dynamic overlay inside standard fallback CSS */
.profile-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(9, 7, 13, 0.95) 0%, rgba(9, 7, 13, 0.4) 60%, transparent 100%);
  padding: 12px 10px 10px 10px;
  display: flex;
  flex-direction: column;
}

.profile-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: hsl(var(--text-primary));
  display: flex;
  align-items: center;
  gap: 4px;
}

.profile-badge {
  width: 6px;
  height: 6px;
  background-color: hsl(var(--accent-green));
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px hsl(var(--accent-green));
}

.profile-meta {
  font-size: 0.7rem;
  color: hsl(var(--text-secondary));
  margin-top: 2px;
}

/* Features Grid */
.features-section {
  width: 100%;
  margin-bottom: 32px;
}

.features-title {
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: -0.2px;
  color: hsl(var(--text-primary));
}

.features-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.feature-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: hsla(var(--bg-surface), 0.4);
  border: 1px solid hsla(var(--border-glass), 1);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.feature-card:hover {
  background: hsla(var(--bg-surface), 0.7);
  border-color: hsla(var(--accent-pink), 0.2);
}

.feature-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 42, 95, 0.08);
  border: 1px solid rgba(255, 42, 95, 0.2);
  border-radius: 12px;
  color: hsl(var(--accent-pink));
  font-size: 1.35rem;
  flex-shrink: 0;
}

.feature-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feature-headline {
  font-size: 0.95rem;
  font-weight: 700;
  color: hsl(var(--text-primary));
}

.feature-desc {
  font-size: 0.8rem;
  color: hsl(var(--text-secondary));
}

/* Thumbnail Section (Cloned Grid) */
.thumbnails-section {
  width: 100%;
  margin-bottom: 36px;
}

.thumbnails-title {
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: hsl(var(--text-primary));
}

.thumbnails-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
}

.thumbnail-wrapper {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid hsla(var(--border-glass), 0.6);
  background: hsla(var(--bg-surface), 0.5);
  transition: var(--transition-smooth);
  cursor: pointer;
}

.thumbnail-wrapper:hover {
  transform: scale(1.08);
  border-color: hsla(var(--accent-pink), 0.5);
  box-shadow: 0 4px 15px rgba(255, 42, 95, 0.2);
}

.thumbnail-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Installation Step-by-Step Accordion Guide */
.guide-section {
  width: 100%;
  background: hsla(var(--bg-surface), 0.3);
  border: 1px solid hsla(var(--border-glass), 0.8);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 12px;
}

.guide-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: hsl(var(--text-primary));
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-title::before {
  content: 'ℹ\FE0F';
  font-size: 1rem;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-item {
  display: flex;
  gap: 14px;
}

.step-num {
  font-size: 0.85rem;
  font-weight: 800;
  color: hsl(var(--accent-pink));
  background: rgba(255, 42, 95, 0.08);
  border: 1px solid rgba(255, 42, 95, 0.25);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-head {
  font-size: 0.9rem;
  font-weight: 700;
  color: hsl(var(--text-primary));
}

.step-body {
  font-size: 0.8rem;
  color: hsl(var(--text-secondary));
  line-height: 1.4;
}

/* Primary CTA Download Button Footer Box */
.download-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: linear-gradient(to top, rgba(9, 7, 13, 0.98) 30%, rgba(9, 7, 13, 0.85) 85%, transparent 100%);
  padding: 20px 24px 30px 24px;
  backdrop-filter: blur(12px);
  border-top: 1px solid hsla(var(--border-glass), 0.8);
  display: flex;
  justify-content: center;
}

.download-cta-inner {
  width: 100%;
  max-width: 450px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: linear-gradient(135deg, hsl(var(--accent-pink)) 0%, hsl(var(--accent-purple)) 100%);
  color: #ffffff;
  border: none;
  padding: 16px 28px;
  border-radius: 35px;
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 
    0 8px 24px hsla(var(--accent-pink), 0.35),
    inset 0 2px 2px rgba(255, 255, 255, 0.25);
  transition: var(--transition-elastic);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.download-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 30%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
  transform: skewX(-25deg);
  animation: shine-sweep 3s infinite ease-in-out;
}

.download-btn:hover {
  transform: scale(1.02) translateY(-2px);
  box-shadow: 
    0 12px 30px hsla(var(--accent-pink), 0.5),
    0 0 15px hsla(var(--accent-purple), 0.3);
}

.download-btn:active {
  transform: scale(0.98) translateY(1px);
}

.download-btn span {
  z-index: 2;
}

.download-subtext {
  font-size: 0.72rem;
  color: hsl(var(--text-muted));
  text-align: center;
  font-weight: 500;
}

/* Animations */
@keyframes logo-pulse {
  from {
    transform: scale(1);
    filter: drop-shadow(0 0 2px hsla(var(--accent-pink), 0.4));
  }
  to {
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px hsla(var(--accent-pink), 0.8));
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.9);
    opacity: 1;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

@keyframes dropdown-fade {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-50% - 7px)); /* Shift exactly half the track length including gaps */
  }
}

@keyframes scroll-right {
  0% {
    transform: translateX(calc(-50% - 7px));
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes shine-sweep {
  0% {
    left: -50%;
  }
  30% {
    left: 150%;
  }
  100% {
    left: 150%;
  }
}

/* Dynamic Content Transition Animation */
.lang-fade {
  animation: content-swap 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes content-swap {
  0% {
    opacity: 0;
    transform: translateY(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Scaling Adjustments */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.6rem;
  }
  .profile-card {
    width: 120px;
    height: 170px;
  }
  .thumbnails-grid {
    grid-template-columns: repeat(3, 1fr); /* Drop to 3 columns on ultra small screens */
  }
  .thumbnail-wrapper:last-child {
    display: none; /* Hide odd thumb to keep grid balanced */
  }
}

@media (min-width: 501px) {
  /* Center the floating footer relative to the mock container on wide screens */
  .download-cta-bar {
    left: 50%;
    right: auto;
    width: 500px;
    transform: translateX(-50%);
    border-left: 1px solid hsla(var(--border-glass), 0.8);
    border-right: 1px solid hsla(var(--border-glass), 0.8);
    border-radius: 24px 24px 0 0;
  }
}
