/* Global styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
::selection {
  color: rgb(11, 0, 48);
  background: rgba(110, 188, 230, 0.675);
}

body {
  background-color: rgba(255, 255, 255, 0.603);
  font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
    "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
  overflow-x: hidden;

}

/* Header styles */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  width: 100%;
  height: 12vh;
  padding: 10px;
  background-color: rgb(0, 52, 65, 1);
  color: #fff;
  z-index: 1000;
}
.logo-container {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 60px;
}

.vlab {
  left: 50%;
  font-size:xx-large;
  font-weight: bold;
}
.nav-menu {
  display: flex;
  gap: 20px;
}
@media (min-width: 840px) {
  .logo-container {
    display: flex;
    align-items: center;
  }
  .vlab {
    margin-left: 15px; 
  }
}


.menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
  font-weight: bold;
  padding-right: 10px;
}
.close-btn{
  display: none;
}
.nav-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.nav-menu a {
  margin-left: 15px;
  padding: 15px;
  text-decoration: none;
  color: #fff;
}

.nav-menu a:hover {
  background: rgba(111, 248, 248, 0.74);
  cursor: pointer;
}

.yourvlabtitle {
  text-align: center;
  background-color: white;
  color: black;
  padding: 20px 0;
}

/* Navigation styles */
.pageview {
  display: grid;
  place-items: center;
  padding: 10px 0;
  background-color: #fff;
}

.navigation {
  display: flex;
  flex-wrap: wrap;
  border-radius: 20px;
  background: rgb(0, 30, 37);
  padding: 10px;
  width: calc(100vw - 20vw);
  justify-content: space-evenly;
  color: white;
}

.navigation .link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 125px;
  height: 115px;
  padding: 10px;
  margin: 2px;
  border-radius: 20px;
  text-decoration: none;
  color: white;
  background-color: rgb(0, 30, 37);
  transition: background-color 0.7s ease;
  border: 2.5px solid rgb(215, 211, 211);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  font-size: .9rem;
}

.navigation .link:hover {
  background-color: rgba(7, 238, 238, 0.8);
}

.navigation .link img {
  height: 60px;
  margin-bottom: 10px;
}


/* Responsive styles */
@media screen and (max-width: 840px) {
  .header {
    justify-content: space-between; 
  }
  .logo-container {
    display: flex;
    align-items: center;
    justify-content: space-between; 
  }
  .menu-toggle {
    display: block;
  }
  .close-btn{
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -250px;
    height: 100%;
    min-width: 200px;
    flex-direction: column;
    background-color: rgba(4, 74, 74, 0.74);
    backdrop-filter: blur(8px);
    transition: right 0.4s ease;
  }

  .nav-menu.show {
    right: 0;
  }
  .navigation .link {
    margin-top: 14px ;
    margin-left: 6px;
  }
  .copy-button {
    position: absolute;
    padding-right: 500px;
    text-size-adjust:smaller;
  }
  .container .title{
    font-size: 2rem;
    
  }
}

/* Content sections */
.main_practical {
  padding: 15px;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1500px;
}

.container {
  margin: 20px;
  padding: 40px;
  border: 1px solid #ccc;
  border-radius: 10px;
  width: calc(100vw - 18vw);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  background-color: #fff;
  text-align: justify;
}

#practice.container {
  padding: 15px !important;
}

#quiz.container {
  text-align: center !important;
}


.container .title {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  text-align: center;
  margin-bottom: 20px;
}


/* General List Styling for Theory and Procedure Containers you may adjust as per your need */

/* Bold element clarity */
.content b {
  color: #2c3e50;
}

/* Highlight keywords */
.content li b {
  color: #1c2c3c;
}

/*Theory Style*/
#theory span, #procedure span, #result span {
  display: block;
  font-size: 20px;
  margin-top: 25px;
  margin-bottom: 15px;
  color: #0859b6;
  font-weight: 600;
}


/* list styles  */

