/*
  Fluid sizing: every former px size is now rem (px / 16).
  1rem = 16px on screens >= ~520px wide (so desktop looks identical),
  and shrinks smoothly on narrower screens down to a floor of 12px (75%).
  Tweak the clamp() below to change how aggressively things scale.
*/
/* Disable WebKit appearance resets globally for form elements */
html { -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; }
body { min-height: 100dvh; }   /* use dvh instead of vh, iOS toolbars break vh */
button { -webkit-tap-highlight-color: transparent; }

button {
  -webkit-appearance: none;
  appearance: none;
  color: black;           /* set explicitly, whatever your theme uses */
  font: inherit;
  background: rgba(255, 255, 255, 0.767);
}
a { color: inherit; }

input {
  font-size: 16px;       /* stops the zoom-on-focus */
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  border-radius: 0;      /* or whatever you want */
  max-width: 100%;
}

html {
    font-size: clamp(14px, 3.08vw, 16px);
    -webkit-text-size-adjust: 100%;
}

@font-face {
    font-family: FingerPaint;
    src: url(fonts/FingerPaint-Regular.ttf);
}

@font-face {
    font-family: OpenSans;
    src: url(fonts/OpenSans-Regular.ttf);
}
 
html {
    background-color: #000;      /* fallback so overscroll never shows white */
    min-height: 100%;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100dvh;
    overflow-x: hidden;
    background: transparent;
    display: flex;
    flex-direction: column;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;                    /* top/right/bottom/left: 0 */
    z-index: -1;
    background:
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url("images/JJSDLE_Background.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.no-scroll {
  overflow: hidden;
}
 
a, a:visited, a:hover, a:active {
  color: inherit;
  text-decoration: none;
}
 
#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    background-color: black;
    z-index: 99;
    transition: opacity 0.4s ease;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("images/JJSDLE_Background.png");
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    background-size: cover;
    margin: 0;
    padding: 0;
    flex-direction: column;
    font-size: 2.4em;
    text-align: center;
}

#loadingImage {
    width: 22.5rem;
    max-width: 90%;
    margin: 1.5rem;
}
 
@keyframes saturate {
    0%, 100% {
        filter: saturate(0);
    }
    50% {
        filter: saturate(1);
    }
}
 
.text {
    font-family: FingerPaint, Verdana;
    color: white;
    text-shadow: 
        -0.1rem -0.1rem 0 #000,  
        0.1rem -0.1rem 0 #000,
        -0.1rem  0.1rem 0 #000,
        0.1rem  0.1rem 0 #000;
}
 
#title {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 4rem;
}
 
#logo {
    display: flex;
    justify-content: center;
    align-items: center;
}
 
#logo img {
    width: 22.5rem;  
    max-width: 90%;
    height: auto;
    margin: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1); 
}
 
#logo a:hover img {
    transform: scale(1.05);
}
 
 
.containerNav {
    display: flex;
    font-size: 1.6em;
    flex-direction: column;
    text-align: center;
    align-items: center;
    margin-top: 1.5rem;
    gap: 0.3125rem;
}

#containerInputRow {
    position: relative; /* new positioning context for containerOptions */
    margin: auto;
    margin-top: 0.625rem;
    margin-bottom: 0.875rem;
    width: 19.375rem;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

#data_dropdown {
    width: 2.625rem;
    height: 2.625rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 1.6px solid black;
    background-color: rgba(255, 255, 255, 0.767);
}

#data_dropdown:hover {
    background-color: rgba(216, 216, 216, 0.769);
    cursor: pointer;
}

#enter {
    position: absolute;
    top: 1rem;
    transform: translateX(10.875rem);
    width: 2.625rem;
    height: 2.625rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 1.6px solid black;
    background-color: rgba(255, 255, 255, 0.767);
}

#enter:hover {
    background-color: rgba(216, 216, 216, 0.769);
    cursor: pointer;
}

.dropdown {
    position: relative; /* establishes the positioning context */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#containerOptions {
    position: absolute;
    top: 100%;         
    margin-top: 0.25rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.767);
    z-index: 8;

    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    margin-bottom: 1rem;
    max-width: 18.75rem;
    max-height: 10rem;
    overflow-y: auto;
    overflow-x: hidden;
}

