/* style.css */

/* Core Variables & Theming */
:root {
  /* Colors - Dark Cyber/Glass Theme */
  --bg-primary: #050505;
  --bg-secondary: #0a0a0c;

  /* Accents */
  --accent-primary: #8a2be2;
  --accent-secondary: #ff007f;
  --accent-tertiary: #4169e1;
  --gradient-main: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  --gradient-text: linear-gradient(to right, #fff, #a0a0b0);

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  --glass-blur: blur(16px);

  /* Effects */
  --shadow-glow: 0 0 20px rgba(138, 43, 226, 0.3);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  /* Typography */
  --font-sans: 'Outfit', sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Typography styles */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.2;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

.text-gradient {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.highlight {
  color: var(--accent-primary);
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

/* Background Animation */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  filter: blur(80px);
  opacity: 0.4;
  border-radius: 50%;
  animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
  animation-delay: 0s;
}

.blob-2 {
  bottom: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
  animation-delay: -5s;
}

.blob-3 {
  top: 40%;
  left: 30%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, var(--accent-tertiary) 0%, transparent 70%);
  opacity: 0.2;
  animation-duration: 25s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(5%, 10%) scale(1.1);
  }

  66% {
    transform: translate(-5%, 5%) scale(0.9);
  }

  100% {
    transform: translate(5%, -5%) scale(1);
  }
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* UI Components */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
}

.interactive {
  transition: var(--transition-smooth);
}

.interactive:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), var(--shadow-glow);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 1200px;
  z-index: 100;
  border-radius: 100px;
  padding: 12px 24px;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-icon {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
}

.nav-links a:hover {
  color: var(--accent-primary);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.mobile-menu-toggle:hover {
  color: var(--accent-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-main);
  transition: var(--transition-fast);
  border-radius: 2px;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
}

.hero-content {
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(138, 43, 226, 0.1);
  border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.5);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

h1 {
  font-size: clamp(3rem, 6vw, 5.5rem);
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Search Box */
.search-container {
  width: 100%;
  margin-top: 20px;
}

.search-box {
  display: flex;
  align-items: center;
  padding: 8px 8px 8px 24px;
  gap: 16px;
  border-radius: 100px;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

.search-icon {
  color: var(--text-secondary);
  font-size: 1.2rem;
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1.1rem;
  min-width: 0;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.btn-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 100px;
  background: var(--gradient-main);
  color: white;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
  animation: buttonPulse 3s infinite;
  position: relative;
  overflow: hidden;
}

@keyframes buttonPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(138, 43, 226, 0.4);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(138, 43, 226, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(138, 43, 226, 0);
  }
}

.btn-primary::before {
  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::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(138, 43, 226, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.search-tips {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.tip-tag {
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.tip-tag:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* Sections */
section {
  padding: 80px 0;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: clamp(25px, 5vw, 40px);
}

/* Results Section */
.results-section {
  min-height: 400px;
  padding-top: 0;
}

.hidden {
  display: none !important;
}

.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  gap: 20px;
  color: var(--text-secondary);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--accent-primary);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.result-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px;
  gap: 16px;
}

.result-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #111;
}

.result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.result-card:hover .result-thumb img {
  transform: scale(1.05);
}

.duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.result-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.result-title {
  font-size: 1.1rem;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.result-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

.btn-download {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.btn-download:hover {
  background: rgba(138, 43, 226, 0.2);
  border-color: rgba(138, 43, 226, 0.5);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-play {
  background: var(--gradient-main);
  border: none;
  animation: buttonPulse 4s infinite;
}

.btn-play:hover {
  background: var(--gradient-main);
  filter: brightness(1.2);
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 60px;
}

.info-card {
  padding: 40px 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.card-icon-wrapper {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(138, 43, 226, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.card-icon {
  font-size: 1.8rem;
  color: var(--accent-primary);
}

.info-card h3 {
  font-size: clamp(1.2rem, 3vw, 1.4rem);
}

.info-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.content-block {
  padding: 60px;
  text-align: left;
}

.content-block:not(.glass-panel) {
  padding: 40px 0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.content-block h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 24px;
}

.content-block p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1.1rem;
}

/* Steps Section */
.steps-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  transition: var(--transition-smooth);
}

.step-item:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateX(10px);
  border-color: rgba(138, 43, 226, 0.3);
}

.step-num {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

.step-content h4 {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  margin-bottom: 8px;
}

.step-content p {
  color: var(--text-secondary);
}

/* Footer */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 60px 0 20px;
  margin-top: 80px;
  background: rgba(0, 0, 0, 0.5);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-brand p {
  color: var(--text-muted);
  margin-top: 10px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Animations Classes */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  animation-delay: 0.1s;
  transition-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
  transition-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
  transition-delay: 0.3s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  padding: 16px 24px;
  border-radius: 12px;
  background: rgba(10, 10, 12, 0.9);
  backdrop-filter: blur(10px);
  border-left: 4px solid var(--accent-primary);
  color: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(120%);
  animation: slideIn 0.3s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.error {
  border-left-color: #ff3333;
}

.toast.success {
  border-left-color: #00cc66;
}

.toast.hiding {
  animation: slideOut 0.3s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
  to {
    transform: translateX(0);
  }
}

@keyframes slideOut {
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .info-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
  }

  .content-block {
    padding: 40px 25px;
  }

  .hero-section {
    padding-top: 120px;
  }
}

@media (max-width: 600px) {
  .navbar {
    width: calc(100% - 20px);
    padding: 10px 15px;
    z-index: 1000;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(10, 5, 20, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 20px 0;
    border-radius: 0 0 16px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
  }

  .nav-links.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 12px 20px;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .logo span {
    font-size: 1.2rem;
  }

  .hero-section {
    padding-top: 80px;
  }

  .search-box {
    border-radius: 16px;
    flex-direction: column;
    padding: 12px;
    gap: 12px;
    width: 95%;
    margin: 0 auto;
  }

  .search-input {
    font-size: 0.95rem;
    text-align: center;
  }

  .search-input::placeholder {
    font-size: 0.85rem;
  }

  .search-icon {
    display: none;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
    border-radius: 12px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .footer-links {
    flex-direction: column;
    gap: 15px;
  }

  /* Full mobile responsiveness overrides */
  .results-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 10px;
  }

  .step-item {
    flex-direction: column;
    text-align: center;
    padding: 20px 15px;
    gap: 15px;
    border-radius: 16px;
  }

  .info-card {
    padding: 25px 15px;
    border-radius: 16px;
  }

  .content-block {
    padding: 25px 15px;
    border-radius: 16px;
  }

  .content-block:not(.glass-panel) {
    padding: 15px 10px;
  }

  .modal-content {
    padding: 15px;
    border-radius: 12px;
  }
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  width: 100%;
  max-width: 900px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition-fast);
}

.close-btn:hover {
  background: var(--accent-secondary);
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  /* 16:9 Aspect Ratio */
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}