/* 1. Global Styles & Variables */
:root {
  --brand-color: #8B5CF6;
  --bg-color: #ffffff;
  --bg-soft: #f4f4f6;
  --bg-soft-transparent: rgba(255, 255, 255, 0.8);
  --text-color: #1f2937;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --border-color-darker: #d1d5db;
  --focus-ring: #8B5CF6;
  --white: #ffffff;
  --black: #000000;

  --codehap-border-color: #d8d8d8;
  --codehap-header-color: #fff;
  --codehap-color: #000;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

html[data-theme="dark"] {
  --bg-color: #131419;
  --bg-soft: #22222c;
  --bg-soft-transparent: rgba(4, 4, 4, 0.8);
  --text-color: #f3f4f6;
  --text-muted: #9ca3af;
  --border-color: #282b32;
  --border-color-darker: #4b5563;
  --codehap-border-color: #282828;
  --codehap-header-color: #fff;
  --codehap-color: #fff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#loader-1{
    fill:var(--brand-color);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.brand-text {
  color: var(--brand-color);
}

.hidden {
  display: none !important;
}

/* 2. Header */
.site-header {
  background-color: var(--bg-soft-transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 5px 42px 0 #00000014;
  position: sticky;
  top: 0px;
  z-index: 50;
  transition: background-color 0.3s, border-color 0.3s;
  max-width: 1180px;
  margin: auto;
  border-radius: 0px 0px 1em 1em;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-color);
}
.logo-icon {
  width: 2.5rem; /* 32px */
  height: 2.5rem; /* 32px */
  color: var(--brand-color);
  margin-top: 0px;
}
.logo-text {
  font-size: 1.5rem; /* 24px */
  font-weight: 600;
}

.main-nav {
  display: none;
}
@media (min-width: 768px) {
  .main-nav {
    display: flex;
    gap: 2rem;
  }
}
.nav-link {
  font-weight: 500;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-link:hover {
  color: var(--brand-color);
}
.nav-link.active {
  color: var(--brand-color);
  font-weight: 600;
  position: relative;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--brand-color);
  border-radius: 50%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle,
.mobile-menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  overflow: hidden;
}
.theme-toggle:hover,
.mobile-menu-button:hover {
  background-color: var(--bg-soft);
}
.theme-toggle .icon,
.mobile-menu-button .icon {
  width: 1.5rem;
  height: 1.5rem;
}
#sun-icon {
  color: #facc15;
}
#moon-icon {
  color: var(--text-color);
}
.mobile-menu-button .close {
  display: none;
}
.mobile-menu-button[aria-expanded="true"] .open {
  display: none;
}
.mobile-menu-button[aria-expanded="true"] .close {
  display: block;
}

.mobile-menu {
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
}
.mobile-menu .nav-link {
  display: block;
  padding: 0.75rem 1.5rem;
  font-size: 1.125rem;
}
.mobile-menu .nav-link.active {
  background-color: rgba(139, 92, 246, 0.1);
  border-left: 3px solid var(--brand-color);
}
.mobile-menu .nav-link.active::after {
  display: none; /* Hide the dot indicator on mobile */
}

/* 3. Main Content & Sections */
.hero-section {
  background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 50%, #F59E0B 100%);
  color: white;
  text-align: center;
  padding: 2rem 0 2rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-title {
  /* font-size: clamp(2.5rem, 6vw, 1.875rem); */
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
  /* text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); */
  /* background: linear-gradient(135deg, #ffffff, #f8fafc); */
  background: #ffffff;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: clamp(0.875rem, 2vw, 1rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
  line-height: 1.4;
}

.isflex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 130px;
}

@keyframes blinkAnimation {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}
.blink {
  animation: blinkAnimation 0.5s linear infinite;
}

.btn {
  padding: 1rem 2rem;
  font-weight: 600;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.3s;
}
.btn-primary {
  background-color: var(--brand-color);
  color: var(--white);
}
.btn-primary:hover {
  background-color: #e63e00;
}

.btn-primary:disabled {
  background-color: var(--text-muted);
  cursor: not-allowed;
  pointer-events: none;
}
.info-section {
  padding: 2rem 0;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
  text-align: center;
}
.card {
  background-color: var(--bg-soft);
  padding: 2rem;
  border-radius: 0.75rem;

  margin: 0 auto;
  transition: background-color 0.3s;
}
@media (min-width: 640px) {
  .card {
    padding: 3rem;
  }
}

.card-content {
  color: var(--text-muted);
  font-size: 1.125rem;
}
.card-content p,
.card-content ul {
  margin-bottom: 1.5rem;
}
.card-content p:last-child,
.card-content ul:last-child {
  margin-bottom: 0;
}
.steps-list {
  list-style: none;
  padding-left: 0;
}
.steps-list li {
  margin-bottom: 1.5rem;
}
.steps-list strong {
  display: block;
  color: var(--text-color);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

/* 4. FAQ Section */
.faq-section {
  padding: 3rem 0;
}
.faq-container {
  max-width: 56rem;
  margin: 0 auto;

  border-radius: 0.75rem;

  overflow: hidden;
  transition: background-color 0.3s;
}
.faq-item {
  border-radius: 0.75rem;
  margin-bottom: 1em;
  background-color: var(--bg-soft);

  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-color);
  background: none;
  border: none;
  cursor: pointer;
}
.faq-question:hover {
  background-color: rgba(0, 0, 0, 0.02);
}
html[data-theme="dark"] .faq-question:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.faq-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}
.faq-icon.rotate-180 {
  transform: rotate(180deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
}
.faq-answer p {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
}

/* 5. Footer */
.site-footer-bottom {
  background-color: transparent;
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 2rem;
  transition: background-color 0.3s, border-color 0.3s;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-about .logo {
  margin-bottom: 1rem;
}
.footer-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-heading {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-color);
  margin-bottom: 1rem;
}
.footer-links ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--brand-color);
}

