/* =====================
   CSS Custom Properties
   ===================== */
:root {
  --color-primary: rgb(0, 52, 65);
  --color-primary-dark: rgb(0, 30, 37);
  --color-accent: #029ba6;
  --color-accent-hover: #00a4b3;
  --color-bg: #f4f0f09f;
  --color-white: #fff;
  --color-border: #ccc;
  --radius-sm: 5px;
  --radius-md: 10px;
  --radius-lg: 20px;
  --transition-fast: 0.2s ease;
  --transition-std: 0.3s ease;
  --font-body: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}

/* =====================
   Reset & Base
   ===================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

::selection {
  color: rgb(11, 0, 48);
  background: rgba(110, 188, 230, 0.675);
}

body {
  background-color: var(--color-bg);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-width: 320px;
}

/* =====================
   Header
   ===================== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background-color: var(--color-primary);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 10vh;
  max-height: 120px;
  min-height: 40px;
  color: var(--color-white);
  z-index: 1000;
}

.logo-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: center;
}

.logo img {
  min-width: 40px;
  width: 9vh;
  max-width: 100px;
  height: auto;
  margin: 10px;
}

.vlab {
  font-size: 2rem;
  font-weight: bold;
  color: var(--color-white);
  text-align: left;
}

/* =====================
   Nav Menu
   ===================== */
.nav-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.nav-menu a {
  margin-left: 5px;
  padding: 15px;
  text-decoration: none;
  color: var(--color-white);
  transition: background var(--transition-std);
}

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

.menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
  font-weight: bold;
  padding-right: 10px;
}

.close-btn {
  display: none;
}

/* =====================
   Page Title
   ===================== */
.vlabtitle {
  font-size: 1rem;
  text-align: center;
  color: #000;
  padding-top: 1vh;
  font-weight: bold;
  width: 100%;
  background-color: var(--color-bg);
}

/* =====================
   Back To Top
   ===================== */
#backToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  height: 40px;
  width: 40px;
  background-color: var(--color-primary);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1000;
  display: none; /* hidden by default; JS controls visibility */
  align-items: center;
  justify-content: center;
  transition: background var(--transition-std);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#backToTop svg {
  width: 20px;
  height: 20px;
  fill: var(--color-white);
  transform: rotate(180deg);
}

#backToTop:hover {
  background: cyan;
}

/* =====================
   Page Layout
   ===================== */
.pageview {
  display: grid;
  place-items: center;
  background-color: inherit;
}

/* =====================
   Sticky Navigation Wrapper
   ===================== */
   .navigation-wrapper {
    width: 100%;
    z-index: 900;
    min-height: 120px;
    /* Reserve minimum space for navigation */
  }

.sticky-trigger {
  height: 1px;
  width: 100%;
  pointer-events: none;
}

/* =====================
   Navigation Bar
   ===================== */
   .navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    border-radius: 20px;
    background-color: rgb(0, 30, 37);
    backdrop-filter: blur(2px);
    padding: 10px 20px;
    margin: 20px auto;
    max-width: 92%;
    gap: 4px;
  }
  
  .navigation .link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 98px;
    width: 94px;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    color: white;
    background-color: rgb(0, 30, 37);
    transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out;
    border: 2.5px solid rgb(215, 211, 211);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
    cursor: pointer;
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
  }
  

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

.navigation .link img {
  height: 45px;
  margin-bottom: 5px;
}

.navigation .link span {
  font-size: 0.7rem;
  font-weight: 700;
}

/* =====================
   Sticky Navigation Wrapper
   ===================== */
   .navigation-wrapper {
    position: sticky;
    top: 8vh;
    width: 100%;
    min-height: 150px;
    z-index: 999;
  }

/* Sticky (compact) nav state */
.sticky-nav-wrapper .navigation {
  /* position: fixed; */
  top: 8vh;
  left: 50%;
  transform: scale(0.9);
  width: 92%;
  max-width: 1200px;
  background-color: rgba(135, 147, 150, 0.419);

  z-index: 999;
  backdrop-filter: blur(2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sticky-nav-wrapper .navigation .link {
  height: 60px;
  width: 60px;
  border-width: 2px;
  opacity: 0.95;
  padding: 8px;
  border-radius: 40px;

}

.sticky-nav-wrapper .navigation .link:hover {
  transform: scale(1.05);
}

.sticky-nav-wrapper .navigation .link img {
  height: 40px;
}

.sticky-nav-wrapper .navigation .link span {
  font-size: 0;
}
/* =====================
   Main Content
   ===================== */
.main_practical {
  padding: 15px;
  background-color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1500px;
}

.container {
  max-width: 1100px;
  margin: 20px auto;
  background-color: var(--color-white);
  padding: 5vh 5vw;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  width: calc(100vw - 48px);
  min-height: 80vh;
  box-shadow: var(--shadow-sm);
}

.container .title {
  font-size: 2rem; font-weight: 700; color: var(--color-primary);
  margin-bottom: 28px; text-align: center;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--color-accent);
}

/* =====================
   Section Visibility
   ===================== */
#aim, #theory, #procedure, #code,
#result, #quiz, #practice, #references, #tnt {
  display: none;
}

