/* ------------------------------ WHOLE SITE STYLING ---------------------------- */
*:not(.material-symbols-rounded) {
    font-family: Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif!important;
    color: #2B3BBB;
}
.sticky-top {
    z-index: 0;
    position: fixed;
}
#fullpage {
    z-index: 1;
    position:static;
    top: -10vh;
}
.fp-watermark {
    display: none!important;
    visibility: hidden!important;
}
body {
    animation: fadeInAnimation ease 2s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
    background: #a59bff !important;
    background-image: linear-gradient(180deg, #cdc7ff 0%, #a59bff 100%) !important;
    background-attachment: fixed !important;
    padding-top: 52px;
    padding-bottom: 60px;
    min-height: 100vh;
}
@keyframes fadeInAnimation {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
     }
}
.modal-header {
    border-bottom: 0px!important;
}

.back-to-map, .refresh-button {
    padding: 20px;
}

/* -------------------------------- CHAT STYLING ------------------------------- */
.chat-shell {
    background-color: #FFCE95;
    margin: 20px!important;
    padding: 40px!important;
    border: #2B3BBB solid 3px;
    border-radius: 24px;
    outline: #FFAA87 solid 6px;
    outline-offset: -9px;
    box-shadow: #D7D1FD 8px 8px;
}
.chat-history {
    overflow: scroll;
    padding: 0px 20px;
}

.chat-input {
    overflow: scroll;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: #FFAA87 6px 6px;
    outline: none !important;
}

.form-control { 
    background-color: #ffffff!important;
    color: #2B3BBB!important;
    border: none!important;
    resize: none;
    padding: 20px!important;
    outline: none !important;
}
.form-control::placeholder {
    color: #a59bff!important;
    outline: none !important;
}
.form-control:focus {
    outline: none !important;
    box-shadow: inset 0 0 0 2px #2B3BBB !important;
    border-radius: 16px;
}
.submit-button-shell {
    background-color: #ffffff!important;
    border: none!important;
}
.llm-text{
    box-shadow: #FFAA87 6px 6px;
    background-color: #fee9cf;
    border-radius: 8px 8px 8px 0px;
    padding: 20px;
    font-size: 16px;
    justify-content: left;
    text-align: left!important;
    display: block;
    float: left;
    width: 80%;
}
.user-text{
    box-shadow: #FFAA87 6px 6px;
    background-color: #ffffff;
    border-radius: 8px 8px 0px 8px;
    padding: 20px;
    font-size: 16px;
    justify-content: left;
    text-align: left!important;
    display: block;
    float: right;
    width: 80%;
}

/* ------------------------------- BUTTON STYLING ------------------------------ */
.learn-button {
    background-color: #ffffff!important;
}
.sail-button {
    background-color: #E5E1FF!important;
}
.learn-button, .sail-button {
    border: #2B3BBB solid 3px !important;
    color: #2B3BBB !important;
    font-weight: 600 !important;
    border-radius: 60px !important;
    margin: 0;
    box-shadow: #2B3BBB 4px 4px !important;
    transform: translate(0, 0) !important;
    transition: transform 150ms ease-in-out, box-shadow 150ms ease-in-out !important;
}
.learn-button:hover, .sail-button:hover {
    border: #2B3BBB solid 3px !important;
    color: #2B3BBB !important;
    font-weight: 600 !important;
    border-radius: 60px !important;
    box-shadow: #2B3BBB 0px 0px !important;
    transform: translate(4px, 4px) !important;
}


/* -------------------------- BG COLOR FOR WAVY SECTIONS ------------------------- */
.wavy-middle {
    background-color: #F4F3FD;
}

/* --------------------------------- TABLE STYLING ------------------------------- */
.table {
    border-radius: 16px;
}
td{
    --bs-table-color: #2B3BBB!important;
    --bs-table-striped-color: #2B3BBB!important;
    --bs-table-bg: #eceaff;
    --bs-table-striped-bg: #e7e4fe;
}

