/* Font loaded via HTML for better performance */

:root {
  /* ── PROFESSIONAL ORANGE & MONOCHROME THEME ── */
  --bg-deep: #ffffff; /* Pure White */
  --bg-dark: #f8fafc; /* Bone White for internal components */
  --bg-glass: rgba(255, 255, 255, 0.9);
  --border-glass: rgba(0, 0, 0, 0.08);
  --text-main: #000000;
  --text-muted: #475569;
  --accent-primary: #f97316; /* Pifree Orange */
  --accent-secondary: #ea580c; /* Darker Orange */
  --brand-orange: #f97316;
  --radius-lg: 20px;
  --radius-md: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-shadow: 
    0 10px 15px -3px rgba(0, 0, 0, 0.05),
    0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --success: #10b981; /* Green for success */
  --error: #ef4444;
  --accent-glow: rgba(249, 115, 22, 0.12);
  --modal-backdrop: rgba(0, 0, 0, 0.6);

  /* Specific for Header */
  --header-bg: #000000;
  --header-text: #ffffff;
  --header-border: rgba(249, 115, 22, 0.3);
}

[data-theme="dark"] {
  /* ── MODERN DARK THEME ── */
  --bg-deep: #020617;
  --bg-dark: #0f172a;
  --bg-glass: rgba(15, 23, 42, 0.75);
  --border-glass: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-primary: #818cf8;
  --accent-secondary: #fb7185;
  --glass-shadow: 0 12px 48px 0 rgba(0, 0, 0, 0.45);
  --accent-glow: rgba(129, 140, 248, 0.2);
  --modal-backdrop: rgba(2, 6, 23, 0.95);

  --header-bg: #020617;
  --header-text: #f8fafc;
  --header-border: rgba(255, 255, 255, 0.05);
}


/* ── BACKGROUND EFFECT ── */
body::before {
  content: '';
  position: fixed;
  inset: -10%;
  background: 
    radial-gradient(circle at 15% 15%, rgba(249, 115, 22, 0.03) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(16, 185, 129, 0.03) 0%, transparent 45%);
  z-index: -1;
  filter: blur(60px);
  animation: auroraPulse 25s ease-infinite alternate;
  opacity: 1;
}

[data-theme="dark"] body::before {
  background: 
    radial-gradient(circle at 20% 30%, rgba(249, 115, 22, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
  opacity: 0.6;
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent; /* Kept from original */
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  position: relative;
  transition: background-color 0.4s ease, color 0.4s ease;
  line-height: 1.6; /* Kept from original */
}


@keyframes auroraPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

/* ── UI COMPONENTS ── */

.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), 0 0 20px rgba(139, 92, 246, 0.1);
}

/* ── HEADER ── */

header {
  padding: 0.85rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  color: var(--header-text);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 900;
  font-size: 1.5rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--brand-orange);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 800;
  margin-right: 10px;
  font-size: 1.25rem;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-orange);
  color: white;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.4);
  transition: var(--transition);
}

.logo:hover .logo-icon {
  transform: rotate(-5deg) scale(1.05);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

.logo-text {
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
}


@media (max-width: 768px) {
  .desktop-only { display: none !important; }
}

@media (min-width: 769px) {
  .mobile-only { display: none !important; }
}

@media (max-width: 768px) {
  .header-tags { 
    display: flex !important; 
    gap: 0.2rem; 
    margin-right: -0.5rem;
  }
  .tag {
    font-size: 0.5rem !important;
    padding: 0.1rem 0.25rem !important;
    border-radius: 4px !important;
  }
  header { 
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  .logo { 
    font-size: 1.2rem;
    gap: 0.5rem;
  }
  .logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    margin-right: 6px;
  }
}

.tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.8rem;
  border-radius: 12px;
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.2);
  color: var(--accent-primary);
  white-space: nowrap;
  transition: var(--transition);
}

[data-theme="dark"] .tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
}

