﻿@font-face {
    font-family: noto-sans-arabic;
    src: url(/fonts/noto-sans-arabic.ttf);
    font-weight: normal;
}
@font-face {
    font-family: playpen;
    src: url(/fonts/playpen-hebrew.ttf);
}
* {
    margin: 0;
    padding: 0;
    font-family: noto-sans-arabic, playpen, Arial;
}
/* ===== General ===== */
body {
    background: linear-gradient(135deg, #e6f7fb, #f1fbfd);
    font-family: noto-sans-arabic, Arial;
}

/* ===== Main Container ===== */
.mainQuestionContainer {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===== Question Card ===== */
.questionContainer {
    background: white;
    width: 100%;
    max-width: 520px;
    padding: 30px 35px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 160, 190, 0.2);
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 15px;
}

/* ===== Word ===== */
.binyanWord {
    text-align: center;
    font-size: 32px;
    font-weight: bold;
    color: #0097b2;
    margin-bottom: 10px;
}

/* ===== Labels ===== */
.questionContainer span {
    display: flex;
    flex-direction: column;
    font-size: 16px;
    color: #035d6b;
    gap: 6px;
    direction: rtl;
}

/* ===== Inputs & Selects ===== */
.questionContainer input,
.questionContainer select {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1.8px solid #b7e3ec;
    font-size: 16px;
    transition: all 0.25s ease;
    background: #f9feff;
    width: 100%;
}

    /* Focus effect */
    .questionContainer input:focus,
    .questionContainer select:focus {
        outline: none;
        border-color: #00b4d8;
        box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.2);
        background: #ffffff;
    }

/* ===== Number input width ===== */
#binyanNum {
    max-width: 120px;
}

/* ===== Root input ===== */
input[lang="he"] {
    direction: rtl;
    letter-spacing: 1px;
}

/* ===== Optional submit button (if you add later) ===== */
.quizButton {
    margin-top: 25px;
    padding: 12px;
    background: linear-gradient(135deg, #00b4d8, #48cae4);
    color: black;
    font-weight: bold;
    font-size: 18px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 50%;
}
    .quizButton:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0, 180, 216, 0.4);
    }

/* ===== Progress Bar ===== */
.progressWrapper {
    width: 100%;
    max-width: 520px;
    margin: 0 auto 15px auto;
}

.progressTrack {
    width: 100%;
    height: 14px;
    background: #dff3f8;
    border-radius: 999px;
    overflow: hidden;
}

.progressFill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00b4d8, #48cae4);
    border-radius: 999px;
    transition: width 0.6s ease; /* keep or adjust timing/easing here */
}

.progressText {
    text-align: center;
    margin-top: 6px;
    font-size: 14px;
    color: #035d6b;
}
.wrong {
    outline: none;
    border-color: #d00000;
    background: #fff0f0;
}
input.wrong:focus, select.wrong:focus {
    outline: none;
    border-color: #00b4d8;
    box-shadow: 0 0 0 3px rgba(222, 60, 51, 0.2);
    background: #ffffff;
    border: 1px solid #910e07;
}
input.correct, select.correct {
    outline: none;
    border-color: #007f2d;
    box-shadow: 0 0 0 3px rgba(0, 127, 45, 0.45);
    background: #f0fff6;
}
    input.correct:focus, select.correct:focus {
        outline: none;
        border-color: #2a9d8f;
        box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.25);
        background: #ffffff;
        border: 1px solid #076919;
    }
/* שורות בטבלת התוצאות */
.correct-row {
    background-color: #f3fcf5; /* ירוק בהיר מאוד */
    border: 1px solid #d4edda;
}

.incorrect-row {
    background-color: #fff9f9; /* אדום בהיר מאוד */
    border: 1px solid #f8d7da;
}

.binyan-table tr td {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

    .binyan-table tr td:first-child {
        border-right: 4px solid transparent;
        border-radius: 10px 0 0 10px;
    }

.binyan-table tr.correct-row td:first-child {
    border-right-color: #28a745;
}

.binyan-table tr.incorrect-row td:first-child {
    border-right-color: #dc3545;
}

/* התאמה לנייד */
@media (max-width: 768px) {
    .correctAndWrong {
        gap: 10px;
    }

    .binyan-table th:nth-child(4), .binyan-table td:nth-child(4) {
        display: none;
    }
    /* הסתרת תשובת משתמש בנייד למניעת צפיפות */
}

/* LETTER DIALOG */
.root-input-wrapper {
    display: flex;
    align-items: stretch;
}
.root-input-wrapper input {
    flex-grow: 1;
}
.help-btn {
    background: #e0f7fa;
    color: #035d6b;
    border: 1.8px solid #b7e3ec;
    border-radius: 10px;
    height: 42px; /* גובה זהה ל-input */
    padding: 0 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}
    .help-btn:hover {
        background: #00b4d8;
        color: white;
        border-color: #00b4d8;
    }

.letters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    direction: rtl;
}

.letter-card {
    background: #f8f9fa;
    border: 1px solid #eee;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 18px;
}

.ara-char {
    color: #1e3a8a;
    font-family: noto-sans-arabic, sans-serif;
    font-weight: bold;
}

.heb-char {
    color: #e67e22;
    font-weight: bold;
}

.arrow {
    font-size: 12px;
    color: #bdc3c7;
}

/* עיצוב גלילה יפה */
.letters-grid::-webkit-scrollbar {
    width: 6px;
}

.letters-grid::-webkit-scrollbar-thumb {
    background: #a9d7de;
    border-radius: 10px;
}
/* רקע הדיאלוג */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 93, 107, 0.4);
    backdrop-filter: blur(4px); /* טשטוש רקע מודרני */
    display: none; /* יופעל ב-JS */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* קופסת הדיאלוג */
.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    position: relative;
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* כותרת הדיאלוג */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1.5px solid #f0f9fb;
    padding-bottom: 10px;
}

.modal-title {
    color: #035d6b;
    font-weight: bold;
    font-size: 1.2em;
}

/* כפתור סגירה (X) */
.close-modal {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

    .close-modal:hover {
        background: #e2e8f0;
        color: #0f172a;
    }

/* עיצוב הגריד בתוך המודל */
.letters-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 5px;
}

.letter-card {
    background: #f8feff;
    border: 1px solid #e0f2f7;
    padding: 12px;
    border-radius: 12px;
    display: flex;
    flex-direction: row-reverse; /* התאמה לשפה */
    justify-content: space-around;
    transition: transform 0.15s;
}

    .letter-card:hover {
        border-color: #00b4d8;
        transform: translateY(-2px);
    }
/* small green hint showing the correct value */
.correct-answer, .binyan .correct-answer {
    display: inline-block;
    margin-top: 6px;
    margin-inline-start: 8px; /* gap in RTL */
    color: #007f2d;
    font-size: 13px;
    font-weight: 600;
    direction: rtl;
}

/* small button that opens the letters modal */
.open-letters-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid #b7e3ec;
  background: #ffffff;
  color: #035d6b;
  font-weight: 700;
  cursor: pointer;
  margin-left: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.open-letters-btn:hover {
  background: #e6fbff;
  transform: translateY(-1px);
}