/* style.css */

/* تنظیمات پایه و فونت */
:root {
  --primary-color: #fcd307;
  --bg-dark: #0b132b;
  --bg-medium: #1c2541;
  --text-light: #ffffff;
  --text-secondary: #a0a0a0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
}

/* هدر */
header {
  text-align: center;
  padding: 20px 10px;
  border-bottom: 2px solid var(--primary-color);
  margin-bottom: 20px;
}

header h1 {
  font-size: 2.2rem;
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(252, 211, 7, 0.5);
}

/* چیدمان اصلی دو ستونی */
.container {
  display: flex;
  flex-wrap: wrap;
  padding: 0 20px;
  gap: 20px;
}

.sidebar {
  flex: 1;
  min-width: 320px;
}

.main-content {
  flex: 2.5;
  min-width: 400px;
}

/* استایل بخش‌های مختلف */
section {
  background-color: var(--bg-medium);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 1px solid #3a506b;
}

h2 {
  color: var(--primary-color);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #3a506b;
  font-size: 1.4rem;
}

/* فرم تنظیمات */
#launchForm fieldset {
  border: 1px solid #3a506b;
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 15px;
}

#launchForm legend {
  padding: 0 10px;
  color: var(--primary-color);
  font-weight: bold;
}

#launchForm label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

#launchForm input {
  width: 100%;
  padding: 8px;
  border: 1px solid #3a506b;
  background-color: var(--bg-dark);
  color: var(--text-light);
  border-radius: 5px;
  margin-top: 5px;
}

.button-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

#launchForm button {
  padding: 12px;
  background-color: var(--primary-color);
  color: #000;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  transition: all 0.3s ease;
}

#launchForm button:hover {
  background-color: #fff;
  box-shadow: 0 0 15px rgba(252, 211, 7, 0.7);
}

#resetBtn {
  background-color: #3a506b;
  color: var(--text-light);
}
#resetBtn:hover {
  background-color: #5bc0de;
  color: #000;
}

/* داده‌های لحظه‌ای */
#dataDisplay p, #forcesDisplay p {
  font-size: 1.1rem;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
}
#dataDisplay span, #forcesDisplay span {
  font-weight: bold;
  color: var(--primary-color);
}

/* بخش‌های گرافیکی */
#rocketCanvas, #altitudeChart {
  width: 100%;
  height: 500px;
  border: 1px solid #3a506b;
  border-radius: 10px;
  display: block;
}

#altitudeChart {
  height: 400px;
}

/* فوتر */
footer {
  text-align: center;
  margin-top: 20px;
  padding: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-top: 1px solid #3a506b;
}

/* style.css (فقط بخش‌های جدید یا اصلاح‌شده) */

/* ... (تمام استایل‌های قبلی سر جای خود باقی می‌مانند) ... */

/* بخش‌های گرافیکی */
#canvas-container, #chart-container {
  width: 100%;
  height: 500px; /* ارتفاع ثابت */
  position: relative; /* مهم برای کنترل اندازه canvas */
  border: 1px solid #3a506b;
  border-radius: 10px;
  overflow: hidden; /* جلوگیری از بیرون زدن محتوا */
}

#chart-container {
  height: 400px;
}

#rocketCanvas, #altitudeChart {
  width: 100%;
  height: 100%;
  display: block;
}

/* در انتهای فایل style.css */

/* --- استایل دکمه‌های زوم --- */
.zoom-controls {
  position: absolute;
  bottom: 15px;
  right: 15px;
  display: flex;
  flex-direction: column; /* چیدن دکمه‌ها روی هم */
  gap: 8px; /* فاصله بین دکمه‌ها */
  z-index: 10; /* اطمینان از اینکه روی بوم نمایش داده می‌شوند */
}

.zoom-controls button {
  width: 40px;
  height: 40px;
  font-size: 24px;
  font-weight: bold;
  line-height: 40px; /* برای وسط‌چین کردن عمودی متن */
  text-align: center;
  color: #ffffff;
  background-color: rgba(40, 40, 40, 0.7);
  border: 1px solid #888888;
  border-radius: 50%; /* گرد کردن دکمه‌ها */
  cursor: pointer;
  transition: background-color 0.2s ease;
  padding: 0;
}

.zoom-controls button:hover {
  background-color: rgba(70, 70, 70, 0.9);
}

.zoom-controls button:active {
  background-color: rgba(90, 90, 90, 1);
}

/* در انتهای فایل style.css */

.camera-controls {
  position: absolute;
  top: 15px;
  left: 15px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.camera-controls button {
  padding: 8px 12px;
  font-size: 14px;
  color: #ffffff;
  background-color: rgba(40, 40, 40, 0.7);
  border: 1px solid #888888;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.camera-controls button:hover {
  background-color: rgba(70, 70, 70, 0.9);
}

.camera-controls button.active {
  background-color: var(--primary-color);
  color: #000;
  font-weight: bold;
}

#site-footer {
  background-color: #111;
  color: #eee;
  padding: 30px 20px;
  text-align: center;
  border-top: 2px solid #444;
  font-family: 'Vazir', sans-serif;
}

.footer-content h3 {
  margin-bottom: 10px;
  font-size: 20px;
  color: #fcd307;
}

.footer-content p {
  margin: 10px auto;
  max-width: 600px;
  line-height: 1.8;
}

.credits {
  margin-top: 20px;
  font-size: 14px;
  color: #aaa;
}