#aim {
  display: block;
}

/* =====================
   List Styles (Theory / Procedure / Practice)
   ===================== */
#theory ul, #procedure ul, #practice ul,
#theory ol, #procedure ol, #practice ol {
  padding-left: 25px;
  margin-bottom: 20px;
  list-style-position: inside;
  font-size: 1rem;
  color: #333;
}

#theory ul, #procedure ul, #practice ul {
  list-style-type: disc;
}

#theory ol, #procedure ol, #practice ol {
  list-style-type: decimal;
}

#theory li, #procedure li, #practice li {
  line-height: 1.6;
  margin-bottom: 12px;
}

#theory ul ul, #procedure ul ul, #practice ul ul,
#theory ol ol, #procedure ol ol, #practice ol ol,
#quiz-report ul {
  padding-left: 35px;
  font-size: 1rem;
}

#theory li a, #procedure li a, #practice li a {
  text-decoration: none;
  color: inherit;
}


/* =====================
   THEORY SECTION — Rich CSS treatment
   ===================== */
   #theory .content { text-align: left; }

   /* Strip all inline styles via a clean cascade */
   #theory p, #theory li { line-height: 1.75; color: #2e3a3f; text-align: justify; }
   
   #theory h2 {
     font-size: 1.2rem; font-weight: 700;
     color: var(--color-primary); margin: 28px 0 10px;
     padding-left: 12px;
     border-left: 4px solid var(--color-accent);
   }
   
   /* Theory info cards — wrap key formula blocks */
   .theory-intro {
     background: linear-gradient(135deg, #e8f6f8 0%, #f4fbfc 100%);
     border: 1px solid #b2dde5; border-left: 5px solid var(--color-accent);
     border-radius: var(--radius-md);
     padding: 18px 22px; margin-bottom: 24px;
     box-shadow: var(--shadow-sm);
   }
   
   .theory-intro p { margin-bottom: 0; color: #1e2f34; }
   
   /* Formula highlight */
   .theory-formula-block {
     display: flex; align-items: center; justify-content: center;
     gap: 12px; flex-wrap: wrap;
     background: var(--color-primary-dark);
     border-radius: var(--radius-md);
     padding: 16px 24px; margin: 20px 0;
     text-align: center;
   }
   
   .theory-formula-block .formula {
     color: #7efff5; font-size: 1.2rem; font-weight: 700; letter-spacing: 0.05em;
   }
   .theory-formula-block .formula-desc { color: #a0d8e0; font-size: 0.88rem; }
   
   /* Cost type cards */
   .cost-cards {
     display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0 24px;
   }
   .cost-card {
     background: #f5fbfc; border: 1px solid #c0e0e8;
     border-top: 4px solid; border-radius: var(--radius-md);
     padding: 16px 18px;
   }
   .cost-card.g-card { border-top-color: #22c55e; }
   .cost-card.h-card { border-top-color: #f59e0b; }
   .cost-card h4 { font-size: 0.9rem; font-weight: 700; color: var(--color-primary); margin-bottom: 6px; }
   .cost-card p  { font-size: 0.9rem; color: #374151; margin: 0; text-align: left; }
   
   /* Application cards */
   .app-cards {
     display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
     gap: 14px; margin: 16px 0;
   }
   .app-card {
     background: #fff; border: 1px solid var(--color-border);
     border-radius: var(--radius-md);
     padding: 16px; box-shadow: var(--shadow-sm);
     transition: transform var(--transition-fast), box-shadow var(--transition-fast);
   }
   .app-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
   .app-card .app-icon { font-size: 1.6rem; margin-bottom: 8px; }
   .app-card h4 { font-size: 0.88rem; font-weight: 700; color: var(--color-primary); margin-bottom: 6px; }
   .app-card p  { font-size: 0.85rem; color: #4b5563; line-height: 1.5; text-align: left; }
   
   /* Theory lists */
   #theory ol, #theory ul {
     padding-left: 22px; margin: 10px 0 16px; list-style-position: outside;
   }
   #theory li { margin-bottom: 10px; }
   #theory ul ul { padding-left: 18px; margin: 6px 0; }
   
   /* Theory procedure/step tables */
   #theory table { margin-left: auto; margin-right: auto; }
   
   /* Open/Closed list highlights */
   .list-highlight {
     display: inline-block;
     background: #e0f7fa; color: var(--color-primary);
     border: 1px solid #80deea; border-radius: 4px;
     padding: 1px 8px; font-size: 0.85rem; font-weight: 600;
     margin: 2px;
   }


   /* =====================
   Procedure tables (inline)
   ===================== */

   /* Theory info cards — wrap key formula blocks */
   .procedure-intro {
    background: linear-gradient(135deg, #fbeaea 0%, #fff5f5 100%);
    border: 1px solid #f1b5b5;
    border-left: 5px solid #e74c3c; /* accent red */
    border-radius: var(--radius-md);
    padding: 18px 22px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
  }


#procedure table {
  border-collapse: collapse; width: auto;
  min-width: 280px; max-width: 100%;
  margin: 12px auto;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
#procedure th, #procedure td {
  border: 1px solid #c0dde5; padding: 9px 14px; text-align: center;
}
#procedure th { background: var(--color-primary); color: #fff; }
#procedure tbody tr:nth-child(even) { background: #f0f9fb; }
#procedure tbody tr:hover { background: #d4f0f5; }
/* =====================
   Code Section
   ===================== */
.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: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  font-weight: bold;
  margin: 0 10px;
  transition: background var(--transition-std), border var(--transition-std);
}

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

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

.code-block {
  display: none;
  position: relative;
  background-color: #f7f7f7;
  border-radius: var(--radius-sm);
  border: 1px solid #ddd;
  margin-bottom: 20px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.code-block.active {
  display: block;
}

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

pre {
  overflow-y: auto;
  scrollbar-width: thin;
}

.copy-button {
  display: none; position: absolute; top: 10px; right: 10px;
  padding: 5px 12px; background: #464646; color: #fff;
  border: none; border-radius: var(--radius-sm);
  cursor: pointer; transition: background var(--transition-std);
  font-size: 0.8rem;
}
.code-content:hover .copy-button { display: block; }
.copy-button:hover { background: #555; }
.copy-button.copied { background: #171717; }
.language-python { padding: 20px; margin: 0; font-size: 12px; white-space: pre-wrap; }
code { background-color: #f4f4f4; padding: 2px 5px; border-radius: 4px; font-family: monospace; }

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

code {
  background-color: #f4f4f4;
  padding: 2px 5px;
  border-radius: 4px;
  font-family: monospace;
}

/* =====================
   Practice Canvas
   ===================== */
.content {
  text-align: center;
}

.gif-wrapper {
  width: 890px;
  height: 651px;
  display: inline-block;
  overflow: hidden;
  position: relative;
}

.zoomed-gif{

    display:block;

    width:100%;

    max-width:600px;

    height:auto;

    margin:25px auto;

    border-radius:18px;

    object-fit:contain;

    transform: rotate(90deg);

}
@media (max-width:900px){

    .zoomed-gif{

        width:min(90%, 320px);

    }

}

@media (max-width:700px){

    .zoomed-gif{

        width:min(80%, 320px);

    }

}
#practice-canvas {
  border: 1px solid black;
  margin-bottom: 10px;
}

/* =======================================
        Sticky Bottom Toolbar
======================================= */

#practice-controls{

    position:sticky;

    bottom:15px;

    z-index:999;

    display:flex;

    justify-content:center;

    align-items:center;

    gap:18px;

    width:fit-content;

    margin:30px auto 20px;

    padding:14px 22px;

    background:rgba(255,255,255,.92);

    backdrop-filter:blur(14px);

    border-radius:60px;

    box-shadow:
        0 10px 35px rgba(0,0,0,.15);

    border:1px solid rgba(0,0,0,.08);
}

#practice-controls button{

    min-width:150px;

    height:48px;

    border:none;

    border-radius:40px;

    font-size:15px;

    font-weight:700;

    cursor:pointer;

    color:white;

    background:linear-gradient(135deg,#003441,#00606d);

    transition:.25s;
}

#practice-controls button:hover{

    transform:translateY(-3px);

    background:linear-gradient(135deg,#0097a7,#00bcd4);
}

#practice-message-area {
  margin-top: 10px;
  font-weight: bold;
}

/* =====================
   Result Section
   ===================== */
.description, .key-points, .output {
  margin-bottom: 16px;
}

/* =====================
   Styled Table
   ===================== */
.styled-table {
  border-collapse: collapse;
  margin: 15px 0;
  font-size: 0.9em;
  font-family: sans-serif;
  min-width: 400px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

.styled-table thead tr {
  background-color: #009879;
  color: var(--color-white);
  text-align: left;
}

.styled-table th,
.styled-table td {
  padding: 12px 15px;
}

.styled-table tbody tr {
  border-bottom: 1px solid #dddddd;
}

.styled-table tbody tr:nth-of-type(even) {
  background-color: #f3f3f3;
}

.styled-table tbody tr:last-of-type {
  border-bottom: 2px solid #009879;
}

.styled-table strong {
  font-weight: bold;
}

/* Path visual in result */
.result-path-visual {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 6px; padding: 18px; margin-bottom: 22px;
  background: var(--color-primary-dark); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.path-node-pill {
  display: inline-block; padding: 7px 16px;
  background: rgba(255,255,255,0.12); color: #e0f7fa;
  border: 1px solid rgba(255,255,255,0.2); border-radius: 30px;
  font-weight: 700; font-size: 1rem; letter-spacing: 0.04em;
  transition: background var(--transition-fast);
}
.path-node-pill.start { background: rgba(34,197,94,0.35); border-color: #22c55e; color: #bbf7d0; }
.path-node-pill.end   { background: rgba(239,68,68,0.35);  border-color: #ef4444; color: #fecaca; }
.path-arrow { color: rgba(255,255,255,0.4); font-size: 1.1rem; font-weight: 300; }



/*======================================================
                    QUIZ SECTION
======================================================*/

/*==================================================
                QUIZ SECTION
==================================================*/

#quiz .content{

    max-width:900px;

    margin:auto;

}

/*==================================================*/

.quiz-hero{

    background:linear-gradient(135deg,#003441,#006c78);

    color:white;

    padding:35px;

    border-radius:22px;

    margin-bottom:30px;

    text-align:center;

    box-shadow:0 15px 35px rgba(0,52,65,.18);

}

.quiz-hero h2{

    font-size:2rem;

    margin-bottom:12px;

}

.quiz-hero p{

    font-size:1rem;

    line-height:1.8;

    opacity:.95;

}

/*==================================================*/

.quiz-card{

    background:white;

    border-radius:22px;

    padding:35px;

    box-shadow:

    0 15px 35px rgba(0,52,65,.08);

}

/*==================================================*/

.quiz-top{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:20px;

    gap:20px;

}

.quiz-counter,
.quiz-score{

    background:#eefbfc;

    color:#003441;

    padding:10px 18px;

    border-radius:30px;

    font-weight:700;

    font-size:15px;

}

/*==================================================*/

.quiz-progress{

    width:100%;

    height:10px;

    background:#d7edf2;

    border-radius:50px;

    overflow:hidden;

    margin-bottom:35px;

}

#quiz-progress-fill{

    width:0;

    height:100%;

    border-radius:50px;

    background:

    linear-gradient(90deg,#00bcd4,#0097a7);

    transition:.4s;

}

/*==================================================*/

.question-wrapper{

    margin-bottom:35px;

    text-align:center;

}

.question-wrapper h2{

    color:#003441;

    line-height:1.6;

    font-size:1.5rem;

}

/*==================================================*/

.choices-grid{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:18px;

}

/*==================================================*/

.choice{

    background:white;

    border:2px solid #d9e8eb;

    border-radius:18px;

    padding:22px;

    cursor:pointer;

    transition:.25s;

    text-align:left;

    font-size:15px;

    line-height:1.6;

    position:relative;

    box-shadow:

    0 6px 18px rgba(0,0,0,.05);

}

.choice:hover{

    border-color:#00bcd4;

    transform:translateY(-3px);

    box-shadow:

    0 12px 24px rgba(0,188,212,.15);

}

.choice strong{

    display:flex;

    justify-content:center;

    align-items:center;

    width:38px;

    height:38px;

    border-radius:50%;

    margin-bottom:16px;

    background:#003441;

    color:white;

    font-size:14px;

}

/*==================================================*/

.choice.correct{

    background:#22c55e;

    border-color:#22c55e;

    color:white;

}

.choice.correct strong{

    background:white;

    color:#22c55e;

}

.choice.wrong{

    background:#ef4444;

    border-color:#ef4444;

    color:white;

}

.choice.wrong strong{

    background:white;

    color:#ef4444;

}

.choice:disabled{

    cursor:default;

}

/*==================================================*/

#quiz-feedback{

    display:none;

    margin-top:25px;

    padding:20px;

    background:#f8fcfd;

    border-left:6px solid #00bcd4;

    border-radius:16px;

    line-height:1.8;

    color:#003441;

}

/*==================================================*/

.quiz-actions{

    display:flex;

    justify-content:flex-end;

    margin-top:30px;

}

/*==================================================*/

.quiz-btn{

    border:none;

    background:

    linear-gradient(135deg,#003441,#00606d);

    color:white;

    padding:14px 34px;

    border-radius:40px;

    font-size:15px;

    font-weight:700;

    cursor:pointer;

    transition:.25s;

    box-shadow:

    0 8px 20px rgba(0,52,65,.18);

}

.quiz-btn:hover{

    transform:translateY(-2px);

    background:

    linear-gradient(135deg,#0097a7,#00bcd4);

}

/*==================================================*/

#quiz-result-card{

    display:none;

    background:white;

    border-radius:24px;

    padding:45px;

    margin-top:35px;

    text-align:center;

    box-shadow:

    0 15px 35px rgba(0,52,65,.08);

}

.result-icon{

    font-size:70px;

    margin-bottom:18px;

}

.result-score{

    font-size:3.2rem;

    font-weight:bold;

    color:#00a8b5;

    margin:25px 0;

}

#final-message{

    font-size:1.15rem;

    color:#666;

    margin-bottom:30px;

}

/*==================================================*/

.choice.correct::after{

    content:"✓";

    position:absolute;

    right:18px;

    top:18px;

    font-size:22px;

    font-weight:bold;

}

.choice.wrong::after{

    content:"✕";

    position:absolute;

    right:18px;

    top:18px;

    font-size:22px;

    font-weight:bold;

}
.quiz-intro{

    background:white;

    padding:45px;

    border-radius:22px;

    text-align:center;

    box-shadow:0 12px 35px rgba(0,0,0,.08);

}

.quiz-intro h2{

    color:#003441;

    margin-bottom:15px;

}

.quiz-intro p{

    color:#666;

    line-height:1.8;

    margin-bottom:30px;

}
#retake-btn{

    display:none;

    margin:35px auto 0;

    width:220px;

    height:56px;

    border:none;

    border-radius:16px;

    background:linear-gradient(135deg,#003441,#00758a);

    color:white;

    font-size:17px;

    font-weight:700;

    cursor:pointer;

    transition:.3s;

    box-shadow:
        0 12px 30px rgba(0,52,65,.20);

}

#retake-btn:hover{

    transform:translateY(-4px) scale(1.02);

    background:linear-gradient(135deg,#008fa1,#00bcd4);

}

/*==================================================*/

@media(max-width:900px){

.choices-grid{

grid-template-columns:1fr;

}

}


/*==================================================*/

@media(max-width:700px){

.quiz-hero{

padding:24px;

}

.quiz-hero h2{

font-size:1.6rem;

}

.quiz-card{

padding:22px;

}

.quiz-top{

flex-direction:column;

align-items:flex-start;

gap:10px;

}

.question-wrapper h2{

font-size:1.25rem;

}

.quiz-actions{

justify-content:center;

}

.quiz-btn{

width:100%;

}

#quiz-result-card{

padding:25px;

}

.result-score{

font-size:2.5rem;

}

}

/* =====================
   Result Section — Static Cards
   ===================== */
#result .title {
  margin-bottom: 28px;
}

/* Static pre-run divs (.description, .key-points, .output) */
#result .description {
  background: #f5fafc;
  border: 1px solid #c8e8ee;
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 20px;
  font-size: 0.97rem;
  color: #333;
  line-height: 1.7;
  text-align: left;
}

#result .key-points {
  background: linear-gradient(135deg, #e8f7f8 0%, #f0fafb 100%);
  border: 1px solid #b2e0e5;
  border-left: 5px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 52, 65, 0.07);
}

#result .key-points h3 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 10px;
}

#result .key-points p {
  font-size: 0.95rem;
  color: #2e3035;
  line-height: 1.7;
  text-align: left;
  margin-bottom: 4px;
}

#procedure .output {
  background: linear-gradient(135deg, #003441 0%, #005566 100%);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  color: #e0f7fa;
  font-size: 0.97rem;
  line-height: 1.7;
}

#procedure .output h3 {
  color: #7efff5;
  font-size: 1rem;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}

#procedure .output p {
  color: #cdeef5;
  text-align: left;
  margin-bottom: 4px;
}

#procedure .output strong {
  color: #fff;
}