/* -------------------------------- NAVBAR STYLING ------------------------------- */
.nav-link {
    font-size: 18px!important;
    color: #2B3BBB!important;
    padding: 10px 30px!important;
}
.navbar {
    padding: 10px!important;
    background-color: #EBE8FC;
}
button.navbar-toggler {
    --bs-navbar-toggler-padding-y: 0;
    --bs-navbar-toggler-padding-x: 0;
    --bs-navbar-toggler-font-size: 1.5rem;
    --bs-navbar-toggler-border-color: none;
    --bs-navbar-toggler-border: 0;
    --bs-navbar-toggler-border-radius: 0;
    --bs-navbar-toggler-focus-width: 0;
    --bs-navbar-toggler-transition: none;
}
button.navbar-toggler-icon {
    color: #2B3BBB;
    --bs-navbar-toggler-icon-bg: url()!important;
}

/* --------------------- REMOVES WEIRD FOCUS OUTLINE ON CLICK --------------------- */
*:focus {
    outline: 0 !important;
}

/* ---------------------------- ISLAND POPOVER/TOOLTIPS --------------------------- */
.custom-popover {
    --bs-popover-max-width: 200px;
    --bs-popover-border-color: #2B3BBB!important;
    --bs-popover-border-width: 3px!important;
    --bs-popover-border-radius: 16px!important;
    --bs-popover-header-bg:  #2B3BBB!important;
    --bs-popover-header-color: #ffffff!important;
    --bs-popover-body-color: #2B3BBB!important;
    font-weight: 500!important;
    box-shadow: 5px 5px 0px #5868e26a!important;
    --bs-popover-body-padding-x: 1rem;
    --bs-popover-body-padding-y: .5rem;
}
  

/* ============================= SVG (MAP) ATTRIBUTES ============================= */

/* ---------------------------------- MAP SIZING ---------------------------------- */
#IslandsMap {
    max-width: 1100px;
    margin: auto;
}

/* --------------------------------- NAV BAR -------------------------------- */
.demo-nav {
    display: flex;
    align-items: center;
    padding: 14px 40px;
    background-color: #2B3BBB;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}
.demo-nav-logo {
    width: 24px;
    height: 24px;
    margin-right: 50px;
    flex-shrink: 0;
}
.demo-nav-logo path {
    fill: #ffffff !important;
}
.demo-nav-links {
    display: flex;
    gap: 40px;
}
.demo-nav-links a {
    color: #ffffff !important;
    text-decoration: none;
    font-family: 'Open Sans', sans-serif !important;
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
    transition: opacity 150ms ease;
}
.demo-nav-links a:hover {
    opacity: 1;
}

/* ------------------------------- MOBILE BLOCK ------------------------------ */
.mobile-block {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, #cdc7ff 0%, #a59bff 100%);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
    flex-direction: column;
    gap: 16px;
}
.mobile-block .material-symbols-rounded {
    font-size: 48px;
    color: #2B3BBB;
}
.mobile-block p {
    font-family: 'Open Sans', sans-serif !important;
    font-size: 18px;
    font-weight: 500;
    max-width: 360px;
}
@media (max-width: 800px) {
    .mobile-block {
        display: flex;
    }
    .ocean-waves, .demo-nav, .page-heading, #IslandsMap,
    .challenge-panel, .progress-bar-container, .modal {
        display: none !important;
    }
}

/* ------------------------------- PAGE HEADING ------------------------------ */
.page-heading {
    text-align: center;
    padding: 20px 20px 0;
    position: relative;
    z-index: 1;
}
.page-title {
    font-family: 'Open Sans', sans-serif !important;
    font-size: 34px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}
.page-subtitle-cta {
    font-family: 'Open Sans', sans-serif !important;
    font-size: 18px;
    font-weight: 400;
    margin: 6px 0 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ------------------------------- OCEAN WAVES ------------------------------- */
.ocean-waves {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: visible;
}
.ocean-waves .wave {
    position: absolute;
    left: -100%;
    width: 400%;
    height: 40px;
    color: #FFFFFF;
    opacity: 0.1;
}
.wave-1  { top: 2%;  animation: waveDrift 35s ease-in-out infinite; }
.wave-2  { top: 9%;  animation: waveDrift 40s ease-in-out infinite reverse; }
.wave-3  { top: 16%; animation: waveDrift 38s ease-in-out infinite; }
.wave-4  { top: 23%; animation: waveDrift 42s ease-in-out infinite reverse; }
.wave-5  { top: 30%; animation: waveDrift 36s ease-in-out infinite; }
.wave-6  { top: 37%; animation: waveDrift 39s ease-in-out infinite reverse; }
.wave-7  { top: 44%; animation: waveDrift 41s ease-in-out infinite; }
.wave-8  { top: 51%; animation: waveDrift 37s ease-in-out infinite reverse; }
.wave-9  { top: 58%; animation: waveDrift 43s ease-in-out infinite; }
.wave-10 { top: 65%; animation: waveDrift 36s ease-in-out infinite reverse; }
.wave-11 { top: 72%; animation: waveDrift 40s ease-in-out infinite; }
.wave-12 { top: 79%; animation: waveDrift 38s ease-in-out infinite reverse; }
.wave-13 { top: 86%; animation: waveDrift 42s ease-in-out infinite; }
.wave-14 { top: 93%; animation: waveDrift 35s ease-in-out infinite reverse; }

@keyframes waveDrift {
    0% { transform: translateX(0%); }
    50% { transform: translateX(-15%); }
    100% { transform: translateX(0%); }
}

/* Make sure content sits above waves */
#IslandsMap, .challenge-panel, .progress-bar-container, .modal {
    position: relative;
    z-index: 1;
}

/* ------------------------------- HIT AREAS --------------------------------- */
.island-hitarea {
    fill: transparent;
    cursor: pointer;
    pointer-events: all;
}

/* ------------------------------- HOVER ANIMATIONS ------------------------------ */
#Island_1, #Island_2, #Island_3, #Island_4, #Island_5, #Island_6, #Island_7 {
    transform-origin: center;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 0.3s ease;
    pointer-events: none;
}
#Compass {
    transform-origin: center;
    transition: transform 0.3s ease,
                filter 0.3s ease;
    pointer-events: none;
}

