/* ── AI Tool Directory Card Styles ── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Sans:wght@400;500;600&display=swap');

.aitd-card-wrap {
  font-family: 'DM Sans', sans-serif;
  max-width: 960px;
  margin: 30px auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.10);
  position: relative;
}

/* HEADER */
.aitd-header {
  background: #fff;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1.5px solid #ededf5;
  border-bottom: none;
}

.aitd-logo { flex-shrink: 0; }
.aitd-logo-img {
  width: 64px; height: 64px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.aitd-logo-placeholder {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, #4f63d8, #0f9eff);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}

.aitd-meta { flex: 1; }
.aitd-name-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.aitd-name {
  font-family: 'Syne', sans-serif;
  font-size: 26px; font-weight: 800;
  color: #12122a; letter-spacing: -0.5px;
}
.aitd-verified-badge {
  background: #f59e0b; color: #fff;
  border-radius: 50%; width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.aitd-rank-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.aitd-rank {
  background: #f1f1f8; color: #444;
  font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 8px;
  border: 1.5px solid #e2e2ec;
}
.aitd-in { color: #999; font-size: 13px; }
.aitd-cat-link { color: #4f63d8; font-size: 13px; font-weight: 500; text-decoration: none; }
.aitd-cat-link:hover { text-decoration: underline; }
.aitd-stars { display: flex; gap: 2px; }
.aitd-star { font-size: 16px; color: #e2e8f0; }
.aitd-star.full { color: #f59e0b; }
.aitd-star.half { color: #f59e0b; opacity: 0.6; }

.aitd-header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.aitd-icon-btn {
  width: 40px; height: 40px;
  border-radius: 10px; border: 1.5px solid #e2e2ec;
  background: #fff; cursor: pointer;
  font-size: 16px; transition: all 0.2s;
}
.aitd-icon-btn:hover { border-color: #4f63d8; background: #f3f5ff; transform: scale(1.05); }
.aitd-visit-btn {
  background: #12122a; color: #fff;
  border: none; border-radius: 12px;
  padding: 12px 22px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.2s; letter-spacing: 0.3px;
}
.aitd-visit-btn:hover { background: #4f63d8; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(79,99,216,0.3); }

/* RAINBOW BAR */
.aitd-rainbow-bar {
  height: 4px;
  background: linear-gradient(90deg,#ff6b6b,#ffd93d,#6bcb77,#4d96ff,#c77dff,#ff6b6b);
  background-size: 200% 100%;
  animation: aitd-rainbow 4s linear infinite;
}
@keyframes aitd-rainbow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* BODY */
.aitd-body {
  background: #fff;
  border: 1.5px solid #ededf5;
  border-top: none;
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

/* LEFT */
.aitd-left { display: flex; flex-direction: column; gap: 14px; }
.aitd-video-wrap, .aitd-video-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 14px;
  overflow: hidden;
  background: #0a0a1a;
  position: relative;
}
.aitd-video-wrap iframe { width: 100%; height: 100%; }
.aitd-video-placeholder {
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #1a1a3a;
  cursor: pointer;
}
.aitd-video-glow {
  position: absolute;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(77,150,255,0.35) 0%, transparent 70%);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  animation: aitd-pulse 2s ease-in-out infinite;
}
@keyframes aitd-pulse {
  0%, 100% { transform: translate(-50%,-50%) scale(1); opacity: 0.6; }
  50% { transform: translate(-50%,-50%) scale(1.3); opacity: 1; }
}
.aitd-video-title {
  font-family: 'Syne', sans-serif;
  font-size: 26px; font-weight: 800;
  color: #4d96ff; text-align: center;
  line-height: 1.3; padding: 20px; z-index: 1;
}
.aitd-play-btn {
  position: absolute; bottom: 14px; right: 14px;
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fff;
}

.aitd-tags-row { display: flex; flex-wrap: wrap; gap: 8px; }
.aitd-tag {
  background: #f3f5ff; color: #4f63d8;
  font-size: 12px; font-weight: 500;
  padding: 5px 12px; border-radius: 20px;
  border: 1px solid #dde2ff; cursor: pointer;
  transition: all 0.2s;
}
.aitd-tag:hover { background: #4f63d8; color: #fff; }

/* RIGHT */
.aitd-right { display: flex; flex-direction: column; gap: 18px; }
.aitd-description {
  font-size: 14px; line-height: 1.75; color: #444;
  background: #fafafe; border-radius: 12px;
  padding: 18px; border-left: 3px solid #4f63d8;
  font-style: italic;
}
.aitd-learn-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.aitd-learn-label { font-weight: 600; color: #555; font-size: 13px; }
.aitd-learn-link {
  background: #f3f5ff; border: 1px solid #dde2ff;
  border-radius: 8px; padding: 5px 12px;
  font-size: 12px; font-weight: 600; color: #4f63d8;
  text-decoration: none; transition: all 0.2s;
}
.aitd-learn-link:hover { background: #4f63d8; color: #fff; }

/* BADGES */
.aitd-badges-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.aitd-badge-totw {
  background: linear-gradient(135deg,#7c3aed,#a855f7);
  color: #fff; border-radius: 12px;
  padding: 8px 14px;
  display: flex; align-items: center; gap: 8px;
}
.aitd-totw-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.aitd-totw-date { font-size: 10px; opacity: 0.85; }
.aitd-badge-verified {
  display: flex; align-items: center; gap: 5px;
  border: 1.5px solid #22c55e; border-radius: 20px;
  padding: 5px 12px; font-size: 12px; font-weight: 600; color: #16a34a;
}
.aitd-badge-pricing {
  border-radius: 20px; padding: 5px 14px;
  font-size: 12px; font-weight: 700;
}
.aitd-badge-pricing.free     { background:#dcfce7; color:#166534; border:1px solid #bbf7d0; }
.aitd-badge-pricing.freemium { background:#fef9c3; color:#854d0e; border:1px solid #fde68a; }
.aitd-badge-pricing.paid     { background:#fee2e2; color:#991b1b; border:1px solid #fecaca; }
.aitd-badge-pricing.free-trial { background:#e0f2fe; color:#075985; border:1px solid #bae6fd; }
.aitd-badge-count { font-size: 14px; font-weight: 700; color: #22c55e; margin-left: auto; }

/* USEFUL LINKS */
.aitd-useful-links { display: flex; flex-direction: column; gap: 10px; }
.aitd-useful-title {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px; color: #aaa;
}
.aitd-links-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.aitd-useful-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: #333;
  text-decoration: none; padding: 6px 12px;
  border-radius: 10px; border: 1.5px solid #eee;
  background: #fafafa; transition: all 0.2s;
}
.aitd-useful-link.primary { color: #4f63d8; border-color: #dde2ff; background: #f3f5ff; }
.aitd-useful-link:hover { border-color: #4f63d8; background: #f3f5ff; color: #4f63d8; transform: translateY(-1px); }

/* UPVOTE */
.aitd-upvote-wrap {
  background: #fff; border-top: 1px solid #f0f0f8;
  padding: 14px 32px; display: flex; justify-content: flex-end;
  border: 1.5px solid #ededf5; border-top: none;
}
.aitd-upvote-btn {
  background: #fff; border: 2px solid #e2e2ec;
  border-radius: 14px; padding: 10px 20px;
  font-family: 'Syne', sans-serif;
  font-size: 16px; font-weight: 700; color: #22c55e;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; gap: 6px;
}
.aitd-upvote-btn:hover { background: #22c55e; color: #fff; border-color: #22c55e; transform: translateY(-2px); }
.aitd-upvote-btn.voted { background: #22c55e; color: #fff; border-color: #22c55e; }

/* RESPONSIVE */
@media (max-width: 700px) {
  .aitd-body { grid-template-columns: 1fr; }
  .aitd-header { flex-wrap: wrap; padding: 18px 20px; }
  .aitd-header-actions { width: 100%; justify-content: flex-end; }
  .aitd-name { font-size: 20px; }
}