.result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.result-card {
  background: linear-gradient(135deg, #e8f7f8 0%, #f0fafb 100%);
  border: 1px solid #b2e0e5;
  border-left: 5px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: 0 2px 8px rgba(0, 52, 65, 0.07);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.result-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 52, 65, 0.13);
}

.result-card h3 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.result-card p {
  font-size: 0.95rem;
  color: #2e3035;
  line-height: 1.6;
  text-align: left;
}

.result-card strong {
  color: var(--color-primary);
}

.result-description {
  background: #f5fafc;
  border: 1px solid #c8e8ee;
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 24px;
  font-size: 0.97rem;
  color: #333;
  line-height: 1.7;
  text-align: left;
}

.result-output-box {
  background: linear-gradient(135deg, #003441 0%, #005566 100%);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  color: #e0f7fa;
  font-size: 0.97rem;
  line-height: 1.7;
}

.result-output-box h3 {
  color: #7efff5;
  font-size: 1rem;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}

.result-output-box p {
  color: #cdeef5;
  text-align: left;
}

.result-output-box strong {
  color: #fff;
}
/* =====================================================
                PRACTICE SECTION 2.0
=====================================================*/

.practice-header{
    width:100%;
    margin-bottom:30px;
    padding:35px;

    background:linear-gradient(135deg,#003441,#00606d);

    color:white;

    border-radius:22px;

    box-shadow:0 15px 35px rgba(0,52,65,.18);

    text-align:center;
}

.practice-header h2{
    font-size:2rem;
    margin-bottom:12px;
}

.practice-header p{
    font-size:1rem;
    opacity:.95;
    line-height:1.8;
}

/* ================================= */

.practice-workspace{

    display:grid;

    grid-template-columns:minmax(0,2.2fr) 360px;

    align-items:start;

    gap:35px;

    width:100%;
}

/* ================================= */

.graph-panel{

    display:flex;

    flex-direction:column;
}

/* ================================= */

.graph-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:15px;
}

.graph-header h3{

    color:#003441;

    font-size:1.3rem;
}

.graph-status{

    background:#eafcff;

    color:#007b90;

    padding:8px 18px;

    border-radius:30px;

    font-size:.85rem;

    font-weight:600;
}

/* ================================= */

.graph-card{

    background:white;

    border-radius:22px;

    padding:20px;

    box-shadow:

    0 20px 50px rgba(0,52,65,.08);

    border:1px solid rgba(0,0,0,.06);

    display:flex;

    justify-content:center;

    align-items:center;
}

/* ================================= */

#practice-canvas{

    width:100%;

    max-width:650px;

    border-radius:18px;

    background:

    radial-gradient(circle at top left,#ffffff,#f8fcfd);

    transition:.35s;
}

#practice-canvas:hover{

    transform:scale(1.01);
}