#containerOptions .buttonWrapper {
    padding: 0.125rem;
}

*, *::before, *::after {
    box-sizing: border-box;
}

#containerOptions button {
    font-family: FingerPaint, Verdana;
    text-align: center;
    font-size: 1.3em;
    min-width: 17.5rem;
    max-width: 18.125rem;
    height: auto;
    border: 1.6px solid black;
    background-color: rgba(255, 255, 255, 0.767);

    color: #000;                  /* fixes the blue text */
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;             /* iOS rounds buttons by default */
    -webkit-tap-highlight-color: transparent;
}

#containerOptions button:hover{
    background-color: rgba(216, 216, 216, 0.769);
    cursor: pointer;
}
 
#user_input {
    font-family: FingerPaint, Verdana;
    text-align: center;
    font-size: 1.6em;
    width: 15.625rem;
    height: 2.625rem;
    border: 1.6px solid black;
    background-color: rgba(255, 255, 255, 0.767);
    outline: none;

    padding: 0;                   /* kills iOS default padding */
    margin: 0;
    color: #000;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
}
 
#beginningText {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.96em;
}
 
.page_message {
    text-align: center; 
    font-size: 1.6em;
}

#page_win_count {
    margin-top: 0.375rem;
    text-align: center;
}

#page_win_count_num {
    display: inline-block;
    opacity: 0;
}

#page_win_count_num.show {
    animation: fadeInDown 0.4s ease-out forwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
 
.hidden {
  display: none !important;
}
 
.correct {
    background-color: rgb(14, 169, 14) !important;
}
 
.partial {
    background-color: rgb(211, 181, 15) !important;
}
 
.incorrect {
    background-color: rgb(187, 33, 33) !important;
}

#containerClassicAttributes {
    max-width: 45rem;
    width: 96%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding-bottom: 0.375rem;
}

#containerAttributesScroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.625rem;
}

#helpIndicator {
    position: relative; /* Establishes positioning context for child elements */
    margin: auto;
    margin-top: 1.875rem;
    background-color: rgba(255, 255, 255, 0.767);
    border: 1.2px solid black;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0 0.9375rem;
}

#helpClose {
    position: absolute;
    top: -1rem;
    right: -0.875rem;
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    line-height: 1;
    font-family: FingerPaint, Verdana;
    padding: 0;
    background-color: #bd1111;
    border: 1.2px solid black;
    width: 1.875rem;
    height: 1.875rem;
    line-height: 0;
}

#helpClose:hover {
    background-color: #9b1111;
}

#helpIndicatorTitle {
    color: black;
    text-shadow: none;
    margin: 0.125rem;
}

#helpIndicatorColors {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    gap: 1.875rem;
    margin-bottom: 1.875rem;
}

#helpIndicatorColors div{
    width: 3.125rem;
    height: 3.125rem;
}

#helpIndicatorColors div p{
    position: absolute;
    top: 2.1875rem;
    overflow: visible;
    color: black;
    text-shadow: none;
}
 
#containerAttributes {
    max-width: 45rem;
    width: max-content;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
    gap: 0.1875rem;
}
 
.bullet {
    width: 4rem;
    height: 0.25rem;
    background-color: rgba(255, 255, 255, 0.767);
    border: 1.2px solid black;
    display: flex;
    align-items: center;
    justify-content: center;
}
 
.rowAttributes {
    display: flex;
    justify-content: center;
    flex-direction: row;
    gap: 1rem;
    text-align: center;
}
 
.attribute {
    width: 4.5rem;
    height: 4.5rem;
    display: flex;            
    justify-content: center;  
    align-items: center;      
    box-sizing: border-box;
    border: 1.2px solid black;
    background-color: rgba(255, 255, 255, 0.767);
    position: relative;
    overflow: visible;
    background-repeat: no-repeat;
    background-position: center;
    text-shadow: 
        -0.075rem -0.075rem 0 #000,  
        0.075rem -0.075rem 0 #000,
        -0.075rem  0.075rem 0 #000,
        0.075rem  0.075rem 0 #000;
        text-align: center;
}
 
