/*==================================================
        اختبر معلوماتك ونمِّ مهاراتك اللغوية
        style.css  (الجزء الأول)
==================================================*/

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{

    direction:rtl;

    font-family:
    "Segoe UI",
    Tahoma,
    Arial,
    sans-serif;

    background:#edf3fa;

    color:#222;

    line-height:1.6;

}

.container{

    width:min(1400px,90%);

    margin:17px auto;

}

/*=========================
        العنوان
=========================*/

.mainHeader{

    background:linear-gradient(135deg,#1565c0,#1e88e5);

    color:white;

    border-radius:15px;

    text-align:center;

    padding:17px;

    margin-bottom:15px;

    box-shadow:0 8px 24px rgba(0,0,0,.18);

}

.mainHeader h1{

    font-size:39px;

    margin-bottom:7px;

    font-weight:600;

}

.mainHeader p{

    font-size:17px;

    opacity:.95;

}

/*=========================
      بطاقات البداية
=========================*/

.playerRow{

    display:grid;

    grid-template-columns:1fr;

    gap:22px;

    margin:0 auto 22px;

    max-width:700px;

}

.playerCard{

    background:white;

    border-radius:14px;

    padding:14px;

    box-shadow:0 3px 10px rgba(0,0,0,.12);

    border:2px solid transparent;

    transition:all .25s ease;

}

.playerCard:hover{

    transform:translateY(-3px);

    border-color:#1e88e5;

    box-shadow:0 8px 20px rgba(0,0,0,.18);

}

.playerCard label{

    display:block;

    font-size:18px;

    font-weight:bold;

    margin-bottom:12px;

}

.playerCard input,

.playerCard select{

    width:100%;

    height:45px;

    border:2px solid #d7dce4;

    border-radius:10px;

    padding:10px;

    font-size:17px;

    transition:all .25s ease;

}

.playerCard input:focus,

.playerCard select:focus{

    border-color:#1665c1;

    outline:none;

    box-shadow:0 0 8px rgba(22,101,193,.25);

}

/*=========================
      اختيار الفئات
=========================*/

.categoryBox{

    background:white;

    border-radius:13px;

    padding:22px;

    box-shadow:0 3px 12px rgba(0,0,0,.12);

    margin-bottom:22px;

}

.categoryBox h2{

    font-size:33px;

    color:#1f64b8;

    margin-bottom:10px;

}

.categoryBox p{

    font-size:21px;

    font-weight:bold;

    margin-bottom:18px;

}
.categoryHeader{

    display:flex;

    justify-content:space-between;

    align-items:center;

    width:100%;

    margin-bottom:18px;

}

.categoryHeader h2{

    margin:0;

    font-size:30px;

    color:#1f64b8;

}

.categoryHeader p{

    margin:0;

    font-size:20px;

    font-weight:bold;

}
/*=========================
        شبكة الفئات
=========================*/

.categories{

    display:grid;

    grid-template-columns:repeat(5,1fr);

    gap:13px;

    margin-top:17px;

}

.categories label{

    display:flex;

    align-items:center;

    justify-content:center;

    gap:9px;

    height:45px;

    background:#f7f9fc;

    border:2px solid #d8e0ea;

    border-radius:10px;

    cursor:pointer;

    font-size:15px;

    font-weight:bold;

    transition:.25s;

}

.categories label:hover{

    background:#e9f2ff;

    border-color:#1976d2;

    transform:translateY(-2px);

}

.categories label:hover{

    background:#eef5ff;

    border-color:#1f64b8;

}

.categories input{

    width:21px;

    height:21px;

}

/*=========================
        زر البداية
=========================*/

.startArea{

    text-align:center;

    margin:30px 0;

}

#startBtn{

    background:#1f64b4;

    color:white;

    border:none;

    border-radius:12px;

    padding:16px 60px;

    font-size:25px;

    font-weight:bold;

    cursor:pointer;

    transition:.25s;

}

#startBtn:hover{

    background:#0f57af;

    transform:translateY(-2px);

}

[hidden]{
    display:none !important;
}

