@charset "utf-8";
@import url("fontiran.css");

:root {
  --card: #fff;
}
body {
  font-family:
    "IRANSansNormal",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial;
}
.card {
  border-radius: 0.5rem;
}
.table th,
.table td {
  vertical-align: middle;
}

/* استایل‌های تکمیلی برای زیبایی بیشتر */
.table td {
  vertical-align: middle;
  position: relative;
}
.element-card:hover {
  transform: scale(1.05);
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
/* پنهان کردن اسکرول‌بار برای زیبایی (اختیاری) */
.table-responsive::-webkit-scrollbar {
  height: 8px;
}
.table-responsive::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
/* استایل‌های جدول (قبلی) */
.cat-alkali {
  background-color: #ff6b6b !important;
  color: #fff;
}

.cat-alkaline-earth {
  background-color: #fca510 !important;
  color: #000;
}

.cat-transition {
  background-color: #4dabf7 !important;
  color: #fff;
}

.cat-post-transition {
  background-color: #74c0fc !important;
  color: #000;
}

.cat-lanthanide {
  background-color: #cc5de8 !important;
  color: #fff;
}

.cat-actinide {
  background-color: #f06595 !important;
  color: #fff;
}

.cat-metalloid {
  background-color: #20c997 !important;
  color: #fff;
}

.cat-nonmetal {
  background-color: #51cf66 !important;
  color: #000;
}

.cat-halogen {
  background-color: #94d82d !important;
  color: #000;
}

.cat-noble-gas {
  background-color: #845ef7 !important;
  color: #fff;
}

.cat-default {
  background-color: #e9ecef !important;
  color: #333;
}

.legend-box {
  padding: 6px 12px;
  font-weight: 500;
}

.periodic-table {
  table-layout: fixed;
  min-width: 1200px;
}

.cell-element {
  height: 75px;
  padding: 2px !important;
  position: relative;
  transition:
    transform 0.15s ease-in-out,
    z-index 0.15s;
}

.cell-element:hover {
  transform: scale(1.25);
  z-index: 100;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.element-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  padding: 2px;
  cursor: pointer;
  position: relative;
}

.atomic-num {
  position: absolute;
  top: 1px;
  left: 3px;
  font-size: 0.65rem;
  font-weight: bold;
  opacity: 0.85;
}

.symbol-text {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 8px;
}

.name-fa-text {
  font-size: 0.65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.atomic-mass {
  font-size: 0.6rem;
  opacity: 0.9;
  font-family: monospace;
}

/* استایل‌های مودال */
.modal-header {
  border-bottom: none;
}

.modal-title {
  font-weight: 700;
}

.modal-body {
  font-size: 1rem;
}

.modal-body p {
  line-height: 1.7;
}

.modal-dialog {
  max-width: 700px;
}

#elementModalLabel {
  font-size: 1.5rem;
}

.display-4 {
  font-weight: 700 !important;
}

.text-justify {
  text-align: justify;
}

.card {
  border-radius: 15px;
  overflow: hidden;
}

.card-header {
  background: linear-gradient(45deg, #0d6efd, #0dcaf0);
}

.bg-gradient-header {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

/* پرسپکتیو و صحنه کارت سه‌بعدی */
.flashcard-scene {
  perspective: 1000px;
  height: 330px;
  cursor: pointer;
  user-select: none;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}

.flashcard-inner.is-flipped {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ظاهر روی کارت */
.flashcard-front {
  background: #ffffff;
  border: 2px solid #e2e8f0;
}

/* ظاهر پشت کارت */
.flashcard-back {
  background: #f8fafc;
  border: 2px solid #22c55e;
  transform: rotateY(180deg);
}

.quiz-label {
  border: 2px solid #dee2e6;
  transition: all 0.2s ease;
}

.quiz-option-input:checked + .quiz-label {
  border-color: #0d6efd;
  background-color: #e7f1ff;
  color: #0d6efd;
}

.quiz-label.is-correct {
  border-color: #198754 !important;
  background-color: #d1e7dd !important;
  color: #0f5132 !important;
}

.quiz-label.is-wrong {
  border-color: #dc3545 !important;
  background-color: #f8d7da !important;
  color: #842029 !important;
}