.downArrow {
    background-image: url("images/icons/DownArrow.svg");
    background-size: 75%; 
}
 
.upArrow {
    background-image: url("images/icons/UpArrow.svg");
    background-size: 75%; 
}
 
.attribute img {
    width: 3rem;   
    height: 3rem; 
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    position: absolute;
}
 
#attributeHeader {
    display: flex;
    flex-direction: row;
    width: max-content;
    margin: auto;
    gap: 1rem;
    text-align: center;
}
 
#attributeHeader div {
    font-size: 0.8em;
    text-shadow: 
        -0.075rem -0.075rem 0 #000,  
        0.075rem -0.075rem 0 #000,
        -0.075rem  0.075rem 0 #000,
        0.075rem  0.075rem 0 #000;
}
 
.header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    width: 4.5rem;
    flex-shrink: 0;
    min-height: 3.5rem;
    padding: 0.2rem;
    flex-direction: column;
}
 
#winnerBox {
    display: flex;
    align-items: center;
    text-align: center; 
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.767);
    border: 1.2px solid black;
    width: 12.5rem;
    height: auto;
    text-align: center;
    margin-top: 1rem;
    margin: auto;
    overflow: hidden;
}
 
#winnerImage {
    display: flex;
    justify-content: center;   
    align-items: center;
    text-align: center; 
    background-color: rgba(255, 255, 255, 0.767);
    border: 1.2px solid black;
    width: 10rem;
    height: 10rem;
    text-align: center;
}
 
#winnerText {
    display: flex;
    justify-content: center;   
    align-items: flex-start;
    text-align: center; 
    font-size: 1.36em;
    margin: 0.75rem;
    color: rgb(29, 224, 29);
    text-shadow: 
        -0.075rem -0.075rem 0 #000,  
        0.075rem -0.075rem 0 #000,
        -0.075rem  0.075rem 0 #000,
        0.075rem  0.075rem 0 #000;
}
 
.timerContainer {
    width: 12.5rem;
    height: 5rem;
    display: flex;
    justify-content: flex-start;   
    align-items: center;
    text-align: center; 
    flex-direction: column;
    line-height: 0.5; 
    margin: auto;
}
 
.timerContainer p {
    text-shadow: none;
    font-size: 1.2em;
    color: #000;
}
 
.nextCharacterTimer {
    display: flex;
    justify-content: center;   
    align-items: center;
    text-align: center; 
    font-family: FingerPaint, Verdana;
    color: white;
    text-shadow: 
        -0.075rem -0.075rem 0 #000,  
        0.075rem -0.075rem 0 #000,
        -0.075rem  0.075rem 0 #000,
        0.075rem  0.075rem 0 #000;
    font-size: 1.92em;
}

.playerNumberContainer {
    margin: none;
    text-align: center;
    width: 90%;
}

.playerNumberContainer p {
    color: black;
    text-shadow: none;
    font-size: 0.9rem;
}

#playerNum {
    color: white;
    text-shadow: 
        -0.075rem -0.075rem 0 #000,  
        0.075rem -0.075rem 0 #000,
        -0.075rem  0.075rem 0 #000,
        0.075rem  0.075rem 0 #000;
}
 
#winnerContainer {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}
 
.attributeTextOverlay {
    position: absolute;
    max-width: 5rem;
    text-align: center;
    margin-top: 4rem;
    font-size: .64em;
    z-index: 1;
    line-height: 1; 
}
 
.animated {
    animation: flip 0.9s ease;
}
 
@keyframes flip {
    0% {
        transform: scaleX(1);
    }
    50% {
        transform: scaleX(0);
    }
    100% {
        transform: scaleX(1);
    }
}
 
.buttonNav {
    display: flex;
    flex-direction: column;
    font-family: FingerPaint, Verdana;
    justify-content: flex-start;
    text-align: start;
    width: 16rem;
    height: 4.2rem;
    border: 1.6px solid black;
    background-color: rgba(255, 255, 255, 0.532);
    position: relative;
}
 
.buttonNav p {
    display: flex;
    justify-content: flex-start; 
    align-items: flex-start;     
    margin: 0;
    margin-left: 0.25rem;
    margin-top: 0.25rem;
    margin-right: 0.5rem;
 
    text-align: start;
    font-family: FingerPaint, Verdana;
    line-height: 1.1; 
    position: relative;
}
 