.footer-copyright {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}
@media only screen and (max-width: 600px) {
  .hero-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.55rem;
  }
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    max-width: 100%;
  }
  .logo-text {
    display: none;
  }
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-button {
  border-radius: 50%;
  background: transparent;
  color: var(--text-color);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;

  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 10px;
  z-index: 1000;
}

.dropdown:hover .dropdown-menu {
  display: flex;
}

.is_error {
  animation: blink 1s step-start infinite, hideIt 5s forwards;
  color: red;
  font-weight: bold;
}

.verysmall {
  font-size: 0.75rem; /* 12px */
  color: var(--text-muted);
}

.chweb_result {
  min-height: 40px;
}

@keyframes blink {
  10% {
    color: rgb(0, 0, 0);
  }
  30% {
    color: rgb(255, 0, 0);
  }
  60% {
    color: rgb(0, 0, 0);
  }
  100% {
    color: rgb(255, 0, 0);
  }
}

@keyframes hideIt {
  0% {
    visibility: visible;
    opacity: 1;
  }
  99% {
    visibility: visible;
    opacity: 1;
  }
  100% {
    visibility: hidden;
    opacity: 0;
  }
}

.ch_page {
  margin-block: 1em;
}

.ch_page h1 {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5em;
}

.ch_page h2 {
  font-size: 1.7rem;
  font-weight: bold;
  margin-top: 0.6em;
}

.ch_page h3 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 0.6em;
}

.ch_page h4 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 0.5em;
}

.ch_page h5 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0.4em;
}

.ch_page h6 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.4em;
}

.ch_page p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  margin-bottom: 15px;
}

.ch_page ul,
.ch_page ol {
  margin-left: 20px;
  margin-bottom: 15px;
}

.ch_page ul li,
.ch_page ol li {
  line-height: 1.5;
  color: var(--text-color);
  margin-bottom: 8px;
}

/* Optional: reset list style inside .ch_page */
.ch_page ul {
  list-style-type: disc;
}

.ch_page ol {
  list-style-type: decimal;
}

.codehap_html table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  color: var(--codehap-color);
  font-weight: normal;
  background-color: var(--bg-soft);
}

.codehap_html table th[colspan="8"] {
  background-color: var(--brand-color);
  font-size: 20px;

  padding: 5px;
  border: 2px solid var(--codehap-border-color);
  color: var(--codehap-header-color);
}

.codehap_html table td {
  border: 1px solid var(--codehap-border-color);
  padding: 15px;
  font-size: 18px;
  font-weight: normal;
}

.codehap_html table tr:nth-child(2) td,
.codehap_html table tr:nth-child(3) td {
  font-weight: bold;
}

@media (max-width: 768px) {
  .codehap_html table td {
    font-size: 15px;
    padding: 10px 2px;
  }

  .codehap_html table th[colspan="8"] {
    font-size: 14px;
    padding: 10px;
  }
}

/* Ultra-small phones (<=330px) fix */
@media (max-width: 330px) {
  .download-card { margin: 0 8px 12px 8px; width: calc(100% - 16px); max-width: none; }
  .input-wrapper { width: 100%; max-width: 100%; padding-bottom: 90px; }
  .input-wrapper .url-input { width: 100%; min-width: 0; padding-left: 2rem; padding-right: 1rem; }
  .input-wrapper .input-actions { left: 0; right: 0; width: 100%; gap: 8px; }
  .input-wrapper .input-actions .paste-btn,
  .input-wrapper .input-actions .clear-btn { width: 40px; height: 38px; }
  .input-wrapper .input-actions .download-inside { height: 38px; font-size: 0.9rem; }
}

#live {
  margin-bottom: 2em;
}

.disclaimer {
  padding: 1em;
  border-radius: 1em;
  background-color: #fff5c4;
  margin-bottom: 2em;
  border-left: 5px solid #cf8300;
  color: #000;
}

.tables {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;

  margin: 0 auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
}

.table th {
  background: var(--bg-soft);
  font-weight: bold;
  color: var(--text-color);
}

.table tr:last-child td {
  border-bottom: none;
}

/* Desktop: side-by-side */
@media (min-width: 768px) {
  .table {
    width: calc(50% - 10px); /* Adjust for gap */
  }
}

/* Mobile: stacked */
@media (max-width: 767px) {
  .table {
    width: 100%;
  }
}

/* Responsive font sizes */
.table th,
.table td {
  font-size: 16px;
  font-family: var(--font-sans);
}

@media (max-width: 767px) {
  .table th,
  .table td {
    font-size: 14px;
    padding: 10px;
  }
}

