:root {
  --primary: #7c3aed;
  --primary-glow: rgba(124, 58, 237, 0.4);
  --secondary: #2dd4bf;
  --bg-dark: #0a0b10;
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-dim: #94a3b8;
  --gradient: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
  --container-max: 1100px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
.logo-text {
  font-family: "Montserrat", sans-serif;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.hidden {
  display: none !important;
}

/* Background Glow Effects */
.glow-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.glow-bg::before {
  content: "";
  position: absolute;
  top: -20%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(
    circle,
    rgba(124, 58, 237, 0.15) 0%,
    transparent 60%
  );
  filter: blur(80px);
}

.glow-bg::after {
  content: "";
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(
    circle,
    rgba(45, 212, 191, 0.1) 0%,
    transparent 60%
  );
  filter: blur(80px);
}

/* Navbar */
header {
  height: 80px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-icon {
  color: var(--secondary);
  font-size: 1.8rem;
  display: flex;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dim);
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--text-main);
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-download {
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-download {
  width: 100%;
  justify-content: center;
  background: var(--secondary);
  color: #0d1117;
  font-size: 1.1rem;
  margin-top: 1.5rem;
}

.btn-download:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

/* Hero Section */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
}

.hero-content h1 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  letter-spacing: -2px;
  line-height: 1.1;
}

.gradient-text {
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* Search Container */
.search-container {
  max-width: 700px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 0.6rem;
  border-radius: 20px;
  display: flex;
  gap: 0.6rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  padding-left: 1rem;
}

.input-icon {
  font-size: 1.4rem;
  color: var(--text-dim);
}

.search-container input {
  width: 100%;
  background: transparent;
  border: none;
  padding: 1rem;
  color: white;
  font-size: 1.1rem;
  outline: none;
}

/* Result Card */
.result-card {
  max-width: 800px;
  margin: 4rem auto 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 2rem;
  display: flex;
  gap: 2rem;
  text-align: left;
  backdrop-filter: blur(20px);
  animation: slideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.thumbnail-wrapper {
  position: relative;
  width: 320px;
  height: 180px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
}

.thumbnail-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

.video-info {
  flex: 1;
}

.video-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}

.video-info p {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}



/* Features */
.features {
  padding: 8rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title h2 {
  font-size: 2.5rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 3rem 2rem;
  border-radius: 24px;
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feat-icon {
  font-size: 2.5rem;
  color: var(--secondary);
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.feature-card p {
  color: var(--text-dim);
}

/* Footer */
footer {
  padding: 4rem 0;
  border-top: 1px solid var(--card-border);
  margin-top: 4rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
}

.socials {
  display: flex;
  gap: 1.5rem;
}

.socials a {
  color: var(--text-dim);
  font-size: 1.5rem;
  transition: color 0.3s;
}

.socials a:hover {
  color: var(--text-main);
}



/* Apisyu Container */
.apisyu-container {
    margin-top: 1.5rem;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(0,0,0,0.2);
    padding: 1.5rem;
    border: 1px solid var(--card-border);
}

.download-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.download-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.download-header ion-icon {
    font-size: 1.5rem;
    color: var(--secondary);
}

.apisyu-widget {
    width: 100%;
    min-height: 500px;
    border-radius: 12px;
    overflow: hidden;
}

.apisyu-widget iframe {
    width: 100%;
    height: 500px;
    border: none;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
}

/* Hide thumbnail and video details, but keep download widget */
.thumbnail-wrapper {
    display: none;
}

#videoTitle,
#videoAuthor {
    display: none;
}

.apisyu-link-container {
    flex: 1;
    max-width: 100%;
    margin: 0 auto;
}

.download-arrow {
    font-size: 1.25rem;
    color: var(--text-dim);
    transition: transform 0.3s;
}

.download-card:hover .download-arrow {
    transform: translateX(4px);
    color: var(--text-main);
}

/* Engine Selector Styles */
.engine-selector { 
    display: flex; 
    gap: 8px; 
    margin-bottom: 12px; 
    justify-content: center; 
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.engine-btn { 
    padding: 8px 16px; 
    border-radius: 8px; 
    border: 1px solid rgba(255,255,255,0.1); 
    background: rgba(255,255,255,0.05); 
    color: white; 
    cursor: pointer; 
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.engine-btn.active { 
    background: var(--primary); 
    border-color: var(--primary);
    box-shadow: 0 4px 15px var(--primary-glow);
    transform: translateY(-1px);
}

.engine-btn:hover:not(.active) {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

/* Status Message */
.status-msg {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-dim);
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .search-container {
    flex-direction: column;
    padding: 1.5rem;
  }
  .btn-primary {
    width: 100%;
    justify-content: center;
  }
  .result-card {
    flex-direction: column;
    padding: 1.5rem;
  }
  .thumbnail-wrapper {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }
  .nav-links {
    display: none;
  }
  .footer-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
  
  .download-card {
    padding: 0.875rem 1rem;
  }
  
  .download-icon {
    width: 42px;
    height: 42px;
    font-size: 1.25rem;
  }
  
  .download-title {
    font-size: 0.95rem;
  }
  
  .download-desc {
    font-size: 0.8rem;
  }
}