.badges-list {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.badge-item {
  font-size: 0.7rem;
  background: #fff;
  border: 1px solid var(--border-glass);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

[data-theme="dark"] .badge-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted);
  box-shadow: none;
}


/* ── LANGUAGE SWITCHER ── */
.lang-switcher {
  position: relative;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  font-weight: 600;
}

.lang-btn:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.lang-icon {
  font-size: 1.1rem;
}

/* Force absolute and hidden by default */
.lang-menu {
  position: absolute !important;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--bg-dark) !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-md);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  width: 200px;
  overflow: hidden;
  display: none !important;
  z-index: 9999;
  animation: slideDownCustom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-menu.show {
  display: block !important;
}

.lang-option {
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-option:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.lang-option.active {
  color: var(--accent-primary);
  background: rgba(139, 92, 246, 0.08);
}

@keyframes slideDownCustom {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .lang-menu {
    right: -20px;
    width: 180px;
  }
}

@media (max-width: 768px) {
  .lang-btn, .theme-btn {
    padding: 0.3rem 0.5rem;
  }
  #lang-label {
    display: none;
  }
}

.theme-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  margin-right: 0.5rem;
}

#theme-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

#theme-icon svg {
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.theme-btn:hover #theme-icon svg {
  transform: rotate(15deg) scale(1.1);
}

.theme-btn:hover {
  background: var(--border-glass);
  transform: translateY(-1px);
}

/* ── HERO ── */

.hero {
  text-align: center;
  padding: 0;
  max-width: 100%;
  margin: 0 auto;
}

.hero-content-inside {
  margin: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem; /* Reduced for ultra-compact */
}

.hero-content-inside p {
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  margin: 0 auto;
  animation: fadeIn 1s ease 0.4s both;
  line-height: 1.4;
}

.hero-content-inside {
  margin: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hero-content-inside h1 {
  font-size: clamp(1.4rem, 5.5vw, 2.8rem); /* Slightly smaller for mobile safety */
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -1.5px;
  color: #ffffff;
  margin: 0;
  white-space: nowrap;
  animation: fadeIn 1s ease 0.2s both;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 95vw;
}
@media (max-width: 480px) {
  .hero-content-inside h1 {
    letter-spacing: -1px;
    font-size: 1.5rem;
  }
}

.hero-content-inside h1 span {
  background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary), var(--success));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-eyebrow {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 100px;
  color: var(--accent-primary);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.8s ease;
}

.hero-extra-info {
  padding: 1rem 1rem;
}

/* ── SEARCH ── */

/* ── HERO SECTION BOX (CONTAINER) ── */
.hero-section-box {
  background: #020617;
  padding: 1rem 1rem 2rem;
  margin: 0;
  width: 100%;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  overflow: hidden; /* Prevent horizontal scroll from full-bleed elements */
}

@media (min-width: 1024px) {
  .hero-section-box {
    padding: 4rem 2rem 5rem;
    gap: 2rem;
  }
}

.search-container {
  max-width: 850px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  position: relative;
  animation: fadeInUp 0.8s ease 0.6s both;
}

/* Background glow for search area */
.search-container::before {
  content: '';
  position: absolute;
  inset: 10%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  z-index: -1;
  filter: blur(40px);
}

@media (max-width: 768px) {
  .search-container {
    margin-bottom: 1rem;
  }
}

.search-wrapper {
  background: #fff;
  padding: 0.4rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 800px;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

[data-theme="dark"] .search-wrapper {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
}

.search-input-group {
  flex: 1;
  display: flex;
  align-items: center;
}

input#url-input {
  flex: 1;
  padding: 0.8rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: #000;
  background: transparent;
  border: none;
  outline: none;
}

[data-theme="dark"] input#url-input {
  color: #fff;
}

input#url-input::placeholder {
  color: #94a3b8;
}

.btn-paste-overlay {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #000;
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  margin-left: 0.5rem;
}

