/* ============================================
   CREATOR TOOLS — LAYOUT & NAVIGATION
   ============================================ */

/* --- Modern Glass Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(9, 10, 15, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: border-color var(--transition-base);
  width: 100%;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* Brand Logo */
.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.header__logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--yt-red) 0%, #C40028 100%);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px var(--yt-red-glow);
  color: #FFFFFF;
}

.header__logo-text span {
  color: var(--yt-red);
}

/* Nav Links (Desktop) - Scrollable Capsule with Horizontal Line */
.header__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 8px 6px 8px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  max-width: calc(100vw - 360px);
  scrollbar-width: thin;
  scrollbar-color: var(--yt-red) rgba(255, 255, 255, 0.04);
}

/* Red Horizontal Scroll Line directly under tools */
.header__nav::-webkit-scrollbar {
  height: 3px;
  display: block;
}

.header__nav::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.header__nav::-webkit-scrollbar-thumb {
  background: var(--yt-red);
  border-radius: 4px;
  box-shadow: 0 0 6px var(--yt-red-glow);
}

.header__nav::-webkit-scrollbar-thumb:hover {
  background: #FF2B4E;
}

.header__nav-link {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.header__nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.header__nav-link.active {
  color: #FFFFFF;
  background: var(--surface-active);
  box-shadow: var(--shadow-sm);
}

/* Quick Action button in header */
.header__cta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Mobile Hamburger Toggle */
.header__menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
}

/* ============================================
   TOP HORIZONTAL MOBILE TOOLS BAR (APP BAR PILLS ON MOBILE)
   ============================================ */
.mobile-tools-bar {
  display: none;
  background: rgba(11, 13, 20, 0.96);
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  position: sticky;
  top: 64px;
  z-index: 990;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  width: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--yt-red) rgba(255, 255, 255, 0.03);
}

.mobile-tools-bar::-webkit-scrollbar {
  height: 3px;
  display: block;
}

.mobile-tools-bar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.mobile-tools-bar::-webkit-scrollbar-thumb {
  background: var(--yt-red);
  border-radius: 4px;
}

.mobile-tools-bar__inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
}

.mobile-tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.mobile-tool-pill:hover, .mobile-tool-pill.active {
  color: #FFFFFF;
  background: var(--yt-red);
  border-color: var(--yt-red);
  box-shadow: 0 2px 10px var(--yt-red-glow);
}

@media (max-width: 860px) {
  .header__menu-btn {
    display: flex;
  }

  .header__nav {
    display: none;
    position: absolute;
    top: 65px;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    gap: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-width: 100%;
  }

  .header__nav.open {
    display: flex;
  }

  .header__nav-link {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
  }

  .header__cta .btn--cta-hide {
    display: none;
  }

  /* Show Top Mobile Tool Bar on mobile */
  .mobile-tools-bar {
    display: block;
  }
}

/* --- Hero Section --- */
.hero {
  padding: 48px 0 36px;
  text-align: center;
  width: 100%;
}

.hero__badge-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--yt-red-soft);
  border: 1px solid rgba(255, 0, 51, 0.25);
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #FF4D6D;
  letter-spacing: 0.02em;
  max-width: 95%;
  word-break: break-word;
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  background: var(--yt-red);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--yt-red);
  animation: pulseGlow 2s infinite;
  flex-shrink: 0;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.hero__title {
  max-width: 840px;
  margin: 0 auto 16px;
  background: linear-gradient(180deg, #FFFFFF 30%, #94A3B8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  word-break: break-word;
}

.hero__subtitle {
  max-width: 620px;
  margin: 0 auto 28px;
  font-size: 1.05rem;
  color: var(--text-secondary);
  word-break: break-word;
}

/* --- Sections --- */
.section {
  padding: 56px 0;
  width: 100%;
}

.section__header {
  text-align: center;
  margin-bottom: 36px;
}

.section__title {
  margin-bottom: 12px;
  word-break: break-word;
}

.section__subtitle {
  max-width: 500px;
  margin: 0 auto;
  font-size: 1rem;
  word-break: break-word;
}

/* --- Tool Cards Grid (Homepage) --- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
}

@media (max-width: 920px) {
  .tool-grid { grid-template-columns: 1fr; }
}

.tool-card {
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
  backdrop-filter: blur(12px);
  width: 100%;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: all var(--transition-base);
}

.tool-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.tool-card:hover::before {
  background: linear-gradient(90deg, transparent, var(--yt-red), transparent);
}

.tool-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.tool-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.tool-card:hover .tool-card__icon {
  transform: scale(1.06);
}

.tool-card__icon--red {
  background: var(--yt-red-soft);
  color: var(--yt-red);
  border: 1px solid rgba(255, 0, 51, 0.2);
}

.tool-card__icon--indigo {
  background: var(--indigo-soft);
  color: var(--indigo);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.tool-card__icon--emerald {
  background: var(--emerald-soft);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.tool-card__pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.tool-card__title {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.tool-card__desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 20px;
  flex-grow: 1;
}

.tool-card__action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tool-card__action-arrow {
  color: var(--yt-red);
  transition: transform var(--transition-fast);
}

.tool-card:hover .tool-card__action-arrow {
  transform: translateX(4px);
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  width: 100%;
}

@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; }
}

.feature-card {
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.feature-card__icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  flex-shrink: 0;
}

.feature-card__title { font-size: 1.1rem; }
.feature-card__text { font-size: 0.9rem; }

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 42px 0 32px;
  background: rgba(9, 10, 15, 0.98);
  margin-top: 60px;
  width: 100%;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer__copy {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer__link {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: #FFFFFF;
}

/* ============================================
   MOBILE RESPONSIVENESS OVERRIDES
   ============================================ */
@media (max-width: 640px) {
  .hero {
    padding: 28px 0 20px;
  }

  .hero__title {
    font-size: 1.6rem;
    line-height: 1.25;
    padding: 0 4px;
  }

  .hero__subtitle {
    font-size: 0.9rem;
    margin-bottom: 20px;
    padding: 0 4px;
  }

  .hero-input-card {
    padding: 14px;
    border-radius: var(--radius-lg);
    width: 100%;
    margin-bottom: 24px;
  }

  .hero-input-wrapper {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .hero-input-wrapper .input-main {
    width: 100%;
    font-size: 0.9rem;
    padding: 12px 14px;
  }

  .hero-input-wrapper .btn {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
    font-size: 0.95rem;
  }

  .quick-samples {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    width: 100%;
  }

  .tool-card {
    padding: 22px 18px;
  }

  .section {
    padding: 36px 0;
  }

  .footer {
    padding: 32px 0 24px;
    margin-top: 40px;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .footer__links {
    justify-content: center;
    gap: 10px 14px;
  }
}
