/* ==========================================================================
   LinkedIn Video Downloader - Official Brand Styling
   Clean, Minimal, Modern Layout with Authentic LinkedIn Blue (#0A66C2)
   ========================================================================== */

:root {
  /* Official LinkedIn Brand Colors */
  --li-blue: #0A66C2;
  --li-blue-hover: #004182;
  --li-blue-dark: #003366;
  --li-blue-light: #EBF4FC;
  --li-blue-subtle: rgba(10, 102, 194, 0.08);
  --li-blue-border: rgba(10, 102, 194, 0.25);

  /* Neutrals & Dark Grays */
  --color-white: #FFFFFF;
  --color-black: #000000;
  --color-text-main: #191919;
  --color-text-muted: #666666;
  --color-text-subtle: #8C8C8C;
  --color-bg-gray: #F3F2EF;
  --color-surface-hover: #F8FAFC;
  --color-border: #E0E0E0;
  --color-border-light: #EBEBEB;

  /* Status Colors */
  --color-error-bg: #FFEBE9;
  --color-error-border: #FA755A;
  --color-error-text: #C32A2A;
  --color-success: #057642;

  /* Typography */
  --font-main: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Radii & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.18);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-white);
  color: var(--color-text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   1. Minimal Header: ONLY the Official LinkedIn Logo
   ========================================================================== */
.header {
  background: var(--li-blue);
  width: 100%;
  padding: 24px 20px 14px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.header-inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease;
}

.logo-link:hover {
  transform: scale(1.06);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.22));
}

.li-header-logo {
  width: 134px;
  height: 34px;
  display: block;
}

/* ==========================================================================
   2. Hero Section: LinkedIn Blue Branding (#0A66C2)
   ========================================================================== */
.hero-section {
  background: var(--li-blue);
  padding: 16px 20px 72px 20px;
  width: 100%;
  position: relative;
}

.hero-container {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero-title {
  color: var(--color-white);
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.08rem;
  font-weight: 500;
  margin-bottom: 32px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* Downloader Form */
.downloader-form {
  display: flex;
  flex-direction: row;
  gap: 12px;
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}

.input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.input-wrapper:focus-within {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22), 0 0 0 3px rgba(255, 255, 255, 0.6);
}

.paste-btn, .clear-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-subtle);
  padding: 0 14px;
  height: 100%;
  transition: color 0.15s ease, transform 0.15s ease;
}

.paste-btn:hover {
  color: var(--li-blue);
  transform: scale(1.08);
}

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

.url-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-main);
  font-size: 1.02rem;
  color: var(--color-text-main);
  background: transparent;
  padding: 16px 8px 16px 2px;
  width: 100%;
}

.url-input::placeholder {
  color: #8C8C8C;
  font-size: 0.98rem;
}

/* Prominent Download Button */
.download-btn {
  background: var(--color-white);
  color: var(--li-blue);
  font-family: var(--font-main);
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 32px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 136px;
  min-height: 54px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.download-btn:hover {
  background: #F2F7FC;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

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

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

/* Spinner */
.spinner {
  width: 22px;
  height: 22px;
  animation: spin 0.85s linear infinite;
}

.spinner-track {
  opacity: 0.25;
}

.spinner-head {
  stroke: var(--li-blue);
}

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

/* Feedback Area: Loading / Status */
.status-container {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.status-loading {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  color: var(--color-white);
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background: var(--color-white);
  border-radius: 50%;
  animation: pulseDot 1.4s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% {
    transform: scale(0.7);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Feedback Area: Error */
.error-container {
  margin-top: 24px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  background: #FFF5F5;
  border: 1px solid #FFD0D0;
  border-left: 4px solid #E02424;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.error-icon {
  color: #E02424;
  flex-shrink: 0;
  margin-top: 2px;
}

.error-content strong {
  display: block;
  color: #9B1C1C;
  font-size: 0.98rem;
  margin-bottom: 2px;
}

.error-content p {
  color: #771D1D;
  font-size: 0.92rem;
  line-height: 1.4;
}

.error-action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--li-blue);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: 8px;
}

.error-action-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Result Card: Real Video Preview & Download Details
   ========================================================================== */
.result-container {
  margin-top: 36px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.result-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;
  display: grid;
  grid-template-columns: 290px 1fr;
  color: var(--color-text-main);
  border: 1px solid var(--color-border);
}

.result-video-wrapper {
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 260px;
}

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

.result-details {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.result-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--color-border);
}

.author-text {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text-main);
  line-height: 1.2;
}

.author-badge {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.quality-badge {
  background: var(--li-blue-light);
  color: var(--li-blue);
  border: 1px solid var(--li-blue-border);
}

.video-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 16px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Quality Selector */
.quality-selector-wrapper {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border-light);
}

.quality-select-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.quality-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quality-pill-btn {
  background: var(--color-bg-gray);
  color: var(--color-text-main);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-main);
}

