.tfc-wrapper {
  position: relative;
  width: 100%;
}

.tfc-grid-bg {
  background-image:
    radial-gradient(circle at 50% 50%, rgba(17, 24, 39, 0.6) 0%, rgba(3, 7, 18, 1) 100%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
}

.tfc-header {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.tfc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.tfc-badge-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  animation: tfc-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes tfc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.tfc-heading {
  font-size: 2.5rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #fff, #e2e8f0, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tfc-subtitle {
  font-size: 1rem;
  color: #94a3b8;
  line-height: 1.625;
  font-weight: 300;
}

/* Marquee Stage */
.tfc-marquee-stage {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.tfc-vignette-left {
  pointer-events: none;
  position: absolute;
  inset: 0 0 0 0;
  width: 8rem;
  background: linear-gradient(to right, #030712, transparent);
  z-index: 20;
}

.tfc-vignette-right {
  pointer-events: none;
  position: absolute;
  inset: 0 0 0 auto;
  width: 8rem;
  background: linear-gradient(to left, #030712, transparent);
  z-index: 20;
}

.tfc-track-wrapper {
  overflow: hidden;
  display: flex;
  width: 100%;
}

.tfc-track {
  display: flex;
  gap: 1.5rem;
  flex-shrink: 0;
  min-width: 100%;
}

.tfc-track-left {
  animation: tfc-marquee-left 40s linear infinite;
}

.tfc-track-right {
  animation: tfc-marquee-right 40s linear infinite;
}

.tfc-track-wrapper:hover .tfc-track {
  animation-play-state: paused;
}

.tfc-no-pause .tfc-track-wrapper:hover .tfc-track {
  animation-play-state: running;
}

.tfc-marquee-paused .tfc-track {
  animation-play-state: paused !important;
}

@keyframes tfc-marquee-left {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes tfc-marquee-right {
  0% { transform: translate3d(-50%, 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* Card Item */
.tfc-card-item {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 1rem;
  padding: 1.5rem 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  user-select: none;
  height: 340px;
  width: 290px;
  border-width: 1px;
  border-style: solid;
}

@media (min-width: 640px) {
  .tfc-card-item {
    padding: 2rem;
    width: 360px;
  }
}

.tfc-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.tfc-card-icon-wrap {
  padding: 0.75rem;
  border-radius: 0.75rem;
  border-width: 1px;
  border-style: solid;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.tfc-card-icon-wrap svg {
  width: 2rem;
  height: 2rem;
}

.tfc-card-badge {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  border-width: 1px;
  border-style: solid;
}

.tfc-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
}

@media (min-width: 640px) {
  .tfc-card-title {
    font-size: 1.5rem;
  }
}

.tfc-card-desc {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.625;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 640px) {
  .tfc-card-desc {
    font-size: 0.875rem;
  }
}

.tfc-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top-width: 1px;
  border-top-style: solid;
  margin-top: 1rem;
}

.tfc-card-cta {
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  transition: all 0.3s ease;
}

.tfc-card-cta svg {
  width: 0.875rem;
  height: 0.875rem;
}

.tfc-card-sys {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Overlay */
.tfc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  z-index: 40;
  transition: opacity 0.3s ease;
}

/* Popup */
.tfc-popup.tfc-popup-hidden {
  display: none !important;
}

.tfc-popup {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  display: none;
  flex-direction: column;
  border-radius: 1rem;
  border-width: 1px;
  border-style: solid;
  border-color: rgba(30, 41, 59, 0.8);
  background: rgba(2, 6, 23, 0.95);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.tfc-popup-header {
  padding: 1.5rem 2rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .tfc-popup-header {
    padding: 2rem;
  }
}

.tfc-popup-icon {
  padding: 0.875rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 1);
  border: 1px solid rgba(30, 41, 59, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tfc-popup-icon svg {
  width: 2rem;
  height: 2rem;
}

.tfc-popup-content {
  flex: 1;
  min-width: 0;
}

.tfc-popup-badge {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  border-width: 1px;
  border-style: solid;
  margin-bottom: 0.5rem;
}

.tfc-popup-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.025em;
}

@media (min-width: 768px) {
  .tfc-popup-title {
    font-size: 1.875rem;
  }
}

.tfc-popup-close {
  padding: 0.625rem;
  color: #94a3b8;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 1);
  border: 1px solid rgba(30, 41, 59, 1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  pointer-events: auto;
  flex-shrink: 0;
}

.tfc-popup-close:hover {
  color: #fff;
  background: rgba(30, 41, 59, 1);
}

.tfc-popup-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.tfc-popup-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .tfc-popup-body {
    padding: 0 2rem 2rem;
  }
}

.tfc-popup-divider {
  height: 1px;
  background: rgba(30, 41, 59, 0.6);
  width: 100%;
}

.tfc-section-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.tfc-popup-abstract {
  font-size: 0.875rem;
  line-height: 1.625;
  font-weight: 500;
}

@media (min-width: 768px) {
  .tfc-popup-abstract {
    font-size: 1rem;
  }
}

.tfc-popup-detail {
  font-size: 0.875rem;
  line-height: 1.625;
  font-weight: 300;
}

@media (min-width: 768px) {
  .tfc-popup-detail {
    font-size: 1rem;
  }
}

.tfc-popup-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .tfc-popup-stats-grid {
    gap: 1rem;
  }
}

.tfc-stat-item {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(30, 41, 59, 0.8);
  border-radius: 0.75rem;
  padding: 0.875rem;
  text-align: center;
}

.tfc-stat-label {
  display: block;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.tfc-stat-value {
  font-size: 0.75rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  .tfc-stat-value {
    font-size: 0.875rem;
  }
}

.tfc-popup-cta {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(to right, #4f46e5, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  pointer-events: auto;
}

.tfc-popup-cta:hover {
  background: linear-gradient(to right, #6366f1, #8b5cf6);
}

.tfc-popup-cta svg {
  width: 1rem;
  height: 1rem;
}

/* Scrollbar */
.tfc-popup-body::-webkit-scrollbar {
  width: 6px;
}

.tfc-popup-body::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
}

.tfc-popup-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.tfc-popup-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}