/* Hover triggered by the parent <a> wrapping both hitarea + island group */
[data-island]:hover > g[id^="Island_"] {
    transform: scale(1.08) translateY(-4px);
}
#CompassClick:hover > #Compass {
    transform: scale(1.06);
}

/* Smooth color transitions on SVG fills */
#Island_1 .st2, #Island_1 .st6, #Island_1 .st17,
#Island_2 .st2, #Island_2 .st6,
#Island_3 .st2, #Island_3 .st6,
#Island_4 .st2, #Island_4 .st6,
#Island_5 .st2,
#Island_6 .st2, #Island_6 .st6,
#Island_7 .st2,
#Compass .st2, #Compass .st13 {
    transition: fill 0.3s ease;
}

/* ------------ ISLAND HOVER COLOR CHANGES (via parent <a> hover) ------------ */
[data-island="1"]:hover #Island1 .st2, [data-island="1"]:hover #Lighthouse .st2{
    fill:#72deba;
}
[data-island="1"]:hover #Shell .st6 {
    fill:#AFA7F8;
}
[data-island="1"]:hover #Lighthouse .st17{
    fill:#E39DBA;
}

[data-island="2"]:hover #Island2 .st2, [data-island="2"]:hover #Island2-2 .st2, [data-island="2"]:hover #Tree #Palm .st2 {
    fill:#72deba;
}
[data-island="2"]:hover #Tree #Palm .st6 {
    fill:#54B79B;
}

[data-island="3"]:hover #Island3 .st2, [data-island="3"]:hover #Tree #Palm .st2 {
    fill:#72deba;
}
[data-island="3"]:hover #Tree #Palm .st6 {
    fill:#54B79B;
}

[data-island="4"]:hover #Island4 .st2, [data-island="4"]:hover #Island4-2 .st2, [data-island="4"]:hover #Tree #Palm .st2 {
    fill:#72deba;
}
[data-island="4"]:hover #Tree #Palm .st6 {
    fill:#54B79B;
}

[data-island="5"]:hover #Island5 .st2, [data-island="5"]:hover #Island5-2 .st2{
    fill:#72deba;
}

[data-island="6"]:hover #Island6 .st2, [data-island="6"]:hover #Chest .st2 {
    fill:#72deba;
}
[data-island="6"]:hover #Chest .st6 {
    fill:#AFA7F8;
}

