/* ==========================================================================
   Slide 3: 2D Semantic Vector Space & Cosine Similarity Styles (Glassmorphism)
   ========================================================================== */

.vector-column {
  width: 100%;
  max-width: min(44rem, 92vw);
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
  z-index: 20;
}

/* 1. Üst Kısım: Cümle Kutusu & Tahmin Et Butonu (Frosted Glassmorphism) */
.sentence-card {
  background: rgba(22, 25, 31, 0.65);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.85rem;
  padding: 0.85rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.sentence-card:focus-within {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 255, 255, 0.05);
}

.sentence-text-wrap {
  flex: 1;
  font-size: 0.96rem;
  font-weight: 500;
  color: #e5e7eb;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  letter-spacing: 0.01em;
}

.slot-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.6rem;
  height: 1.85rem;
  padding: 0 0.65rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px dashed rgba(16, 185, 129, 0.7);
  border-radius: 0.45rem;
  color: #10b981;
  font-weight: 600;
  font-family: 'SF Mono', 'Courier New', Monaco, Consolas, monospace;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.slot-placeholder.typing {
  border-style: solid;
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  color: #ffffff;
  box-shadow: none;
}

.slot-placeholder.filled {
  background: #10b981;
  border-style: solid;
  border-color: #10b981;
  color: #041a10;
  font-weight: 700;
  box-shadow: none;
  transform: none;
}

/* Kapalı Gri Tahmin Et Butonu (Google Tarzı Dinamik Mouse Spotlight Gradient Kenarlık) */
.predict-btn {
  position: relative;
  background: #232731;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.55rem;
  padding: 0.65rem 1.35rem;
  font-family: var(--font-sans, 'Google Sans Flex', -apple-system, sans-serif);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  user-select: none;
  flex-shrink: 0;
  box-shadow: none;
  transform: none;
  transition: background-color 0.25s ease, border-color 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  --mouse-x: 50%;
  --mouse-y: 50%;
}

/* Mouse takip eden dinamik spotlight gradient kenarlık */
.predict-btn::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1.5px solid transparent;
  background-origin: border-box;
  background-clip: padding-box, border-box;
  background-image: 
    linear-gradient(#282d38, #282d38),
    radial-gradient(
      85px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(255, 255, 255, 1) 0%,
      rgba(56, 189, 248, 1) 25%,
      rgba(168, 85, 247, 0.9) 55%,
      rgba(236, 72, 153, 0.6) 80%,
      rgba(255, 255, 255, 0.14) 100%
    );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 1;
}

/* Mouse bölgesine hafif iç yüzey aydınlatması (Google Arama derinliği) */
.predict-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    75px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(56, 189, 248, 0.18) 0%,
    rgba(168, 85, 247, 0.08) 55%,
    transparent 100%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 1;
}

.predict-btn:hover::before,
.predict-btn:hover::after {
  opacity: 1;
}

.predict-btn:hover {
  background: #282d38;
  border-color: transparent;
  color: #ffffff;
  transform: none;
  box-shadow: none;
}

.predict-btn:active {
  background: #1c2027;
  transform: none;
  box-shadow: none;
}

.predict-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.predict-btn:disabled::before,
.predict-btn:disabled::after {
  display: none !important;
}

