@font-face {
  font-family: 'Vazir';
  src: url('Vazir.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazir';
  src: url('Vazir.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: 'Vazir', Tahoma, sans-serif;
  background: linear-gradient(135deg, #00c4ff, #6c5ce7);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  direction: rtl;
  user-select: none; /* جلوگیری از انتخاب متن */
}

.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 20px;
}

.welcome-box, .question-box, .result {
  background-color: #ffffff;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 500px;
  width: 100%;
  animation: fadeIn 1s ease-in;
  user-select: none;
}

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(-20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.input-name {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  font-family: 'Vazir', sans-serif;
}

.error-message {
  color: #ff0000;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.timer {
  font-size: 1rem;
  color: #ff0000;
  margin-bottom: 15px;
}

.question-text {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.options {
  display: grid;
  gap: 10px;
}

.option {
  padding: 10px;
  background-color: #f0f0f0;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s;
  user-select: none;
}

.option:hover {
  background-color: #e0e0e0;
}

.option.selected {
  background-color: #007bff;
  color: #fff;
}

.navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.btn {
  padding: 10px 20px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s;
  font-family: 'Vazir', sans-serif;
}

.btn:hover {
  background-color: #0056b3;
}

.btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.footer {
  margin-top: 20px;
  font-size: 0.8rem;
  text-align: center;
  color: #666;
}

.report-card {
  max-width: 500px;
  padding: 20px;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  user-select: none;
}

.report-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.report-card p {
  font-size: 1rem;
  margin-bottom: 10px;
}

.scores p {
  font-size: 1rem;
}

.total-score {
  font-weight: bold;
  font-size: 1.1rem;
  margin-top: 15px;
}

.signature {
  margin-top: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.print-btn {
  display: block;
  margin: 20px auto 0;
  padding: 10px 20px;
  background-color: #28a745;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s;
}

.print-btn:hover {
  background-color: #218838;
}

@media screen and (max-width: 480px) {
  .container {
    padding: 10px;
  }

  .welcome-box, .question-box, .result {
    padding: 20px;
  }

  h1, h2 {
    font-size: 1.5rem;
  }

  .option {
    font-size: 0.9rem;
  }

  .btn {
    font-size: 0.9rem;
  }

  .report-card {
    padding: 15px;
  }

  .report-card h3 {
    font-size: 1.3rem;
  }

  .report-card p {
    font-size: 0.9rem;
  }
}

@media print {
  body {
    background: white;
  }
  .container, .result, .report-card {
    box-shadow: none;
    border: none;
    padding: 10px;
    margin: 0;
  }
  .print-btn, .footer, .navigation, .timer, .options, .question-box, .welcome-box {
    display: none;
  }
  .report-card {
    border: 1px solid #000;
    font-size: 8pt;
    color: #000;
    max-width: 100%;
  }
  .report-card h3 {
    font-size: 10pt;
  }
  .report-card p {
    font-size: 8pt;
  }
  .report-card::before {
    display: none;
  }
}