#theory ul, #procedure ul, #result ul {
  list-style-type: disc;
  padding-left: 25px;
  margin-bottom: 10px;
  margin-left: 20px;
  list-style-position: inside;
  font-size: 1rem;
  color: #333;
}

#theory ol, #procedure ol, #result ol {
  list-style-type: decimal;
  padding-left: 25px;
  margin-bottom: 10px;
  margin-left: 20px;
  list-style-position: inside;
  font-size: 1rem;
  color: #333;
}

#theory li, #procedure li, #result li {
  line-height: 1.5;
  margin-bottom: 10px;
}

#theory ul ul, #procedure ul ul, #theory ol ol, #procedure ol ol {
  padding-left: 35px;
}

#theory ul ul li, #procedure ul ul li, #theory ol ol li, #procedure ol ol li {
  font-size: 1rem;
}

/* Formula block styling */
#theory code, #procedure code, #result code, #practice code{
  display: inline-block;
  background-color: #eef1f4;
  color: #2d3436;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
}


/* Code block styles */
.switch-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 5px;
}

input[type="radio"] {
  display: none;
}

.switch-container label {
  cursor: pointer;
  padding: 10px 20px;
  background-color: #005256;
  color: #fff;
  border-radius: 5px;
  font-weight: bold;
  margin: 0 10px;
}


.code-blocks {
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-button:hover {
  background-color: #555;
}

.code-block {
  position: relative;
  background-color: #f7f7f7;
  border-radius: 5px;
  border: 1px solid #ddd;
  margin-bottom: 20px;
  overflow: hidden;
}

.code-content {
  position: relative;
  min-width: 1080px;
}

.copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  background-color: #464646;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.copy-button.copied {
  background-color: #171717;
  color: white;
}

.code-content:hover .copy-button {
  display: block;
}

.copy-button {
  display: none;
}
.switch-container input[type="radio"]:checked + label {
  background-color:#029ba6;
  display: block;
  border: 2px solid rgb(47, 255, 220);
  color: rgb(238, 255, 0);
}

.language-cpp,
.language-python {
  padding: 20px;
  margin: 0;
  font-size: 12px;
  white-space: pre-wrap;
}

.code-block {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.5s ease;
}

.code-block.active {
  opacity: 1;
  max-height: 2000px; /* large enough to show code */
}


/* Quiz */
.box {
  margin: 0 auto;
  padding: 20px;
  border: 1px solid #ccc;
  background-color: #f7f7f7;
  text-align: center; 
  max-width: 600px; /* Consolidated from below */
  border-radius: 8px; /* Consolidated from below */
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1); /* Consolidated from below */
}

h2 {
  font-size: 24px;
  color: rgb(0, 0, 0);
  margin-bottom: 10px; /* Consolidated from below */
}

h4 {
  font-size: 14px;
  color: #777;
}

#question {
  font-size: 18px;
  margin: 20px;
}

.choices {
  display: flex;
  flex-direction: column;
  align-items: center; /* Consolidated from below */
  margin-top: 20px; /* Consolidated from below */
}

.choices .choice {
  width: 100%; /* Consolidated from below */
  max-width: 500px; /* Consolidated from below */
  margin: 10px 0;
  padding: 10px;
  border: 1px solid rgb(12, 12, 12);
  border-radius: 6px;
  background-color: rgb(0, 0, 0); /* Consolidated from rgb(255, 255, 255) to rgb(0,0,0) as per later definition */
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  overflow-wrap: break-word;
}

.choices .choice:hover {
  background-color: rgb(46, 132, 245);
  color: #fff;
}

button {
  margin-top: 20px; /* Consolidated from below */
  padding: 10px 20px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #6725d0;
}

.codes button,
#next-btn {
  margin: 20px auto;
  padding: 10px 20px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
  display: block;
}

.codes button:hover,
#next-btn:hover,
#searchbt:hover {
  background-color: #0056b3;
}

