/* ===== سبک پایه ===== */
body {
  font-family: 'Vazirmatn', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ===== حالت روشن ===== */
:root {
  --bg: #f4f9ff;
  --card-bg: #ffffff;
  --text: #222;
  --primary: #0077ff;
  --shadow: rgba(0, 123, 255, 0.2);
}

/* ===== حالت تاریک ===== */
body.dark {
  --bg: #0f172a;
  --card-bg: #1e293b;
  --text: #e2e8f0;
  --primary: #38bdf8;
  --shadow: rgba(56, 189, 248, 0.2);
}

/* ===== استایل عمومی ===== */
header {
  text-align: center;
  background: linear-gradient(90deg, var(--primary), #00d2ff);
  color: white;
  padding: 20px;
}

.theme-btn {
  background: none;
  color: white;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.theme-btn:hover {
  background-color: rgba(255,255,255,0.2);
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 0 10px var(--shadow);
  max-width: 600px;
  width: 100%;
  margin: 15px 0;
  padding: 20px;
  box-sizing: border-box;
  transition: background 0.3s ease;
}

textarea {
  width: 100%;
  min-height: 80px;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
  resize: vertical;
  direction: rtl;
  background-color: var(--bg);
  color: var(--text);
  transition: all 0.3s;
}

button {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  margin-bottom: 10px;
  transition: background 0.3s ease;
}

button:hover {
  background-color: #005fcc;
}

footer {
  text-align: center;
  padding: 15px;
  background-color: rgba(0,0,0,0.05);
  color: var(--text);
}

/* ===== حالت موبایل ===== */
@media (max-width: 600px) {
  textarea { min-height: 70px; }
  button { width: 100%; }
}