/* ================================= */

.dashboard{

    display:flex;

    flex-direction:column;

    gap:18px;
}

/* ================================= */

.status-card{

    background:white;

    border-radius:18px;

    padding:20px;

    box-shadow:

    0 10px 30px rgba(0,52,65,.08);

    transition:.3s;
}

.status-card:hover{

    transform:translateY(-3px);
}

.status-card h4{

    color:#003441;

    margin-bottom:15px;

    font-size:1rem;
}

/* ================================= */

.status-value{

    font-size:3rem;

    font-weight:bold;

    color:#0097a7;

    text-align:center;
}

/* ================================= */

.badge-container{

    display:flex;

    flex-wrap:wrap;

    gap:8px;
}

.badge{

    padding:7px 12px;

    border-radius:20px;

    color:white;

    font-size:.85rem;

    font-weight:600;
}

.badge.open{

    background:#2196F3;
}

.badge.closed{

    background:#FF9800;
}

/* ================================= */

.empty-text{

    color:#888;
}

/* ================================= */

.stats-grid{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:15px;
}

/* ================================= */

.stat-card{

    background:linear-gradient(145deg,#003441,#005c6d);

    color:white;

    border-radius:18px;

    padding:20px;

    text-align:center;

    transition:.3s;
}

.stat-card:hover{

    transform:translateY(-4px);
}

.stat-card h5{

    font-size:.9rem;

    margin-bottom:10px;

    font-weight:500;

    opacity:.85;
}

.stat-card span{

    font-size:2rem;

    font-weight:bold;
}

/* ================================= */

.legend-card{

    background:white;

    border-radius:18px;

    padding:20px;

    box-shadow:

    0 10px 30px rgba(0,52,65,.08);
}

.legend-card h4{

    margin-bottom:18px;

    color:#003441;
}

/* ================================= */

.legend-grid{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:14px;
}

.legend-item{

    display:flex;

    align-items:center;

    gap:10px;

    font-weight:600;

    color:#444;
}

/* ================================= */

.legend-dot{

    width:16px;

    height:16px;

    border-radius:50%;
}

.legend-dot.start{

    background:#22c55e;
}

.legend-dot.goal{

    background:#ef4444;
}

.legend-dot.current{

    background:#7c3aed;
}

.legend-dot.open{

    background:#2196F3;
}

.legend-dot.closed{

    background:#FF9800;
}

.legend-dot.path{

    background:#FFD600;
}

/* ================================= */

.progress-card{

    background:white;

    padding:22px;

    border-radius:18px;

    box-shadow:

    0 12px 30px rgba(0,52,65,.08);

    margin-bottom:25px;
    margin-top: 25px;
}

/* ================================= */

.progress-header{

    display:flex;

    justify-content:space-between;

    margin-bottom:12px;

    font-weight:600;

    color:#003441;
}

/* ================================= */

.progress-bar{

    height:14px;

    background:#dceff3;

    border-radius:30px;

    overflow:hidden;
}

.progress-fill{

    width:0%;

    height:100%;

    background:

    linear-gradient(90deg,#00bcd4,#0097a7);

    transition:.4s;
}

/* ================================= */

#practice-controls{

    display:flex;

    justify-content:center;

    gap:18px;

    flex-wrap:wrap;

    margin-bottom:25px;
}

#practice-controls button{

    border:none;

    background:

    linear-gradient(135deg,#003441,#00606d);

    color:white;

    font-size:15px;

    font-weight:700;

    padding:14px 28px;

    border-radius:14px;

    cursor:pointer;

    transition:.25s;

    box-shadow:

    0 10px 20px rgba(0,52,65,.2);
}

#practice-controls button:hover{

    transform:translateY(-3px);

    background:

    linear-gradient(135deg,#0097a7,#00bcd4);
}

#practice-controls button:disabled{

    opacity:.4;

    cursor:not-allowed;

    transform:none;
}

