/* ============================================
   MYM.fans Downloader - Premium UI v2.0
   Direction: Editorial + Tech, Warm + Modern
   ============================================ */

/* === IMPORTS === */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Work+Sans:wght@300;400;500;600&display=swap');

/* === CSS VARIABLES === */
:root {
  /* Colors - Warm Coral + Deep Blue */
  --color-coral-100: #fff5f2;
  --color-coral-200: #ffe4db;
  --color-coral-300: #ffcab8;
  --color-coral-400: #ff9b7a;
  --color-coral-500: #ff7a52;
  --color-coral-600: #f05a2e;

  --color-blue-100: #e8f0ff;
  --color-blue-200: #c9d9f7;
  --color-blue-500: #4a6cf7;
  --color-blue-600: #3451b2;
  --color-blue-700: #1e3a8a;
  --color-blue-900: #0f172a;

  --color-teal-400: #2dd4bf;
  --color-teal-500: #14b8a6;

  --color-green-400: #4ade80;
  --color-green-500: #22c55e;
  --color-green-600: #16a34a;

  --color-red-400: #f87171;
  --color-red-500: #ef4444;

  /* Surfaces */
  --surface-bg: #0c0f1a;
  --surface-card: rgba(26, 32, 53, 0.7);
  --surface-card-hover: rgba(30, 38, 62, 0.85);
  --surface-input: rgba(22, 28, 48, 0.8);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Glass effect */
  --glass-blur: 16px;
  --glass-border: rgba(255, 255, 255, 0.08);

  /* Shadows */
  --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.25);
  --shadow-glow-coral: 0 0 30px rgba(255, 122, 82, 0.15);
  --shadow-glow-blue: 0 0 30px rgba(74, 108, 247, 0.15);

  /* Gradients */
  --gradient-coral: linear-gradient(135deg, var(--color-coral-500) 0%, var(--color-coral-400) 100%);
  --gradient-blue: linear-gradient(135deg, var(--color-blue-500) 0%, var(--color-blue-600) 100%);
  --gradient-success: linear-gradient(135deg, var(--color-green-500) 0%, var(--color-teal-500) 100%);
  --gradient-hero: linear-gradient(135deg, var(--color-coral-500) 0%, var(--color-blue-500) 100%);
  --gradient-bg: radial-gradient(ellipse at top, #1a1f35 0%, var(--surface-bg) 60%);

  /* Typography */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Work Sans', system-ui, sans-serif;

  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-primary);
  background: var(--gradient-bg);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
  padding: 0;
  margin: 0;
  position: relative;
  overflow-x: hidden;
}

/* Background noise pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
}

.display-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* === LAYOUT === */
.container {
  position: relative;
  z-index: 1;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* === HERO HEADER === */
.hero-header {
  text-align: center;
  padding: 3rem 2rem 2rem;
  margin-bottom: 2rem;
  position: relative;
}

.hero-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: var(--gradient-coral);
  filter: blur(80px);
  opacity: 0.2;
  border-radius: 50%;
  z-index: -1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--surface-card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  animation: fadeSlideUp 0.6s ease-out;
}

.hero-badge i {
  color: var(--color-coral-400);
}

.hero-title {
  animation: fadeSlideUp 0.6s ease-out 0.1s both;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  animation: fadeSlideUp 0.6s ease-out 0.2s both;
}

.hero-links {
  margin-top: 1.5rem;
  animation: fadeSlideUp 0.6s ease-out 0.3s both;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--gradient-blue);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-glow-blue);
}

.hero-links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(74, 108, 247, 0.3);
}

/* === GLASS CARDS === */
.card {
  background: var(--surface-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  margin-bottom: 1.5rem;
  overflow: hidden;
  transition: all var(--transition-base);
}

.card:hover {
  background: var(--surface-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}

.card-header.header-primary {
  background: var(--gradient-blue);
  color: white;
}

.card-header.header-success {
  background: var(--gradient-success);
  color: white;
}

.card-header.header-info {
  background: linear-gradient(135deg, var(--color-blue-500) 0%, var(--color-teal-500) 100%);
  color: white;
}

.card-header.header-dark {
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-primary);
}

.card-body {
  padding: 1.5rem;
}

/* === FORM ELEMENTS === */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-label b {
  color: var(--color-coral-400);
  font-weight: 500;
}

.input-group {
  display: flex;
  position: relative;
}

.input-group-text {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--glass-border);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  color: var(--text-muted);
}

.form-control {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--surface-input);
  border: 1px solid var(--glass-border);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--transition-base);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-blue-500);
  box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.15);
  background: rgba(26, 32, 53, 0.9);
}
.form-control:focus{
    color:white;
}
.form-control::placeholder {
  color: var(--text-muted);
}

/* Standalone inputs */
.form-control:not(.input-group .form-control) {
  border-radius: var(--radius-md);
}

textarea.form-control {
  border-radius: var(--radius-md);
  resize: vertical;
  min-height: 100px;
}

.form-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* Checkbox */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-check-input {
  width: 18px;
  height: 18px;
  background: var(--surface-input);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
}

.form-check-input:checked {
  background: var(--gradient-blue);
  border-color: var(--color-blue-500);
}

.form-check-input:checked::after {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.form-check-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-blue);
  color: white;
  box-shadow: 0 4px 15px rgba(74, 108, 247, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(74, 108, 247, 0.35);
}