/* Hover effect for better interactivity */
.table tbody tr:hover {
  background: var(--bg-soft-transparent);
}

/* Focus styles for accessibility */
.table th:focus,
.table td:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
}

.whyus {
  padding: 1em;
  text-align: center;
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
  border-radius: 1em;
  margin-bottom: 2em;

  border: dashed 2px var(--brand-color);
}
.whyus h3 {
  margin-block: 1em;
  font-size: 25px;
}

.whyus p {
  margin-block: 1em;
}

.live-result {
  min-height: 170px;
}

.old-title {
  margin-top: 2em;
  font-size: 1.5rem;
}

.months {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 3em;
  margin-top: 1em;
}

.months div {
  flex: 1 1 auto;
  white-space: nowrap;
}

.months a {
  display: inline-block;
  padding: 6px 10px;
  background-color: var(--bg-soft);
  color: var(--text-color);
  text-decoration: none;
  border-radius: 4px;
  font-size: 16px;
  text-align: center;
}

.months a:hover {
  background-color: var(--brand-color);
  color: #fff;
}

.thisMonth {
  background-color: #222222;
  color: white;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.thisMonth:hover {
  background-color: var(--brand-color);
}

/* Mobile style: 3 in a row, small text */
@media (max-width: 768px) {
  .months a {
    font-size: 12px;
    padding: 4px 6px;
    min-width: 60px;
  }
}
.social_buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.social_btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  background-color: var(--bg-soft);
  color: var(--text-color);
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;

  transition: background 0.3s;

  text-align: center;
  width: 180px;
  height: 50px;
}

.social_btn:hover {
  background-color: var(--brand-color);
  color: #fff;
}

.social_btn svg {
  width: 20px;
  height: 20px;
}

.nofound {
  font-size: 30px;
  color: red;
  text-transform: capitalize;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.tips table {
  border-collapse: collapse;
  width: 100%;
}

.tips table td,
.tips table th {
  border: 1px solid var(--border-color);
  padding: 8px;
}

.tips table tr:nth-child(even) {
  background-color: var(--bg-soft);
}

.tips table th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: center;
  background-color: var(--brand-color);
  color: white;
}

.circle {
  width: 10px;
  height: 10px;
  background-color: red;
  border-radius: 50%;
  animation: blink 1s infinite;
  display: inline-flex;
}

@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.1;
  }
  100% {
    opacity: 1;
  }
}

@media (min-width: 768px) {
  .mobile-menu-button {
    display: none;
  }
}

/* Custom CSS for the wheel */
.wheel_container {
  position: relative;
  width: 350px; /* Increased size for better visibility */
  height: 350px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  background-color: #f0f0f0;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto; /* Center the wheel */
  border: 8px solid #ccc; /* Add a subtle border */
}

.wheel_spinner {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 50%;
  transition: transform 4s cubic-bezier(0.25, 0.1, 0.25, 1); /* Smooth spin transition */
  /* Replicated color scheme from the image (greens and yellows) */
  background: conic-gradient(
    #aac3fe 0% 10%,
    #f07de7 10% 20%,
    #f0f7da 20% 30%,
    #ffd700 30% 40%,
    #7ce37c 40% 50%,
    #6ceaef 50% 60%,
    #ff9abe 60% 70%,
    #ffac41 70% 80%,
    #9fd7cc 80% 90%,
    #e5fb95 90% 100%
  );
}

/* This wrapper will rotate with the wheel, and contain the number */
.wheel_segment_wrapper {
  position: absolute;
  width: 100%; /* Spans the whole wheel */
  height: 100%;
  top: 0;
  left: 0;
  transform-origin: center center; /* Rotates around the wheel's center */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* The actual number content, positioned radially and counter-rotated */
.wheel_segment_content {
  position: absolute; /* Position relative to the wrapper */
  font-family: "Inter", sans-serif;
  font-size: 2.5rem;
  font-weight: bold;
  color: #333;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  /* Initial transform will be set dynamically in JS */
  text-align: center; /* Ensure text is centered within its own box */
  width: 50px; /* Give it a fixed width for centering */
  height: 50px; /* Give it a fixed height for centering */
  display: flex;
  justify-content: center;
  align-items: center;
}

.wheel_center_button {
  position: absolute;
  width: 100px;
  height: 100px;
  background-color: #333; /* Dark background for the button */
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 20; /* Ensure it's above the spinner */
  transition: transform 0.1s ease-in-out;
}

.wheel_center_button:active {
  transform: scale(0.95); /* Add a slight press effect */
}

.tips .table td,
.tips .table th {
  text-align: center;
}
/* Responsive adjustments */
@media (max-width: 640px) {
  .wheel_container {
    width: 300px;
    height: 300px;
  }
  .wheel_segment_content {
    font-size: 2rem;
    width: 40px;
    height: 40px;
  }
  .wheel_center_button {
    width: 80px;
    height: 80px;
    font-size: 1.2rem;
  }

  .header-actions {
    gap: 5px;
  }

  .tips .table td,
  .tips .table th {
    padding: 4px;
    font-size: 12px;
  }
}
.iamflex {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hidden {
  display: none;
}

.wheel_box {
  min-height: 55px;
  margin-top: 2px;
}

.wheel_result_display {
  background-color: #c6ffea;

  color: #003421;
  border-radius: 10px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: auto;
  max-width: 300px;
  height: 50px;
  border: 1px solid #04aa6d;
}

#wheel_lucky_number {
  font-size: 40px;
  font-weight: bold;
}

.sp {
  position: relative;
}

.ar {
  position: absolute;
  top: 44px;
  right: -15px;
  rotate: 14deg;

  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 20px solid #333; /* Arrow points right */
}

#goToTopBtn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  background: 0;
  cursor: pointer;
  border: 0;
}
#goToTopBtn svg {
  fill: var(--brand-color);
  background-color: #fff;
  border-radius: 50%;
  padding: 1px;
}
#goToTopBtn svg:hover {
  fill: var(--black);
}