#next-btn {
  margin-top: 30px; /* Kept specific margin-top for next-btn */
}

/* Retake button styles */
#retake-btn {
  display: none;
  margin: 20px auto;
  padding: 10px 20px;
  background-color: #28a745;
  color: white;
  border-radius: 8px;
  font-size: 16px;
  width: 50%;
  max-width: 250px;
}

#retake-btn:hover {
  background-color: #218838;
}

/* tnt */
/* Lists styling */
#tnt .content {
  padding: 10px;
  background-color: #ffffff; 

}

#tnt .content span{
  display: block;
  font-size: 1.2rem;
  font-weight: normal;
  color: #2e3035;
  margin-bottom: 7px;
  margin-top: 16px; /* Space above each section */
}

/* List Styling */
.ref-list, .tools-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 20px;
}

.ref-list li, .tools-list li {
  padding: 10px;
  background-color: #f9fafb; 
  border-radius: 4px;
  margin-bottom: 10px;
  font-weight: 500;
  font-size: 1rem;
  color: #333; 
  transition: background-color 0.3s ease; /* Smooth hover effect */
}

.ref-list li a {
  text-decoration: none;
  color: inherit;
  font-weight: 400;
  transition: color 0.3s ease; /* Transition for link hover effect */
  word-break: break-all;
  overflow-wrap: anywhere;
}

.tools-list li span {
  text-decoration: none;
  color: inherit;
  font-weight: 400;
  transition: color 0.3s ease; /* Transition for link hover effect */
}

.tools-list li a {
  text-decoration: none;
  color: inherit;
  font-weight: 400;
  transition: color 0.3s ease; /* Transition for link hover effect */
}

.ref-list li:hover, .tools-list li:hover {
  background-color: #e6f0ff; /* Soft blue hover effect */
}

.ref-list li a:hover {
  color: #0073e6; /* Change link color on hover */
}

/* Mentors & Students Section Styling */
.ref-list li, .tools-list li {
  font-size: 1.1rem; 
  padding-left: 15px;
}

/* Styling for individual links */
.ref-list li a {
  color: #222529; /* Soft blue color for links */
  font-weight: 500; /* Bold the links slightly */
}



/* Tile control  */
#aim,
#theory,
#procedure,
#code,
#result,
#quiz,
#practice,
#references,
#tnt {
  display: none;
}
#aim {
  display: block;
}

/* Adjustments */
@media screen and (max-width: 500px) {
  .practical {
    margin-left: 0px;
    margin-right: 0px;
    padding: 5px;
    font-size: smaller;
  }
  .navigation .link {
    width: 62px;
    height: 74px;
    padding: 10px;
    font-size: 0.5rem;
    border: 2px solid rgb(215, 211, 211);
    margin-top: 5px ;
    margin-left: 6px;
    border-radius: 14px;
  }
  .navigation .link img {
    height: 30px;
    width: auto;
    margin-bottom: 10px;
  }
  .container {
    padding: 5px;
    margin: 0;
    text-align: left;
    width: calc(100vw- 5vw);
  }
  .choices {
    justify-content: space-between;
  }

  .choices .choice {
    width: 300px;
    margin-left: 10px;
  }
  .code-block {
    overflow: scroll;
    width: 320px;
  }
  #code.container {
    width: 330px;
  }
  .container .title{
    font-size: 1rem;
  }
}


/*Practice tab Styling*/

.tab-bar {
  display: flex;
  flex-wrap: wrap; /* allow buttons to wrap on small screens */
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ccc;
}

.tab-bar button {
  padding: 8px 16px;
  background-color: #3fb1f4;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  flex-shrink: 0; /* prevents buttons from shrinking too small */
  transition: background-color 0.3s ease;
  min-width: 120px; /* ensures good readability on small screens */
}

.tab-bar button:hover {
  background-color: #2279f1;
}

.tab-bar button.active-tab {
  background-color: #0e55b9; /* darker shade */
  color: white;
}

