:root {
  --primary-bg: #101018;       
  --primary-text: #ffffff;     
  --secondary-bg: #1F1F27;     
  --disabled-color: #fff4;     
  --main-color: #FF33CC;       
  --red: #e74c3c;              
  --gray: #7f8c8d;             
  --green: #27ae60;            
  --plus-color: #4e94f3;       
}


body { 
  margin: 0; 
  background: var(--primary-bg);
}

.main { text-align: center; }

.main h1 {
  font-size: 3.5rem; 
  font-weight: 800; 
  letter-spacing: 5px; 
  color: var(--primary-text); 
  text-transform: uppercase; 
  margin-top: 20px;
  
  text-shadow: 
    0 0 7px var(--main-color),   
    0 0 15px var(--main-color),  
    0 0 30px #FF66E0,          
    0 0 60px #FF66E0,           
    0 0 90px #FF33CC;
    
  transition: text-shadow 0.3s ease-in-out;
}

.main h1:hover {
    text-shadow: 
    0 0 10px var(--main-color),   
    0 0 20px var(--main-color),  
    0 0 40px #FF66E0,  
    0 0 70px #FF66E0,           
    0 0 120px #FF33CC;
}


.todo-table {
  background: var(--secondary-bg); 
  width: 85%;
  margin: 40px auto;
  border-collapse: collapse; 
}



.todo-table td {
  background: var(--secondary-bg);
  border: 1px solid #0004;
  padding: 0;
  text-align: center;
  color: var(--main-color);
  position: relative;
  width: calc(100% / 8); 
  height: 60px;
  cursor: pointer; 
}

.todo-table td:last-child {
  margin-right: 0;
}

.label {
  font-size: 20px;
  transition: .3s;
  display: block;
  padding: 5px 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--main-color); 
  text-decoration-color: var(--green) !important;
  text-decoration-thickness: 2px;
}

.label[style*="line-through"] {
    text-decoration: line-through;
    color: var(--green) !important;
}


.hover-box {
  position: absolute;
  top: -20px; 
  left: 50%; 
  transform: translateX(-50%); 
  
  display: flex;
  justify-content: center;
  align-items: flex-start;
  opacity: 0;
  transition: opacity 0.3s; 
  pointer-events: none; 
  color: var(--primary-text); 
  
  width: max-content; 
  height: max-content;
  
  z-index: 999; 
}

.todo-table td:hover .hover-box {
  opacity: 1;
  pointer-events: all;
}

.todo-table td:hover .label { opacity: 1; } 


.all-icons-container {
  display: flex;
  gap: 6px; 
  z-index: 10; 
  padding: 5px; 
  background: rgba(31, 31, 39, 0.9); 
  border-radius: 12px; 
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
}

.icon {
  width: 32px; 
  height: 32px; 
  border-radius: 50%; 
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  cursor: pointer;
  color: var(--primary-text); 
  position: relative; 
  transition: 0.3s all; 
  border: 1px solid transparent; 
  background: none; 
  margin: 0; 
  flex: none; 
  pointer-events: all;
}

.icon.add, .icon.done {
  display: none;
}


.edit { border-color: var(--main-color); color: var(--main-color); } 
.edit:hover {
  background: var(--main-color);
  color: var(--primary-bg);
  box-shadow: 0 0 10px var(--main-color);
}

.trash { border-color: var(--red); }
.trash:hover {
  background: var(--red);
  color: var(--primary-bg);
  box-shadow: 0 0 10px var(--red);
}


.icon::before {
  content: attr(data-tooltip); 
  position: absolute;
  bottom: 100%; 
  left: 50%;
  transform: translateX(-50%) translateY(-5px); 
  background-color: #333;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px; 
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 100;
}


.icon:hover::before {
  opacity: 1;
  visibility: visible;
}


.todo-table td.disable-hover .hover-box {
  opacity: 0 !important;
}

.todo-table td.disable-hover .label {
  opacity: 1 !important;
}


.todo-table td:first-child .hover-box {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  flex-direction: column;
}

.todo-table td:first-child:hover .hover-box {
  opacity: .5;
}


.todo-table td:first-child .icon {
    display: none;
}


.row-actions-container {
    display: flex;
    justify-content: center; 
    gap: 15px; 
    margin: 20px auto; 
    width: 85%;
}

.row-actions-container button {
    min-width: 120px;
    margin: 0.5rem 0; 
    height: 3rem; 
    padding: 0 20px; 
}


button {
  width: 150px; 
  height: 3rem;
  color: var(--main-color);
  background: transparent;
  border: 2px solid var(--main-color);
  border-radius: 10px; 
  font-weight: bold;
  font-size: .995rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease; 
  z-index: 0;
  margin: .5rem 0; 
}

 button::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 100%;
  width: 200%;
  height: 0;
  border-radius: 0 0 50% 50%;
  background: var(--main-color);
  z-index: -1;
  transition: all 0.6s ease;
}


 button:hover {
  color: var(--primary-bg);
  background: var(--main-color);
  box-shadow: 0 0 15px var(--main-color), 0 0 25px var(--main-color); 
}

 button:hover::before {
  top: -30px;
  left: -30px;
}

