/* ===============================================
   YesPotato - Combined & Optimized Styles
   =============================================== */

/* Poppins Font */
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

/* --- CSS Reset & Variables --- */
:root {
  --primary: #22c55e;
  --primary-hover: #16a34a;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e5e7eb;
  --shadow: rgba(0, 0, 0, 0.05);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.3s ease;
}

body.dark {
  --bg: #0b1220;
  --card: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: #1f2933;
  --shadow: rgba(0, 0, 0, 0.3);
}

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

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

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* ===============================================
   NAVIGATION
   =============================================== */
nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-wrap {
  max-width: 1200px;
  margin: auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
}

.logo img {
  height: 36px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  transition: 0.2s;
}

.dropdown-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  transition: 0.2s;
}

.nav-link:hover,
.dropdown-btn:hover {
  color: var(--primary);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-btn {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dropdown-menu {
  position: absolute;
  top: 36px;
  left: 0;
  background: var(--card);
  border: 1px solid var(--border);
  min-width: 180px;
  display: none;
  animation: fade 0.2s ease;
  z-index: 1001;
  box-shadow: 0 4px 12px var(--shadow);
}

.dropdown-menu a {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text);
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
  background: var(--bg);
  color: var(--primary);
}

.dropdown.open .dropdown-menu {
  display: block;
}

@keyframes fade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hamburger */
.hamburger {
  display: none;
  font-size: 24px;
  cursor: pointer;
  position: relative;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.hamburger i {
  position: absolute;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hamburger .fa-bars {
  display: block;
  opacity: 1;
}

.hamburger .fa-times {
  display: none;
  opacity: 0;
  transform: rotate(90deg);
}

.hamburger.active .fa-bars {
  display: block;
  opacity: 0;
}

.hamburger.active .fa-times {
  display: block;
  opacity: 1;
  transform: rotate(0deg);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--card);
  border-top: 1px solid var(--border);
}

.mobile-menu a {
  padding: 14px 20px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu a:hover {
  background: var(--bg);
  color: var(--primary);
}

/* Mobile Menu Dropdown */
.mobile-menu-dropdown {
  width: 100%;
}

.mobile-menu-dropdown-btn {
  width: 100%;
  padding: 14px 20px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.mobile-menu-dropdown-btn:hover {
  background: var(--bg);
  color: var(--primary);
}

.mobile-menu-dropdown-menu {
  display: none;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.mobile-menu-dropdown.open .mobile-menu-dropdown-menu {
  display: block;
}

.mobile-menu-dropdown-menu a {
  padding: 12px 20px 12px 40px;
  font-size: 14px;
  color: var(--muted);
}

.mobile-menu-dropdown-menu a:hover {
  background: var(--bg);
  color: var(--primary);
  padding-left: 45px;
}

.mobile-menu-dropdown-menu a.active {
  color: var(--primary);
  font-weight: 500;
}

/* ===============================================
   HERO SECTION
   =============================================== */
.hero {
  text-align: center;
  padding: 60px 20px 20px 20px;
}

.hero h1 {
  font-size: 36px;
  margin-bottom: 10px;
}

.hero p {
  color: var(--muted);
  margin-bottom: 30px;
}

.input-row {
  max-width: 720px;
  margin: auto;
  display: flex;
  gap: 10px;
}

.input-box {
  flex: 1;
  position: relative;
}

.input-box input {
  width: 100%;
  padding: 14px 44px 14px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  transition: var(--transition);
}

.input-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.paste-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 5px;
}

.paste-btn:hover {
  color: var(--primary);
}

.download-btn {
  padding: 14px 26px;
  background: var(--primary);
  border: none;
  color: white;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.download-btn:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.download-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Download Button Loader */
.download-btn.loading {
  position: relative;
  color: transparent;
}

.download-btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Inline Loader Below Input */
.inline-loader {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 20px;
}

.inline-loader.show {
  display: flex;
}

.inline-loader-text {
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}

/* Simple Spinner Loader */
.spinner-loader {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===============================================
   RESULT SECTION - Modern Table Design
   =============================================== */
.result-section {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
  display: none;
  animation: fadeIn 0.4s ease;
}

.result-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px var(--shadow);
  animation: slideUp 0.4s ease;
}

.result-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  padding: 24px;
  text-align: center;
}

.result-header h2 {
  font-size: 24px;
  margin-bottom: 5px;
}

.result-body {
  padding: 30px;
}

/* Video Info Section */
.video-info {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
  align-items: flex-start;
}

.video-preview {
  flex: 0 0 280px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--border);
  transition: var(--transition);
}

.video-preview:hover {
  border-color: var(--primary);
}

.video-preview img {
  width: 100%;
  height: 158px;
  object-fit: cover;
  display: block;
}

.video-details {
  flex: 1;
  min-width: 0;
}

.video-details h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.video-length {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.video-length::before {
  content: '\f017';
  font-family: 'Font Awesome 7 Free';
  font-weight: 900;
}

.video-description {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  max-height: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  display: box;
  line-clamp: 4;
}

.video-description.Expanded {
  max-height: none;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

/* Download Table - Base Styles */
.download-options-table {
  margin-bottom: 30px;
  overflow-x: auto;
}

.download-table,
.thumbnail-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-width: 300px;
}

.download-table thead,
.thumbnail-table thead {
  background: var(--bg);
}

.download-table th,
.thumbnail-table th {
  padding: 14px 16px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

/* First column left-aligned for quality label */
.download-table th:first-child,
.thumbnail-table th:first-child {
  text-align: left;
}

.download-table td,
.thumbnail-table td {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.download-table tbody tr,
.thumbnail-table tbody tr {
  transition: var(--transition);
}

.download-table tbody tr:hover,
.thumbnail-table tbody tr:hover {
  background: var(--bg);
}

.download-table tbody tr:last-child td,
.thumbnail-table tbody tr:last-child td {
  border-bottom: none;
}

/* ===============================================
   3-Column Table (Video, MP3, Shorts)
   =============================================== */
.download-table th:nth-child(1),
.download-table td:nth-child(1),
.download-table th:nth-child(2),
.download-table td:nth-child(2),
.download-table th:nth-child(3),
.download-table td:nth-child(3) {
  width: 33.333%;
  min-width: 100px;
}

/* Quality Column */
.download-table td:first-child {
  font-weight: 500;
}

.download-table td:first-child span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Size Column */
.download-table td:nth-child(2) {
  text-align: center;
  color: var(--muted);
  font-weight: 500;
}

/* Action Column */
.download-table td:last-child,
.thumbnail-table td:last-child {
  text-align: center;
}

/* ===============================================
   2-Column Table (Thumbnail)
   =============================================== */
.thumbnail-table th:nth-child(1),
.thumbnail-table td:nth-child(1) {
  width: 40%;
}

.thumbnail-table th:nth-child(2),
.thumbnail-table td:nth-child(2) {
  width: 60%;
}

/* ===============================================
   Download Button Styling
   =============================================== */
.download-table td:last-child a,
.thumbnail-table td:last-child a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: var(--transition);
  min-width: 100px;
  background: var(--primary);
  color: white;
}

.download-table td:last-child a:hover,
.thumbnail-table td:last-child a:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.download-table td:last-child a i,
.thumbnail-table td:last-child a i {
  font-size: 14px;
}

/* ===============================================
   Retry Button
   =============================================== */
.download-again-btn {
  display: block;
  margin: 0 auto;
  padding: 14px 32px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.download-again-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* ===============================================
   SHARE SECTION
   =============================================== */
.share-section {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 20px;
}

.share-section h2 {
  text-align: center;
  margin-bottom: 20px;
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
  cursor: pointer;
}

.share-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.share-btn i {
  font-size: 18px;
}

/* ===============================================
   FEATURES SECTION
   =============================================== */
.section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.section h2 {
  text-align: center;
  margin-bottom: 40px;
}

.features {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.feature {
  width: 280px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}

.feature:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px var(--shadow);
}

.feature i {
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 12px;
}

.feature h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.feature p {
  font-size: 13px;
  color: var(--muted);
}

/* ===============================================
   HOW TO SECTION
   =============================================== */
.howto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: var(--transition);
}

.step:hover {
  transform: scale(1.02);
}

.step img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.step div {
  padding: 14px;
}

.step h4 {
  font-size: 14px;
  color: var(--primary);
  margin-bottom: 6px;
}

.step p {
  font-size: 14px;
}

/* ===============================================
   FAQ SECTION
   =============================================== */
.faq-container {
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item.open {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.1);
}

.faq-question {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
  font-size: 16px;
  transition: var(--transition);
}

.faq-question:hover {
  color: var(--primary);
}

.faq-question i {
  color: var(--primary);
  font-size: 14px;
  transition: transform 0.3s ease;
}

.faq-item.open .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.6;
  transition: all 0.3s ease;
}

.faq-item.open .faq-answer {
  padding: 0 20px 20px;
  max-height: 500px;
}

/* ===============================================
   APP DOWNLOAD SECTION
   =============================================== */
.app-download {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

.app-download h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 32px;
}

.app-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.app-left {
  flex: 0 0 auto;
}

.app-icon-large {
  width: 120px;
  height: 120px;
  background: white;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.app-icon-large img {
  width: 60px;
  height: 60px;
}

.app-right {
  flex: 1;
}

.app-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}

.app-subtitle {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 25px;
}

.download-app-btn {
  padding: 16px 32px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.download-app-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.3);
}

/* Google Play Button Styles */
.google-play-btn {
  display: inline-block;
  transition: var(--transition);
}

.google-play-btn img {
  height: 84px;
  width: auto;
  border-radius: 12px;
  display: block;
}

.google-play-btn:hover {
  transform: translateY(-3px);
  opacity: 0.9;
}

/* ===============================================
   FOOTER
   =============================================== */
footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 30px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ===============================================
   TOAST NOTIFICATION SYSTEM
   =============================================== */

/* Toast Container */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  transform: translateX(400px);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  z-index: 10000;
  min-width: 300px;
  max-width: 400px;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hide {
  transform: translateX(400px);
  opacity: 0;
}

/* Toast Icon */
.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* Toast Content */
.toast-content {
  flex: 1;
}

.toast-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.toast-message {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* Toast Close Button */
.toast-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text);
}

/* Toast Types */
.toast-success {
  border-color: #22c55e;
}

.toast-success .toast-icon {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.toast-success .toast-title {
  color: #16a34a;
}

.toast-error {
  border-color: #ef4444;
}

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

.toast-error .toast-title {
  color: #dc2626;
}

.toast-warning {
  border-color: #f59e0b;
}

.toast-warning .toast-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.toast-warning .toast-title {
  color: #d97706;
}

.toast-info {
  border-color: #3b82f6;
}

.toast-info .toast-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.toast-info .toast-title {
  color: #2563eb;
}

.toast-message-type {
  border-color: #64748b;
}

.toast-message-type .toast-icon {
  background: rgba(100, 116, 139, 0.15);
  color: #64748b;
}

.toast-message-type .toast-title {
  color: #475569;
}

/* Toast Position Variants */
.toast-bottom-left {
  top: auto;
  bottom: 20px;
  right: auto;
  left: 20px;
  transform: translateX(-400px);
}

.toast-bottom-left.show {
  transform: translateX(0);
}

.toast-bottom-left.hide {
  transform: translateX(-400px);
}

.toast-bottom-right {
  top: auto;
  bottom: 20px;
  right: 20px;
  transform: translateX(400px);
}

.toast-bottom-right.show {
  transform: translateX(0);
}

.toast-bottom-right.hide {
  transform: translateX(400px);
}

.toast-top-center {
  top: 20px;
  left: 50%;
  right: auto;
  transform: translateX(-50%) translateY(-100px);
}

.toast-top-center.show {
  transform: translateX(-50%) translateY(0);
}

.toast-top-center.hide {
  transform: translateX(-50%) translateY(-100px);
}

/* Toast Stack Container */
.toast-stack {
  position: fixed;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast-stack-top-right {
  top: 20px;
  right: 20px;
}

.toast-stack-bottom-right {
  bottom: 20px;
  right: 20px;
}

.toast-stack-bottom-left {
  bottom: 20px;
  left: 20px;
}

/* ===============================================
   MOBILE TOOLBAR
   =============================================== */
.mobile-toolbar {
  display: none;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.mobile-dropdown {
  position: relative;
}

.mobile-dropdown-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
  min-width: 100px;
  color: var(--text);
}

.mobile-dropdown-btn .current-selection {
  color: var(--primary);
  font-weight: 500;
}

.mobile-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  margin-top: 5px;
  display: none;
  z-index: 1000;
  box-shadow: 0 4px 12px var(--shadow);
}

.mobile-dropdown.open .mobile-dropdown-menu {
  display: block;
}

.mobile-dropdown-menu a {
  display: block;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text);
}

.mobile-dropdown-menu a:hover {
  background: var(--bg);
  color: var(--primary);
}

.mobile-dropdown-menu a.active {
  color: var(--primary);
  font-weight: 500;
  background: var(--bg);
}

.theme-toggle-mobile {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 16px;
  width: 40px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

body.dark .theme-toggle-mobile {
  color: #f8fafc;
}

/* ===============================================
   ANIMATIONS
   =============================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */
@media (max-width: 768px) {
  /* Video Info Section - Stack on mobile */
  .video-info {
    flex-direction: column;
    gap: 20px;
  }
  
  .video-preview {
    flex: none;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .video-preview img {
    height: 170px;
  }
  
  .video-details h3 {
    font-size: 16px;
  }
  
  /* Navigation */
  .nav-right {
    display: none;
  }
  
  .hamburger {
    display: block;
  }
  
  .mobile-toolbar {
    display: flex;
  }
  
  /* Hero */
  .hero h1 {
    font-size: 28px;
  }
  
  .hero p {
    font-size: 14px;
  }
  
  .input-row {
    flex-direction: column;
  }
  
  .download-btn {
    width: 100%;
  }
  
  /* Result Section */
  .result-body {
    padding: 20px;
  }
  
  .video-preview {
    max-width: 100%;
  }
  
  .video-preview img {
    height: 200px;
  }
  
  /* Tables - Horizontal Scroll */
  .download-options-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-left: -20px;
    margin-right: -20px;
    padding: 0 20px;
  }
  
  .download-table,
  .thumbnail-table {
    min-width: 100%;
  }
  
  .download-table th,
  .download-table td,
  .thumbnail-table th,
  .thumbnail-table td {
    padding: 12px 10px;
    font-size: 13px;
  }
  
  /* 3-Column Table Responsive */
  .download-table th,
  .download-table td {
    min-width: 80px;
  }
  
  .download-table td:last-child a,
  .thumbnail-table td:last-child a {
    padding: 8px 12px;
    font-size: 12px;
    min-width: 80px;
  }
  
  /* 2-Column Table Responsive */
  .thumbnail-table th:first-child,
  .thumbnail-table td:first-child {
    width: 35%;
    min-width: 80px;
  }
  
  .thumbnail-table th:last-child,
  .thumbnail-table td:last-child {
    width: 65%;
    min-width: 100px;
  }
  
  /* Scrollbar styling */
  .download-options-table::-webkit-scrollbar {
    height: 6px;
  }
  
  .download-options-table::-webkit-scrollbar-track {
    background: var(--bg);
    border-radius: 3px;
  }
  
  .download-options-table::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
  }
  
  .download-options-table::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
  }
  
  /* Sections */
  .section {
    padding: 40px 20px;
  }
  
  .app-download h2 {
    font-size: 28px;
  }
  
  .app-box {
    flex-direction: column;
    text-align: center;
    padding: 30px 20px;
    gap: 25px;
  }
  
  .app-title {
    font-size: 24px;
  }
  
  .app-subtitle {
    font-size: 16px;
  }
  
  .download-app-btn {
    padding: 14px 28px;
    font-size: 16px;
  }
  
  .share-row {
    gap: 10px;
  }
  
  .share-btn {
    padding: 8px 15px;
    font-size: 13px;
  }
  
  .faq-question {
    padding: 16px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 24px;
  }
  
  .feature {
    width: 100%;
    max-width: 320px;
  }
  
  .step img {
    height: 200px;
  }
  
  .result-header h2 {
    font-size: 20px;
  }
  
  .download-table td:last-child a,
  .thumbnail-table td:last-child a {
    padding: 8px 10px;
    font-size: 11px;
    min-width: 70px;
  }
}

/* ===============================================
   ACCESSIBILITY & UTILITIES
   =============================================== */
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: high) {
  :root {
    --border: #000;
  }
  body.dark {
    --border: #fff;
  }
}

/* Print styles */
@media print {
  nav,
  .mobile-toolbar,
  .mobile-menu,
  .share-section,
  .app-download,
  footer,
  .toast {
    display: none !important;
  }
  
  .result-section {
    display: block !important;
  }
  
  body {
    background: white;
    color: black;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

::selection {
  background: var(--primary);
  color: white;
}