#main {
  width: 100%;
  min-height: 100vh;
  background:
    linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
    url("../img/background2.jpg") center center no-repeat;
  background-size: cover;
  background-attachment: fixed;
  position: relative;
  z-index: 9;
  padding: 80px 0 60px 0;
}

#content-wrap {
  padding-bottom: 2.5rem;    /* Footer height */
}


/*--------------------------------------------------------------
# logout area
--------------------------------------------------------------*/
.logout-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
}


.logout-panel .small-btn {
    padding: 10px 18px !important;
    font-size: 17px !important;
    margin: 4px !important;
}

.logout-btn {
    background: rgba(37, 99, 235, 0.22)!important;
    border: 2px solid rgba(255, 255, 255, 0.9)!important;
}

.logout-btn:hover {
    background: rgba(37, 99, 235, 0.35)!important;
    box-shadow: 0 0 12px rgba(96, 165, 250, 0.38)!important;
}

.delete-btn {
    background: rgba(220, 38, 38, 0.13)!important;
    border: 2px solid rgba(255, 255, 255, 0.9)!important;
}

.delete-btn:hover {
    background: rgba(220, 38, 38, 0.35)!important;
    box-shadow: 0 0 12px rgba(248, 113, 113, 0.45)!important;
}

.logout-box {
    width: fit-content !important;
    min-height: auto !important;
    padding: 12px 16px !important;
    margin: 0 !important;

    display: inline-flex;
    justify-content: center;
    align-items: center;

    background: rgba(36, 33, 33, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}



/*--------------------------------------------------------------
# faded back container
--------------------------------------------------------------*/
.back-container {
  position: relative;       
  width: 90%;               
  max-width: 1300px;   
  min-height: 300px;        
  margin: 0 auto;           
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 75px 20px;

  background: rgba(30, 28, 28, 0.66);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  margin-top: 45px
}





/*--------------------------------------------------------------
# video
--------------------------------------------------------------*/
.video-gallery {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 10px 0;
  flex-wrap: wrap;
}


.video-wrapper {
  background: #111111c7;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(116, 62, 29, 0.4);
  max-width: 900px;
  width: 120%;
  min-height:650px; 

}


#videoFrame {
  width: 100%;
  height: 450px;
  border: none;
  border-radius: 10px;
}



.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
}



/* Video description section */
.card-videoDescription {
  margin-top: 15px;
  font-size: 16px;
  color: #eee;
  background-color: #222;
  padding: 12px 18px;
  border-left: 5px solid #ffffffe7;
  border-radius: 8px;
  text-align: left;
  min-width: 880px;     

}

#prevBtn.btn, #nextBtn.btn {
  all: unset;
}
.nav-button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 70px;        
  height: 70px;
  font-size: 30px;      
  background-color: rgba(53, 51, 51, 0.8);
  border: 2px solid white;
  border-radius: 50%;   
  color: #ffffff;
  font-weight: bold;
  padding: 0;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}


.nav-button:hover {
  background: linear-gradient(
    to right,
    rgba(34, 121, 235, 0.41) 0%,   /* light purple with 50% opacity */
    rgba(255, 255, 255, 0.57) 51%, /* soft orange with 45% opacity */
    rgba(122, 115, 115, 0) 100%  /* pinkish-orange at the end with 40% opacity */
  );
  transform: scale(1.3);
  color: #1f4e66;
  border: none; 
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}





/*--------------------------------------------------------------
# Sections General
--------------------------------------------------------------*/
section {
  padding: 0px 0 50px 0;
}

h1 {
    font-size: 65px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #ffffff;
}
p {
    font-size: 20px;
    color: #ffffff;
}


.top-menu {
    text-align: center;
    padding-bottom: 28px;
}



/*--------------------------------------------------------------
# button section
--------------------------------------------------------------*/

.btn {
    display: inline-block;
    padding: 14px 26px;
    margin: 8px;
    font-size: 20px;
    font-weight: 500;
    color: white;
    text-decoration: none;

    background: rgba(255, 255, 255, 0.32);
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 12px;

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);

    transition: all 0.3s ease;
}


.btn:hover {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.45);
    transform: translateY(-2px) scale(1.03);
}

.button-description {
    color: white;
    font-size: 18px;
    text-align: left;
    margin-bottom: 35px;
    line-height: 1.6;
}


.description-text,
.description-list {
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
    font-size: 20px;      /* was probably around 20 */
    font-weight: 500;     /* slightly bolder */
    color: #f8fafc;       /* soft white */
    line-height: 1.8;
}

.description-list {
    margin-top: 20px;
    padding-left: 25px;
    line-height: 1.8;
    font-size: 20px;      /* was probably around 20 */
    font-weight: 500;     /* slightly bolder */
    color: #f8fafc;       /* soft white */
    line-height: 1.8;
}



/*--------------------------------------------------------------
# NPC list section
--------------------------------------------------------------*/

.npc-dashboard {
    padding: 40px 0;
}

.npc-toggle-header {
    text-align: center;
    margin-bottom: 20px;
}



.npc-collapse-container {
    display: flex;
    flex-direction: column;
    gap: 85px;
    width: 100%;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.npc-collapse-container > .npc-card {
    flex: 0 0 auto;
    flex-shrink: 0;
}

.npc-card {
    width: 100%;
    max-width: 1115px;
    margin: 0 auto;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,.7);
    border-radius: 20px;
    background: rgba(255,255,255,.045);
    backdrop-filter: blur(7px);
    color: #fff;
}

.npc-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* LEFT SIDE */
.npc-left {
    width: 180px;
    min-width: 180px;
    text-align: center;
    padding-top: 6px;
}

.npc-avatar {
    width: 100px;
    height: auto;
    display: block;
    margin: 0 auto 12px auto;
}

