@font-face {
    font-family: "Star Jedi";
    src: url("../fonts/StarJedi.woff") format("opentype");
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: "Star Wars";
    src: url("../fonts/StarWars.woff") format("opentype");
    font-weight: normal;
    font-style: normal;
}
/* Page basics*/
body {
    /* display: flex; */
    justify-content: center;
    align-items: center;
    font-family: Arial, sans-serif;
    /* text-align: center; */
    background-color: #121213;
    color: white;
    padding: 20px;

    /* Background stars */
    background-image:
        radial-gradient(1px 1px at 20% 30%, white, transparent),
        radial-gradient(1px 1px at 80% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 10% 80%, white, transparent),
        radial-gradient(1px 1px at 90% 20%, white, transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
}
.btn:hover {
    transform: scale(1.5);
    transition: transform 0.2s ease-in-out;
}
.hidden {
    display: none;
}

.reset-timer-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 5px;
    /* justify-content: center; */
    /* align-items: center; */
}
.reset-timer-text {
    font-family: 'Star Jedi', sans-serif;
    font-size: 20px;
    color: rgb(128, 0, 0);
    font-weight: 500;
    left: 0;
}
.reset-timer {
    font-size: 40px;
    color: rgb(128, 0, 0);
    font-weight: 1000;
    /* top: 50%;
    left: 50%; */
}

#game-title {
    display: flex;
    align-items: center;
    justify-content: center;
    /* margin-bottom: 5px; */
    margin-top: 5px;

    font-size: 90px;
    font-family: 'Star Wars', sans-serif;
    /* font-family: 'Star Jedi', sans-serif; */
    color: #121213;
    text-shadow: -2px 0 yellow, 0 2px yellow, 2px 0 yellow, 0 -2px yellow;
}
#game-info {    
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.input-wrapper {
    display: flex;
    justify-content: center;
}
#input-elems {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;

    width: 100%;
    max-width: 420px;
}
#input-border {
    width: 385px;
    padding: 10px;
    font-size: 15px;
    border: 2px solid yellow;
    border-radius: 50px;
}
#guess-input {
    width: 300px;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid white;
    border-radius: 50px;
}
#guess-list {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 330px;
    top: 100%;
    left: 10px;

    background: #eed9c4;
    color: black;
    border: 1px solid #444;
    border-radius: 10px;
    max-height: 200px;
    overflow-y: auto;

    font-size: 15px;
    font-weight: 600;

    z-index: 100;
}
.guess-list-item {
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
}
.guess-list-item:hover {
    background-color: #777;
    cursor: pointer;
}
.guess-list-image {
    position: relative;
    width: 65px;
    height: 65px;
    left: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    /* padding: 5px; */

    /* background-color: white; */
    /* border: 2px solid black; */
    /* border-radius: 5px; */
    border: none;
}
.guess-list-image img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 50%;
    object-fit: contain;
}
.guess-list-name {
    position: relative;
    height: 65px;
    padding: 5px;
    left: 10px;
    display: flex;
    justify-content: center;
    align-items: center;

    /* background-color: white; */
    color: black;
}
#guess-button {
    width: 40px;
    font-size: 20px;
    /* font-family: 'Star Wars', sans-serif; */
    text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;
    background-color: transparent;
    border: none;
    color: #121213;
    cursor: pointer;

    transition: transform 0.2s ease-in;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 50px;
    /* font-family: 'Star Jedi', sans-serif; */
}
.header-row.hidden {
    display: none;
}

.header-box {
    width: 120px;
    height: 40px;
    border-bottom: 5px solid white;
    background-color: #121213;
    
    text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
    color: yellow;
    font-weight: bold;
    letter-spacing: 0.7px;
    
    text-align: center;
    padding: 10px;
    border-radius: 15px;
}

/* Container for all guesses */
#guess-container {
    margin-top: 20px;
}

/* One guess row */
.guess-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
}

/* Individual boxes */
.box {
    position: relative;
    overflow: hidden;
    width: 120px;
    height: 90px;
    /* border: 2px solid #3a3a3c; */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-align: center;
    padding: 10px;

    /* Background */
    background: rgba(0, 180, 255, 0.15);
    box-shadow:
        0 0 8px rgba(0, 180, 255, 0.6),
        inset 0 0 8px rgba(0, 180, 255, 0.4);
    border: 1px solid rgba(0, 200, 255, 0.6);
    border-radius: 4px;

    /* Transformation Animations */
    transition: transform 0.6s ease, background-color 0.6s ease;
    transform-style: preserve-3d;
}
.box::before {
  content: "";
  position: absolute;
  inset: 0;

  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.04) 1px,
    transparent 1px,
    transparent 3px
  );

  pointer-events: none;
}
.box.flip {
    transform: rotateX(90deg);
}
.box.hidden {
    color: transparent;
    background-color: transparent;
}
.box img {
    max-width: 80%;
    max-height: 80%;
    border-radius: 50%;
    object-fit: contain;
}