/* ================================= */

#practice-message-area,#algorithm-steps-area{

    background:white;

    border-left:6px solid #00bcd4;

    border-radius:16px;

    padding:20px;

    margin-bottom:25px;

    box-shadow:

    0 10px 30px rgba(0,52,65,.08);

    font-size:1rem;

    font-weight:600;

    color:#003441;

    text-align:left;

    line-height:1.8;
}

/* ================================= */

#algorithm-steps-area{

    width:100%;

    box-sizing:border-box;

    background:white;

    border-radius:18px;

    padding:25px;

    margin-top:25px;

    box-shadow:
        0 12px 30px rgba(0,52,65,.08);

    overflow:auto;

}

/* ================================= */

@media(max-width:1100px){

.practice-workspace{

grid-template-columns:1fr;
}

.dashboard{

order:2;
}

.graph-panel{

order:1;
}

}

/* ================================= */

@media(max-width:700px){

.practice-header{

padding:25px;
}

.practice-header h2{

font-size:1.6rem;
}

.stats-grid{

grid-template-columns:1fr;
}

.legend-grid{

grid-template-columns:1fr;
}


#practice-controls{

    width:95%;

    bottom:8px;

    padding:10px;

    gap:10px;
}

#practice-controls button{

    flex:1;

    min-width:auto;

    font-size:14px;

    padding:10px;
}

}