.radio-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.vote-option {
  position: relative;
  display: inline-block;
}

.vote-option input {
  display: none;
}

.vote-label {
  display: inline-block;
  padding: 12px 18px;
  border: 2px solid var(--text-muted);
  border-radius: 8px;
  background: var(--bg-soft-transparent);
  color: var(--text-color);
  font-size: 18px;
  cursor: pointer;
  transition: 0.2s;
  font-weight: bold;
}

.vote-option input:checked + .vote-label {
  background: var(--brand-color);
  color: white;
}

.submit-btn {
  padding: 12px 25px;
  font-size: 16px;
  background: var(--brand-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 30px;
}

#result table {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  border-collapse: collapse;
  background: var(--bg-soft);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  font-weight: bold;
}

#result table th,
#result table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

#result table th {
  background: var(--brand-color);
  color: white;
}

@media (max-width: 600px) {
  .vote-label {
    padding: 10px 14px;
    font-size: 16px;
  }
}

.color_circle_picker {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  padding: 0px;
  border-radius: 50%;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-color: transparent;
  overflow: hidden;
}

.color_circle_picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color_circle_picker::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
}

/* Page Layout Styles */
.section {
  padding: 2rem 0;
}

.title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.title.is-1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

/* How-to-use page styles */
.how_title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  text-align: center;
}

.how_section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bg-soft);
  border-radius: 8px;
  border-left: 4px solid var(--brand-color);
}

.how_section h2 {
  color: var(--brand-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.how_section ul, .how_section ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.how_section li {
  margin: 0.5rem 0;
  line-height: 1.6;
}

.how_warning {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-left: 4px solid #DC2626;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 8px;
}

.how_warning h2 {
  color: #DC2626;
  margin-bottom: 1rem;
}

.how_note {
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  border-left: 4px solid #0EA5E9;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 8px;
}

.how_note h2 {
  color: #0EA5E9;
  margin-bottom: 1rem;
}

.how_link {
  color: var(--brand-color);
  text-decoration: none;
  font-weight: 600;
}

.how_link:hover {
  text-decoration: underline;
}

/* Dark theme adjustments for how-to-use */
html[data-theme="dark"] .how_warning {
  background: #1F2937;
  border-color: #374151;
  color: #F87171;
}

html[data-theme="dark"] .how_warning h2 {
  color: #F87171;
}

html[data-theme="dark"] .how_note {
  background: #1F2937;
  border-color: #374151;
  color: #60A5FA;
}

html[data-theme="dark"] .how_note h2 {
  color: #60A5FA;
}

/* Hero Download Section */
.hero-download-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Platform Tabs */
/* Info Section */
.info-section {
  padding: 3rem 0;
  background: var(--bg-color);
}

.info-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
  align-items: center;
  background: var(--bg-soft);
  border: 2px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.info-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.info-image img {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}

.info-text {
  color: var(--text-color);
}

.info-text h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-color);
  line-height: 1.2;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.info-text p {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 768px) {
  .info-content-wrapper {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
  
  .info-image {
    padding: 1.5rem;
  }
  
  .info-image img {
    max-width: 200px;
  }
  
  .info-text h2 {
    font-size: 1.5rem;
  }
  
  .info-text p {
    font-size: 1rem;
  }
}

/* Mobile App Section */
.app-download-section {
  padding: 4rem 0;
  background: var(--bg-color);
  margin-top: 2rem;
}

.app-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: center;
  background: var(--bg-soft);
  border: 2px solid var(--border-color);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.app-content-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 50%, rgba(240, 147, 251, 0.1) 100%);
  z-index: 0;
  pointer-events: none;
}

.app-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.phone-mockup {
  width: 100%;
  max-width: 280px;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
  position: relative;
  z-index: 2;
  border-radius: 40px;
}

.floating-icon {
  position: absolute;
  width: 50px;
  height: 50px;
  opacity: 0.9;
  animation: float 3s ease-in-out infinite;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.icon-1 {
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.icon-2 {
  top: 60%;
  left: -5%;
  animation-delay: 1s;
}

.icon-3 {
  bottom: 15%;
  right: 10%;
  animation-delay: 2s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.app-text {
  color: var(--text-color);
  z-index: 2;
}

.app-text h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  line-height: 1.2;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-text p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.app-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.app-install-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.app-install-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.app-install-btn:hover::before {
  opacity: 1;
}

.app-install-btn svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 968px) {
  .app-content-wrapper {
    grid-template-columns: 1fr;
    padding: 2rem;
    gap: 2rem;
  }
  
  .app-image {
    order: 1;
  }
  
  .app-text {
    order: 2;
    text-align: center;
  }
  
  .app-text h2 {
    font-size: 2rem;
  }
  
  .app-text p {
    font-size: 1rem;
  }
  
  .phone-mockup {
    max-width: 220px;
    border-radius: 32px;
  }
  
  .floating-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
  }
  
  .app-install-btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }
}

