/* ================================================================
   Aria2 Work — Components
   ================================================================ */

/* ---------------------------------------------------------------
   1. Buttons
   --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: var(--primary-500);
  color: white;
}

.btn--primary:hover {
  background: var(--primary-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.btn--secondary {
  background: white;
  color: var(--gray-800);
  border: 1px solid var(--gray-200);
}

.btn--secondary:hover {
  border-color: var(--gray-300);
  background: var(--gray-50);
}

.btn--ghost {
  background: transparent;
  color: var(--gray-600);
  padding: 8px 16px;
}

.btn--ghost:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

.btn--white {
  background: white;
  color: var(--primary-500);
}

.btn--white:hover {
  background: var(--gray-50);
  transform: translateY(-1px);
}

.btn--lg {
  padding: 14px 28px;
  font-size: 16px;
}

/* ---------------------------------------------------------------
   2. Cards
   --------------------------------------------------------------- */
.card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-200);
}

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  background: var(--primary-50);
  color: var(--primary-600);
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

.card__title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.card__desc {
  font-size: 15px;
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ---------------------------------------------------------------
   3. Tags
   --------------------------------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
}

/* ---------------------------------------------------------------
   4. Badges
   --------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
}

.badge--green {
  background: var(--primary-50);
  color: var(--primary-700);
}

.badge--purple {
  background: rgba(167,139,250,0.1);
  color: var(--accent-purple-dark);
}

.badge--outline {
  background: transparent;
  color: var(--gray-500);
  border: 1px solid var(--gray-200);
}

/* ---------------------------------------------------------------
   5. Chat Demo (TeamChat Mock)
   --------------------------------------------------------------- */
.chat-demo {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: var(--shadow-lg);
}

.chat-demo__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.chat-demo__avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-400), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
}

.chat-demo__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
}

.chat-demo__status {
  font-size: 11px;
  color: var(--primary-600);
  margin-left: auto;
  font-weight: 600;
}

.chat-demo__body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Message row with avatar */
.chat-demo__message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.chat-demo__message.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.chat-demo__message--user {
  flex-direction: row-reverse;
}

.chat-demo__msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  margin-top: 2px;
}

.chat-demo__msg-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: calc(100% - 42px);
}

/* ---------------------------------------------------------------
   Temporary Hidden Auth Entrances
   --------------------------------------------------------------- */
a[href="login.html"]:not(.lang-toggle),
a[href="register.html"]:not(.lang-toggle),
a[href="../login.html"]:not(.lang-toggle),
a[href="../register.html"]:not(.lang-toggle) {
  display: none !important;
}

.auth-card__footer,
p:has(a[href="login.html"]:not(.lang-toggle)),
p:has(a[href="register.html"]:not(.lang-toggle)),
p:has(a[href="../login.html"]:not(.lang-toggle)),
p:has(a[href="../register.html"]:not(.lang-toggle)) {
  display: none !important;
}

.chat-demo__message--user .chat-demo__msg-content {
  align-items: flex-end;
}

.chat-demo__message--agent .chat-demo__msg-content {
  align-items: flex-start;
}

.chat-demo__bubble {
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  width: fit-content;
  max-width: 100%;
}

.chat-demo__bubble--user {
  background: var(--primary-500);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-demo__bubble--agent {
  background: var(--gray-100);
  color: var(--gray-800);
  border-bottom-left-radius: 4px;
}

.chat-demo__name {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
}

.chat-demo__name span {
  color: var(--primary-600);
}

.chat-demo__attachment {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding: 8px 10px;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.15);
  border-radius: var(--radius-md);
  color: var(--primary-600);
  font-size: 12px;
  font-weight: 500;
}

/* ---------------------------------------------------------------
   6. Pricing Cards
   --------------------------------------------------------------- */
.pricing-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  position: relative;
  transition: all 0.3s ease;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-card--featured {
  border-color: var(--primary-200);
  box-shadow: 0 0 0 1px var(--primary-200), var(--shadow-lg);
}

.pricing-card__badge {
  position: absolute;
  top: -1px;
  right: var(--space-6);
  background: var(--primary-500);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.pricing-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: var(--space-2);
}

.pricing-card__price {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: var(--space-1);
}

.pricing-card__price span {
  font-size: 15px;
  font-weight: 400;
  color: var(--gray-500);
}

.pricing-card__desc {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: var(--space-6);
}

.pricing-card__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.pricing-card__feature {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 15px;
  color: var(--gray-700);
}

.pricing-card__features svg {
  width: 18px;
  height: 18px;
  color: var(--primary-500);
  flex-shrink: 0;
}

/* ---------------------------------------------------------------
   7. Footer
   --------------------------------------------------------------- */
.footer {
  background: var(--dark-900);
  color: var(--gray-400);
  padding: var(--space-16) 0 var(--space-8);
}

.footer__grid {
  display: grid;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.footer__brand {
  max-width: 300px;
}

.footer__logo {
  height: 32px;
  width: auto;
  max-width: 181px;
  display: block;
  margin-bottom: var(--space-4);
}

.footer__tagline {
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-500);
}

.footer__links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.footer__col h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-200);
  margin-bottom: var(--space-4);
}

.footer__col a {
  display: block;
  font-size: 14px;
  color: var(--gray-500);
  text-decoration: none;
  padding: 5px 0;
  transition: color 0.2s;
  line-height: 1.5;
}

.footer__col a:hover {
  color: white;
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-top: var(--space-8);
  border-top: 1px solid var(--dark-800);
  font-size: 13px;
  color: var(--gray-600);
}

.footer__bottom a {
  color: var(--gray-500);
  text-decoration: none;
}

.footer__bottom a:hover {
  color: var(--gray-300);
}

.footer__credits {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.footer__credit-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gray-400);
  transition: color 0.2s;
}

.footer__credit-link:hover {
  color: white;
}

.footer__credit-icon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-block;
}

.footer__heart {
  color: #00c853;
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 280px 1fr;
    align-items: start;
  }
  
  .footer__links {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
  }
  
  .footer__bottom {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-4);
  }
  
  .footer__bottom span:last-child {
    text-align: right;
  }
}

/* ---------------------------------------------------------------
   8. Mobile Menu
   --------------------------------------------------------------- */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.95);
  backdrop-filter: blur(12px);
  z-index: 200;
  padding: var(--space-8);
}

.mobile-menu.is-open {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--space-6);
}

.mobile-menu__link {
  font-size: 24px;
  font-weight: 600;
  color: white;
  text-decoration: none;
}

.mobile-menu__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* ---------------------------------------------------------------
   9. Utility
   --------------------------------------------------------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-20) 0;
}

.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-12);
}

.section__eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-600);
  margin-bottom: var(--space-3);
}

.section__title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--space-4);
}

.section__subtitle {
  font-size: 18px;
  color: var(--gray-500);
  line-height: 1.6;
}

.section--dark {
  background: var(--dark-900);
  color: white;
}

.section--dark .section__title {
  color: white;
}

.section--dark .section__subtitle {
  color: var(--gray-400);
}

/* ---------------------------------------------------------------
   10. Scroll Animations
   --------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---------------------------------------------------------------
   11. Navbar
   --------------------------------------------------------------- */
@media (min-width: 1024px) {
  .navbar__nav {
    display: flex;
  }
  .navbar__toggle {
    display: none;
  }
}
