:root {
  --bg-color: #0c0d10;
  --panel-bg: rgba(255, 255, 255, 0.04);
  --panel-border: rgba(255, 255, 255, 0.1);
  --primary: #FF0000;
  /* YouTube Red */
  --primary-hover: #CC0000;
  --text-main: #FFFFFF;
  --text-muted: #888888;
  --glow-color: rgba(255, 0, 0, 0.2);

  --font-family: 'Outfit', sans-serif;
  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  /* Allow vertical scroll but no horizontal */
  line-height: 1.6;
}

/* Background Elements */
.background-elements {
  position: fixed;
  /* Keep background fixed during scroll */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
  background: radial-gradient(circle at center, #1a1b25 0%, #0f1015 100%);
}

.glow {
  position: absolute;
  width: 60vw;
  height: 60vw;
  background: var(--glow-color);
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.4;
  pointer-events: none;
}

.glow-1 {
  top: -10vh;
  left: -20vw;
}

.glow-2 {
  bottom: -10vh;
  right: -20vw;
  background: rgba(112, 161, 255, 0.08);
}

/* Premium Navigation */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(15, 16, 21, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--panel-border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.nav-links a:hover {
  color: var(--primary);
}

.btn-nav {
  background: var(--primary);
  color: #fff !important;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 15px rgba(255, 71, 87, 0.2);
}

.btn-nav:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 10px 20px rgba(255, 71, 87, 0.3);
}

/* Main Layout */
.app-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 2rem 5rem;
  /* Space for fixed nav */
  z-index: 1;
}

/* Hero Section */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  padding: 4rem 0 8rem;
  min-height: calc(100vh - 100px);
}

.hero-content {
  flex: 1;
  max-width: 650px;
}

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(255, 71, 87, 0.1);
  color: var(--primary);
  border: 1px solid rgba(255, 71, 87, 0.2);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 2rem;
  animation: slideIn 0.8s ease;
}

.hero-title {
  font-size: 4.5rem;
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 2rem;
  letter-spacing: -2px;
  animation: slideIn 0.8s ease 0.1s both;
}

.hero-title .accent {
  background: linear-gradient(135deg, var(--primary) 0%, #ff6b81 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Landing Sections */
.landing-section {
  padding: 8rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.section-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 5rem;
  text-align: center;
  letter-spacing: -1.5px;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.6) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* How It Works - Process Steps */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
}

.step-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  padding: 4rem 2.5rem;
  border-radius: var(--radius-lg);
  position: relative;
  transition: var(--transition);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.step-card:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-10px);
  border-color: rgba(255, 71, 87, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.step-num {
  font-size: 6rem;
  font-weight: 900;
  color: rgba(255, 71, 87, 0.05);
  /* Very subtle huge number */
  position: absolute;
  top: -10px;
  right: -10px;
  line-height: 1;
  pointer-events: none;
}

.step-card h3 {
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  color: #fff;
  font-weight: 700;
}

.step-card p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* FAQ Section */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2.5rem;
}

.faq-item {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--panel-border);
  border-left: 4px solid var(--primary);
  padding: 2.5rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.faq-item:hover {
  background: rgba(255, 255, 255, 0.03);
  transform: translateX(5px);
}

.faq-item h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #fff;
  font-weight: 600;
}

.faq-item p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Footer Section */
.main-footer {
  background: rgba(10, 11, 16, 0.95);
  padding: 6rem 2rem;
  border-top: 1px solid var(--panel-border);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.footer-logo i {
  color: var(--primary);
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 8px var(--glow-color));
}

.footer-logo span span {
  color: var(--primary);
}

.creator {
  display: block;
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 0.5rem;
  letter-spacing: 1px;
}

.footer-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  gap: 3rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links a:hover {
  color: #fff;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
    padding-top: 2rem;
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
    flex-direction: column;
    gap: 2rem;
  }

  .youtube-spinner {
    width: 300px;
    height: 300px;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 2.8rem;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 3rem;
  line-height: 1.6;
  max-width: 550px;
  animation: slideIn 0.8s ease 0.2s both;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 3rem;
  animation: slideIn 0.8s ease 0.3s both;
}

.hero-btn {
  padding: 1.25rem 2.5rem;
  font-size: 1.1rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
}