.platform-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tab {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-2px);
}

.tab.active {
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-color);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

a.tab:visited {
  color: rgba(255, 255, 255, 0.8);
}

a.tab.active:visited {
  color: var(--brand-color);
}

.tab svg {
  width: 16px;
  height: 16px;
}

/* Download Card */
.download-card {
  background: var(--bg-color);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  margin-bottom: 1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Visibility helpers */
.mobile-only { display: none; }
.desktop-only { display: block; }

@media (max-width: 768px) {
  .mobile-only { display: block; }
  .desktop-only { display: none; }
  .mobile-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
  }
  .mobile-actions-row .paste-btn,
  .mobile-actions-row .clear-btn {
    width: 44px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-actions-row .download-btn {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    justify-content: center;
    padding: 0 10px;
    height: 40px;
  }
}

.card-header {
  text-align: center;
  margin-bottom: 1rem;
}

.card-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--brand-color), #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.card-header p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
}

/* Input Container */
.input-container {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  flex-wrap: wrap;
}

.input-wrapper {
  flex: 1;
  min-width: 250px;
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--text-muted);
  z-index: 2;
  width: 16px;
  height: 16px;
}

.url-input {
  width: 100%;
  padding: 0.9rem 0.9rem 0.9rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 0.95rem;
  background: var(--bg-soft);
  color: var(--text-color);
  transition: all 0.3s ease;
  outline: none;
}

.url-input:focus {
  border-color: var(--brand-color);
  background: var(--bg-color);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

/* Light theme overrides to match desired bright input style */
html:not([data-theme="dark"]) .url-input {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
html:not([data-theme="dark"]) .url-input:focus {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Dark theme input styling */
html[data-theme="dark"] .url-input {
  background: var(--bg-soft) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-color) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
html[data-theme="dark"] .url-input:focus {
  background: var(--bg-soft) !important;
  border-color: var(--brand-color) !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
html[data-theme="dark"] .url-input::placeholder {
  color: var(--text-muted) !important;
}

.clear-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-soft);
  border: none;
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
html:not([data-theme="dark"]) .clear-btn {
  background: #f3f4f6;
}

.clear-btn:hover {
  background: var(--border-color);
  color: var(--text-color);
  transform: none;
}

.download-btn {
  background: linear-gradient(135deg, var(--brand-color), #ec4899);
  color: white;
  border: none;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 120px;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
}

/* Download button when placed inside input wrapper */
/* clean up old inside pattern (kept for future pages if needed) */
.inside-btn { position: static; transform: none; }
.input-wrapper { position: relative; }

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.download-btn:active {
  transform: translateY(0);
}

/* Download Result */
.download-result {
  margin-top: 1rem;
  min-height: 60px;
}

/* Result Cards */
.result-card {
  background: var(--bg-color);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  max-width: 600px;
  margin: 0 auto;
}

.error-card {
  border-left: 4px solid #ef4444;
}

.loading-card {
  border-left: 4px solid var(--brand-color);
}

.success-card {
  border-left: 4px solid #10b981;
}

.error-icon, .success-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.error-icon {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.success-icon {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--brand-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-content h3, .loading-content h3, .success-info h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
}

.error-content p, .loading-content p, .success-info p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Success Header */
.success-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.success-info {
  flex: 1;
}

/* Downloads Grid */
.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.download-card-item {
  background: var(--bg-soft);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.download-card-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--brand-color);
}

.preview-container {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg-soft);
  overflow: hidden;
}

.preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.preview-container:hover .play-overlay {
  opacity: 1;
}

.no-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--bg-soft);
}

.download-info {
  padding: 0.75rem;
}

.download-info h4 {
  margin: 0 0 0.25rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color);
  word-break: break-all;
}

.file-size {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin: 0 0 0.5rem 0;
}

.file-duration {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin: 0 0 0.5rem 0;
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: linear-gradient(135deg, var(--brand-color), #ec4899);
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 1px 4px rgba(139, 92, 246, 0.2);
}

.download-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
  color: white;
  text-decoration: none;
}

/* Dark theme adjustments */
html[data-theme="dark"] .error {
  background: #1F2937;
  border-color: #374151;
  color: #F87171;
}

html[data-theme="dark"] .success {
  background: #1F2937;
  border-color: #374151;
  color: #34D399;
}

html[data-theme="dark"] .success h3 {
  color: #34D399;
}

