/* Design Tokens */
:root {
  --bg: #050508;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.15);
  
  --text: #f1f1f5;
  --text-muted: #8e8e9c;
  
  /* Primary brand colors */
  --tiktok-pink: #fe2c55;
  --tiktok-cyan: #25f4ee;
  --accent: #fe2c55; /* Dynamic accent */
  --accent-rgb: 254, 44, 85;
  
  --btn-gradient: linear-gradient(135deg, #fe2c55 0%, #17b9b4 100%);
  --glow-gradient: linear-gradient(135deg, rgba(254, 44, 85, 0.35) 0%, rgba(37, 244, 238, 0.35) 100%);
  
  --font-primary: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;
  
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Global resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

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

/* Background Glow Effects */
.glow-bg {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(150px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
}

.glow-1 {
  top: -100px;
  right: -50px;
  background: var(--tiktok-pink);
}

.glow-2 {
  top: 600px;
  left: -150px;
  background: var(--tiktok-cyan);
}

/* Layout Utilities */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  background: rgba(5, 5, 8, 0.75);
}

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

.logo {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  text-decoration: none;
  letter-spacing: -1.5px;
  background: linear-gradient(to right, #fff, #a2a2bd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

.logo::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tiktok-pink);
  bottom: 6px;
  right: -12px;
  box-shadow: 0 0 10px var(--tiktok-pink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a:hover {
  color: #fff;
}

.nav-btn-tg {
  background: rgba(41, 167, 230, 0.1);
  border: 1px solid rgba(41, 167, 230, 0.2);
  color: #29a7e6 !important;
  padding: 8px 16px;
  border-radius: 50px;
}

.nav-btn-tg:hover {
  background: #29a7e6 !important;
  color: #fff !important;
  box-shadow: 0 0 15px rgba(41, 167, 230, 0.4);
}

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

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 80px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(254, 44, 85, 0.1);
  border: 1px solid rgba(254, 44, 85, 0.25);
  color: var(--tiktok-pink);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 25px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 58px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 24px;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 540px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 50px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--btn-gradient);
  color: #000;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  gap: 16px;
  box-shadow: 0 8px 30px rgba(254, 44, 85, 0.3);
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(254, 44, 85, 0.45);
}

.btn-icon {
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.btn-title {
  font-size: 16px;
  color: #000;
}

.btn-subtext {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.6);
  font-weight: 500;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: #fff;
  text-decoration: none;
  padding: 16px 28px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 15px;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
}

.hero-stats {
  display: flex;
  gap: 40px;
  border-top: 1px solid var(--border);
  padding-top: 35px;
}

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

.stat-val {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: #fff;
}

.stat-lbl {
  color: var(--text-muted);
  font-size: 13px;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Floating Info Cards */
.floating-card {
  position: absolute;
  background: rgba(10, 10, 15, 0.7);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10;
  animation: float 4s ease-in-out infinite;
}

.fc-1 {
  top: 15%;
  left: -20px;
}

.fc-2 {
  bottom: 20%;
  right: -20px;
  animation-delay: 2s;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.fc-icon {
  width: 40px;
  height: 40px;
  background: rgba(254, 44, 85, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tiktok-pink);
  font-size: 18px;
}

.fc-2 .fc-icon {
  background: rgba(37, 244, 238, 0.15);
  color: var(--tiktok-cyan);
}

.floating-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.floating-card p {
  color: var(--text-muted);
  font-size: 11px;
}

/* Phone Frame Mockup */
.phone-frame {
  width: 290px;
  height: 580px;
  background: #000;
  border-radius: 40px;
  border: 8px solid #1c1c1e;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.7),
    0 0 0 2px rgba(255, 255, 255, 0.05),
    0 0 40px rgba(var(--accent-rgb), 0.15);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.phone-speaker {
  width: 90px;
  height: 20px;
  background: #1c1c1e;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: #08080a;
  display: flex;
  flex-direction: column;
  padding-top: 20px;
}

/* App Header Mockup */
.mock-app-header {
  height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.mock-app-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  font-family: var(--font-primary);
}

.mock-back-btn {
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

/* App Content Mockup */
.mock-app-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.mock-app-content::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari */
}

.mock-category-title {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 16px 16px 6px;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.mock-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  font-size: 13px;
  transition: background 0.2s;
}

.mock-item.actionable {
  cursor: pointer;
}

.mock-item.actionable:hover {
  background: rgba(255, 255, 255, 0.05);
}

.mock-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.item-icon {
  width: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.item-arrow {
  color: rgba(255, 255, 255, 0.15);
  font-size: 10px;
}

.mock-flag {
  font-size: 14px;
}

/* Mock Switches and Radios */
.mock-switch {
  width: 32px;
  height: 18px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  position: relative;
  transition: background 0.3s;
}

.mock-switch::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.mock-switch.active {
  background: var(--tiktok-pink);
}

.mock-switch.active::after {
  transform: translateX(14px);
}

.mock-radio {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mock-radio.active {
  border-color: var(--tiktok-pink);
}

.mock-radio-dot {
  width: 8px;
  height: 8px;
  background: var(--tiktok-pink);
  border-radius: 50%;
}

.badge-beta {
  background: rgba(255, 159, 10, 0.15);
  color: #ff9f0a;
  font-size: 8px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  margin-left: 5px;
  vertical-align: middle;
}

/* App Footer Mockup */
.mock-app-footer {
  padding: 30px 16px 20px;
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
}

.mock-app-footer p:first-child {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 2px;
}

.mock-legal-trigger {
  color: var(--text-muted);
  text-decoration: underline;
  margin-top: 8px;
  display: inline-block;
}

/* Customizer Section */
.customizer-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 24px;
  border-top: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.customizer-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 70px;
  align-items: center;
}

.config-controls {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 35px;
  backdrop-filter: blur(10px);
}

.controls-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 15px;
}

.control-box {
  margin-bottom: 30px;
}

.control-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.color-palette {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.color-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.color-dot:hover {
  transform: scale(1.1);
}

.color-dot.active {
  border-color: #fff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.color-desc {
  font-size: 12px;
  color: var(--text-muted);
}

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

.control-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 16px 20px;
  border-radius: 16px;
  transition: var(--transition);
}

.control-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.control-card-info h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.control-card-info p {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 340px;
}

/* Switch Toggle Styling */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

input:checked + .slider {
  background-color: var(--accent);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

.config-preview {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Features Section */
.features-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 24px;
  border-top: 1px solid var(--border);
}

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

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 35px;
  transition: var(--transition);
}

.feature-card:hover {
  background: var(--card-hover);
  border-color: var(--border-hover);
  transform: translateY(-5px);
}

.f-card-icon {
  width: 50px;
  height: 50px;
  background: rgba(254, 44, 85, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tiktok-pink);
  font-size: 22px;
  margin-bottom: 25px;
}

.feature-card:nth-child(2n) .f-card-icon {
  background: rgba(37, 244, 238, 0.1);
  color: var(--tiktok-cyan);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Footer Section */
footer {
  background: #020204;
  border-top: 1px solid var(--border);
  padding: 80px 24px 40px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand .logo {
  display: inline-block;
  margin-bottom: 15px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

.footer-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 30px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.copyright {
  color: var(--text-muted);
  font-size: 13px;
}

.legal-text {
  color: var(--text-muted);
  font-size: 11px;
  max-width: 700px;
  line-height: 1.5;
  text-align: right;
}

/* Dynamic Class Application (by script) */
.brand-accent {
  color: var(--accent) !important;
}

.brand-bg {
  background-color: var(--accent) !important;
}

.brand-border-accent {
  border-color: var(--accent) !important;
}

/* Responsiveness */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 60px;
    text-align: center;
  }
  
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .customizer-container {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  
  .config-preview {
    order: -1;
  }
  
  .legal-text {
    text-align: left;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 40px;
  }
  
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-primary, .btn-secondary {
    width: 100%;
    justify-content: center;
  }
  
  .floating-card {
    display: none;
  }
}