[data-theme="dark"] .btn-paste-overlay {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

[data-theme="dark"] .btn-paste-overlay:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-primary);
}

.btn-search {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  border: none;
  padding: 0.8rem 2.5rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 8px 16px rgba(249, 115, 22, 0.3);
}

@media (max-width: 768px) {
  .search-wrapper {
    flex-direction: row;
    border-radius: 12px;
    padding: 0.35rem;
    gap: 0.35rem;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
  }
  input#url-input {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
  .btn-search {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    white-space: nowrap;
  }
  .btn-paste-overlay {
    background: #f8fafc;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .search-wrapper {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    gap: 0.75rem;
    flex-direction: column;
  }
  .search-input-group {
    padding: 0.25rem;
    width: 100%;
    display: flex;
    align-items: center;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  [data-theme="dark"] .search-input-group {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
  }
  input#url-input {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }
  .btn-paste-overlay {
    margin-right: 0.25rem;
    margin-left: 0;
    background: #f1f5f9;
    padding: 0.5rem 1rem;
    border-radius: 8px; /* Slightly smaller for internal pills */
  }
  .btn-search {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.3);
  }
  .btn-search:active {
    transform: scale(0.96);
    filter: brightness(0.9);
  }
}

/* ── SEO CONTENT SECTIONS ── */

.seo-info-section {
  max-width: 1000px;
  margin: 2rem auto 4rem;
  padding: 0 1.5rem;
  animation: fadeInUp 0.6s ease forwards;
}

.seo-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.seo-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  padding: 1.5rem;
  border-radius: 16px;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.seo-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.1);
}

.seo-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--accent-primary);
}

.seo-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.platform-seo-cta {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.btn-search.secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  box-shadow: none;
  font-size: 1rem;
  padding: 0.75rem 2rem;
}

.btn-search.secondary:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  transform: translateY(-2px);
}

@media (max-width: 480px) {
  .seo-info-grid {
    grid-template-columns: 1fr;
  }
}

/* ── PLATFORMS ── */

.platforms-carousel-container {
  position: relative;
  width: 100%;
}

.platforms-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .platforms-carousel-container::before,
  .platforms-carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    z-index: 5;
    pointer-events: none;
    transition: opacity 0.3s;
  }
  .platforms-carousel-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-dark), transparent);
  }
  .platforms-carousel-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-dark), transparent);
  }

  .platforms-grid {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 1rem 1.5rem;
    gap: 0.8rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    margin: 0 -1.5rem 1rem;
    cursor: grab;
  }
  .platforms-grid:active {
    cursor: grabbing;
  }
  .platform-card:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.1);
  }
  .platforms-grid::-webkit-scrollbar {
    display: none;
  }
  .platform-card {
    flex-shrink: 0;
    scroll-snap-align: center;
    padding: 0.6rem 1.2rem;
    font-size: 0.88rem;
  }
}

.platform-card {
  padding: 0.35rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
  cursor: pointer;
  color: #ffffff;
}

.platform-card.active {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(249, 115, 22, 0.3);
}


.p-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ── RESULTS ── */

#result {
  max-width: 1000px;
  margin: 0 auto 5rem;
  padding: 0 1.5rem;
}

.result-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 2rem;
}

@media (max-width: 850px) {
  .result-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.preview-container {
  position: sticky;
  top: 100px;
}

@media (max-width: 850px) {
  .preview-container {
    position: relative !important;
    top: 0 !important;
  }
}

.media-wrapper {
  width: 100%;
  aspect-ratio: 9/16;
  max-height: 600px;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.8);
}

@media (max-width: 480px) {
  .media-wrapper {
    max-height: 450px;
    border-radius: 12px;
  }
}

.media-wrapper img, .media-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.badge-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.data-badge {
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.format-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.download-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.download-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .download-card:hover {
    transform: none;
  }
  .download-card:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.98);
  }
}

.dl-details h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.dl-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.75rem;
}

.dl-button {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 8px 16px rgba(139, 92, 246, 0.3);
  transition: var(--transition);
}

