/* ===== Upload pic  CSS ===== */

.upload-area {
  margin-top: 28px;
  padding: 28px;
  border-radius: 22px;
  background: linear-gradient(180deg, #f8fafc, #ffffff);
  border: none;
}

.upload-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #111827;
}

.upload-subtitle {
  font-size: 15px;
  color: #6b7280;
  margin-bottom: 22px;
}

#chooseImageBtn,
#sendBtn {
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 22px;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

#chooseImageBtn:hover,
#sendBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.45);
}


.progress-wrap {
  margin-top: 28px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  transition: width 0.4s ease;
}

.progress-text {
  margin-top: 10px;
  font-size: 14px;
  color: #374151;
}

.result-area {
  margin-top: 32px;
  text-align: left;
}

.result-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #111827;
}

#jsonOutput {
  max-height: 320px;
  overflow: auto;
  background: #0f172a;
  color: #e5e7eb;
  padding: 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}
#gameScreen {
  padding: 48px 16px;
}

.card {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 32px 36px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18);
text-align: center;





}


.upload-error {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff1f1;
    color: #8b1e1e;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.upload-error-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e53935;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.upload-error-text {
    font-size: 14px;
    line-height: 1.4;
}



.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  margin-bottom: 18px;
}

.topbar-title {
  justify-self: center;
  text-align: center;
}

.words-preview {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.word-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: 14px;
    background: #f8fafc;
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.word-source {
    font-size: 18px;
    font-weight: 700;
}

.word-target {
    font-size: 16px;
    opacity: 0.75;
}
.word-row {
  direction: ltr;
}

html[dir="rtl"] .word-row {
  direction: rtl;
}

.word-source,
.word-target {
  direction: auto;
  unicode-bidi: plaintext;
}

.hero h1 {
  margin: 6px 0 14px;
  font-size: 34px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
}


#approveBtn {
  margin-top: 28px;
  width: 100%;
  background: linear-gradient(180deg, #0f172a, #1f2937);
  color: #ffffff;
  border-radius: 20px;
  font-size: 18px;
  font-weight: 900;
  padding: 20px;
  box-shadow: 0 18px 40px rgba(15,23,42,0.35);
}


#approveBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 48px rgba(22, 163, 74, 0.45);
}
#sendBtn {
  margin-top: 16px;
  background: linear-gradient(180deg, #22c55e, #16a34a);
  box-shadow: 0 18px 44px rgba(34, 197, 94, 0.45);
  transform: scale(1.03);
}

#sendBtn:hover {
  transform: scale(1.06) translateY(-1px);
  box-shadow: 0 26px 56px rgba(34, 197, 94, 0.55);
}

@keyframes ctaPulse {
  0% { transform: scale(1.03); }
  50% { transform: scale(1.07); }
  100% { transform: scale(1.03); }
}

#sendBtn {
  animation: ctaPulse 1.4s ease-in-out infinite;
}

.topbar-title {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  background: none;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  text-align: center;
  flex: 1;
}



.back {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #111827;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
}
#sendBtn.service-down {
  background: #dc2626;
  cursor: not-allowed;
  opacity: 0.9;
}

#sendBtn.service-down:hover {
  background: #dc2626;
}
.status-list {
  margin: 18px 0 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
   position: relative;
  padding-right: 16px;
}
.preview-box {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  font-size: 14px;
  color: #374151;
}

.preview-box strong {
  display: block;
  margin-bottom: 6px;
  color: #111827;
}


.status-list::before {
  content: "";
  position: absolute;
  right: 22px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(
    to bottom,
    rgba(37, 99, 235, 0.35),
    rgba(37, 99, 235, 0.05)
  );
}
.status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
    background: transparent;
  border: none;
  padding: 8px 0;
}

.status-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #ffffff;
  flex-shrink: 0;
    background: #ffffff;

}

.status-item.done .status-icon {
  background: #16a34a;
  border-color: #16a34a;
}

.status-item.done .status-icon::after {
  content: "✓";
}

.status-item.failed .status-icon {
  background: #dc2626;
  border-color: #dc2626;
}

.status-item.failed .status-icon::after {
  content: "✕";
}

.status-time {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}
.service-down {
  background: #dc2626 !important;
  cursor: not-allowed;
  opacity: 0.9;
}

.service-down:hover {
  background: #dc2626 !important;
}

button.service-down {
  pointer-events: none;
}
.service-msg{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 14px;
  font-weight: 600;
}
.words-preview {
  margin-top: 20px;
  gap: 12px;
}

.word-row {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.preview-box {
  background: linear-gradient(180deg, #f8fafc, #ffffff);
  border: 1px solid #e5e7eb;
}

#approveBtn {
  box-shadow: 0 10px 24px rgba(22,163,74,0.3);
}

.status-list {
  margin-bottom: 32px;
}
body.upgrade-open {
  overflow: hidden;
}

.upgrade-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.25s ease;
}

.upgrade-modal {
  width: 92%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 28px;
  padding: 36px 28px 32px;
  text-align: center;
  box-shadow: 0 40px 90px rgba(0,0,0,0.25);
  animation: slideUp 0.35s ease;
  position: relative;
}

.upgrade-close {
  position: absolute;
  top: 16px;
  left: 16px;
  background: none;
  border: none;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
}

.upgrade-main-btn {
  margin-top: 24px;
  width: 100%;
  padding: 18px;
  border-radius: 18px;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 18px 40px rgba(139, 92, 246, 0.35);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.upgrade-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8b5cf6, #6366f1);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 18px;
}

.upgrade-sub {
  font-size: 15px;
  color: #4b5563;
  margin-bottom: 20px;
}

.upgrade-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
}

.upgrade-features li {
  margin-bottom: 10px;
  font-size: 14px;
  color: #111827;
}

.upgrade-main-btn {
  width: 100%;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, #8b5cf6, #7c3aed);
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 20px 50px rgba(124, 58, 237, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.upgrade-main-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 60px rgba(124, 58, 237, 0.45);
}
.card { position: relative; }

.ai-usage-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 24px rgba(0,0,0,0.10);
  font-size: 13px;
  font-weight: 800;
  color: #111827;
}

.ai-usage-icon {
  font-size: 14px;
  line-height: 1;
}