.quality-pill-btn:hover {
  background: var(--li-blue-light);
  border-color: var(--li-blue);
  color: var(--li-blue);
}

.quality-pill-btn.active {
  background: var(--li-blue);
  border-color: var(--li-blue);
  color: var(--color-white);
  box-shadow: 0 2px 6px rgba(10, 102, 194, 0.3);
}

/* Meta Row */
.meta-row {
  display: flex;
  gap: 18px;
  margin-bottom: 22px;
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--color-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.meta-val {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin-top: 2px;
}

.highlight-val {
  color: var(--color-success);
}

/* Action Buttons */
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.18s ease;
}

.download-action-btn {
  background: var(--li-blue);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(10, 102, 194, 0.3);
}

.download-action-btn:hover {
  background: var(--li-blue-hover);
  box-shadow: 0 6px 18px rgba(10, 102, 194, 0.4);
  transform: translateY(-1px);
}

.li-watch-action-btn {
  background: var(--color-bg-gray);
  color: var(--color-text-main);
  border: 1px solid var(--color-border);
}

.li-watch-action-btn:hover {
  background: var(--li-blue-light);
  border-color: var(--li-blue);
  color: var(--li-blue);
}

.secondary-action-btn {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.secondary-action-btn:hover {
  background: var(--color-bg-gray);
  color: var(--color-text-main);
}

.text-action-btn {
  background: none;
  border: none;
  color: var(--color-text-subtle);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px;
}

.text-action-btn:hover {
  color: var(--li-blue);
  text-decoration: underline;
}

/* ==========================================================================
   3. Content Section: Pure White Background (#FFFFFF) Immediately Below Hero
   ========================================================================== */
.content-section {
  background: var(--color-white);
  padding: 64px 20px 80px 20px;
  flex: 1;
  width: 100%;
}

.content-container {
  max-width: 860px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-text-main);
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 36px;
}

/* 3-Step Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 28px 22px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.step-card:hover {
  transform: translateY(-4px);
  border-color: var(--li-blue-border);
  box-shadow: var(--shadow-sm);
}

.step-badge {
  width: 44px;
  height: 44px;
  background: var(--li-blue);
  color: var(--color-white);
  border-radius: 50%;
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px auto;
  box-shadow: 0 4px 12px rgba(10, 102, 194, 0.25);
}

.step-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 8px;
  line-height: 1.3;
}

.step-desc {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--color-border-light);
  margin: 54px 0 48px 0;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-item {
  text-align: center;
  padding: 0 10px;
}

.feature-icon {
  width: 46px;
  height: 46px;
  background: var(--li-blue-light);
  color: var(--li-blue);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px auto;
}

.feature-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 6px;
}

.feature-text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   4. Footer
   ========================================================================== */
.footer {
  background: var(--color-white);
  border-top: 1px solid var(--color-border-light);
  padding: 28px 20px;
  text-align: center;
}

.footer-container {
  max-width: 860px;
  margin: 0 auto;
}

.footer-text {
  font-size: 0.85rem;
  color: var(--color-text-subtle);
  line-height: 1.6;
}

/* Utility Helpers */
.hidden {
  display: none !important;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.85rem;
  }

  .downloader-form {
    flex-direction: column;
    gap: 10px;
  }

  .download-btn {
    width: 100%;
    padding: 16px 20px;
  }

  .result-card {
    grid-template-columns: 1fr;
  }

  .result-video-wrapper {
    min-height: 220px;
    max-height: 320px;
  }

  .steps-grid, .features-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .step-card {
    padding: 20px 18px;
  }
}