.transition-wrapper {
  display: none;
}

.transition-wrapper.active {
  display: block;
}


/*Styling for Example tabs */
.step {
  background-color: #f7f7f7; /* fallback default */
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 25px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: background-color 0.3s ease-in-out;
  display: none;
}

.step-container:first-of-type .step {
  display: block;
}

.reveal-step-btn {
  background-color: #42a845; /* Green */
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  margin: 20px auto;
  display: none; /* already present in your code */
}

/* Optional: Hover effect */
.reveal-step-btn:hover {
  background-color: #2a822f;
}


#example1Wrapper .step-container:nth-of-type(odd) .step, #example2Wrapper .step-container:nth-of-type(odd) .step {
  background-color: #e9f7fa; /* Light Blue (AliceBlue) */
}

#example1Wrapper .step-container:nth-of-type(even) .step, #example2Wrapper .step-container:nth-of-type(even) .step {
  background-color: #e8f5e9; /* Light Green */
}

.step img {
  width: 100%;
  border: 1px solid #ccc;
  margin-top: 10px;
}
    
.image-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin: 20px 0px;
}

.image-row img {
  max-width: 100%;
  width: 48%;
  height: auto;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  object-fit: contain;
}
@media (max-width: 768px) {
  .image-row img {
    width: 100%;
  }
}


/* Style for step comaprison */
.processing-step {
  margin: 30px 0 15px;
  font-weight: bold;
  font-size: 18px;
  color: #2c3e50;
  border-left: 4px solid #3498db;
  padding-left: 10px;
}

.step-comparison {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

.step-box {
  flex: 1 1 48%;
  background-color: #f9f9f9;
  padding: 15px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

@media (max-width: 600px) {
  .step-box {
    flex: 1 1 100%;
  }
}

.step-box p {
  margin: 0;
  font-size: 14px;
  color: #333;
  text-align: left;
}

.step-box code {
  background-color: #f0f0f0;
  padding: 6px 8px;
  display: block;
  margin: 3px 0px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  word-break: break-all;
}

/* Styling for Try Yourself Tab */
.contain {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.box, .output-box {
  border: 2px dashed #8e8e8e;
  width: 320px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin: 10px;
  padding: 10px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s;
  position: relative;
  cursor: pointer;
  box-sizing: border-box;
}
.output-box {
  overflow-y: auto;
  overflow-x: hidden;
  text-align: center;
  padding: 24px 14px 14px 14px;
  box-sizing: border-box;
  white-space: pre-wrap;
}
.box.dragover {
  background-color: #e0e7ff;
}
.box:hover, .output-box:hover {
  transform: scale(1.02);
}
.box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 5px;
}
.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.upload-icon {
  font-size: 36px;
  color: #888;
}
.box input[type="file"] {
  margin-top: 10px;
}
button {
  margin: 10px auto;
  padding: 12px 24px;
  font-size: 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
  display: block;
}
button:hover {
  background-color: #0056b3;
}
.scorecard {
  margin-top: 30px;
  padding: 10px;
  background-color: #ffffff;
  border: 2px solid #28a745;
  border-radius: 10px;
  width: 300px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  font-size: 19px;
  font-weight: bold;
  color: #28a745;
  text-align: center;
}
h3 {
  margin-bottom: 5px;
  color: #444;
}

.example-heading {
  display: block;
  font-size: 1rem;
  font-weight: normal;
  color: #2e3035;
  margin: 25px; /* Space above each section */
  line-height: 1.6;
}

.image-input {
  display: none;
}

.preview-image {
  display: none;
}

.image-container {
  text-align: center;
}

.tfidf-image {
  max-width: 100%;
  height: auto;
  border: 1px solid #ccc;
  padding: 6px;
}

.similarity-matrix-container {
  text-align: left;
  margin: 10px 0;
}

.similarity-matrix {
  display: inline-block;
  background: #f8f8f8;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.similarity-score {
  color: green;
}