/* =====================
   Algorithm Steps Area
   ===================== */
#algorithm-steps-area {
  width: 100%;
  text-align: left;
}

.step-card {
  background: #fff;
  border: 1px solid #d0eaf0;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-top: 20px;
  box-shadow: 0 2px 10px rgba(0, 52, 65, 0.07);
}

.step-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #b2e0e5;
  letter-spacing: 0.03em;
}

.step-card h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #005566;
  margin: 16px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.step-card ol,
.step-card ul {
  padding-left: 22px;
  margin: 0;
}

.step-card li {
  font-size: 0.93rem;
  color: #2e3035;
  line-height: 1.65;
  margin-bottom: 6px;
}

.step-card li ul {
  margin-top: 6px;
  padding-left: 18px;
}

.step-card li ul li {
  list-style-type: circle;
  color: #444;
}

.step-card p {
  font-size: 0.93rem;
  color: #333;
  margin: 6px 0;
}

/* State summary badges */
.state-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.state-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e8f7f8;
  border: 1px solid #a8d8df;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-primary);
}

.state-badge span.badge-label {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Table inside steps — centered and responsive */
.step-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 12px 0 4px;
  border-radius: var(--radius-sm);
}

.styled-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 340px;
  font-size: 0.88em;
  font-family: var(--font-body);
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 0 auto;
}

