/* =============================================
   CapCut Pro Unlocker — Custom CSS
   Design System: #FF1744 / #0D0D0D / #1A1A1A
   Fonts: Inter (headings/body), JetBrains Mono (terminal)
   ============================================= */

/* ---- Base & Scrollbar ---- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: #0D0D0D;
  color: #FFFFFF;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #0D0D0D;
}
::-webkit-scrollbar-thumb {
  background: #2A2A2A;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #FF1744;
}

/* ---- Selection ---- */
::selection {
  background: rgba(255, 23, 68, 0.3);
  color: #FFFFFF;
}

/* ---- Keyframe Animations ---- */

/* Shake for input errors */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}
.shake {
  animation: shake 0.5s ease-in-out;
  border-color: #FF1744 !important;
  box-shadow: 0 0 0 2px rgba(255, 23, 68, 0.4) !important;
}

/* Blinking cursor for terminal */
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: #00E676;
  animation: blink 0.8s infinite;
  vertical-align: middle;
  margin-left: 1px;
}

/* Pulse glow for processing state */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 23, 68, 0.3); }
  50% { box-shadow: 0 0 24px rgba(255, 23, 68, 0.6); }
}
.pulse-glow-active {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Green pulse for completed stages */
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(0, 230, 118, 0); }
}
.pulse-green-active {
  animation: pulse-green 1.5s ease-out infinite;
}

/* Progress bar shimmer */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.progress-shimmer::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
}

/* Fade-in up for reveal animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* Success checkmark draw */
@keyframes draw-check {
  to { stroke-dashoffset: 0; }
}
.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: draw-check 0.6s ease-out forwards;
}
.checkmark-tick {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: draw-check 0.4s 0.4s ease-out forwards;
}

/* Slide down banner */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}
.slide-down {
  animation: slideDown 0.5s ease-out forwards;
}

/* Float animation for background particles */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
  50% { transform: translateY(-20px) rotate(180deg); opacity: 0.6; }
}

/* Grid background pattern */
.bg-grid-pattern {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Button glow on hover */
.btn-glow {
  box-shadow: 0 0 20px rgba(255, 23, 68, 0.3);
  transition: all 0.15s ease;
}
.btn-glow:hover {
  box-shadow: 0 0 32px rgba(255, 23, 68, 0.5);
  transform: scale(1.02);
}

/* ---- Terminal Styles ---- */
.terminal-window {
  background: #0E0E0E;
  border: 1px solid #2A2A2A;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  overflow: hidden;
}
.terminal-header {
  background: #1A1A1A;
  padding: 8px 16px;
  border-bottom: 1px solid #2A2A2A;
  display: flex;
  align-items: center;
  gap: 8px;
}
.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.terminal-body {
  padding: 16px;
  max-height: 320px;
  overflow-y: auto;
}
.terminal-body::-webkit-scrollbar {
  width: 4px;
}
.log-line {
  opacity: 0;
  animation: fadeInUp 0.3s ease-out forwards;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}
.log-info { color: #B0B0B0; }
.log-ok { color: #00E676; }
.log-warn { color: #FFB300; }
.log-error { color: #FF1744; }

/* ---- Particle Background ---- */
.particles-container {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  overflow: hidden;
}
.particle {
  position: absolute;
  background: rgba(255, 23, 68, 0.15);
  border-radius: 50%;
  animation: float linear infinite;
}

/* ---- Device Card Selection ---- */
.device-card {
  border: 2px solid #2A2A2A;
  transition: all 0.2s ease;
  cursor: pointer;
}
.device-card:hover {
  border-color: #FF1744;
  background: rgba(255, 23, 68, 0.05);
}
.device-card.selected {
  border-color: #FF1744;
  box-shadow: 0 0 16px rgba(255, 23, 68, 0.25);
  background: rgba(255, 23, 68, 0.08);
}

/* ---- Feature Toggle Cards ---- */
.feature-card {
  border: 2px solid #2A2A2A;
  transition: all 0.2s ease;
  cursor: pointer;
}
.feature-card:hover {
  border-color: #3A3A3A;
}
.feature-card.active {
  border-color: #FF1744;
  background: rgba(255, 23, 68, 0.06);
}

/* ---- Success Overlay ---- */
.success-overlay {
  transition: opacity 0.4s ease;
}

/* ---- CPA Locker Container ---- */
.locker-container {
  border: 2px solid rgba(255, 23, 68, 0.3);
  border-radius: 12px;
  background: #1A1A1A;
  min-height: 300px;
}

/* ---- Countdown Timer ---- */
.countdown-ring {
  position: relative;
}
.countdown-ring svg {
  transform: rotate(-90deg);
}

/* ---- Stats Counter ---- */
.counter-value {
  font-variant-numeric: tabular-nums;
}

/* ---- Testimonial Cards ---- */
.testimonial-card {
  background: #1A1A1A;
  border: 1px solid #2A2A2A;
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.testimonial-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ---- Activity Feed ---- */
.activity-feed {
  max-height: 200px;
  overflow-y: hidden;
}
.activity-item {
  animation: fadeInUp 0.4s ease-out;
}

/* ---- Toast Notification ---- */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #1A1A1A;
  border: 1px solid #00E676;
  color: #00E676;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  animation: slideDown 0.3s ease-out;
}

/* ---- Comparison Table ---- */
.comparison-table th,
.comparison-table td {
  padding: 12px 16px;
  text-align: center;
  border-bottom: 1px solid #2A2A2A;
}
.comparison-table th {
  font-weight: 700;
  color: #FFFFFF;
}
.comparison-table .check-col {
  color: #00E676;
}
.comparison-table .cross-col {
  color: #FF1744;
}

/* ---- FAQ Accordion ---- */
.faq-item {
  border: 1px solid #2A2A2A;
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}
.faq-question {
  background: #1A1A1A;
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  transition: background 0.2s ease;
}
.faq-question:hover {
  background: #222222;
}
.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #B0B0B0;
}
.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 16px 20px;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
}
.faq-icon {
  transition: transform 0.3s ease;
  color: #FF1744;
  font-size: 20px;
}

/* ---- Blog Styles ---- */
.blog-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.blog-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #FFFFFF;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.blog-content p {
  color: #B0B0B0;
  line-height: 1.8;
  margin-bottom: 1rem;
}
.blog-content ul,
.blog-content ol {
  color: #B0B0B0;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.blog-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}
.blog-content strong {
  color: #FFFFFF;
}
.blog-cta-box {
  background: linear-gradient(135deg, rgba(255, 23, 68, 0.1), rgba(255, 23, 68, 0.05));
  border: 1px solid rgba(255, 23, 68, 0.3);
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
}

/* ---- Mobile Nav Overlay ---- */
.mobile-nav {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(13, 13, 13, 0.98);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-nav.open {
  opacity: 1;
  pointer-events: all;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .terminal-body {
    max-height: 240px;
  }
  .terminal-window {
    font-size: 11px;
  }
  .feature-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 480px) {
  .terminal-body {
    max-height: 180px;
  }
  .terminal-window {
    font-size: 10px;
  }
  .feature-grid {
    grid-template-columns: 1fr !important;
  }
  .device-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}