html[data-theme="dark"] .download-item {
  background: var(--bg-soft);
  border-color: var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 0 1.5rem;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .hero-subtitle {
    font-size: 0.875rem;
    margin-bottom: 1rem;
  }
  
  .platform-tabs {
    gap: 0.375rem;
    margin-bottom: 0.75rem;
  }
  
  .tab {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .tab svg {
    width: 14px;
    height: 14px;
  }
  
  .download-card {
    padding: 1rem;
    border-radius: 12px;
    margin: 0 0.5rem 1rem 0.5rem;
  }
  
  .card-header h2 {
    font-size: 1.25rem;
  }
  
  .card-header p {
    font-size: 0.75rem;
  }
  
  .input-container {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .input-wrapper {
    min-width: 100%;
  }
  
  .download-btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
  }
  
  .downloads-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .download-card-item {
    border-radius: 8px;
  }
  
  .download-info {
    padding: 0.5rem;
  }
  
  .result-card {
    padding: 0.75rem;
    border-radius: 12px;
    margin: 0 0.5rem;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 1.5rem 0 1rem;
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .hero-subtitle {
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  .platform-tabs {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .tab {
    padding: 0.25rem 0.5rem;
    font-size: 0.625rem;
  }
  
  .tab svg {
    width: 12px;
    height: 12px;
  }
  
  .download-card {
    padding: 0.75rem;
    margin: 0 0.25rem 1rem 0.25rem;
  }
  
  .card-header h2 {
    font-size: 1.125rem;
  }
  
  .card-header p {
    font-size: 0.625rem;
  }
  
  .url-input {
    padding: 0.5rem 0.5rem 0.5rem 2rem;
    font-size: 0.75rem;
  }
  
  .input-icon {
    left: 0.5rem;
    width: 14px;
    height: 14px;
  }
  
  .clear-btn {
    right: 0.5rem;
    width: 18px;
    height: 18px;
  }
  
  .download-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .input-group {
    flex-direction: column;
  }
  
  .url-input { min-width: 0; width: 100%; }
  
  .download-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .download-actions {
    width: 100%;
    justify-content: space-between;
  }

  /* Mobile: move Download button outside, keep paste/clear in input */
  .input-wrapper { position: relative; padding-bottom: 88px; }
  .url-input-wrapper { max-width: 100%; width: 100%; }
  .input-section { width: 100%; }
  .input-wrapper { width: 100%; max-width: 100%; overflow: visible; }
  .input-wrapper .url-input { width: 100%; box-sizing: border-box; min-width: 0; }
  .input-wrapper .url-input {
    padding-right: 1rem !important; /* no buttons inside on mobile */
  }
  /* Place all three buttons below input in a single row */
  .input-wrapper .input-actions {
    position: absolute;
    left: 8px;
    right: 8px;
    top: calc(100% + 10px);
    transform: none;
    display: flex;
    width: calc(100% - 16px);
    max-width: 100%;
    align-items: center;
    gap: 10px;
  }
  .input-wrapper .input-actions .paste-btn,
  .input-wrapper .input-actions .clear-btn,
  .input-wrapper .input-actions .download-inside {
    position: static;
    width: auto;
    height: 40px;
  }
  .input-wrapper .input-actions .paste-btn,
  .input-wrapper .input-actions .clear-btn {
    width: 44px;
    flex: 0 0 44px;
  }
  .input-wrapper .input-actions .download-inside {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
    padding: 0 10px !important; /* smaller padding on mobile */
    font-size: 0.95rem;
  }
}

/* ===== MODERN DOWNLOAD CARD ===== */
.modern-download-card {
  background: #131419;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  padding: 2.5rem;
  margin: 2rem auto;
  max-width: 600px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.modern-download-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.02) 0%, rgba(236, 72, 153, 0.02) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Light theme adjustments for modern card */
html:not([data-theme="dark"]) .modern-download-card {
  background: #ffffff;
  border: 1px solid #E5E7EB;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}
html:not([data-theme="dark"]) .modern-download-card::before {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(236, 72, 153, 0.06) 100%);
}
html:not([data-theme="dark"]) .card-description {
  color: #4B5563;
}

.modern-download-card .card-content {
  position: relative;
  z-index: 1;
}

.card-content {
  text-align: center;
}

.card-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #8B5CF6;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.card-description {
  color: #6B7280;
  font-size: 0.95rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.input-field {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
}

.modern-download-card .paste-btn {
  align-self: flex-start;
  margin-bottom: 0.5rem;
  margin-left: 0;
}

.input-field .input-icon {
  position: absolute;
  left: 1rem;
  color: #6B7280;
  z-index: 2;
  width: 20px;
  height: 20px;
}

.input-field .url-input {
  width: 100%;
  padding: 1rem 6.75rem 1rem 3rem; /* extra right space for paste + clear */
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  font-size: 1rem;
  background: #ffffff;
  color: #111827;
  transition: all 0.3s ease;
  outline: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  font-weight: 400;
}

.input-field .url-input:focus {
  border-color: #8B5CF6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1), 0 4px 12px rgba(139, 92, 246, 0.15);
  transform: translateY(-1px);
}

.input-field .url-input:hover {
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.input-field .url-input::placeholder {
  color: #9CA3AF;
}

.input-field .clear-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  color: #64748B;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
}

.input-field .clear-btn:hover {
  background: #F1F5F9;
  color: #475569;
  opacity: 1;
  transform: translateY(-50%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modern-download-card .paste-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: #F8FAFC;
  color: #475569;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 100px;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.modern-download-card .paste-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}

.modern-download-card .paste-btn:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modern-download-card .paste-btn:hover::before {
  left: 100%;
}

.modern-download-card .download-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--brand-color), #ec4899);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
  position: relative;
  overflow: hidden;
}

.modern-download-card .download-btn::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: left 0.5s;
}

.modern-download-card .download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #2563EB, #7C3AED);
}

.modern-download-card .download-btn:hover::before {
  left: 100%;
}

.modern-download-card .download-btn:active {
  transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .modern-download-card {
    margin: 1rem;
    padding: 1.5rem;
    border-radius: 16px;
  }
  
  .card-title {
    font-size: 1.5rem;
  }
  
  .card-description {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
  }
  
  .input-group {
    flex-direction: column;
    gap: 1rem;
  }
  
  .input-field {
    min-width: 100%;
  }
  
  .paste-btn,
  .download-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .modern-download-card {
    margin: 0.5rem;
    padding: 1rem;
  }
  
  .card-title {
    font-size: 1.25rem;
  }
  
  .card-description {
    font-size: 0.8rem;
  }
  
  .input-field .url-input {
    padding: 0.875rem 2.5rem 0.875rem 2.5rem;
    font-size: 0.9rem;
  }
  
  .input-field .input-icon {
    left: 0.75rem;
    width: 18px;
    height: 18px;
  }
  
  .input-field .clear-btn {
    right: 0.75rem;
    width: 32px;
    height: 32px;
  }
  
  .paste-btn,
  .download-btn {
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
  }
}

/* ===== FASTDL-INSPIRED COMPONENTS ===== */

/* Content Tabs */
.content-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.content-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  font-weight: 500;
  font-size: 0.875rem;
  min-width: 80px;
  justify-content: center;
}

.content-tab:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-2px);
}