.npc-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 14px;
    color: white;
}

.talk-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 450;
    text-decoration: none;
    background: rgba(255, 255, 255, 0);
}

/* RIGHT SIDE */
.npc-right {
    flex: 1;
    min-width: 0;
}

.npc-title {
    font-size: 22px;
    font-weight: 700;
    color: white;
    line-height: 1.3;
    margin-bottom: 6px;
}

/* DIVIDER LINES */
.npc-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    margin: 10px 0;
}

/* CONTENT BLOCKS */
.student-list {
    margin-top: 4px;
    line-height: 1.5;
    font-size: 17px;
    color: white;
}

.student-list strong {
    display: block;
    text-align: center;
    font-size: 18px;
    margin-bottom: 8px;
    color: white;
}

.student-list p {
    margin: 6px 0 0 0;
}

.student-list ol,
.student-list ul {
    margin: 6px 0 0 0;
    padding-left: 24px;
}

.student-list li {
    margin-bottom: 4px;
}

/* PERFORMANCE ROWS */
.performance-list {
    list-style: disc;
    padding-left: 24px;
    margin-top: 8px;
}

.performance-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 0;
}

.performance-list li:last-child {
    border-bottom: none;
}

/* MOBILE */
@media (max-width: 900px) {
    .npc-layout {
        flex-direction: column;
        gap: 18px;
    }

    .npc-left {
        width: 100%;
        min-width: unset;
        padding-top: 0;
    }

    .npc-title {
        text-align: center;
    }

    .student-list strong {
        text-align: center;
    }
}

/*--------------------------------------------------------------
# toggle button section
--------------------------------------------------------------*/



.toggle-btn {
    background: transparent;
    border: 2px solid white;
    color: white;
    font-size: 20px;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 20px;
    margin-bottom: 20px;
}

#toggleNpcBtn {
    visibility: visible;
    opacity: 1;
}

.toggle-btn:hover {
    background: rgba(255,255,255,0.1);
}

.npc-toggle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}



.npc-filter-box{
    width:100%;
    max-width:900px;
    margin:0 auto 26px auto;
    text-align:center;
}

.npc-filter-box input{
    width:550px;
    max-width:90%;
    height:52px;
    padding:0 20px;
    border:2px solid rgba(255,255,255,.35);
    border-radius:8px;
    background:rgba(255,255,255,.08);
    color:#ffffff;
    font-size:17px;
    font-weight:700;
    outline:none;
    box-sizing:border-box;
}

.npc-filter-box input::placeholder{
    color:rgba(255,255,255,.65);
}

.npc-filter-box input:focus{
    border-color:#ffffff;
    background:rgba(255,255,255,.12);
}

.npc-search-count{
    margin-top:10px;
    color:rgba(255,255,255,.75);
    font-size:14px;
    font-weight:700;
}

.npc-card.hidden-by-search{
    display:none !important;
}































.npc-card-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.npc-header-avatar {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
}

.npc-header-main {
    min-width: 0;
}

.npc-header-name {
    margin-bottom: 3px;
    color: #fff;
    font-size: 23px;
    font-weight: 700;
}

.npc-header-title {
    color: rgba(255, 255, 255, 0.92);
    font-size: 18px;
    line-height: 1.3;
}

.npc-header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.npc-best-score {
    min-width: 112px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.npc-card-redesign .talk-btn {
    margin: 0;
    white-space: nowrap;
}

.npc-card-section {
    padding: 16px 20px 18px;
}

.npc-card-section + .npc-card-section {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.npc-section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 12px;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

.reward-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.reward-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    min-height: 104px;
    padding: 13px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.18);
}

.reward-medal-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.reward-medal-image {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.reward-medal-placeholder {
    display: flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(255, 255, 255, 0.38);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.68);
    font-size: 24px;
}

.reward-card-content {
    min-width: 0;
}

.reward-medal-name {
    margin: 0 0 6px;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.reward-detail {
    margin: 3px 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    line-height: 1.35;
}

.reward-detail strong {
    color: #fff;
}

.attempt-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.attempt-item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 11px;
    background: rgba(0, 0, 0, 0.14);
}

.attempt-score {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.attempt-date {
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

.attempt-earned {
    color: #86efac;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.attempt-not-earned {
    color: rgba(255, 255, 255, 0.48);
    font-size: 14px;
    white-space: nowrap;
}

.npc-empty-message {
    margin: 0;
    padding: 14px 16px;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    border-radius: 11px;
    color: rgba(255, 255, 255, 0.78);
}

@media (max-width: 1050px) {
    .reward-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .npc-card-header {
        grid-template-columns: 66px minmax(0, 1fr);
        padding: 18px;
    }

    .npc-header-avatar {
        width: 66px;
        height: 66px;
    }

    .npc-header-actions {
        grid-column: 1 / -1;
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .npc-card-section {
        padding: 18px;
    }

    .reward-card {
        grid-template-columns: 62px minmax(0, 1fr);
        padding: 14px;
    }

    .reward-medal-image {
        width: 58px;
        height: 58px;
    }

    .attempt-item {
        grid-template-columns: 46px minmax(0, 1fr);
    }

    .attempt-earned,
    .attempt-not-earned {
        grid-column: 2;
    }
}


.reward-locked {
    background: rgba(0, 0, 0, 0.2);
}

.reward-locked .reward-medal-placeholder {
    filter: grayscale(1);
    opacity: 0.75;
}

.reward-locked .reward-medal-name {
    color: rgba(255, 255, 255, 0.7);
}

.reward-earned {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(134, 239, 172, 0.65);
}

.reward-unlocked-label {
    margin-top: 5px;
    color: #86efac;
    font-size: 12px;
    font-weight: 700;
}