.stat {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.stat b {
  display: block;
  font-size: 1.2rem;
  color: var(--text-main);
}

.hero-visual {
  flex: 0.8;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 1.5s ease;
}

.aura-spinner {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 2px solid rgba(255, 71, 87, 0.1);
  border-top-color: var(--primary);
  animation: pulse-spin 6s linear infinite;
  box-shadow: inset 0 0 100px rgba(255, 71, 87, 0.05), 0 0 50px rgba(255, 71, 87, 0.1);
}

.hero-icon {
  position: absolute;
  width: 80px;
  height: 80px;
  color: var(--primary);
  filter: drop-shadow(0 0 20px var(--glow-color));
  animation: float 4s ease-in-out infinite;
}

@keyframes pulse-spin {
  0% {
    transform: rotate(0deg) scale(1);
    opacity: 0.8;
  }

  50% {
    transform: rotate(180deg) scale(1.1);
    opacity: 1;
  }

  100% {
    transform: rotate(360deg) scale(1);
    opacity: 0.8;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

.status-box {
  width: 100%;
  max-width: 550px;
  margin: 2rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border: none;
  animation: fadeIn 0.4s ease;
}

.status-box .glass-panel {
  width: 100%;
  max-width: 550px;
  background: rgba(255, 255, 255, 0.05);
  /* Lighter glass for modal */
  padding: 4rem 3rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.input-group {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  transition: var(--transition);
  position: relative;
}

.input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--glow-color);
}

input[type="url"] {
  flex: 1;
  background: transparent;
  border: none;
  padding: 1rem;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 1.1rem;
  outline: none;
}

input[type="url"]::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px var(--primary);
}

.btn-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.btn-primary:hover .btn-icon {
  transform: translateX(3px);
}

/* Status & Loader */
.hidden {
  display: none !important;
}

.status-container,
.error-container {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.status-text {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.85rem;
}

/* Equalizer Loader Animation */
.loader {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 30px;
}

.loader .bar {
  width: 6px;
  background-color: var(--primary);
  border-radius: 3px;
  animation: equalize 1s infinite alternate;
}

.loader .bar:nth-child(1) {
  animation-delay: -0s;
  height: 100%;
}

.loader .bar:nth-child(2) {
  animation-delay: -0.2s;
  height: 70%;
}

.loader .bar:nth-child(3) {
  animation-delay: -0.4s;
  height: 30%;
}

.loader .bar:nth-child(4) {
  animation-delay: -0.6s;
  height: 80%;
}

.loader .bar:nth-child(5) {
  animation-delay: -0.8s;
  height: 50%;
}

@keyframes equalize {
  0% {
    height: 10px;
  }

  100% {
    height: 30px;
  }
}

.error-container {
  color: #ff3838;
}

.error-icon {
  width: 32px;
  height: 32px;
}

/* Features Section */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-5px);
}

.feature-icon {
  width: 28px;
  height: 28px;
  color: var(--primary);
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 600px) {
  .input-group {
    flex-direction: column;
    padding: 0.5rem;
    background: transparent;
    border: none;
    gap: 1rem;
  }

  .input-group:focus-within {
    box-shadow: none;
  }

  input[type="url"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
  }

  input[type="url"]:focus {
    border-color: var(--primary);
  }

  .input-icon {
    display: none;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
  }
}

.progress-wrapper {
  width: 100%;
  max-width: 300px;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: var(--primary);
  transition: width 0.4s ease;
  box-shadow: 0 0 10px var(--primary);
}

.success-container {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success-icon-wrapper {
  width: 64px;
  height: 64px;
  background: rgba(46, 213, 115, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon {
  width: 32px;
  height: 32px;
  color: #2ed573;
}

.video-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-success {
  background: #2ed573;
  padding: 1.2rem 2.5rem;
  font-size: 1.1rem;
}

.btn-success:hover {
  background: #7bed9f;
  box-shadow: 0 10px 20px -10px #2ed573;
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-family);
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
  transition: var(--transition);
}

.btn-text:hover {
  color: var(--text-main);
}

/* Loading View Page - Now Inline */
#loading-view {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 250px;
  padding: 1rem 1rem;
  animation: fadeIn 0.5s ease forwards;
}

#loading-view.hidden {
  display: none !important;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
}

.big-loader {
  margin: 0.5rem 0;
}

.equalizer {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 60px;
}

.equalizer .bar {
  width: 10px;
  background: linear-gradient(to top, #FF0000, #cc0000);
  border-radius: 4px;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
  animation: equalize-big 1.2s ease-in-out infinite alternate;
}

.equalizer .bar:nth-child(1) {
  animation-delay: -0.0s;
  height: 100%;
}

.equalizer .bar:nth-child(2) {
  animation-delay: -0.2s;
  height: 70%;
}

.equalizer .bar:nth-child(3) {
  animation-delay: -0.4s;
  height: 40%;
}

.equalizer .bar:nth-child(4) {
  animation-delay: -0.6s;
  height: 85%;
}

.equalizer .bar:nth-child(5) {
  animation-delay: -0.8s;
  height: 60%;
}

@keyframes equalize-big {
  0% {
    height: 15px;
  }

  100% {
    height: 60px;
  }
}

.success-thumbnail {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #2ed573;
  box-shadow: 0 0 30px rgba(46, 213, 115, 0.3);
  animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.thumbnail-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#loading-success-action {
  margin-top: 1.5rem;
  animation: fadeIn 0.4s ease forwards;
}

.btn-success {
  background: linear-gradient(135deg, #2ed573 0%, #26af5a 100%) !important;
  color: #fff !important;
  padding: 0.6rem 1.6rem !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  border-radius: 100px !important;
  border: none !important;
  box-shadow: 0 8px 20px rgba(46, 213, 115, 0.3) !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-success:hover {
  background: linear-gradient(135deg, #7bed9f 0%, #2ed573 100%) !important;
  box-shadow: 0 15px 30px rgba(46, 213, 115, 0.5) !important;
  transform: translateY(-3px) scale(1.02);
}

#loading-video-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 0.2rem;
  line-height: 1.2;
  word-break: break-word;
}

.loading-status {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#loading-status-text {
  color: var(--text-muted);
  font-size: 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}

.progress-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
}

#loading-progress-bar {
  width: 0%;
  height: 100%;
  background: var(--primary);
  box-shadow: 0 0 15px var(--primary);
  transition: width 0.4s ease;
}

#home-view.hidden {
  display: none !important;
}