.buttonNav img {
    position: absolute;
    width: 100%;
    object-fit: cover;
    z-index: -1;
}
 
.buttonNavHeader {
    text-shadow: none;
    color: black;
    font-size: 1.28rem;
}
 
.buttonNavDesc {
    text-shadow: none;
    color: black;
    font-size: 0.8rem;
}
 
.buttonNav:hover{
    background-color: rgba(216, 216, 216, 0.55);
}

.buttonNav .buttonNavCompletion { 
  position: absolute;
  top: -0.375rem;
  right: -0.75rem;
  width: 1.875rem; 
  height: 1.875rem; 
  background-image: url("images/icons/Incomplete.svg"); 
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}


 
.tooltip {
    position: relative; /* Ensures the container tightly fits the target element */
}
 
.tooltip .tooltiptext {
    text-shadow: none;
    visibility: hidden;
    width: 9.375rem;
    background-color: rgb(216, 216, 216);
    color: black;
    text-align: center;
    padding: 0.25rem;
    border: 1.6px solid black;

    position: absolute;
    z-index: 3;
    top: 100%; /* Positions the top edge of the tooltip directly below the parent element */
    left: -60%;   /* Aligns the left edge of the tooltip with the parent element */

    opacity: 0;
    transition: opacity 0.3s;
}
 
.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    bottom: 100%; /* Positions the arrow at the top edge pointing upward */
    left: 1.25rem;   /* Positions the arrow relative to the tooltip box */
    margin-left: -0.25rem;
    border-width: 0.25rem;
    border-style: solid;
    border-color: transparent transparent #555 transparent; /* Points triangle upward */
    }
 
.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}
 
#containerUtilities {
    display: flex;
    justify-content: space-evenly;   
    align-items: center; 
    background-color: rgba(0, 0, 0, 0.562);
    width: 7.5rem;
    height: 2.25rem;
    margin: 0 auto;
    border-radius: 1.5rem;
    margin-bottom: 1rem;
}
 
#containerUtilities svg{
    width: 1.75rem;
    color: white;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1); 
}
 
#containerUtilities svg:hover {
    transform: scale(1.1);
    cursor: pointer;
}
 
#shareContainer {
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}
 
#shareBox {
    display: flex;
    align-items: center;
    text-align: center; 
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.918);
    border: 1.2px solid black;
    max-width: 18.125rem;
    height: auto;
    text-align: center;
    margin: auto;
    overflow: hidden;
    margin-bottom: 1.875rem;
}
 
#shareHeader {
    margin-bottom: 0;
    font-size: 1.44em;
    font-family: FingerPaint, Verdana;
    text-shadow: 
    -0.0625rem -0.0625rem 0 #000,  
    0.0625rem -0.0625rem 0 #000,
    -0.0625rem  0.0625rem 0 #000,
    0.0625rem  0.0625rem 0 #000;
    color: white;
    background-color: rgba(198, 198, 198, 0.628);
    border: 1.2px solid black;
    width: 100%;
    padding: 0.25rem;
}
 
#shareBox p{
    margin-top: 0.5rem;
    margin-left: 1rem;
    margin-right: 1rem;
    margin-bottom: 0;
}
 
#shareResultHeader {
    text-shadow: none;
    font-size: 1.12em;
    color: black;
}   

#shareResultBody {
    margin: 0.625rem;
}
 
#shareWeblink {
    font-family: FingerPaint, Verdana;
    font-size: 0.96em;  
    color: white;
    text-shadow: 
        -0.0625rem -0.0625rem 0 #000,  
        0.0625rem -0.0625rem 0 #000,
        -0.0625rem  0.0625rem 0 #000,
        0.0625rem  0.0625rem 0 #000;
}
 
.shareRow {
    text-shadow: none;
    color: black;
    font-size: 1.04em;
}

#shareRow {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
}

.shareButton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 7.5rem;
  height: 2.5rem;
  background-color: rgba(255, 255, 255, 0.767);
  border: 1.2px solid black;
  cursor: pointer;
  font-size: 1.12em;
  padding: 3.2px;
  box-sizing: border-box;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.2s ease;
  margin-bottom: 16px;
  margin-top: 16px;
  font-family: FingerPaint, Verdana;
  color: black;
}

 
.shareButton svg {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    color: black;
}