[data-island="7"]:hover #Island7 .st2, [data-island="7"]:hover #Island7-2 .st2, [data-island="7"]:hover #Island7-3 .st2{
    fill:#72deba;
}

/* ----------------------------- COMPASS HOVER CHANGES ---------------------------- */
#CompassClick:hover .st2 {
    fill:#E39DBA;
}
#CompassClick:hover .st13 {
    fill:#AFA7F8;
}

/* ----------------------------- HOW-TO MODAL STYLING ----------------------------- */
.howto-modal {
    background-color: #EBE8FF !important;
    border: 3px solid #2B3BBB !important;
    border-radius: 24px !important;
    box-shadow: none !important;
}
.howto-modal .btn-close {
    filter: none;
    opacity: 1;
    width: 24px;
    height: 24px;
    background-size: 24px;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%232B3BBB' stroke-width='2.5' stroke-linecap='round'%3e%3cline x1='2' y1='2' x2='14' y2='14'/%3e%3cline x1='14' y1='2' x2='2' y2='14'/%3e%3c/svg%3e") center/24px auto no-repeat;
}
.howto-modal .table {
    border: 3px solid #2B3BBB !important;
    border-radius: 12px !important;
    overflow: hidden;
}
.howto-modal .table td:first-child,
.howto-modal .table th:first-child {
    text-align: center;
    vertical-align: middle;
    width: 60px;
}
.howto-modal thead {
    background-color: #2B3BBB !important;
}
.howto-modal thead th {
    color: #ffffff !important;
    --bs-table-bg: #2B3BBB !important;
    --bs-table-color: #ffffff !important;
}

/* ========================= CHALLENGE PANEL STYLING ========================= */
.challenge-panel {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    animation: slideUp 0.4s ease-out;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
.challenge-inner {
    background-color: #EBE8FF;
    border: 3px solid #2B3BBB;
    border-radius: 24px;
    padding: 30px;
    box-shadow: #2B3BBB 6px 6px;
}
.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}
.challenge-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.challenge-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.challenge-helm {
    width: 80px;
    height: 80px;
}
.challenge-title {
    font-weight: 700;
    font-size: 24px;
    margin: 0;
}
.challenge-subtitle {
    font-size: 14px;
    margin: 0;
    opacity: 0.7;
}
.challenge-difficulty {
    font-weight: 600;
    font-size: 16px;
    background-color: #D7D1FD;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 1px;
}
.challenge-difficulty .material-symbols-rounded {
    font-size: 20px;
    vertical-align: middle;
}
.star-filled {
    color: #2B3BBB;
}
.star-empty {
    color: #B1A4FD;
}
.challenge-close-btn {
    background: #ffffff;
    border: 2px solid #2B3BBB;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 120ms ease-in-out, box-shadow 120ms ease-in-out;
    box-shadow: #2B3BBB 3px 3px;
}
.challenge-close-btn:hover {
    transform: translate(3px, 3px);
    box-shadow: #2B3BBB 0px 0px;
}
.challenge-objective {
    background-color: #ffffff;
    border: 2px solid #2B3BBB;
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 20px;
    font-size: 15px;
}

/* ---- Challenge chat overrides ---- */
.challenge-panel .chat-shell {
    margin: 0 !important;
    margin-bottom: 0 !important;
}
.challenge-panel .chat-history {
    min-height: 180px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 12px;
}
.challenge-panel .llm-text {
    transition: opacity 0.3s ease;
    white-space: pre-wrap;
}
.chat-input-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 24px;
}
.refresh-btn {
    background: #ffffff;
    border: 2px solid #2B3BBB;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 120ms ease-in-out, box-shadow 120ms ease-in-out;
    box-shadow: #2B3BBB 3px 3px;
}
.refresh-btn:hover {
    transform: translate(3px, 3px);
    box-shadow: #2B3BBB 0px 0px;
}

/* ---- Flag / completion areas ---- */
.flag-area, .flag-raised, .level-complete {
    animation: slideUp 0.3s ease-out;
    margin-top: 20px;
}
.flag-success-banner, .flag-raised-banner, .level-complete-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: #ffffff;
    border: 2px solid #2B3BBB;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}