.styled-table thead tr {
  background-color: var(--color-primary);
  color: var(--color-white);
  text-align: center;
}

.styled-table th,
.styled-table td {
  padding: 10px 14px;
  text-align: center;
}

.styled-table tbody tr {
  border-bottom: 1px solid #d8eef2;
  transition: background var(--transition-fast);
}

.styled-table tbody tr:nth-of-type(even) {
  background-color: #f0fafc;
}

.styled-table tbody tr:last-of-type {
  border-bottom: 2px solid var(--color-accent);
}

.styled-table tbody tr:hover {
  background-color: #d4f1f5;
}

.styled-table strong {
  font-weight: 700;
  color: var(--color-primary);
}

/* =====================
   Mobile — Practice & Result
   ===================== */
/* ==========================================================
                RESPONSIVE DASHBOARD
==========================================================*/

@media (max-width:1000px){

    .practice-workspace{

        display:flex;
        flex-direction:column;
        gap:20px;
    }

    .graph-panel{
        order:1;
    }

    .dashboard{
        order:2;
    }

    .graph-card{

        padding:15px;
    }

    #practice-canvas{

        width:100%;
        height:auto;
        max-width:100%;
    }

}

/* ========================================================== */

@media (max-width:768px){

    .practice-header{

        padding:22px 18px;
    }

    .practice-header h2{

        font-size:1.55rem;
    }

    .practice-header p{

        font-size:.95rem;
    }

    /* Make dashboard a nice grid */

    .dashboard{

        display:grid;

        grid-template-columns:repeat(2,1fr);

        gap:15px;
    }

    .status-card{

        padding:18px;
    }

    .stats-grid{

        grid-template-columns:repeat(2,1fr);

        gap:12px;
    }

    .progress-card{

        padding:18px;
    }

}

/* ========================================================== */

@media (max-width:600px){

    .dashboard{

        display:flex;

        flex-direction:column;
    }

    .graph-header{

        flex-direction:column;

        gap:10px;

        align-items:flex-start;
    }

    .graph-header h3{

        font-size:1.1rem;
    }

    .graph-status{

        width:100%;

        text-align:center;
    }

    #practice-canvas{

        width:100%;

        height:auto;
    }

    .status-value{

        font-size:2.3rem;
    }

    .stats-grid{

        grid-template-columns:1fr 1fr;
    }

    .stat-card{

        padding:18px;
    }

    .stat-card span{

        font-size:1.6rem;
    }


#practice-controls{

    width:95%;

    bottom:8px;

    padding:10px;

    gap:10px;
}

#practice-controls button{

    flex:1;

    min-width:auto;

    font-size:14px;

    padding:10px;
}

}

    #practice-message-area{

        font-size:.95rem;

        padding:16px;
    }

    #algorithm-steps-area{

        padding:18px;
    }



/* ========================================================== */

@media (max-width:420px){

    .practice-header{

        border-radius:15px;
    }

    .graph-card{

        padding:10px;
    }

    .status-card{

        padding:15px;
    }

    .stat-card{

        padding:14px;
    }

    .stats-grid{

        grid-template-columns:1fr;
    }

    .status-value{

        font-size:2rem;
    }

    .progress-header{

        flex-direction:column;

        gap:8px;

        align-items:flex-start;
    }

}

/* =====================
   References & Team/Tools
   ===================== */
#tnt .content {
  padding: 10px;
  background-color: var(--color-white);
}

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

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

.ref-list li,
.tools-list li {
  padding: 10px 10px 10px 15px;
  background-color: #f9fafb;
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
  transition: background-color var(--transition-std);
}

.ref-list li a,
.tools-list li span {
  text-decoration: none;
  color: #222529;
  font-weight: 400;
  transition: color var(--transition-std);
}

.ref-list li:hover,
.tools-list li:hover {
  background-color: #e6f0ff;
}

