* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #2d5080;
  --navy-dark: #1e3a5f;
  --gold: #b8962e;
  --gold-light: #d4af5a;
  --bg: #f4f5f7;
  --white: #ffffff;
  --text: #1a2b3c;
  --text-light: #5a6a7a;
  --border: #dde2ea;
  --radius: 12px;
  --shadow: 0 2px 16px rgba(45, 80, 128, 0.10);
}

body {
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  direction: rtl;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: var(--white);
  text-align: center;
  padding: 36px 24px 28px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

.logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 14px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

header h1 {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.78);
}

/* Main */
main {
  flex: 1;
  max-width: 660px;
  width: 100%;
  margin: 36px auto;
  padding: 0 20px;
}

/* Card */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 28px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.card-title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
}

/* Drop zone */
.drop-zone {
  border: 2px dashed var(--navy);
  border-radius: 10px;
  background: #f0f4fa;
  text-align: center;
  padding: 36px 20px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.drop-zone:hover,
.drop-zone.drag-over {
  background: #e4ecf7;
  border-color: var(--gold);
}

.drop-icon {
  font-size: 2.6rem;
  margin-bottom: 10px;
}

.drop-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}

.drop-hint {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* File selected */
.file-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eef3fb;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.95rem;
  color: var(--navy);
  font-weight: 600;
}

.file-icon { font-size: 1.3rem; }

.file-selected span:nth-child(2) {
  flex: 1;
  word-break: break-all;
}

.remove-file {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s;
}
.remove-file:hover { color: #c0392b; }

/* Select */
select {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%232d5080' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  cursor: pointer;
  transition: border-color 0.2s;
}

select:focus {
  outline: none;
  border-color: var(--navy);
}

/* Translate button */
.btn-translate {
  width: 100%;
  padding: 16px;
  font-size: 1.15rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--navy-dark);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(184, 150, 46, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-translate:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(184, 150, 46, 0.45);
}

.btn-translate:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(30, 58, 95, 0.25);
  border-top-color: var(--navy-dark);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Messages */
.error-box {
  margin-top: 20px;
  background: #fff0f0;
  border: 1px solid #f5c6c6;
  color: #c0392b;
  border-radius: 10px;
  padding: 16px 20px;
  font-weight: 600;
}

.success-box {
  margin-top: 20px;
  background: #f0fff4;
  border: 1px solid #b2dfdb;
  color: #1a6b4a;
  border-radius: 10px;
  padding: 16px 20px;
  font-weight: 600;
  text-align: center;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  color: var(--text-light);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  background: var(--white);
}
