/* Reset padding, margin and set default font */
* {
  padding: 0px;
  margin: 0px;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
/* Set background gradient for the entire body */
body {
  background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
  min-height: 100vh;
  min-width: 100vw;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
/*_______________________________________________________________Section 1_______________________________________________________________________*/

/* Styling for the statistics panel (Total, Active, Inactive students) */
.section_1 {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  padding: 30px 20px 30px 20px;
  width: 1200px;
  background-color: rgba(255, 255, 255, 0.2);
  margin: 30px 150px 20px 150px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
/* Containers for each statistic block */
.total_students,
.active_students,
.inactive_students {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  margin: 10px;
}
/* Font styles for statistic numbers */
.total_no,
.active_no,
.inactive_no {
  font-size: 40px;
  text-shadow: 2px 2px 4px black;
}
/* Font styles for statistic labels */
.total_students h5,
.active_students h5,
.inactive_students h5 {
  font-size: 20px;
  font-weight: 400;
}

/*_______________________________________________________________Section 2_____________________________________________________________________*/

/* Container for all student input and output sections */
.section_2 {
  display: flex;
  flex-direction: column;
  background-color: rgba(255, 255, 255, 0.9);
  border: white 2px solid;
  width: 1200px;
  margin: 30px 150px 20px 150px;
  border-radius: 30px;
  overflow: hidden;
}
/*_________________________________________________________________Header_____________________________________________________________________*/

/* Header of the section with title and subtitle */
.header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(to right, #4361ee, #1e1888);
  width: 100%;
  padding: 20px;
  position: relative;
}
/* Title and subtitle styles */
.header h1 {
  font-size: 50px;
  text-align: center;
}
.header h3 {
  font-size: 20px;
  font-weight: 400;
  text-align: center;
}
/* Light radial gradient effect in header */
.header::before {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  transform: rotate(30deg);
}

/*_______________________________________________________________Main_________________________________________________________________________*/

/* Main content area with input and output sides */
.main {
  display: flex;
  flex-direction: row;
  margin: 20px 20px 30px 30px;
}
/*----------------------------------------------------------------Input Area-----------------------------------------------------------------*/
/* Styling for the input form container */
.main .input_tag {
  background-color: rgba(255, 255, 255, 0.9);
  color: black;
  border-radius: 30px;
  margin: 20px 30px 20px 0px;
}
/* Section title for inputs */
.input_title {
  position: relative;
  color: #4361ee;
  font-size: 20px;
  border-bottom: 3px solid #4895ef;
  padding: 20px;
}
/* Input wrapper spacing */
.inputs {
  margin: 20px 30px 10px 40px;
}
/* Label text for each input field */
.inputs .input_header {
  font-size: 15px;
  font-weight: 600;
}
.inputs .input_header i {
  padding: 5px;
}
/* Input field styles */
.inputs input,
.input_gender,
.input_course,
.input_address,
.input_status {
  width: 300px;
  height: 50px;
  margin: 10px;
  border-radius: 10px;
  border: solid 2px #ccc;
  padding: 0 20px;
  outline: none;
  transition: transform 0.5s;
}
/* Highlight effect on focused input */
.inputs input:focus,
.input_gender:focus,
.input_course:focus,
.input_address:focus,
.input_status:focus {
  border-color: #4361ee;
  box-shadow: 0 0 12px 4px rgba(67, 97, 238, 0.7);
  transform: scale(1.05);
}
/* Larger height for address textarea */
.inputs .input_address {
  height: 80px;
}
/* Placeholder styling */
.inputs input::placeholder {
  padding: 2px;
  font-size: 15px;
}
.input_address {
  padding-top: 15px;
}
textarea::placeholder {
  padding: 0px 10px 10px 2px;
  font-size: 15px;
}
/* Action buttons (save and reset) */
.actions {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 20px;
  margin: 40px;
}
.actions .save_btn {
  padding: 15px;
  border-radius: 20px;
  background: linear-gradient(to right, #4361ee, #10237a);
  color: white;
  border: none;
  font-size: 15px;
  margin: 0px 20px 0px 2px;
  width: 150px;
  cursor: pointer;
  transition: transform 0.4s;
}
.actions .reset_btn {
  padding: 15px;
  border-radius: 20px;
  background: linear-gradient(to right, rgb(118, 113, 113), rgb(55, 52, 52));
  color: white;
  border: none;
  font-size: 15px;
  margin: 0px;
  width: 150px;
  cursor: pointer;
  transition: transform 0.4s;
}
.save_btn:hover,
.reset_btn:hover {
  transform: scale(1.08);
}
/*----------------------------------------------------------------Output Area-----------------------------------------------------------------*/

/* Output container (table view) */
.main .output_informations {
  background-color: rgba(255, 255, 255, 0.9);
  color: black;
  border-radius: 30px;
  margin: 20px 0px 20px 0px;
  position: relative;
  width: 700px;
}
/* Title above table */
.output_header {
  display: flex;
  flex-direction: row;
  gap: 60px;
  border-bottom: 2px solid #4895ef;
}
.output_title {
  color: #4361ee;
  font-size: 20px;
  padding: 20px;
}
/* Search bar styling */
.searchbar input {
  border: #ccc 2px solid;
  margin: 20px 20px 30px 100px;
  padding: 10px;
  font-size: 16px;
  border-radius: 20px;
  margin-left: 10px;
  width: 280px;
  outline: none;
  transition: transform 0.4s;
}
.searchbar input:focus {
  border-color: #4361ee;
  box-shadow: 0 0 12px 4px rgba(67, 97, 238, 0.7);
  transform: scale(1.1);
}

/* Table and cells */
table {
  margin: 30px 20px 40px 35px;
  border-collapse: collapse;
  width: 90%;
}
th,
td {
  border: none;
  padding: 15px;
  text-align: center;
}
td {
  font-size: 15px;
  word-wrap: normal;
  border-top: none;
}
th {
  background: linear-gradient(to right, #4361ee, #3f37c9);
  color: white;
  font-size: 20px;
}

/* Hover effect for table rows */
tbody tr:hover {
  background-color: rgba(67, 97, 238, 0.15);
  transform: scale(1.02);
}

/* Transition effect on row hover and input focus */
tbody tr {
  transition: transform 0.4s;
}

/* Pill style for student status */
.status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
}
.status-active {
  background-color: rgba(67, 211, 255, 0.25);
  color: #00aaff;
}
.status-inactive {
  background-color: rgba(255, 0, 98, 0.2);
  color: #b7194e;
}

/* Action buttons column */
.action_sec {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}

/* Edit and Delete button styles */
.edit_btn,
.delete_btn {
  padding: 10px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  font-size: 18px;
  cursor: pointer;
}
.edit_btn {
  color: #4361ee;
  background-color: rgba(67, 97, 238, 0.15);
  margin-right: 10px;
}
.delete_btn {
  color: rgb(236, 16, 89);
  background-color: rgb(236, 16, 89, 0.15);
}
.edit_btn:hover,
.delete_btn:hover {
  transform: scale(1.09);
}

/* Styling for empty state when no students are present */
.empty_state {
  display: none;
  text-align: center;
}
.empty_state i {
  font-size: 80px;
  color: black;
  opacity: 0.4;
  margin: 40px 30px;
}
.empty_state p {
  color: black;
  opacity: 0.5;
  font-size: 20px;
}

/*___________________________________________________________________Footer_____________________________________________________________________*/
/* Footer */
footer {
  padding: 50px;
  font-size: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/*______________________________________________________________________KeyFrames____________________________________________________________________*/
/*----------------------------------------------------------------------For Tablets-----------------------------------------------------------------*/
@media ( max-width: 1205px) {
  /* Adjust overall sections */
  .section_1,
  .section_2 {
    width: 95%;
    margin: 20px auto;
    flex-direction: column;
  }

  /* Stack statistics vertically */
  .section_1 {
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }

  /* Main layout becomes vertical */
  .main {
    flex-direction: column;
    align-items: center;
  }

  .main .input_tag,
  .main .output_informations {
    width: 90%;
    margin: 10px 0;
  }

  .inputs input,
  .input_gender,
  .input_course,
  .input_address,
  .input_status {
    width: 100%;
  }


  /* Adjust search bar */
  .searchbar input {
    width: 90%;
    margin: 10px auto;
    display: block;
  }

  /* Make table scrollable if needed */
  .table {
    overflow-x: auto;
  }

  table {
    width: 100%;
    font-size: 14px;
  }

  th,
  td {
    padding: 10px;
  }

  /* Action buttons stacked on smaller screens */
  .actions {
    flex-direction: row;
    justify-content: flex-start;
    gap: 15px;
  }
  .inputs{
    margin-left: 20px;
  }

  .save_btn,
  .reset_btn {
    width: 100%;
    flex-direction: row;
  }
    .searchbar input {
    width: 90%;
    margin: 20px auto;
    display: block;
    font-size: 16px;
    padding: 10px 15px;
    box-sizing: border-box;
  }

  footer {
    padding: 30px 10px;
    font-size: 14px;
    text-align: center;
  }
}
/*-------------------------------------------------------------------------For Mobiles-------------------------------------------------------------*/
@media (max-width:768px){
  .section_1{
    flex-direction: column;
  }
  .header h1{
    font-size: 28px;
  }
  .header h3{
    font-size: 14px;
    margin: 8px;
  }
  .actions{
    flex-direction: column;
    align-items: center;
  
   }
   .actions .save_btn{
    display: block;
    width: 100%;
    margin-left: 30px;
   }
   .actions .reset_btn{
     display: block;
    width: 100%;
    margin-left: 10px;
   }
   .output_header{
    gap: 10px;
   }
   .output_title h1{
    font-size: 18px;
   }
   
}
