html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #000;
  color: #1d1d1f;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}

/* Header styles */
.site-header {
  background: rgba(21, 20, 24, 0.8);
  padding: 32px 0;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 2;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  max-width: 1400px;
}

.site-header .logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s ease;
}

.site-header .logo img {
  height: 24px;
  width: auto;
  image-rendering: -webkit-optimize-contrast;
  -webkit-font-smoothing: antialiased;
  filter: brightness(0) invert(1);
}

.site-header .logo:hover {
  opacity: 0.9;
}

.site-header nav {
  display: flex;
  gap: 30px;
  align-items: center;
}

.site-header nav a {
  color: white;
  text-decoration: none;
  opacity: 0.7;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.site-header nav a:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.site-header nav .external-link {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.site-header nav .external-link svg {
  width: 12px;
  height: 12px;
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.site-header nav .external-link:hover svg {
  transform: translate(2px, -2px);
  opacity: 1;
}

/* Hero section styles */
.hero {
  background-image: url('/checksub-convertor-background.png');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 0;
  min-height: 100vh;
  position: relative;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.6) 100%);
  width: 100vw;
}

.hero .container {
  position: relative;
  z-index: 1;
  padding-top: 120px;
  padding-bottom: 32px;
  width: 100%;
  max-width: 900px;
}

.hero-content {
  text-align: center;
  margin-bottom: 40px;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 32px;
}

/* Input URL styles */
.input-group {
  width: 100%;
  margin: 0 auto;
}

#videoUrl {
  flex: 1;
  padding: 12px 16px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1rem;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

#videoUrl::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

#videoUrl:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

/* Form styles */
.converter-card {
  background: rgba(21, 20, 24, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 32px;
  max-width: 860px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#downloadForm {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-label {
  text-align: center;
  color: white;
  font-size: 1.1rem;
  margin: 0 0 8px 0;
  text-align: left;
}

.form-group {
  position: relative;
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
  width: 100%;
}

.form-group input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1rem;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-group input:hover {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.15);
}

.download-btn {
  padding: 16px 24px;
  white-space: nowrap;
  background: #6b2cf5 !important;
  border: none !important;
  font-weight: 600;
  min-width: 120px;
}

.download-btn:hover {
  background: #5620c5 !important;
  transform: translateY(-1px);
}

.button-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  width: 100%;
  display: none;  /* Hidden by default */
}

.primary-button {
  background: #6b2cf5;
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 180px;
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  background: #5620c5;
}

/* Download another button */
form .primary-button:last-child {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

form .primary-button:last-child:hover {
  background: rgba(255, 255, 255, 0.2);
}

#fetchBtn {
  flex: none;
  white-space: nowrap;
}

#downloadVideoBtn, #downloadAudioBtn {
  display: none;
  flex: 1;
  max-width: 250px;
}

/* Preview styles */
#previewContainer {
  margin-top: 20px;
  background: rgba(21, 20, 24, 0.6);
  border-radius: 12px;
  padding: 16px;
  backdrop-filter: blur(10px);
  text-align: center;
  width: 100%;
  display: none;  /* Hidden by default */
}

#previewThumbnail {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

#status {
  text-align: center;
  color: white;
  margin: 10px 0;
}

#status .input-label {
  display: none;  /* Caché par défaut */
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  text-align: center;
}

#status.show-download-text .input-label {
  display: block;  /* Affiché uniquement quand la classe show-download-text est présente */
}

#status h2 {
  margin-top: 0;
  color: white;
  font-size: 1.5rem;
  line-height: 1.4;
}

.video-title {
  color: white;
  font-size: 1.2rem;
  margin: 20px 0;
  padding: 0 20px;
  line-height: 1.4;
  font-weight: 500;
}

/* Features section */
.features {
  padding: 80px 0;
  background: white;
}

.features h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 60px;
  color: #151418;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-card {
  background: #f5f5f7;
  border-radius: 16px;
  padding: 30px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  background: #6b2cf5;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: #151418;
}

.feature-card p {
  color: #666;
  line-height: 1.6;
}

/* Footer styles */
footer {
  background: #151418;
  color: white;
  padding: 60px 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  align-items: flex-start;
}

.footer-brand {
  max-width: 300px;
}

.footer-brand img {
  height: 36px;
  margin-bottom: 24px;
}

.footer-brand h3 {
  font-size: 1.5rem;
  margin: 0 0 16px 0;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-direction: column;
}

.footer-links h4 {
  color: white;
  font-size: 1rem;
  margin: 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 16px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-social a:hover {
  color: white;
}

.copyright {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* Responsive styles */
@media (max-width: 992px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 20px 0;
  }

  .site-header nav {
    display: none;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .converter-card {
    padding: 20px;
  }

  .button-group {
    flex-direction: column;
  }

  #fetchBtn {
    width: 100%;
  }

  .form-group {
    flex-direction: column;
  }
  
  .form-group input,
  .form-group button {
    width: 100%;
  }
}

.download-another {
  margin-top: 20px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.download-another:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

.services-preview {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.service-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 24px;
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.service-card h3,
.service-card p,
.service-card svg {
  cursor: default;
}

.service-card h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin-bottom: 12px;
}

.service-card p {
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.9;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.service-icon {
  width: 20px;
  height: 20px;
  color: #6b2cf5;
  background: white;
  padding: 6px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(107, 44, 245, 0.2);
}

/* Checksub Promo Section */
.checksub-promo {
  background: #151418;
  background-size: cover;
  background-position: bottom center;
  color: white;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.checksub-promo h2 {
  text-align: center;
  font-size: 3rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1.5rem;
}

.promo-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.promo-text p {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 30px;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
}

.promo-text ul {
  list-style: none;
  padding: 0;
  margin: 0 0 40px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.promo-text li {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.promo-text li:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.promo-text li strong {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: #fff;
}

.promo-text li span {
  opacity: 0.9;
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
}

.promo-cta {
  display: block;
  width: fit-content;
  margin: 0 auto;
  background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
  color: white;
  padding: 16px 32px;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.promo-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(217, 70, 239, 0.4);
}

/* Responsive styles */
@media (max-width: 768px) {
  .promo-text ul {
    grid-template-columns: 1fr;
  }
  
  .checksub-promo h2 {
    font-size: 2rem;
  }
  
  .promo-text p {
    font-size: 1.1rem;
  }
  
  .promo-text li {
    padding: 20px;
  }
}