/* reset بسيط */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Tajawal", sans-serif;
  background: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
}

/* الجزء الأبيض */
.container {
  display: flex;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.07);
  overflow: hidden;
  max-width: 1100px;
  width: 100%;
}

/* النموذج */
.form-section {
  flex: 1 1 320px;
  background: #fafafa;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  align-items: center;
}

.form-section div {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1rem;
}

.form-section input,
.form-section button {
  width: 100%;
  font-size: 1.15rem;
  padding: 0.9rem 1.25rem;
  border-radius: 8px;
}

.form-section input {
  border: 2px solid #ddd;
  text-align: center;
  transition: border-color 0.25s;
}

.form-section input:focus {
  border-color: #3e783e;
  outline: none;
}

.form-section button {
  border: none;
  color: #fff;
  background: #3e783e; /* نفس الأخضر الرئيس */
  cursor: pointer;
  transition: background 0.25s, transform 0.18s;
}

.form-section button:hover {
  background: #2d5b2d;
  transform: scale(1.04);
}

/* البطاقة */
.card-section {
  flex: 2 1 0;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer{
  margin-top: 20px;
  font-size: 14px;
  color: #777;
  text-align: center;
}

/* جعل الـ canvas مرن */
canvas {
  display: block;
  max-width: 80%;
  height: auto;
  border: 2px solid #ddd;
  border-radius: 10px;
}

/* موبايل */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  .form-section {
    display: inline-block;
    flex: auto;
}
.form-section {
    display: inline-block;
  justify-content: start;
}

}
