/* ============================================
   OPENLYS.APP - ULTRA PREMIUM UI STYLES
   Inspired by Opus Pro, ClipCut, InVideo
   Premium SaaS aesthetic for clip generators
   ============================================ */

/* ===== ENHANCED HERO SECTION ===== */

.hero {
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 30% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
  animation: heroGlow 15s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroGlow {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, 2%) rotate(1deg); }
  66% { transform: translate(-1%, -1%) rotate(-0.5deg); }
}

/* ===== ENHANCED PRICING CARDS ===== */

.pricing-section {
  position: relative;
  padding: 80px 0 100px;
  background: 
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
}

.pricing-grid {
  display: grid;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

/* 3 column grid for monthly plans */
#monthly-plans {
  grid-template-columns: repeat(3, 1fr);
}

/* 2 column grid for lifetime plans (centered) */
#lifetime-plans {
  grid-template-columns: repeat(2, 1fr);
  max-width: 700px;
}

@media (max-width: 900px) {
  #monthly-plans,
  #lifetime-plans {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
}

.pricing-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.01) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 32px 28px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.pricing-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.3) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(59, 130, 246, 0.3) 100%
  );
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.pricing-card:hover {
  transform: translateY(-12px) scale(1.02);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(139, 92, 246, 0.2);
}

.pricing-card:hover::before {
  opacity: 1;
}

/* Highlighted/Popular Card */
.pricing-card.pricing-highlight,
.pricing-card.highlight {
  border: 2px solid rgba(139, 92, 246, 0.6);
  background: linear-gradient(
    180deg,
    rgba(139, 92, 246, 0.08) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  transform: scale(1.03);
  box-shadow: 
    0 0 40px rgba(139, 92, 246, 0.15),
    0 20px 40px -10px rgba(0, 0, 0, 0.4);
}

.pricing-card.pricing-highlight:hover,
.pricing-card.highlight:hover {
  transform: translateY(-12px) scale(1.05);
  box-shadow: 
    0 0 80px rgba(139, 92, 246, 0.25),
    0 30px 60px -15px rgba(0, 0, 0, 0.5);
}

/* Popular Badge */
.popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  color: white;
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 
    0 4px 20px rgba(139, 92, 246, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  z-index: 10;
}

/* Pricing Card Header */
.pricing-card .card-header h3,
.pricing-card h3:first-of-type {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.pricing-card .price,
.pricing-card .pricing-price .amount {
  font-size: 3.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.pricing-card .price span,
.pricing-card .pricing-price .period {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  -webkit-text-fill-color: var(--text-muted);
}

.price-compare {
  font-size: 0.9rem;
  margin-top: 6px;
}

.price-compare s {
  color: var(--text-muted);
}

/* Features List */
.features-list,
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  text-align: left;
}

.features-list li,
.pricing-features li {
  padding: 8px 0;
  padding-left: 40px !important; /* Increased padding + !important to enforce no overlap */
  position: relative;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color 0.2s ease;
  line-height: 1.5;
}

.features-list li::before,
.pricing-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 8px; /* Align with text */
  font-weight: 700;
  font-size: 1.1rem;
  color: #10b981;
}

.features-list li:hover,
.pricing-features li:hover {
  color: var(--text-primary);
}

.features-list li::before,
.pricing-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  font-weight: 700;
  font-size: 1rem;
  color: #10b981;
}

/* CTA Button in Pricing */
.pricing-card .btn {
  width: 100%;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pricing-card .btn-primary {
  background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  box-shadow: 
    0 4px 15px rgba(139, 92, 246, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.pricing-card .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(139, 92, 246, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.pricing-card .btn-outline {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.pricing-card .btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

/* ===== PRICING TOGGLE PREMIUM ===== */

.pricing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}

.pricing-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 8px 16px;
  border-radius: 8px;
}

.pricing-label:hover {
  color: var(--text-secondary);
}

.pricing-label.active {
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.1);
}

.save-badge {
  display: inline-block;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-left: 6px;
  vertical-align: middle;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 56px;
  height: 30px;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.4s ease;
  border-radius: 30px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: white;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

input:checked + .toggle-slider {
  background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  border-color: transparent;
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

/* ===== ENHANCED BUTTONS ===== */

.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: 0.5s;
}

.btn-primary:hover::after {
  left: 100%;
}

/* ===== FEATURE CARDS PREMIUM ===== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 32px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.01) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(139, 92, 246, 0.1);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: inline-block;
}

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

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* ===== FAQ SECTION PREMIUM ===== */

.faq-section {
  padding: 80px 0;
}

.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(139, 92, 246, 0.3);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
}

.faq-question:hover {
  color: var(--accent-secondary);
}

.faq-icon {
  font-size: 1.5rem;
  color: var(--accent-primary);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 200px;
  padding: 0 24px 20px;
}

.faq-answer p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== TRUST BADGES ===== */

.trust-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  padding: 40px 0;
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.trust-badge svg,
.trust-badge span.icon {
  font-size: 1.5rem;
  color: var(--accent-secondary);
}

/* ===== LIGHT THEME OVERRIDES ===== */

[data-theme="light"] .pricing-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(248, 250, 252, 0.95) 100%
  );
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .pricing-card:hover {
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.15),
    0 0 40px rgba(139, 92, 246, 0.1);
}

[data-theme="light"] .pricing-card.pricing-highlight,
[data-theme="light"] .pricing-card.highlight {
  border-color: rgba(139, 92, 246, 0.5);
  background: linear-gradient(
    180deg,
    rgba(139, 92, 246, 0.05) 0%,
    rgba(255, 255, 255, 0.95) 100%
  );
}

[data-theme="light"] .pricing-card .price,
[data-theme="light"] .pricing-card .pricing-price .amount {
  background: linear-gradient(135deg, #1a1a2e 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light"] .toggle-slider {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .pricing-section {
  background: 
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
}
