

    :root {
        --clr-submit-btn: #63686be6;
        --clr-submit-btn--hover: #0a0a0a;
        --clr-text-btn: #fff;
        --clr-border-box: #fff;

        --scrollbar-thumb: #007bff;  
        --scrollbar-thumb-hover: #0056b3;
        --scrollbar-width: 16px;  
    }

    .no-select {
        user-select: none;       /* Standard */
        -webkit-user-select: none; /* For Safari */
        -ms-user-select: none;     /* For old IE/Edge */
    }

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

    html, body {
        height: 100%;
    }

    body {
        font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
        color: #fff;
        background: #000;
    }

    body::-webkit-scrollbar {
    width: var(--scrollbar-width);
    height: var(--scrollbar-width); 
    }

    body::-webkit-scrollbar-track {
    background: transparent;
    }


    body::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb);
    border-radius: 999px;
    border: 3px solid transparent;         
    background-clip: padding-box;          
    }

    /* slightly darker on hover */
    body::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-thumb-hover);
    }

     body::-webkit-scrollbar-corner {
    background: transparent;
    }


    html {
    scrollbar-width: thin; /* auto / thin / none */
    scrollbar-color: var(--scrollbar-thumb) transparent;
    }

    body {
    --sb-alpha: 1; 
    }

    footer {
        margin: 6% 4%; 
        padding-bottom: 3rem;
    }

    body.custom-subtle-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(0, 123, 255, 0.65);
    }
    body.custom-subtle-scrollbar:hover::-webkit-scrollbar-thumb {
    background-color: rgba(0, 86, 179, 1);
    }

    :focus {
    outline: 3px solid rgba(0,123,255,0.25);
    outline-offset: 2px;
    }

    .heading {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        margin: 2.5rem 0;
    }

    .checkbox-column {
        display: flex;
        flex-direction: column; 
        align-items: flex-end;
        gap: 5px;
    }

    .mt-vh-4 {
        margin-top: 3.5vh !important;
    }

    .HideMe {
        visibility: hidden;
    }

    label {
        margin-right: 10px;
        margin-top: 0.5rem;
    }

    label.last-row--checkbox {
        margin-right: 0;
    }

    .line, .close-btn { display: none; }

    .close-btn {
        cursor: pointer;
    }

    .heading-btn {
        margin: 0;
        flex-grow: 1; /* Ensures the heading takes up available space on the left */
        position: relative;
        top: 0;
        left: 0;
        text-align: left; /* Ensures text stays aligned to the left */
    }

    p.heading-btn {
        font-weight: bold;
    }

    p.marking-guide--introduction,
    p.marking-guide--info {
        display: inline-block;
        margin: 0 auto;
    }

    .edit-btn,
    .close-btn,
    .save-btn,
    .cancel-btn,
    .bold-btn,
    .criterion-btn {
        cursor: pointer;
        background: var(--clr-submit-btn);
        color: var(--clr-text-btn);  
        border: 1px solid var(--clr-border-box);
    }

    .edit-btn {
        margin-right: 10px;
    }

    .bold-btn,
    .criterion-btn {
        margin-left: 10px;
    }

    .edit-btn:hover,
    .close-btn:hover,
    .bold-btn:hover,
    .criterion-btn:hover {
        color: var(--clr-text-btn);
    }

    .close-btn:hover,
    .edit-btn:hover,
    .bold-btn:hover,
    .submit-btn:hover,
    .marking-btn:hover,
    .criterion-btn:hover {
        background: var(--clr-submit-btn--hover);
        border: 1px solid white;
    }

    /* Button alignment */

    .btn {
        cursor: pointer;
        background: var(--clr-submit-btn);
        color: var(--clr-text-btn);
        border: 1px solid var(--clr-border-box);
        padding: 8px; /* Adjust button size as needed */
    }

    .btn:hover {
        background: var(--clr-submit-btn--hover);
        color: var(--clr-text-btn);
    }

    .feedback-btn {
      grid-column: 1 / -1;   /* span across all 4 columns */ 
      justify-self: end; /* push to right edge */
      margin: 4rem 0;
      min-width: 260px;
    }

    .submit-btn,
    .marking-btn,
    .light-theme-btn,
    .criterion-btn {
      padding: 10px 25px;
      /*margin-left: 25px;*/
      background: var(--clr-submit-btn);
      color: #fff;
      border: none;
      border-radius: 5px;
      cursor: pointer;
      min-width: 200px;
    }

    
    .dark-theme-btn {
      padding: 10px 25px;
      margin-left: 10px;
      background: var(--clr-submit-btn);
      color: #fff;
      border: none;
      border-radius: 5px;
      cursor: pointer;
      min-width: 200px;  
    }

    .submit-btn:hover,
    .marking-btn:hover,
    .light-theme-btn:hover,
    .dark-theme-btn:hover,
    .criterion-btn:hover {
      background: var(--clr-submit-btn--hover);
      color: var(--clr-text-btn);
      font-weight: 500;
    }

    .guide-heading {
        margin: 2% 5% 1% 5%;
        border-radius: 0.5rem;
        border: 1px solid #fff;
        padding: 2rem 3rem 2rem 3rem;
    }

    .guide-card {
        margin: 0 5%;
        border-radius: 0.5rem;
        border: 1px solid #fff;
        padding: 2rem 3rem 6rem 3rem;
        
    }

    .guide-card h2 {
        text-decoration: underline;
        text-underline-offset: 8px;
    }


    /* ======================= SETTINGS CSS ======================== */

    #settingbutton {
        position: fixed;
        top: 28vh;
        right: 0.8em;
        z-index: 1100;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #343a40;
        border-radius: 0.25rem;
        width: 3rem;
        height: 3rem;
        color: white;
        cursor: pointer;
        box-shadow: 0 4px 8px rgba(0,0,0,0.3);
        transition: background-color 0.3s ease, transform 0.2s ease;
    }

    #settingbutton:hover { 
        background-color: #495057;  
    }

    #settingbutton svg { 
        width: 1.5rem; 
        height: 1.5rem; 
    }

    .live-customizer {
        position: fixed;
        top: calc(28vh + 3.5rem);  /* below the button (button height + gap) */
        right: 0.8em;              /* aligned with button */
        width: fit-content;
        max-width: 90vw;
        background: #fff;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        border-radius: 0.5rem;
        z-index: 1090;
        padding: 1rem 2rem;
        opacity: 0;
        transform: translateX(-20px);
        pointer-events: none;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .live-customizer.active {
        opacity: 1;
        transform: translateX(0);
        pointer-events: auto;
    }

    .live-customizer h5 {
        color: #000;
        text-align: center;
        margin-bottom: 1rem;
    }

    .live-customizer .close-btn { 
        position: absolute; 
        top: 1rem; 
        right: 1rem; 
        background: #343a40; 
        color: #fff; 
        border: none; 
        border-radius: 50%; 
        width: 2rem;
        height: 2rem; 
        cursor: pointer; 
        display: flex; 
        align-items: center; 
        justify-content: center; 
    }

    .live-customizer .modes {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* two equal columns */
        gap: 0.8rem; /* spacing between buttons */
    }

    .live-customizer .modes button {
        border: 1px solid transparent; /* default border included in layout */
        transition: background-color 0.2s, color 0.2s; /* avoid size change */
        box-sizing: border-box; /* include border in size */
    }

    .live-customizer .modes button:hover {
        border-color: #000; /* changes color but size stays same */
    }

    .live-customizer .modes button:last-child {
        grid-column: 1 / -1; /* span all columns */
        justify-self: center; /* center horizontally */
        width: auto; /* optional: shrink to fit content */
        margin: 0.5rem 0;
    }


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


    /* ============= Page Wrapper on top of video ============= */

    .background-image {
        position: relative;
        min-height: 90vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 16px;
        z-index: 0;
    }

    .background-image::before {
        content: "";
        position: absolute;
        inset: 0;
        /*background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.6));*/
        z-index: -1;
    }

    .grid-container {
      display: grid;
      grid-template-columns: 6fr repeat(4, 4fr);
      /*grid-template-columns: repeat(4, 4fr) 5fr;*/
      grid-template-rows: repeat(11, auto); /* 1 header row + 10 data rows */
      gap: 5px;
      margin-top: 20px;
      width: 90vw;
      max-width: 95vw;
    }

    .grid-item {
      border: 1px solid #ddd;
      padding: 10px;
    }

    .grid-item.checkbox-column {
        display: flex;
        flex-direction: column;
    }

    .inline-span {
        display: flex;
        gap: 0.5rem; /* spacing between checkbox and buttons */
        margin-top: auto; /* ensures it sits at the bottom */
        padding-top: 1.25rem;
    }

    .edit-btn {
        cursor: pointer;
    }

    .editable {
        display: none;
        margin-top: 5px;
        padding: 5px;
        border: 1px solid transparent;
        min-height: 3vh;
        cursor: text;
        width: 100%;
        box-sizing: border-box;
    }

    /* When the .editable paragraph is in editing mode, show it as a block element */
    .editable.editing {
        display: block; /* Show when editing */
        border: 1px solid var(--clr-border-box);
        border-radius: 0.25rem;
    }

    .editable.empty::before {
        content: attr(data-placeholder);
        color: #aaa;
    }

    .fs-3 {
        font-size: 1.16rem;
    }

    .editable-input {
        margin-top: 5px;
        padding: 5px;
        width: 100%;
        box-sizing: border-box;
    }


    .header {
      font-size: 1.2rem;
      font-weight: bold;
      text-align: left;
    }

   /* Back to top container handles positioning */
#back-to-top {
  position: fixed;
  bottom: 20px;   /* distance from bottom */
  right: 20px;    /* distance from right */
  z-index: 9999;
  display: none;  /* hidden by default */
}

/* Button styles */
#back-to-top .btn {
  width: 44px;
  height: 44px;
  line-height: 44px;
  text-align: center;
  font-size: 18px;
  border-radius: 50%;
  background-color: #007bff !important;
  color: black;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  transition: transform 0.2s ease-in-out, background-color 0.3s;
}

/* Hover effect */
#back-to-top .btn:hover {
  transform: scale(1.1);
  background-color: #0056b3 !important;
}