/* ---- Material Symbols overrides ---- */
.material-symbols-rounded {
    font-family: 'Material Symbols Rounded' !important;
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    font-variation-settings:
        'FILL' 1,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24;
}
.flag-icon {
    font-size: 40px;
    flex-shrink: 0;
    color: #2B3BBB;
}
.flag-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.level-complete-banner {
    flex-direction: column;
    text-align: center;
}
.level-complete-banner h4 {
    margin: 0;
    font-weight: 700;
}
.level-complete-banner p {
    margin: 8px 0 0;
    font-size: 15px;
}

/* ========================= PROGRESS BAR STYLING ========================= */
.progress-bar-outer {
    max-width: 1200px;
    margin: 15px auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}
.progress-bar-container {
    padding: 20px 20px;
    background-color: #EBE8FF;
    border: 3px solid #2B3BBB;
    border-radius: 24px;
    box-shadow: #2B3BBB 6px 6px;
}
.progress-label {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 10px;
}
.progress-track-wrapper {
    position: relative;
    margin-bottom: 0;
    padding-top: 0;
}
.progress-track {
    background-color: #D7D1FD;
    border-radius: 16px;
    height: 32px;
    overflow: hidden;
    border: 2px solid #2B3BBB;
}
.progress-boat {
    position: absolute;
    top: -6px;
    font-size: 38px;
    color: #2B3BBB;
    transform: translateX(-50%);
    transition: left 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.progress-fill {
    background: #63CAAB;
    height: 100%;
    border-radius: 14px;
    transition: width 0.6s ease-in-out;
    box-shadow: inset 0 0 0 4px #63CAAB;
}
.progress-fill.progress-fill-striped {
    background: repeating-linear-gradient(
        -45deg,
        #63CAAB,
        #63CAAB 6px,
        #D7D1FD 6px,
        #D7D1FD 10px
    );
}
.progress-islands {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
}
.progress-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #EBE8FF;
    border: 2px solid #2B3BBB;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    z-index: 1;
}
.progress-dot[data-dot="0"] {
    width: auto;
    height: 32px;
    padding: 0 14px;
    border-radius: 16px;
    font-size: 13px;
}
.progress-dot.completed {
    background-color: #8FE8CE;
    border-color: #2B3BBB;
}

/* ---- Victory modal ---- */
.victory-modal {
    background-color: #EBE8FF !important;
    border: 3px solid #2B3BBB !important;
    border-radius: 24px !important;
    box-shadow: none !important;
}
.victory-icon {
    margin-top: 10px;
}

/* ---- Completed island color locks (same as hover colors) ---- */
.island-completed #Island1 .st2, .island-completed #Lighthouse .st2 { fill:#72deba; }
.island-completed #Shell .st6 { fill:#AFA7F8; }
.island-completed #Lighthouse .st17 { fill:#E39DBA; }

.island-completed #Island2 .st2, .island-completed #Island2-2 .st2, [data-island="2"].island-completed #Tree #Palm .st2 { fill:#72deba; }
[data-island="2"].island-completed #Tree #Palm .st6 { fill:#54B79B; }

.island-completed #Island3 .st2, [data-island="3"].island-completed #Tree #Palm .st2 { fill:#72deba; }
[data-island="3"].island-completed #Tree #Palm .st6 { fill:#54B79B; }

.island-completed #Island4 .st2, .island-completed #Island4-2 .st2, [data-island="4"].island-completed #Tree #Palm .st2 { fill:#72deba; }
[data-island="4"].island-completed #Tree #Palm .st6 { fill:#54B79B; }

.island-completed #Island5 .st2, .island-completed #Island5-2 .st2 { fill:#72deba; }

.island-completed #Island6 .st2, .island-completed #Chest .st2 { fill:#72deba; }
.island-completed #Chest .st6 { fill:#AFA7F8; }

.island-completed #Island7 .st2, .island-completed #Island7-2 .st2, .island-completed #Island7-3 .st2 { fill:#72deba; }

/* ---- Popover width increase for longer descriptions ---- */
.custom-popover {
    --bs-popover-max-width: 260px;
}