.adminReviewArea{
    text-align:center;
    margin:-15px 0 25px;
}

.adminReviewArea a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:44px;
    padding:10px 20px;
    border:1px solid #c7ddf8;
    border-radius:10px;
    background:#f3f8ff;
    color:#1458a8;
    font-size:16px;
    font-weight:bold;
    text-decoration:none;
}

.adminReviewArea a:hover{
    background:#e6f1ff;
}

/*=========================
      شاشة النتيجة النهائية
=========================*/

.endScreen{
    max-width:760px;
    margin:20px auto;
    padding:30px;
    background:#fff;
    border-radius:18px;
    box-shadow:0 7px 24px rgba(16,69,122,.14);
    text-align:center;
}

.endIcon{font-size:66px;line-height:1;margin-bottom:8px;}
.endScreen h2{margin:0;color:#145db5;font-size:34px;}
.endMessage{font-size:20px;color:#526579;margin:10px 0 20px;}
.endPlayer{padding:13px;border:2px solid #d8e8fa;border-radius:11px;background:#f7fbff;font-size:20px;}
.endStats{display:grid;grid-template-columns:repeat(3,1fr);gap:13px;margin:20px 0;}
.endStat{padding:18px 10px;border:2px solid #d8e8fa;border-radius:13px;background:#f8fbff;}
.endStat strong{display:block;color:#1760b6;font-size:35px;line-height:1.1;}
.endStat span{display:block;color:#526579;margin-top:7px;font-weight:bold;}
.endStatScore{border-color:#aee1bc;background:#effbf2;}
.endStatScore strong{color:#267c32;}
.endSaveStatus{border-radius:10px;padding:12px 15px;font-weight:bold;background:#eef6ff;color:#1458a8;}
.endSaveStatus.local{background:#fff7e8;color:#9a5700;}
.endButtons{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:18px;}
.endButtons button{min-height:52px;border:0;border-radius:11px;color:#fff;font-size:18px;font-weight:bold;cursor:pointer;}
.btnSecondary{background:#586b80;}
.btnSecondary:hover{background:#46586b;}
.endScreen .adminReviewArea{margin:20px 0 0;}

/*=========================
      سجل أفضل النتائج
=========================*/

.leaderboardBox{
    background:#fff;
    border-radius:14px;
    padding:22px;
    margin:25px 0;
    box-shadow:0 3px 12px rgba(0,0,0,.12);
}

.leaderboardHeader{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:16px;
}

.leaderboardHeader h2{
    color:#1f64b8;
    font-size:27px;
    margin-bottom:3px;
}

.leaderboardHeader p,
.gamePlan{
    color:#526579;
    font-size:16px !important;
    font-weight:600 !important;
    margin:0 !important;
}

.fixedTimeNotice{
    margin:10px 0 0 !important;
    color:#a34c00;
    font-size:17px !important;
    font-weight:bold !important;
}

#refreshLeaderboardBtn{
    border:0;
    border-radius:9px;
    padding:10px 16px;
    background:#e7f1ff;
    color:#1458a8;
    font-size:15px;
    font-weight:bold;
    cursor:pointer;
}

.leaderboardTableWrap{overflow-x:auto;}

.leaderboardTable{
    width:100%;
    border-collapse:collapse;
    min-width:560px;
}

.leaderboardTable th{
    background:#1f64b8;
    color:#fff;
    padding:11px;
}

.leaderboardTable td{
    border-bottom:1px solid #e2e9f1;
    padding:10px;
    text-align:center;
    font-weight:600;
}

.leaderboardTable tbody tr:nth-child(-n+3) td{background:#fff9e6;}

.leaderboardStatus{
    min-height:24px;
    margin-top:10px;
    color:#60758b;
    font-size:14px;
}

/*=========================
      معلومات الجولة
=========================*/

.infoBar{

    display:grid;

    grid-template-columns:repeat(5,1fr);

    gap:18px;

    margin-bottom:25px;

}

.infoBar>div{

    background:white;

    border-radius:14px;

    text-align:center;

    padding:18px;

    font-size:28px;

    font-weight:bold;

    box-shadow:0 3px 10px rgba(0,0,0,.12);

}

.gameControls{
    display:flex;
    justify-content:flex-end;
    margin:-10px 0 18px;
}

.gameControls button{
    min-width:190px;
    min-height:48px;
    border:0;
    border-radius:10px;
    color:#fff;
    font-size:19px;
    font-weight:bold;
    cursor:pointer;
}

.gameControls button:disabled{
    opacity:.55;
    cursor:not-allowed;
}

/*=========================
            الجدول
=========================*/

.tableContainer{

    background:white;

    border-radius:16px;

    padding:18px;

    box-shadow:0 3px 12px rgba(0,0,0,.12);

    overflow-x:auto;

}

#gameTable{

    width:100%;

    border-collapse:collapse;

}

#gameTable th{

    background:#1f64b8;

    color:white;

    padding:14px;

    font-size:24px;

}

#gameTable td{

    border:1px solid #d8dfe8;

    padding:10px;

    text-align:center;

}

#gameTable td.unusedWord{
    background:#f1f4f8;
    color:#98a6b5;
    font-size:22px;
    font-weight:bold;
}

#gameTable input{

    width:100%;

    height:46px;

    border-radius:8px;

    border:2px solid #cfd6e0;

    font-size:22px;

    text-align:center;

    transition:.2s;

}

#gameTable input:focus{

    border-color:#1f64b8;

    outline:none;

}
/*=========================
        أزرار الجولة
=========================*/

.roundButtons{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin:25px 0;

}

.roundButtons button{

    min-width:220px;

    height:55px;

    border:none;

    border-radius:10px;

    color:#fff;

    font-size:22px;

    font-weight:bold;

    cursor:pointer;

    transition:.25s;

}

.btnPrimary{

    background:#1976d2;

}

.btnPrimary:hover{

    background:#1565c0;

}

.btnDanger{

    background:#d32f2f;

}

.btnDanger:hover{

    background:#b71c1c;

}


/*=========================
      لوحة التعلم
=========================*/

.learningPanel{

    background:#ffffff;

    border-radius:16px;

    padding:20px;

    margin-top:20px;

    box-shadow:0 3px 12px rgba(0,0,0,.12);

}

.learningPanel h2{

    color:#1976d2;

    font-size:30px;

    margin-bottom:12px;

}

.learningText{

    font-size:20px;

    margin-bottom:18px;

    color:#444;

}

.dictionaryNote{
    background:#fff5d9;
    border:1px solid #f0c865;
    border-right:5px solid #e49a00;
    border-radius:10px;
    color:#704b00;
    font-size:17px;
    line-height:1.8;
    margin-bottom:18px;
    padding:10px 14px;
}

#learningTable{

    width:100%;

    border-collapse:collapse;

}

#learningTable th{

    background:#1976d2;

    color:white;

    padding:12px;

    font-size:20px;

}

#learningTable td{

    border:1px solid #d8dfe8;

    padding:10px;

    text-align:center;

    font-size:18px;

}


/*=========================
          التذييل
=========================*/

.footer{

    text-align:center;

    margin:35px 0 15px;

    color:#666;

    font-size:18px;

}


/*=========================
      الشاشات الصغيرة
=========================*/

@media (max-width:900px){

    .playerRow{

        grid-template-columns:1fr;

    }

    .categories{

        grid-template-columns:repeat(2,1fr);

    }

    .infoBar{

        grid-template-columns:repeat(2,1fr);

    }

    .roundButtons{

        flex-direction:column;

        gap:15px;

    }

    .roundButtons button{

        width:100%;

    }

    .leaderboardHeader{

        align-items:flex-start;

        flex-direction:column;

    }

    #refreshLeaderboardBtn{

        width:100%;

    }

    .gameControls button{

        width:100%;

    }

    .endStats{grid-template-columns:1fr;}
    .endButtons{grid-template-columns:1fr;}

    .mainHeader h1{

        font-size:34px;

    }

    .mainHeader p{

        font-size:22px;

    }

}
