/* translate.css — TR→EN Cümle Çevirisi (4 şıklı) */

/* ── Home ── */
.tr-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem 4rem;
  min-height: 100%;
  max-width: 480px;
  margin: 0 auto;
}
.tr-home-topbar { display: flex; margin-bottom: 1rem; }
.tr-exit-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.tr-exit-btn:hover { background: rgba(255,255,255,0.07); color: #e2e8f0; }
.tr-home-hero { text-align: center; margin-bottom: 2rem; }
.tr-home-icon { font-size: 3.5rem; line-height: 1; margin-bottom: 0.5rem; }
.tr-home-title { font-size: 1.7rem; font-weight: 700; color: #e2e8f0; margin: 0 0 0.35rem; }
.tr-home-sub   { font-size: 0.95rem; color: #94a3b8; margin: 0; }

.tr-level-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  width: 100%;
  margin-bottom: 1.2rem;
}
.tr-level-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.2rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.18s, transform 0.15s, border-color 0.18s;
  color: inherit;
}
.tr-level-btn:hover {
  background: rgba(0,212,255,0.1);
  border-color: rgba(0,212,255,0.35);
  transform: translateY(-2px);
}
.tr-level-btn:active { transform: translateY(0); }
.tr-level-all {
  grid-column: span 2;
  background: rgba(0,212,255,0.06);
  border-color: rgba(0,212,255,0.25);
}
.tr-lbtn-badge { font-size: 1.1rem; font-weight: 800; color: #00d4ff; letter-spacing: 0.06em; }
.tr-lbtn-count { font-size: 0.78rem; color: #94a3b8; }
.tr-home-tip   { font-size: 0.8rem; color: #64748b; text-align: center; margin: 0; }

/* ── Header ── */
.tr-q-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  background: rgba(15,23,42,0.92);
  backdrop-filter: blur(8px);
  z-index: 10;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tr-back-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: #94a3b8;
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.tr-back-btn:hover { background: rgba(255,255,255,0.07); color: #e2e8f0; }
.tr-progress-wrap { flex: 1; display: flex; align-items: center; gap: 0.5rem; }
.tr-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 99px;
  overflow: hidden;
}
.tr-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0ea5e9, #00d4ff);
  border-radius: 99px;
  transition: width 0.4s ease;
}
.tr-progress-txt { font-size: 0.78rem; color: #64748b; white-space: nowrap; }

/* ── Timer ring ── */
.tr-timer-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.tr-timer-ring {
  width: 44px;
  height: 44px;
  transform: rotate(-90deg);
}
.tr-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.08);
  stroke-width: 3;
}
.tr-ring-fill {
  fill: none;
  stroke: #00d4ff;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear, stroke 0.4s;
}
.tr-ring-fill.tr-timer-warn   { stroke: #f59e0b; }
.tr-ring-fill.tr-timer-danger { stroke: #ef4444; }
.tr-timer-num {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: 700;
  color: #00d4ff;
  transition: color 0.4s;
}
.tr-timer-num.tr-timer-warn   { color: #f59e0b; }
.tr-timer-num.tr-timer-danger { color: #ef4444; animation: tr-pulse 0.5s ease infinite alternate; }
@keyframes tr-pulse { from { opacity: 1; } to { opacity: 0.5; } }

/* ── Question body ── */
.tr-question { display: flex; flex-direction: column; min-height: 100%; }
.tr-q-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.2rem 1rem 2rem;
  max-width: 540px;
  margin: 0 auto;
  width: 100%;
}
.tr-q-topic {
  font-size: 0.72rem;
  font-weight: 600;
  color: #0ea5e9;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.9rem;
  align-self: flex-start;
}
.tr-q-tr {
  font-size: 1.45rem;
  font-weight: 700;
  color: #e2e8f0;
  text-align: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  padding: 1.2rem 1.4rem;
  width: 100%;
  margin-bottom: 1rem;
  line-height: 1.4;
}
.tr-q-prompt {
  font-size: 0.82rem;
  color: #64748b;
  align-self: flex-start;
  margin-bottom: 0.7rem;
}

/* ── Mode row (prompt + type toggle) ── */
.tr-mode-row{display:flex;align-items:center;justify-content:space-between;width:100%;margin-bottom:0.7rem}
.tr-type-toggle{background:rgba(255,255,255,0.07);border:1px solid rgba(255,255,255,0.15);color:#94a3b8;font-size:0.72rem;font-weight:700;padding:0.3rem 0.65rem;border-radius:8px;cursor:pointer;transition:background 0.15s,color 0.15s;font-family:inherit;white-space:nowrap}
.tr-type-toggle:hover{background:rgba(0,212,255,0.12);color:#00d4ff;border-color:rgba(0,212,255,0.3)}

/* ── Type mode input ── */
.tr-type-area{display:flex;flex-direction:column;gap:0.6rem;width:100%}
.tr-type-input{width:100%;padding:0.85rem 1rem;background:rgba(255,255,255,0.05);border:1.5px solid rgba(255,255,255,0.15);border-radius:13px;color:#e2e8f0;font-size:1rem;font-family:inherit;outline:none;transition:border-color 0.15s;box-sizing:border-box}
.tr-type-input:focus{border-color:rgba(0,212,255,0.5);background:rgba(0,212,255,0.05)}
.tr-type-input::placeholder{color:#475569}
.tr-type-submit{padding:0.75rem 1rem;background:linear-gradient(135deg,#0ea5e9,#00d4ff);border:none;border-radius:10px;color:#0f172a;font-size:0.9rem;font-weight:700;cursor:pointer;font-family:inherit;transition:opacity 0.15s,transform 0.12s}
.tr-type-submit:hover{opacity:0.88;transform:translateY(-1px)}

/* ── Choice buttons ── */
.tr-choices {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.tr-choice-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 13px;
  cursor: pointer;
  text-align: left;
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.4;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.tr-choice-btn:not(:disabled):hover {
  background: rgba(0,212,255,0.08);
  border-color: rgba(0,212,255,0.3);
  transform: translateX(3px);
}
.tr-choice-btn:disabled { cursor: default; transform: none; }

.tr-choice-letter {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
}
.tr-choice-text { flex: 1; }

/* ── Result states on choice buttons ── */
.tr-choice-correct {
  background: rgba(74,222,128,0.12) !important;
  border-color: rgba(74,222,128,0.5) !important;
  color: #4ade80 !important;
}
.tr-choice-correct .tr-choice-letter {
  background: #4ade80 !important;
  border-color: #4ade80 !important;
  color: #0f172a !important;
}
.tr-choice-wrong {
  background: rgba(248,113,113,0.1) !important;
  border-color: rgba(248,113,113,0.45) !important;
  color: #f87171 !important;
  text-decoration: line-through;
}
.tr-choice-wrong .tr-choice-letter {
  background: #f87171 !important;
  border-color: #f87171 !important;
  color: #0f172a !important;
}

/* ── Feedback strip ── */
.tr-feedback-strip {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  margin-top: 1rem;
  border: 1.5px solid transparent;
  animation: trFadeUp 0.25s ease both;
}
.tr-fb-correct {
  background: rgba(74,222,128,0.1);
  border-color: rgba(74,222,128,0.3);
}
.tr-fb-wrong {
  background: rgba(248,113,113,0.1);
  border-color: rgba(248,113,113,0.3);
}
.tr-fb-left {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
}
.tr-fb-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1; }
.tr-fb-texts { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.tr-fb-label {
  font-size: 0.95rem;
  font-weight: 700;
}
.tr-fb-correct .tr-fb-label { color: #4ade80; }
.tr-fb-wrong   .tr-fb-label { color: #f87171; }
.tr-fb-xp {
  display: inline-block;
  margin-left: 0.4rem;
  background: rgba(250,204,21,0.15);
  color: #fbbf24;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 99px;
  vertical-align: middle;
}
.tr-fb-streak {
  display: inline-block;
  margin-left: 0.3rem;
  background: rgba(251,146,60,0.15);
  color: #fb923c;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 99px;
  vertical-align: middle;
}
.tr-fb-correct-ans {
  font-size: 0.85rem;
  color: #00d4ff;
  font-weight: 600;
  word-break: break-word;
}
.tr-fb-tip {
  font-size: 0.8rem;
  color: #94a3b8;
  word-break: break-word;
}

.tr-next-btn {
  flex-shrink: 0;
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, #0ea5e9, #00d4ff);
  border: none;
  border-radius: 10px;
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.12s;
}
.tr-next-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.tr-next-btn:active { transform: translateY(0); }

/* ── Summary ── */
.tr-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.2rem 4rem;
  max-width: 520px;
  margin: 0 auto;
}
.tr-sum-hero { text-align: center; margin-bottom: 1.5rem; }
.tr-sum-medal { font-size: 3.5rem; line-height: 1; margin-bottom: 0.3rem; }
.tr-sum-pct   { font-size: 3rem; font-weight: 800; color: #00d4ff; line-height: 1; }
.tr-sum-label { font-size: 1rem; color: #94a3b8; margin-top: 0.3rem; }
.tr-sum-xp    { font-size: 1rem; font-weight: 700; color: #4ade80; margin-top: 0.5rem; }

.tr-sum-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  width: 100%;
  margin-bottom: 1.5rem;
}
.tr-sum-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1rem 0.5rem;
  border-radius: 12px;
  font-size: 2rem;
  font-weight: 800;
  border: 1px solid transparent;
}
.tr-sum-cell small { font-size: 0.7rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.grade-correct { background: rgba(74,222,128,0.1); border-color: rgba(74,222,128,0.25); color: #4ade80; }
.grade-wrong   { background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.25); color: #f87171; }

.tr-sum-review {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
}
.tr-sum-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 0.8rem 1rem;
}
.tr-sum-wrong  { border-color: rgba(248,113,113,0.2); }
.tr-sum-num    { font-size: 0.78rem; color: #64748b; margin-bottom: 0.25rem; }
.tr-sum-tr     { font-size: 0.95rem; font-weight: 600; color: #e2e8f0; margin-bottom: 0.2rem; }
.tr-sum-en     { font-size: 0.88rem; color: #00d4ff; }
.tr-sum-yours  { font-size: 0.8rem; color: #f87171; margin-top: 0.2rem; }

.tr-sum-btns { display: flex; gap: 0.8rem; width: 100%; }
.tr-again-btn, .tr-home-btn {
  flex: 1;
  padding: 0.85rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.12s;
  border: none;
}
.tr-again-btn {
  background: linear-gradient(135deg, #0ea5e9, #00d4ff);
  color: #0f172a;
}
.tr-home-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  color: #e2e8f0;
}
.tr-again-btn:hover, .tr-home-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.tr-again-btn:active, .tr-home-btn:active { transform: translateY(0); }

/* ── Animate ── */
.animate-in { animation: trFadeUp 0.3s ease both; }
@keyframes trFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