.download-card.downloading .dl-button {
  transform: rotate(360deg);
  background: var(--success);
}


.res-tag {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
}
.res-HD { color: #facc15; }
.res-4K { color: #fb7185; }

.nowm-tag {
  background: linear-gradient(135deg, #00f2ea, #ff0050);
  color: #fff;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
}

/* Platform Specific Colors for Badges */
.plat-instagram { border-color: #e1306c !important; color: #fff !important; background: rgba(225, 48, 108, 0.1) !important; }
.plat-tiktok { border-color: #00f2ea !important; color: #fff !important; background: rgba(0, 242, 234, 0.1) !important; }
.plat-youtube { border-color: #ff0000 !important; color: #fff !important; background: rgba(255, 0, 0, 0.1) !important; }
.plat-twitter { border-color: #1da1f2 !important; color: #fff !important; background: rgba(29, 161, 242, 0.1) !important; }
.plat-facebook { border-color: #1877f2 !important; color: #fff !important; background: rgba(24, 119, 242, 0.1) !important; }
.plat-vk { border-color: #4c75a3 !important; color: #fff !important; background: rgba(76, 117, 163, 0.1) !important; }

.modal-social-proof {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.proof-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.proof-badge i {
  font-size: 1rem;
}

/* ── VISIBILITY MODIFIERS ── */
.loader, .error-msg, .result, .list-result, .ig-profile {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.loader.show {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transform: translateY(0);
  margin: 3rem 0;
}

.error-msg.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
  margin: 2rem auto;
}

.ig-profile {
  margin-top: 2rem;
}

.ig-profile-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 3rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.ig-profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem 1.5rem;
  position: relative;
}

@media (min-width: 768px) {
  .ig-profile-header {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
  }
}

.ig-avatar-container {
  position: relative;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .ig-avatar-container {
    margin-bottom: 0;
    flex-shrink: 0;
  }
}

.ig-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid var(--accent-primary);
  padding: 3px;
  object-fit: cover;
  background: #111;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5), 0 0 15px var(--accent-glow);
}

@media (min-width: 768px) {
  .ig-avatar {
    width: 120px;
    height: 120px;
  }
}

.ig-info {
  flex: 1;
  text-align: center;
}

@media (min-width: 768px) {
  .ig-info {
    text-align: left;
  }
}

.ig-username {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.ig-fullname {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.ig-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .ig-stats {
    justify-content: flex-start;
  }
}

.ig-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 768px) {
  .ig-stat {
    align-items: flex-start;
  }
}

.ig-stat-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.ig-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.ig-bio {
  color: #e2e8f0;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .ig-bio {
    margin: 0;
  }
}

.ig-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .ig-posts-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px; /* Instagram style grid */
    padding: 0 4px;
  }
  .ig-post-card {
    border-radius: 4px;
  }
}

@media (min-width: 769px) {
  .ig-posts-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
  }
}

.ig-post-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1/1;
  cursor: pointer;
}

.ig-post-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.ig-post-card:hover .ig-post-thumb {
  transform: scale(1.05);
}

.ig-post-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
}

.ig-post-card:hover .ig-post-overlay {
  opacity: 1;
}

.ig-post-stats {
  display: flex;
  gap: 1rem;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
}

.ig-post-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ig-post-type {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.25rem;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.result.show, .list-result.show, .ig-profile.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ── MODAL PREVIEW ── */
.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.preview-modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(10px);
}


.modal-inner {
  position: relative;
  width: 95%;
  max-width: 1200px;
  height: 85vh;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 350px;
  background: rgba(10, 10, 26, 0.7);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.8), 0 0 20px rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
}

@media (max-width: 1000px) {
  .modal-inner {
    grid-template-columns: 1fr;
    height: 92vh;
    width: 95%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-radius: var(--radius-md);
  }
  .modal-carousel-container {
    height: 40vh; /* Reducido de 50vh para dar más espacio a las descargas */
    min-height: 300px;
    flex-shrink: 0;
  }
  .modal-sidebar {
    height: auto;
    overflow-y: visible;
  }
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 200;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.modal-carousel-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
}

.modal-sidebar {
  background: var(--bg-glass);
  border-left: 1px solid var(--border-glass);
  padding: 1.5rem; /* Reducido de 2rem */
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

@media (max-width: 1000px) {
  .modal-sidebar {
    border-left: none;
    border-top: 1px solid var(--border-glass);
  }
}

.carousel-track-viewport {
  width: 100%;
  height: 100%;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.carousel-slide img, .carousel-slide video {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.carousel-nav {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  display: flex !important;
  justify-content: space-between;
  padding: 0 1rem;
  pointer-events: none;
  transform: translateY(-50%);
  z-index: 150;
}

.carousel-btn {
  pointer-events: auto;
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  min-height: 50px !important;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.carousel-btn:hover {
  background: var(--accent-primary);
  transform: scale(1.1);
}

.carousel-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(4px);
  border-radius: 20px;
}

.carousel-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .carousel-dots .dot {
    width: 12px;
    height: 12px;
  }
}

.carousel-dots .dot.active {
  background: var(--accent-primary);
  transform: scale(1.3);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Slide Actions (Download inside modal) */
.slide-actions {
  position: absolute;
  bottom: 4rem;
  right: 2rem;
  display: flex;
  gap: 1rem;
}

.modal-dl-btn {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 10px 20px rgba(139, 92, 246, 0.4);
  transition: var(--transition);
}

.modal-dl-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(139, 92, 246, 0.5);
}

@media (max-width: 1000px) {
  .modal-inner { 
    height: 90vh; 
    width: 100%;
    border-radius: 0;
    margin-top: auto;
  }
  .modal-close { 
    top: 1rem; 
    right: 1rem; 
    background: rgba(0, 0, 0, 0.6);
  }
  .slide-actions { 
    bottom: 1.5rem; 
    left: 1rem; 
    right: 1rem; 
    justify-content: stretch; 
  }
  .modal-dl-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── ESSENTIALS ── */
.loader {
  width: 100%;
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-msg {
  max-width: 600px;
  margin: 0 auto;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  color: var(--error);
  text-align: center;
}

/* ── PRO CONVERSION UI ── */
.pro-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pro-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-radius: 100px;
  text-decoration: none;
  color: #fff;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255,255,255,0.05); /* Fallback */
}

.pro-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.pro-btn-primary { background: linear-gradient(135deg, #2563eb, #3b82f6); box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3); }
.pro-btn-premium { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3); }
.pro-btn-audio { background: linear-gradient(135deg, #8b5cf6, #d946ef); box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3); }

.pro-btn-icon {
  font-size: 1.5rem;
  background: rgba(0,0,0,0.2);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pro-btn-text {
  display: flex;
  flex-direction: column;
}

.pro-btn-title {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.2;
}

.pro-btn-sub {
  display: block;
  font-size: 0.75rem;
  opacity: 0.8;
  font-weight: 600;
}

.pro-multi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.pro-multi-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.pro-multi-item:hover {
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-5px);
}

.pro-multi-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.pro-multi-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
}

.pro-btn-sm {
  padding: 0.75rem 1rem;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  border-radius: 12px;
  gap: 0.5rem;
}


/* ── FEATURES SECTION ── */
.features-section {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 1.5rem;
  text-align: center;
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
  opacity: 1;
  transform: translateY(0);
  overflow: hidden; /* Protection */
  position: relative;
  z-index: 10;
}

.features-section.hide-features {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  visibility: hidden;
  height: 0;
  margin: 0;
  overflow: hidden;
}

.features-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  text-align: center;
  font-weight: 900;
  margin-bottom: 5rem;
  letter-spacing: -2px;
  color: #0f172a; /* Fallback */
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .features-title {
    background: linear-gradient(135deg, #0f172a 20%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

[data-theme="dark"] .features-title {
  color: #fff; /* Fallback */
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  [data-theme="dark"] .features-title {
    background: linear-gradient(135deg, #fff 40%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}


.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--bg-glass);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid var(--border-glass);
  border-radius: 32px;
  padding: 4rem 2.5rem;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px -10px rgba(0,0,0,0.05);
}

.feature-card:hover {
  transform: translateY(-12px) scale(1.02);
  border-color: var(--accent-primary);
  box-shadow: 0 40px 80px -15px rgba(0, 0, 0, 0.15), 0 0 30px rgba(249, 115, 22, 0.15);
}

.feature-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(249, 115, 22, 0.05));
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2.5rem;
  color: #f97316;
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.1);
  transition: var(--transition);
}

.feature-card:hover .feature-icon {
  background: var(--accent-primary);
  color: #fff;
  transform: rotate(5deg) scale(1.1);
  box-shadow: 0 15px 30px rgba(249, 115, 22, 0.3);
}

.feature-icon svg {
  width: 32px !important;
  height: 32px !important;
  display: block;
}

.feature-h {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  color: var(--text-main);
  letter-spacing: -0.5px;
}


.feature-p {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
  font-weight: 500;
}

@media (max-width: 768px) {
  .features-section {
    margin: 4rem auto 2rem;
  }
  .features-title {
    margin-bottom: 2.5rem;
  }
  .feature-card {
    padding: 2.5rem 1.5rem;
  }
}
/* ── HOW TO DOWNLOAD ── */
.how-to-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.how-to-trigger:hover {
    color: var(--accent-primary);
    opacity: 1;
    transform: translateY(-1px);
}

.how-to-icon {
    font-size: 1.1rem;
}

.instructions-modal-inner {
    max-width: 600px;
    height: auto;
    max-height: 90vh;
    padding: 3rem 2rem;
    background: var(--bg-dark);
    display: block;
    overflow-y: auto;
}

[data-theme="dark"] .instructions-modal-inner {
    background: #0f172a;
}

.instructions-content {
    text-align: left;
}

.instructions-content h2 {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ins-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ins-step {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.ins-step-num {
    width: 32px;
    height: 32px;
    background: var(--accent-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.ins-step-text h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.ins-step-text p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── LEGAL PAGES ── */
.legal-page {
  background: var(--bg-deep);
}

.legal-container {
  max-width: 900px;
  margin: 4rem auto 6rem;
  padding: 0 1.5rem;
}

.legal-card {
  background: var(--bg-glass);
  backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid var(--border-glass);
  border-radius: 32px;
  padding: 5rem 4rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}

.legal-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 2rem;
  letter-spacing: -2px;
  color: var(--text-main);
  text-align: center;
}

.legal-intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 4rem;
  line-height: 1.6;
}

.legal-section {
  margin-bottom: 3rem;
}

.legal-section h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  color: var(--accent-primary);
  letter-spacing: -0.5px;
}

.legal-section p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
}

@media (max-width: 768px) {
  .legal-container {
    margin: 2rem auto 4rem;
  }
  .legal-card {
    padding: 3rem 1.5rem;
    border-radius: 20px;
  }
  .legal-title {
    font-size: 1.8rem;
  }
}

/* ── FAQ SECTION ── */
.faq-section {
  max-width: 900px;
  margin: 6rem auto;
  padding: 0 1.5rem;
}

.faq-title {
  text-align: center;
  font-size: 2.25rem;
  font-weight: 900;
  margin-bottom: 3rem;
  color: var(--text-main);
  letter-spacing: -1px;
}

.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.5rem;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.05);
}

.faq-question {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.faq-answer {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 1rem;
  font-weight: 500;
}

@media (max-width: 768px) {
  .faq-section { margin: 4rem auto; }
  .faq-title { font-size: 1.75rem; }
  .faq-question { font-size: 1.05rem; }
}