.predict-btn > span {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

/* 2. Orta Sahne: 2D Vektör Alanı (Koordinat Düzlemi - Glass) */
.vector-plane-card {
  background: rgba(22, 25, 31, 0.65);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.85rem;
  padding: 0.85rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.vector-plane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding: 0 0.3rem;
}

.plane-title {
  font-family: 'SF Mono', 'Courier New', Monaco, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plane-metric {
  font-family: 'SF Mono', 'Courier New', Monaco, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: #10b981;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.plane-metric.visible {
  opacity: 1;
  transform: translateY(0);
}

.vector-canvas-wrap {
  width: 100%;
  height: clamp(170px, 13.5rem, 30rem);
  background: rgba(14, 17, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.55rem;
  position: relative;
  overflow: hidden;
}

.vector-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Vektör Noktaları ve Etiketler (Başlangıçta Gizli, Tıklandığında Çıkar) */
.vec-node {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.vec-node.visible {
  opacity: 0.45;
  pointer-events: auto;
}

.vec-node.highlight {
  opacity: 1;
}

.vec-node.highlight text {
  fill: #ffffff;
  font-weight: 700;
}

.vec-node.highlight circle:not(.yesil-halo) {
  fill: #10b981;
}

.yesil-halo {
  opacity: 0;
  pointer-events: none;
  transform-origin: 455px 75px;
  transition: opacity 0.5s ease;
}

.vec-node.highlight .yesil-halo {
  opacity: 1;
  animation: yesilPulse 2.8s ease-in-out infinite;
}

@keyframes yesilPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Çimen Düşme Animasyonu & Dairesel Radial Işıma (Başlangıçta Gizli) */
.cimen-node {
  opacity: 0;
  pointer-events: none;
  transform-origin: 330px 135px;
  transform: scale(0.6);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cimen-node.visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.cimen-halo {
  pointer-events: none;
  transform-origin: 330px 135px;
  animation: cimenPulse 2.8s ease-in-out infinite;
}

@keyframes cimenPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Kosinüs Çekim Çizgisi */
.cosine-vector-line {
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.cosine-vector-line.drawn {
  stroke-dashoffset: 0;
}

/* 3. Katman: 3 Adet Olasılık Çubuğu & Minimal Terminal (Glass) */
.probability-card {
  background: rgba(22, 25, 31, 0.65);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.85rem;
  padding: 0.95rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  min-height: 10rem;
}

/* Olasılık Satırları (Hizalama Birebir Eşit, Başlangıçta Gizli) */
.prob-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.45rem;
  border: 1px solid transparent;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.45s ease, transform 0.45s ease, background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.prob-row.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.prob-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-family: 'SF Mono', 'Courier New', Monaco, Consolas, monospace;
  color: #e5e7eb;
}

.prob-label-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.prob-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
  transition: all 0.3s ease;
}

.prob-row.primary .prob-bullet {
  background: #10b981;
}

.prob-row.secondary .prob-bullet {
  background: #38bdf8;
}

.prob-val {
  font-weight: 600;
  color: #94a3b8;
}

.prob-row.primary .prob-val {
  color: #10b981;
  font-weight: 700;
}

/* Seçilen Olasılık Satırı (Parlama ve Gradient Işık Olmadan Temiz Vurgu) */
.prob-row.primary.selected {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: none;
}

.prob-row.primary.selected .prob-word {
  color: #10b981;
  font-weight: 700;
  text-shadow: none;
}

.prob-row.primary.selected .prob-bullet {
  background: #10b981;
  box-shadow: none;
  transform: none;
}

.prob-track {
  width: 100%;
  height: 7px;
  background: rgba(16, 19, 24, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.prob-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.prob-fill-green {
  background: linear-gradient(90deg, #059669, #10b981);
}

.prob-fill-blue {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
}

.prob-fill-gray {
  background: #475569;
}

/* Minimal 2 Satırlık Monospaced Terminal (Glass) */
.terminal-box {
  background: rgba(12, 14, 19, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.55rem;
  padding: 0.55rem 0.85rem;
  font-family: 'SF Mono', 'Courier New', Monaco, Consolas, monospace;
  font-size: 0.74rem;
  line-height: 1.55;
  color: #e5e7eb;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 2.85rem;
  user-select: text;
  margin-top: 0.25rem;
}

.term-line {
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.term-prompt {
  color: #10b981;
  font-weight: 700;
  margin-right: 0.45rem;
  user-select: none;
}

.term-cursor {
  display: inline-block;
  width: 6px;
  height: 12px;
  background: #10b981;
  vertical-align: middle;
  margin-left: 2px;
  animation: blinkCursor 0.9s infinite;
}

@keyframes blinkCursor {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@media (max-width: 640px) {
  .sentence-card {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.75rem 0.95rem;
  }
  .sentence-text-wrap {
    font-size: 0.88rem;
  }
  .predict-btn {
    width: 100%;
    justify-content: center;
  }
  .vector-canvas-wrap {
    height: clamp(150px, 11rem, 190px);
  }
  .prob-row {
    padding: 0.35rem 0.55rem;
  }
  .terminal-box {
    font-size: 0.68rem;
    min-height: 2.5rem;
  }
}
