*{
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}
body{
    background-color: #333;
    color: white;
}

.curd{
    width: 600px;
    margin: 10px auto;
    text-align: center;
    /* border: 1px solid #333; */
}
.curd h2 {
  text-align: center;
  margin-bottom: 15px;
  color: #4CAF50;
  font-size: 22px;
  letter-spacing: 1px;
}
/* table style */
table{
    width: 600px;
    margin: 10px auto;
    text-align: center;
    border-collapse: collapse;
    /* border: 1px solid black; */
  background: #222;
  color: #eee;

    
    
    box-shadow: 1px 2px 10px ;

}
table thead tr{
    /* background-color: #777; */
      background: #555;
    color: white;
    font-family: sans-serif;

    
}
table th{
    padding: 5px 10px;
}
table td{
    padding: 5px;
}
table tr:nth-child(even) {
  background: #333;
}

table tr:hover {
  background: #444;
  transition: 0.3s;
}
table .Edit{
    display: flex;
    justify-content: space-around;
}
/* inputs  */
input,button{
    width: 100%;
    padding: 10px 20px;
    border-radius: 6px;
    outline: none;
    border: 1px solid #6846;
    margin: 10px 0;
}
input:focus{
    transform: scaleX(1.1);
    transition: 0.3s;
}
button.Add{
   background: linear-gradient(135deg, #4CAF50, #2E7D32);
  border: none;
  font-size: 16px;
  transition: 0.3s;
    color: aliceblue;
    margin:10px 0;
    cursor: pointer;
}
button.Add:hover{
    background: linear-gradient(135deg, #66BB6A, #388E3C);
  transform: scale(1.05);
}
.labels{
    display: flex;
    justify-content: space-around;
}
.prices{

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

/* edit and delete icons */
i{
    color: #777;
}
i:hover{
    color: #789;
    cursor: pointer;
}
i.del{
      color: #F44336;
}
i.del:hover{
     color: #D32F2F;
  transform: scale(1.2);
}
i.update{
  color: #FFC107;
}
i.update:hover{
    color: #FF9800;
  transform: scale(1.2);
}


/* alert style */
.myalert {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 250px;
  animation: fadeIn 0.5s ease, fadeOut 0.5s ease 2.5s forwards;
}

.myalert .close {
  margin-left: 15px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  border: 1px solid;
  padding: 4px 6px;
  border-radius: 5px;
}

.myalert.success {
  background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.myalert.warning {
  background: linear-gradient(135deg, #FFC107, #FF9800);
  color: #333;
}

.myalert.error {
  background: linear-gradient(135deg, #F44336, #B71C1C);
}

/* animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateY(-20px); }
}


/* Responsive for mobile */
@media (max-width: 768px) {
  .curd, table {
    width: 100%;
    margin: 5px auto;
  }

  table th, table td {
    padding: 8px;
    font-size: 14px;
  }

  input, button {
    width: 100%;
    font-size: 14px;
    padding: 8px;
  }
  input:focus{
    transform: scaleX(1);
}
td.Edit{
  gap: 5px;
}
.myalert {
    top: 10px;
    right: 10px;
    min-width: 200px;
    font-size: 12px;
  }

  .curd h2 {
    font-size: 18px;
  }
}







