﻿@font-face {
  font-family: "NotoKufiArabicLocal";
  src: url("assets/fonts/NotoKufiArabic-Regular.ttf") format("truetype");
  font-display: swap;
}
:root {
  --bg-1: #0b2a33;
  --bg-2: #1f4150;
  --bg-3: #93a2ad;
  --panel: rgba(7, 22, 30, 0.68);
  --panel-border: rgba(255, 255, 255, 0.12);
  --text: #f6f8fb;
  --muted: #c9d4dc;
  --accent: #f2c45a;
  --accent-2: #9fd4e8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Montserrat", "Fustat", Arial, sans-serif;
  background: linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 45%, var(--bg-3) 100%);
  min-height: 100vh;
}

.page {
  position: relative;
  padding: 48px clamp(20px, 5vw, 64px) 72px;
  overflow: hidden;
}

.page::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 120%;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.08) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 10%, rgba(255, 255, 255, 0.06) 0 2px, transparent 3px),
    radial-gradient(circle at 30% 80%, rgba(255, 255, 255, 0.05) 0 2px, transparent 3px);
  background-size: 120px 120px;
  opacity: 0.7;
  pointer-events: none;
}

.header {
  position: relative;
  max-width: 960px;
  z-index: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 12px;
  color: var(--accent-2);
}

.title {
  font-size: clamp(28px, 3.4vw, 46px);
  margin: 16px 0 8px;
}

.subtitle {
  color: var(--muted);
  margin: 0 0 28px;
  font-size: clamp(14px, 1.5vw, 18px);
}

.card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 28px;
  padding: clamp(18px, 3vw, 32px);
  border-radius: 20px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(14px);
  z-index: 1;
  box-shadow: 0 18px 50px rgba(7, 18, 24, 0.45);
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.lang-switch {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lang-btn {
  padding: 10px 12px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: var(--text);
  box-shadow: none;
}

.lang-btn.active {
  background: var(--accent-2);
  color: #1f2b31;
}

.lang-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input[type="text"],
input[type="file"],
input[type="range"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(9, 22, 28, 0.9);
  color: var(--text);
  font-size: 16px;
}

input[type="range"] {
  padding: 8px 0;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}

button {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button.primary {
  background: linear-gradient(120deg, #f0c35a, #f4df8a);
  color: #1f2b31;
  box-shadow: 0 8px 22px rgba(242, 196, 90, 0.35);
}

button.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

button:hover {
  transform: translateY(-1px);
}

.preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.canvas-wrap {
  background: rgba(8, 18, 24, 0.65);
  border-radius: 18px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #1a2d36;
}

body.rtl {
  font-family: "Noto Kufi Arabic", "NotoKufiArabicLocal", sans-serif;
  direction: rtl;
}

body.rtl .controls {
  text-align: right;
}

body.rtl input[type="text"] {
  text-align: right;
}

body.rtl label {
  text-transform: none;
  letter-spacing: 0;
}

.hint {
  font-size: 13px;
  color: var(--muted);
}

details {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 14px;
  background: rgba(12, 24, 30, 0.65);
}

details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent-2);
}

@media (max-width: 900px) {
  .card {
    grid-template-columns: 1fr;
  }

  .actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
}