.btn-success {
  background: var(--gradient-success);
  color: white;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.25);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(34, 197, 94, 0.35);
}

.btn-outline-secondary {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

.btn-outline-secondary:hover {
  background: var(--surface-card);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-outline-primary {
  background: transparent;
  border: 1px solid var(--color-blue-500);
  color: var(--color-blue-500);
}

.btn-outline-primary:hover {
  background: var(--gradient-blue);
  color: white;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.download-btn {
  transition: all var(--transition-base);
}

.download-btn:hover {
  transform: scale(1.05);
}

/* === ALERTS === */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  backdrop-filter: blur(8px);
}

.alert-dismissible {
  position: relative;
  padding-right: 3rem;
}

.alert .btn-close {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0;
  line-height: 1;
}

.alert .btn-close:hover {
  opacity: 1;
}

.alert-info {
  background: rgba(74, 108, 247, 0.1);
  border-color: rgba(74, 108, 247, 0.3);
  color: var(--color-blue-100);
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--color-green-400);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--color-red-400);
}

.alert-secondary {
  background: var(--surface-card);
  border-color: var(--glass-border);
  color: var(--text-secondary);
}

/* === PROGRESS BARS === */
.progress {
  height: 12px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 100px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.progress-bar {
  height: 100%;
  border-radius: 100px;
  transition: width var(--transition-base);
  background: var(--gradient-blue);
}

.progress-bar.bg-success {
  background: var(--gradient-success);
}

.progress-bar-striped {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 1rem 1rem;
}

.progress-bar-animated {
  animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
  from { background-position: 1rem 0; }
  to { background-position: 0 0; }
}

/* === BADGES === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 100px;
}

.badge.bg-primary {
  background: var(--gradient-blue);
  color: white;
}

.badge.bg-success {
  background: var(--gradient-success);
  color: white;
}

.badge.bg-info {
  background: linear-gradient(135deg, var(--color-blue-500) 0%, var(--color-teal-500) 100%);
  color: white;
}

/* === TERMINAL OUTPUT === */
#output {
  height: 300px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.6);
  color: var(--color-teal-400);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
  border: 1px solid var(--glass-border);
}

/* === TABS === */
.nav-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: none;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-tabs .nav-item {
  flex: 1;
}

.nav-tabs .nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  width: 100%;
  text-decoration: none;
}

.nav-tabs .nav-link:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

.nav-tabs .nav-link.active {
  color: var(--color-coral-400);
  background: var(--surface-card);
  border-bottom: 2px solid var(--color-coral-400);
}

.tab-content {
  padding-top: 0.5rem;
}

.tab-pane {
  display: none;
}

.tab-pane.show.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.instructions-card {
  max-height: 350px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.instructions-card h4 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.instructions-card ol {
  padding-left: 1.25rem;
  color: var(--text-secondary);
}

.instructions-card ol li {
  margin-bottom: 0.75rem;
}

/* === LINKS === */
a {
  color: var(--color-blue-500);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-coral-400);
}

/* === CODE === */
code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--color-teal-400);
}

/* === FOOTER === */
footer {
  text-align: center;
  padding: 2rem 0;
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer p {
  margin: 0;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered section animations */
.section-animate {
  opacity: 0;
  animation: fadeSlideUp 0.6s ease-out forwards;
}

.section-animate:nth-child(1) { animation-delay: 0.1s; }
.section-animate:nth-child(2) { animation-delay: 0.2s; }
.section-animate:nth-child(3) { animation-delay: 0.3s; }
.section-animate:nth-child(4) { animation-delay: 0.4s; }
.section-animate:nth-child(5) { animation-delay: 0.5s; }
.section-animate:nth-child(6) { animation-delay: 0.6s; }
.section-animate:nth-child(7) { animation-delay: 0.7s; }

/* Pulse animation for error */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.alert-danger.auth-error {
  animation: pulse 2s infinite;
}

/* === UTILITIES === */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted) !important; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.me-1 { margin-right: 0.25rem; }
.me-2 { margin-right: 0.5rem; }
.me-3 { margin-right: 1rem; }
.my-3 { margin-top: 1rem; margin-bottom: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.p-0 { padding: 0; }
.w-100 { width: 100%; }
.d-none { display: none !important; }
.d-flex { display: flex; }
.d-block { display: block; }
.d-grid { display: grid; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.g-3 { gap: 1rem; }
.row { display: flex; flex-wrap: wrap; margin: -0.5rem; }
.row > * { padding: 0.5rem; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* === RESPONSIVE === */
@media (min-width: 768px) {
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .col-md-10 { flex: 0 0 83.333%; max-width: 83.333%; }
  .text-md-end { text-align: right; }
}

@media (max-width: 767px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-header {
    padding: 2rem 1rem 1.5rem;
  }

  .display-title {
    font-size: 1.75rem;
  }

  .card-body {
    padding: 1rem;
  }

  .nav-tabs .nav-link {
    font-size: 0.8rem;
    padding: 0.6rem 0.5rem;
  }

  .btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }
}

/* Layout centering */
.justify-content-center {
  justify-content: center;
}

/* Fade show for Bootstrap compatibility */
.fade:not(.show) {
  opacity: 0;
}

.fade.show {
  opacity: 1;
  transition: opacity var(--transition-base);
}

/* Spinner */
.spinner-border {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
  to { transform: rotate(360deg); }
}

    .col-md-6 {
        flex: 0 0 50%;
        max-width: 49%;
    }