/* feedback colors */
.correct {
    background-color: #6aaa64;
    /* Background */
    background: rgba(106, 170, 100, 0.15);
    box-shadow:
        0 0 8px rgba(106, 170, 100, 0.6),
        inset 0 0 8px rgba(106, 170, 100, 0.4);
    border: 1px solid rgba(106, 190, 100, 0.6);
    border-radius: 4px;
}
.partial {
    background-color: #c9b458;
    /* Background */
    background: rgba(201, 180, 88, 0.15);
    box-shadow:
        0 0 8px rgba(201, 180, 88, 0.6),
        inset 0 0 8px rgba(201, 180, 88, 0.4);
    border: 1px solid rgba(250, 250, 88, 0.6);
    border-radius: 4px;
}
.incorrect {
    background-color: rgba(0, 180, 255, 0.15);
}
.lower {
    background-color: rgba(0, 180, 255, 0.15);
}
.higher {
    background-color: rgba(0, 180, 255, 0.15);
}

/* Help modal */
#help-button {
    width: 50px;
    height: 50px;
    top: 20px;
    right: 20px;
    border-radius: 50%;

    background-color: rgba(0, 180, 255, 0.05);
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.08),
        rgba(255, 255, 255, 0.08) 1px,
        transparent 1px,
        transparent 3px
    );
    box-shadow:
        0 0 8px rgba(0, 180, 255, 0.6),
        inset 0 0 8px rgba(0, 180, 255, 0.4);
    border: 1px solid rgba(0, 200, 255, 0.6);
    cursor: pointer;
    
    font-size: 30px;
    color: #121213;
    text-shadow: -2px 0 yellow, 0 2px yellow, 2px 0 yellow, 0 -2px yellow;
    font-weight: 500;
}
#help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;

    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease-in-out, visibility 0.25s ease-in-out;
}
#help-overlay.hidden {
    /* display: none; */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
#help-modal {
    position: relative;
    width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    margin-top: 50px;
    margin-bottom: 50px;
    max-width: 90%;
    padding: 24px 28px;

    background: #eed9c4;
    border: 2px solid #800080;
    border-radius: 12px;
    /* text-align: center; */
    box-shadow: 0 0 25px rgba(255, 232, 31, 0.35);
}
#help-close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-weight: 1000;
    background: none;
    border: none;
    color: rgb(200, 0, 0);
    font-size: 1.6rem;
    cursor: pointer;
}
.help-header {
    color: #000000;
    /* font-family: 'Star Wars', sans-serif; */
    font-family: 'Star Jedi', sans-serif;
    font-size: 35px;
    margin-bottom: 12px;
    justify-content: center;
    align-items: center;
    /* text-align: center; */
    border-bottom: 10px #000000;
}
#help-description {
    color: #000000;
    font-size: 20px;
    font-weight: 500;
}
.help-sub-header {
    font-family: 'Star Jedi', sans-serif;
    font-size: 20px;
    font-weight: 200;
    color: rgb(140, 0, 153)
}
.help-desc {
    font-family: 'Star Jedi', sans-serif;
    font-size: 15px;
    font-weight: 200;
    color: black;
}

#help-color-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;

    justify-content: center;
    align-items: center;
}
.help-color-square {
    width: 35%;
    display: flex;
    flex-direction: column;

    margin: 5px;
}
.help-color-example {
    width: 100%;
    height: 45px;
    border: 4px solid black;
}
.help-color-example.correct {
    background: rgba(106, 170, 100, 1.0);
}
.help-color-example.partial {
    background: rgba(201, 180, 88, 1.0);
}
.help-color-example.incorrect {
    background-color: rgba(0, 180, 255, 1.0);
}
.help-color-desc {
    color: black;
    font-family: 'Star Jedi', sans-serif;
    font-size: 15px;
}


/* End game modal */
#endgame-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;

    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
#endgame-overlay.hidden {
    /* display: none; */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
#endgame-modal {
    position: relative;
    width: 550px;
    max-height: 90vh;
    max-width: 90%;
    overflow-y: auto;
    padding: 15px 28px;
    margin-top: 50px;
    margin-bottom: 50px;

    background: #eed9c4;
    border: 2px solid red;
    border-radius: 12px;
    
    /* text-align: center; */
    font-family: 'Star Jedi', sans-serif;
    box-shadow: 0 0 25px rgba(255, 232, 31, 0.35);
}
#endgame-title {
    color: #000000;
    text-align: center;
    font-size: 50px;
    margin-bottom: 5px;
}
#endgame-title.win {
    color: #6aaa64;
}
#endgame-title.loss {
    color: red;
}
#endgame-guess-cnt {
    margin-bottom: 20px;
}
.endgame-msg {
    color: black;
    font-size: 20px;
}
#endgame-answer {
    color: black;
    font-size: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
}
#endgame-answer img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 50%;
    object-fit: contain;
}
#endgame-close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-weight: 1000;
    background: none;
    border: none;
    color: rgb(200, 0, 0);
    font-size: 1.6rem;
    cursor: pointer;
}
#play-again-btn {
    justify-content: center;
}


.Light {
    border: 2px solid #89CFF0;
}
.Dark {
    border: 2px solid red;
}
.Neutral {
    border: 2px solid #FAF9F6;
}