button:active::before {
background: var(--main-color);
transition: background 0s 0.6s;
}


input {
  width: 70%;
  height: 2.5rem; 
  margin: 15px;
  background: rgba(255, 255, 255, 0.05); 
  backdrop-filter: blur(5px);
  
  border: 1px solid var(--disabled-color); 
  padding: 0 15px; 
  border-radius: 8px; 
  font-size: 1rem;
  color: var(--main-color); 
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s; 
}

 input:focus {
  border-color: var(--main-color); 
  box-shadow: 0 0 15px var(--main-color), 0 0 25px var(--main-color); 
  background: rgba(255, 255, 255, 0.1); 
  outline: none; 
}

/* Custom Message Modal/Toast Styles */
#custom-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    padding: 20px 30px;
    background-color: var(--secondary-bg);
    border: 2px solid var(--main-color);
    border-radius: 12px;
    box-shadow: 0 0 20px var(--main-color);
    text-align: center;
    transition: opacity 0.3s ease-in-out;
}

.modal-hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-visible {
    opacity: 1;
    pointer-events: auto;
}

#message-text {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-text);
}

/* Confirmation Modal Styles */
#confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s;
}

#confirm-modal .modal-content {
    background: var(--secondary-bg);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid var(--red);
    box-shadow: 0 0 30px var(--red);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

#confirm-text {
    display: block;
    font-size: 1.1rem;
    color: var(--primary-text);
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    justify-content: space-around;
    gap: 15px;
}

.modal-buttons button {
    flex: 1;
    height: 3rem;
    color: var(--main-color);
    background: transparent;
    border: 2px solid var(--main-color);
    border-radius: 10px; 
    font-weight: bold;
    transition: all 0.4s ease; 
}

#confirm-no {
    color: var(--gray);
    border-color: var(--gray);
}
#confirm-no:hover {
    background: var(--gray);
    color: var(--primary-bg);
}

#confirm-yes {
    color: var(--red);
    border-color: var(--red);
}
#confirm-yes:hover {
    background: var(--red);
    color: var(--primary-text);
}

/* Welcome Modal Styles (Updated Colors) */
#welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9); 
    z-index: 3000; 
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s;
}

#welcome-modal .modal-content {
    background: var(--secondary-bg);
    padding: 30px;
    border-radius: 15px;
    border: 3px solid var(--main-color); 
    box-shadow: 0 0 40px rgba(255, 51, 204, 0.5); 
    max-width: 500px;
    width: 90%;
    text-align: left;
    color: var(--primary-text); 
}

#welcome-modal h2 {
    color: var(--main-color);
    margin-top: 0;
    border-bottom: 1px solid var(--disabled-color);
    padding-bottom: 10px;
}

#welcome-modal h3 {
    color: var(--main-color); /* 💡 تم التعديل */
    margin-top: 15px;
}

#welcome-modal ul {
    list-style-type: disc;
    padding-left: 20px;
    color: var(--main-color); /* 💡 تم التعديل */
}

#welcome-modal li {
    margin-bottom: 5px;
}

#welcome-modal .modal-buttons {
    margin-top: 20px;
}


@media (max-width: 768px) {
    
    .main h1 {
        font-size: 2.5rem;
    }

    .container {
        width: 95%;
        margin: 0 auto;
    }

    .container input {
        width: 65%;
    }
    
    .container button {
        width: 25%;
        min-width: 80px;
        font-size: 0.9rem;
    }
    
    .todo-table {
        width: 100%;
        margin: 20px auto;
    }
    
    .todo-table td {
        height: 50px;
        width: calc(100% / 8 - 1px);
        margin-right: 1px;
    }
    
    .label {
        font-size: 14px;
        letter-spacing: 0;
    }
    
    .icon {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }

    .all-icons-container {
        gap: 4px;
        padding: 3px;
    }

    .hover-box {
        top: -15px;
    }
    
    .row-actions-container {
        flex-wrap: wrap; 
        gap: 10px;
        width: 100%;
        padding: 0 10px;
        justify-content: space-between;
    }

    .row-actions-container button {
        min-width: 48%; 
        margin: 5px 0;
        height: 2.5rem;
        font-size: 0.9rem;
    }

    #custom-message {
        width: 80%;
        padding: 15px 20px;
    }
    #message-text {
        font-size: 16px;
    }

    #confirm-modal .modal-content, #welcome-modal .modal-content {
        padding: 20px;
    }
    
    #welcome-modal ul {
        padding-left: 15px;
    }
}