.content-tab.active {
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-color);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.content-tab svg {
  width: 18px;
  height: 18px;
}

/* Download Interface */
.download-interface {
  max-width: 600px;
  margin: 2rem auto 0;
}

.input-section {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  flex-wrap: wrap;
}

.url-input-wrapper {
  flex: 1;
  min-width: 300px;
  position: relative;
}

.url-input {
  width: 100%;
  padding: 1rem 3rem 1rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  background: var(--bg-soft);
  color: var(--text-color);
  transition: all 0.3s ease;
  outline: none;
  backdrop-filter: blur(10px);
}

.url-input:focus {
  border-color: var(--brand-color);
  background: var(--bg-color);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.url-input::placeholder {
  color: var(--text-muted);
}

.clear-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-soft);
  border: none;
  border-radius: 6px;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clear-btn:hover {
  background: var(--border-color);
  color: var(--text-color);
}

.paste-btn {
  position: absolute;
  right: 3rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-soft);
  border: none;
  border-radius: 6px;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ensure inline paste button beside Clear is compact inside the input */
.modern-download-card .input-field .paste-btn {
  position: absolute;
  right: 3.25rem; /* leave ~8px gap from clear */
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  padding: 0;
  min-width: 0;
  border-radius: 8px;
  box-shadow: none !important;
  background: var(--bg-soft) !important;
  border: 1px solid var(--border-color) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Avoid large pill styles from other paste variants affecting inline */
.modern-download-card .input-field .paste-btn span { display: none; }

.paste-btn:hover {
  background: var(--border-color);
  color: var(--text-color);
}

/* Dark theme: inline paste/clear inside input (hero) */
html[data-theme="dark"] .modern-download-card .input-field .paste-btn,
html[data-theme="dark"] .modern-download-card .input-field .clear-btn {
  background: linear-gradient(135deg, var(--brand-color), #ec4899) !important; /* requested background */
  border-color: var(--brand-color) !important;
  color: #e5e7eb !important;
}
html[data-theme="dark"] .modern-download-card .input-field .paste-btn svg,
html[data-theme="dark"] .modern-download-card .input-field .clear-btn svg {
  color: #e5e7eb !important;
  fill: currentColor !important;
}
html[data-theme="dark"] .modern-download-card .input-field .paste-btn:hover,
html[data-theme="dark"] .modern-download-card .input-field .clear-btn:hover {
  background: #1a1d24 !important;
}

.download-btn {
  background: linear-gradient(135deg, var(--brand-color), #ec4899);
  color: white;
  border: none;
  padding: 1rem 1rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

/* How To Section */
.how-to-section {
  padding: 4rem 0;
  background: var(--bg-soft);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.step-item {
  text-align: center;
  padding: 2rem;
  background: var(--bg-color);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease;
}

.step-item:hover {
  transform: translateY(-4px);
}

.step-image {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-image img {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  background: #fff;
}

.step-number {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--brand-color), #ec4899);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 1.5rem;
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.35);
}

.step-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.step-content p {
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
}

/* Features Section */
.features-section {
  padding: 4rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-item {
  text-align: center;
  padding: 2rem;
  background: var(--bg-color);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  border: 1px solid var(--border-color);
}

.feature-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--brand-color), #ec4899);
  color: white;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.feature-item h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.feature-item p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Content Types Section */
.content-types-section {
  padding: 4rem 0;
  background: var(--bg-soft);
}

.content-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.content-type-item {
  padding: 2rem;
  background: var(--bg-color);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  border: 1px solid var(--border-color);
}

.content-type-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.content-type-icon {
  width: 48px;
  height: 48px;
  background: var(--brand-color);
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.content-type-item h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.content-type-item p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Responsive Design for New Components */
@media (max-width: 768px) {
  .content-tabs {
    gap: 0.375rem;
    margin: 1.5rem 0;
  }
  
  .content-tab {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    min-width: 70px;
  }
  
  .content-tab svg {
    width: 16px;
    height: 16px;
  }
  
  .input-section {
    flex-direction: column;
    gap: 1rem;
  }
  
  .url-input-wrapper {
    min-width: 100%;
  }
  
  .download-btn {
    width: 100%;
  }
  
  .steps-grid,
  .features-grid,
  .content-types-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .step-item,
  .feature-item,
  .content-type-item {
    padding: 1.5rem;
  }
}

/* --- Light mode overrides to match desired look --- */
html:not([data-theme="dark"]) .hero-section .url-input {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  color: #111827;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
html:not([data-theme="dark"]) .hero-section .url-input:focus {
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

/* --- Dark mode overrides for hero section --- */
html[data-theme="dark"] .hero-section .url-input,
html[data-theme="dark"] .modern-download-card .url-input {
  background: var(--bg-soft) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-color) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
html[data-theme="dark"] .hero-section .url-input:focus,
html[data-theme="dark"] .modern-download-card .url-input:focus {
  background: var(--bg-soft) !important;
  border-color: var(--brand-color) !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
html[data-theme="dark"] .hero-section .url-input::placeholder,
html[data-theme="dark"] .modern-download-card .url-input::placeholder {
  color: var(--text-muted) !important;
}
/* Light theme in hero: use dark controls for contrast */
html:not([data-theme="dark"]) .hero-section .clear-btn {
  background: linear-gradient(135deg, var(--brand-color), #ec4899) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}
html:not([data-theme="dark"]) .hero-section .paste-btn {
  background: linear-gradient(135deg, var(--brand-color), #ec4899) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

/* Theme-specific button colors for paste and clear buttons */
/* Dark theme: white background, black icons */
/* Dark theme: match Download button gradient and white icons */
html[data-theme="dark"] .clear-btn,
html[data-theme="dark"] .paste-btn {
  background: linear-gradient(135deg, var(--brand-color), #ec4899) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 6px 20px rgba(99,102,241,0.25) !important;
}
html[data-theme="dark"] .clear-btn:hover,
html[data-theme="dark"] .paste-btn:hover {
  filter: brightness(0.96);
}
html[data-theme="dark"] .clear-btn svg,
html[data-theme="dark"] .paste-btn svg {
  color: #ffffff !important;
  fill: currentColor !important;
}

/* Light theme: white background, black icons */
html:not([data-theme="dark"]) .clear-btn,
html:not([data-theme="dark"]) .paste-btn {
  background: #111827 !important; /* dark slate */
  color: #ffffff !important;
  border: 1px solid rgba(0,0,0,0.2);
}
html:not([data-theme="dark"]) .clear-btn:hover,
html:not([data-theme="dark"]) .paste-btn:hover {
  background: #0f1623 !important;
}
html:not([data-theme="dark"]) .clear-btn svg,
html:not([data-theme="dark"]) .paste-btn svg {
  color: inherit;
  fill: currentColor;
}

/* Unify paste/clear buttons to match Download button style */
.paste-btn,
.clear-btn {
  background: linear-gradient(135deg, var(--brand-color), #ec4899) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 6px 20px rgba(99,102,241,0.25) !important;
}
.paste-btn svg,
.clear-btn svg {
  color: #ffffff !important;
  fill: currentColor !important;
}
.paste-btn:hover,
.clear-btn:hover {
  filter: brightness(0.96);
}
html:not([data-theme="dark"]) .content-tab {
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.7);
  color: #4b5563;
}
html:not([data-theme="dark"]) .content-tab:hover {
  background: rgba(255,255,255,0.8);
  color: #111827;
}
html:not([data-theme="dark"]) .content-tab.active {
  background: #ffffff;
  color: var(--brand-color);
  border-color: #ffffff;
}

/* Fix input icon/placeholder overlap in hero and download card */
.input-wrapper .url-input {
  padding: 0.9rem 13.5rem 0.9rem 2.5rem !important; /* space reserved for three inline buttons */
}

/* Place paste and clear inside the input on hero/download card */
/* group actions container */
.input-wrapper .input-actions {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.input-wrapper .input-actions .paste-btn,
.input-wrapper .input-actions .clear-btn {
  position: static;
  right: auto;
  top: auto;
  transform: none;
  width: 40px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.input-wrapper .input-actions .download-inside {
  position: static;
  right: auto;
  top: auto;
  transform: none;
  height: 36px;
  min-width: 100px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
}

/* Desktop: ensure only inline Paste shows inside the input, hide any stray paste button siblings */
@media (min-width: 769px) {
  .download-card .input-container > .paste-btn { display: none !important; }
  /* In hero, hide standalone paste buttons; keep inline button inside input-field */
  .hero-section .paste-btn { display: none; }
  .hero-section .input-field .paste-btn { display: inline-flex !important; }
}
