/*
 * Load Noto Naskh Arabic from Google Fonts
 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic&display=swap');

/* Flashcard container & info */
.ofc-container {
  max-width: 400px;
  margin: 1em auto;
  text-align: center;
  position: relative;
}

#ofc-info,
#ofc-timer {
  margin: 0.5em 0;
  font-weight: bold;
}

/* Card wrapper: center the box */
.ofc-card {
  perspective: 1000px;
  position: relative;
  width: 80%;      /* shrink and center */
  height: 200px;
  margin: 1em auto;
}

/* Card faces */
.ofc-card-front,
.ofc-card-back {
  backface-visibility: hidden;
  transition: transform 0.6s;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Arabic in Naskh, English fallback */
  font-family: 'Noto Naskh Arabic', Arial, sans-serif;
  font-size: 2em;
  line-height: 1.4;
  text-align: center;

  border: 2px solid #ddd;
  border-radius: 10px;
  padding: 20px;
  background: #fff;
  color: #000;
  pointer-events: none;
}

.ofc-card-back {
  transform: rotateY(180deg);
}

/* Flip state transforms */
.ofc-card.flipped .ofc-card-front {
  transform: rotateY(180deg);
}
.ofc-card.flipped .ofc-card-back {
  transform: rotateY(360deg);
}

/* Buttons */
.ofc-container button {
  margin: 0.5em 0.2em;
  padding: 0.5em 1em;
  font-size: 1em;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

/* Enabled buttons */
.ofc-container button:not(:disabled) {
  background: #0073aa;
  color: #fff;
}
.ofc-container button:not(:disabled):hover {
  background: #005f8d;
}

/* Disabled buttons */
.ofc-container button:disabled {
  background: #ddd;
  color: #888;
  cursor: not-allowed;
}