.ref-list li a:hover {
  color: #0073e6;
}
/* ==========================================
            MOBILE HEADER
========================================== */

@media (max-width: 768px) {

    .header{

        padding:12px 16px;

        height:auto;

        min-height:70px;

    }

    .vlab{

        font-size:1.4rem;

    }

    .logo img{

        width:55px;

        min-width:55px;

        margin:5px;

    }

    /* Show hamburger */

    .menu-toggle{

        display:block;

        font-size:30px;

        color:white;

        cursor:pointer;

        z-index:1002;

    }

    /* Hide desktop menu */

    .nav-menu{

        position:fixed;

        top:0;

        right:-100%;

        width:260px;

        height:100vh;

        background:#003441;

        display:flex;

        flex-direction:column;

        justify-content:flex-start;

        align-items:flex-start;

        padding:80px 25px;

        gap:10px;

        transition:right .35s ease;

        z-index:1001;

    }

    .nav-menu.active{

        right:0;

    }

    .nav-menu a{

        width:100%;

        padding:14px 0;

        margin:0;

        color:white;

        text-decoration:none;

        border-bottom:1px solid rgba(255,255,255,.15);

    }

    .close-btn{

        display:block;

        position:absolute;

        top:18px;

        right:20px;

        font-size:28px;

        color:white;

        cursor:pointer;

    }

}


.final-path-banner{

    background:linear-gradient(135deg,#8B0000,#B22222);
    color:white;

    padding:18px 22px;

    border-radius:16px;

    margin-bottom:20px;

    display:flex;

    flex-wrap:wrap;

    justify-content:space-between;

    align-items:center;

    gap:12px;

    box-shadow:0 10px 25px rgba(198,40,40,.25);

}

.path-label{

    font-weight:700;

    font-size:1rem;

}

.path-nodes{

    font-weight:600;

    letter-spacing:.3px;

}

.path-cost{

    background:rgba(255,255,255,.18);

    padding:6px 12px;

    border-radius:20px;

    font-weight:600;

}

.path-cost strong{

    color:#fff;

}

.tooltip{

    position:relative;

    cursor:help;

    color:#007b90;

    font-weight:700;

}

.tooltip::after{

    content:attr(data-tip);

    position:absolute;

    bottom:140%;

    left:50%;

    transform:translateX(-50%);

    background:#003441;

    color:white;

    padding:8px 12px;

    border-radius:8px;

    font-size:13px;

    white-space:nowrap;

    opacity:0;

    visibility:hidden;

    transition:.25s;

    pointer-events:none;

    box-shadow:0 8px 20px rgba(0,0,0,.2);

}

.tooltip:hover::after{

    opacity:1;

    visibility:visible;

}

/*==================================
        GRAPH LEGEND
==================================*/

.graph-legend{

    margin-top:20px;

    background:#ffffff;

    border-radius:18px;

    padding:20px;

    box-shadow:0 10px 25px rgba(0,52,65,.08);

}

.legend-title{

    font-size:1rem;

    font-weight:700;

    color:#003441;

    margin-bottom:15px;

}

.legend-grid{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));

    gap:14px;

}

.legend-item{

    display:flex;

    align-items:center;

    gap:10px;

    color:#444;

    font-weight:600;

}

.legend-circle{

    width:18px;

    height:18px;

    border-radius:50%;

    border:2px solid transparent;

}

/* Match these colors with your canvas */

.start-node{
    background:#22c55e;
}

.goal-node{
    background:#ef4444;
}

.current-node{
    background:rgb(134,183,239);
}

.open-node{
    background:rgb(253,224,71);
}

.closed-node{
    background:rgb(251,146,60);
}

.unvisited-node{
    background:#f0f9ff;
    border:2px solid #003441;
}

.path-node{
    background:#fde68a;
    border:2px solid #ef4444;
}

.legend-line{
    width:28px;
    border-top:4px solid #ef4444;
}

.team-list{

    list-style:none;

    padding:0;

    margin:15px 0 30px;

}

.student-item{

    margin-bottom:25px;

}

.student-name{

    display:flex;

    justify-content:center;

    align-items:center;

    gap:12px;

    flex-wrap:wrap;

    font-size:1.5rem;

    font-weight:700;

    text-align:center;

}

.student-course{

    margin-top:8px;

    margin-left:2px;

    font-size:1.1rem;

    color:#555;

    font-weight:500;

}

.icon-link{

    text-decoration:none;

    font-size:28px;

    transition:.25s;

}

.icon-link.github{

    color:#333;

}

.icon-link.linkedin{

    color:#0077b5;

}

.icon-link:hover{

    transform:scale(1.15);

}

@media(max-width:768px){

.student-name{

    font-size:1.2rem;

}

.student-course{

    font-size:.95rem;

}

.icon-link{

    font-size:22px;

}

}

.social-icon{

    width:24px;

    height:24px;

    vertical-align:auto;

}

.scholar{

    color:#1a73e8;

}

.scopus{

    color:#ff6c00;

}

.wos{

    color:#009688;

}

.orcid{

    display:inline-flex;

    align-items:center;

}