.shareButton img {
    width: 1.6rem;
    height: 1.6rem;
    flex-shrink: 0;
    color: black;
}
 
.shareButton:hover {
    background-color: rgba(216, 216, 216, 0.829);
}
 
#nextContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
}
 
#nextBox {
    display: flex;
    align-items: center;
    text-align: center; 
    justify-content: flex-start;
    flex-direction: column;
    background-color: rgba(26, 23, 23, 0.591);  
    width: 18.5rem;
    height: 9rem;
    margin: auto;
    overflow: hidden;
    border-radius: 1.5rem;
    font-size: 1.2em;
}
 
#nextBoxHeader{
    margin-bottom: 0.3125rem;
}
 
#containerToday {
    display: flex;
    align-items: center;
    text-align: center;
    flex-direction: column;
    background-color: rgba(26, 23, 23, 0.591);
    width: fit-content;
    margin: auto;
    margin-top: 1rem;
    margin-bottom: 1rem;
    border-radius: 1.5rem;
    padding: 0 1.0625rem;
}
 
#containerToday img {
    width: 20.625rem;
    display: flex;
    align-items: center;
    text-align: center;
    margin-top: 1rem;
}
 
#containerToday p {
    text-shadow: none;
    color: white;
    font-size: 0.88em;
}

#containerTodayText {
    margin: 0;
    margin-top: 0.3125rem;
    font-size: 2.8em;
}

#containerTodayMoveset {
    margin-top: 0.875rem;
    display: flex;
    flex-direction: row;
    gap: 0.625rem;
}

.containerMove {
    position: relative;
    font-family: OpenSans;
    font-size: 0.65em;
    display: flex;
    width: 4.375rem;
    height: 4.375rem;
    text-align: center;
    background-color:   rgba(0, 0, 0, 0.333);
    justify-content: center;
    align-items: center;
    color: rgb(225, 223, 223);
}

.moveNum {
    position: absolute;
    font-size: 2em;
    top: -0.9375rem;
}

.moveUnder {
    position: absolute;
    font-size: 0.9em;
    bottom: -0.125rem;
    overflow: visible;
    text-wrap: nowrap;
}
 
.objectCard {
    width: 15rem;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;  
    flex-direction: row;
    background-color: rgba(255, 255, 255, 0.767);
    border: 1.6px solid black;
    margin-bottom: 0.25rem;
    text-align: center;
}
 
.objectCardWrapper {
    flex: 1;                 
    display: flex;            
    justify-content: center;
    align-items: center;
}
 
.objectCard p{
    text-align: center;
    display: flex;
    align-items: center;
    font-size: 0.96em;
}
 
.cardImage {
    margin: 0.25rem;
    display: flex;
    background-image: url('/pages/character/characterImages/Vessel.webp');
    background-size: cover;
}
 
@keyframes shakeX {
  from, to {
    transform: translate3d(0, 0, 0);
  }
 
  20%, 60% {
    transform: translate3d(-0.5rem, 0, 0);
  }
 
  40%, 80% {
    transform: translate3d(0.5rem, 0, 0);
  }
}
 
.objectCard.shakeX {
    animation-name: shakeX;
    animation-duration: 0.5s;
    animation-fill-mode: both;
}

.spinner {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  /* blue fading into near-black */
  background: conic-gradient(from 0deg, #111 0%, #111 30%, #1e90ff 100%);
  /* cut out the middle to make a ring */
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 0.4375rem), #000 calc(100% - 0.4375rem));
          mask: radial-gradient(farthest-side, transparent calc(100% - 0.4375rem), #000 calc(100% - 0.4375rem));
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.site-footer {
    text-align: center;
    line-height: 1.4;
    margin-top: auto;
    padding: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
    color: white;
    box-sizing: border-box;
    margin-bottom: 0.2rem;
}

.site-footer a {
    color: white;
    text-decoration: underline;
    font-size: 10px;
}

.site-footer img {
    width: 3rem;
    height: 3rem;
}