body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #fcd5d5;
    direction: rtl;
    padding: 20px;
}

/* الحكمة */
q {
    width: 90%;
    display: block;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    margin: 0 auto 40px auto;
    background: #9b4747;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
}

#twice {
    display: flex;
    text-align: center;
}

/* ================= */
/* Inputs + Add button */
/* ================= */
.task-input {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.task-input label {
    width: 20%;
    text-align: right;
    margin-right: 5px;
    font-weight: bold;
}

.task-input input {
    width: 50%;
    margin: 0 15px;
    padding: 10px;
    border: 1px solid #000;
    border-radius: 8px;
    transition: 0.3s all ease;
}

.task-input input:focus {
    border-color: #d76666;
    box-shadow: 0 0 5px #d76666;
    outline: none;
}

.task-input button {
    width: 15%;
    padding: 10px;
    margin-left: 8px;
    background: #000;
    color: #f5f1f1;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s all ease;
}

.task-input button:hover {
    background: #d76666;
    color: #fff;
}

/* ================= */
/* مصفوفة الأولويات 2x2 */
/* ================= */
.matrix-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 800px;
    margin: 40px auto 0 auto;
}

.matrix-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.matrix-item button {
    width: 100%;
    padding: 14px;
    border: 1px solid #000;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    border-radius: 8px;
    transition: 0.3s all ease;
}

.matrix-item button:hover {
    background: #000;
    color: #d76666;
}

.matrix-item div {
    width: 100%;
    min-height: 120px;
    border: 1px solid #000;
    margin-top: 8px;
    padding: 10px;
    background: #bab0b0;
    box-sizing: border-box;
    color: #141010;
    border-radius: 8px;
}

/* عداد المهام */
#cont {
    width: 50%;
    max-width: 500px;
    margin: 25px auto 30px auto;
    padding: 16px;
    border: 1px solid #666;
    border-radius: 10px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

/* ================= */
/* مكافأة عند الانتهاء */
/* ================= */
.reward {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgb(73, 66, 26);
    color: white;
    font-size: 2rem;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 20px 20px 20px 20px gold;
    z-index: 9999;

    opacity: 0;
    pointer-events: none;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.reward.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}


/* ///////////////////////////////////////////// */


/* ===== العنوان ===== */
/* #titledaily {
    width: 60%;
    margin: 0 auto 40px auto;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    background: #9b4747;
    color: #fff;
    padding: 12px;
    border-radius: 10px;
} */

/* ===== input ===== */
#mytask {
    display: block;
    width: 60%;
    margin: 20px auto;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #8e3f3f;
    font-size: 16px;
    
    direction: rtl;
}

#mytask:focus {
    outline: none;
    box-shadow: 0 0 6px rgba(183, 91, 91, 0.6);
}

/* ===== add button ===== */
#addbtn {
    display: block;
    margin: 0 auto 25px auto;
    padding: 10px 30px;
    border: none;
    border-radius: 10px;
    background: #000;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s ease;
}

#addbtn:hover {
    background: linear-gradient(135deg, #5a1f1f, #b75b5b);
}

/* ===== container ===== */
#content {
    width: 65%;
    color: rgba(0, 0, 0, 0.867);
    margin: auto;
    background: #bab0b0;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #4a2a2a;
}

/* ===== task list ===== */
#tasklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ===== task item ===== */
#tasklist li {
    display: flex;
    color: #020101;
    font-size: 20px;
    align-items: center;
    justify-content: space-between;
    background: #e2cccc;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #8e3f3f;
}

/* يمين: checkbox + النص */
.task-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-direction: row-reverse;
    /* ⭐ التعديل الوحيد */
}

/* checkbox */
.task-info input[type="checkbox"] {
    transform: scale(1.2);
    cursor: pointer;
}

/* النص */
.task-info span {
    font-size: 17px;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    color: #000000;
    text-align: right;
}

/* زر المسح (أقصى الشمال) */
#tasklist li button {
    padding: 6px 16px;
    border: none;
    border-radius: 20px;
    background: #fff;
    color: #0c0909;
    font-size: 13px;
    cursor: pointer;
    transition: 0.3s ease;
}

#tasklist li button:hover {
    background: #000;
    color: #fff;
}


#howmany {
    width: 50%;
    max-width: 500px;
    margin: 25px auto 30px auto;
    padding: 16px;
    border: 1px solid #666;
    border-radius: 10px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

#back,
#dailytask {
    width: 15%;
    padding: 10px;
    margin-left: 8px;
    background: #942929;
    color: #dfd8d8;
    border: #000;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s all ease;

}

.reward {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgb(73, 66, 26);
    color: white;
    font-size: 2rem;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 0 20px gold;
    z-index: 9999;
    transition: transform 0.5s ease, opacity 0.5s ease;
    opacity: 0;
}

.reward.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

small {
    margin: 0 0 px;
    padding: 0 0 px;
}

#definded {
    display: flex;
    border-color: #000000;
    border-radius: 30px;
    margin: 9px;
    padding-bottom: -9px;
    height: 19px;
    text-align: center;
    position: relative;
    cursor: pointer;
    /* overflow: hidden; */
}
#definded span {
    margin: 5px auto;
    position: absolute;
    background-color: #d49696;
    left: 50%;
    transform: translate(-50%);
    min-width: 50px;
    top: -32px;
    color: #070606;
    opacity: 0;
}


#definded span:before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -18px;


    border-width: 10px;

    transform: translate(-50%);
    border-style: solid;
    border-color: #d49696 transparent transparent;
}

/* 
#definded :hover {
    overflow: visible;
} */

#definded:hover span {
    opacity: 1;
}






















#tip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #e9acac, #f3efef);
    /* خلفية أغمق شويه */
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    padding: 30px 40px;
    width: 450px;
    /* أكبر شويه */
    max-width: 95%;
    font-family: Arial, sans-serif;
    text-align: center;
    z-index: 1000;
}

/* العنوان */
#tip h2 {
    margin-bottom: 20px;
    color: #000000;
    font-size: 24px;
}

/* قائمة التعليمات */
#tip ul {
    text-align: left;
    padding-left: 25px;
    margin: 15px 0 25px 0;
    font-size: 16px;
}

/* الزرار أسفل الديف */
#tip #okay {
    padding: 11px 16px;
    /* margin: 20px; */
    border: none;
    border-radius: 10px;
    background-color: #050805;
    color: white;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

#tip #okay:hover {
    background-color: #000000;
}