@import url('https://fonts.googleapis.com/css2?family=Klee+One&family=Red+Hat+Display:ital,wght@0,300..900;1,300..900&family=Red+Hat+Mono:ital,wght@0,300..700;1,300..700&display=swap');


/* .red-hat-display-<uniquifier> {
  font-family: "Red Hat Display", sans-serif;
  font-optical-sizing: auto;
  font-weight: <weight>;
  font-style: normal;
} */

/* .red-hat-mono-<uniquifier> {
  font-family: "Red Hat Mono", monospace;
  font-optical-sizing: auto;
  font-weight: <weight>;
  font-style: normal;
} */

/* .klee-one-regular {
  font-family: "Klee One", cursive;
  font-weight: 400;
  font-style: normal;
} */

*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
  height: 100%;
  /* touch-action: none; */
}


:root {
    --bg-color: #00dd6e;
    --card-bg: rgb(84 255 158);
    --accent: #252525;
    --accent-hover: #080808;
    --text-main: #252525;
    --text-muted: #4a4a4a;
    --danger: #c60c0c;
    --success: #10b981;
}

::-webkit-scrollbar {
    width: 2px;
    margin-left: 15px;
  }

  /* Track */
  ::-webkit-scrollbar-track {
    background: rgba(15, 72, 27, 0.389);
  }

  /* Handle */
  ::-webkit-scrollbar-thumb {
    background: rgb(15, 72, 27);
  }

  /* Handle on hover */
  ::-webkit-scrollbar-thumb:hover {
    background: rgb(43, 43, 43);
  }

body {
    font-family: "Red Hat Display", sans-serif;
    background-color: var(--bg-color);
    /* background-image: url(../img/bg.png);
    background-repeat: no-repeat;
  background-position: center;
  background-size: cover; */
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100dvh;
}

.container {
    width: 100%;
    max-width: 450px;
    min-width: 330px;
    background-color: var(--card-bg);
    border-radius: 16px;
    border: 3px solid var(--accent);
    box-shadow: 5px 5px var(--accent);
    border-radius: 10px;
    /* margin: 0 auto */
    transition: all 1s ease-in-out;
}

header{
    background-color: var(--accent);
    color: var(--card-bg);
    text-align: center;
        padding-top: 4px;
        padding-bottom: 6px;
    font-family: "Red Hat Mono", monospace;
    font-size: 0.8rem;
    cursor: pointer;
}

header:hover{
    background-color: var(--accent);
    text-decoration: underline;
}

.card {
    width: 100%;
    padding-top: 20px;
    padding-right: 30px;
    padding-bottom: 50px;
    padding-left: 30px;
    text-align: center;
    box-sizing: border-box;
}

h1 {
    margin-top: 0;
    font-size: 1.8rem;
    color: var(--accent);
}

h2 {
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 20px;
}

#welcome-username {
    color: var(--success);
    background: linear-gradient(
        to right,
        #0e7e59 20%,
        #084120 30%,
        #4a4a4a 70%,
        #080808 80%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 500% auto;
    animation: textShine 5s ease-in-out infinite alternate;
}

@keyframes textShine {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

.hidden {
    display: none !important;
}

/* Inputs */
input {
    font-family: "Klee One", cursive;
    width: 100%;
    padding: 12px;
    border: 1.7px solid var(--accent);
    border-radius: 10px;
    background-color: transparent;
    color: var(--text-main);
    font-size: 1rem;
    margin-bottom: 15px;
    box-sizing: border-box;
    font-weight: bold;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 2px 2px var(--accent);
}

/* Buttons */
button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background-color: var(--accent);
    color: var(--bg-color);
    font-family: "Red Hat Display", sans-serif;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 10px;
}

button:hover {
    background-color: var(--accent-hover);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--accent);
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--accent);
    box-shadow: 3px 3px var(--accent);
    background-color: transparent;
}

.btn-tertiary {
        width: 75%;
    background-color: transparent;
    border: 1px solid var(--accent);
    color: var(--text-muted);
    transition: all 0.2s ease;
    box-shadow: 1px 1px var(--accent);
    padding: 7px 10px;
    border-radius: 7px;
    margin-bottom: 15px;
}

.btn-tertiary:hover {
    border-color: var(--accent);
    box-shadow: 3px 3px var(--accent);
    background-color: transparent;
}

#view-leaderboard-btn{
        border: none;
    border: 1.5px solid var(--accent);
    width: 235px;
    /* border-top: 1.5px solid; */
    padding: 6px;
    border-radius: 5px;
    margin-top: 10px;
}

.back-btn {
        display: flex;
    position: absolute;
    width: 30px;
    justify-content: center;
    top: -1px;
    align-items: center;
    left: 1px;
    /* margin-top: -1px; */
    padding: 5px;
    height: 25px;
    margin-bottom: 0;
    /* margin-top: 15px; */
    border-radius: 10px;
    border-color: transparent;
    /* vertical-align: middle; */
    background: transparent;
}
.back-btn svg {
    width: 1.3rem;
    height: 1.3rem;
    vertical-align: middle;
    color: var(--bg-color);
}
#start-btn {
    width: 100px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}
#start-btn svg {
    width: 1.6rem;
    height: 1.6rem;
    margin-right: 8px;
    vertical-align: middle;
}

.toggle-link {
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.9rem;
}

/* Game Screen HUD */
.hud {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hud span strong {
    color: var(--text-main);
}

.timer-bar-container {
    width: 100%;
    height: 8px;
    background-color: var(--success);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 25px;
}

#timer-bar {
    height: 100%;
    width: 100%;
    background-color: var(--accent);
    transition: width 0.1s linear;
}

.equation {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

/* Options Layout Grid */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.option-btn {
    background-color: var(--bg-color);
    color: var(--text-main);
    border: 3px solid var(--accent);
    box-shadow: 2px 2px var(--accent);
    border-radius: 12px;
    padding: 15px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 0;
}

.option-btn:hover {
    background-color: var(--card-bg);
    box-shadow: 5px 5px var(--accent);
    border-radius: 12px;
    transform: translateY(-3px);
}

.option-btn:active {
    transform: translateY(0);
}

/* Leaderboard Screen */
.leaderboard-list {
    text-align: left;
    margin: 10px 0;
    margin-bottom: 15px;
    padding: 0;
    list-style: none;
    max-height: 334px;
    overflow-y: auto; 
    padding-right: 5px;
    padding-bottom: 10px;
}

#standalone-leaderboard-list{
    margin-bottom: -20px;
}

#gameover-leaderboard-list{
    max-height: 208px;
}

.leaderboard-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #334155;
}

.leaderboard-name-clickable {
    cursor: pointer;
    color: var(--text-main);
    transition: color 0.2s ease;
}

.leaderboard-name-clickable:hover {
    color: var(--accent);
    text-decoration: underline;
}

.leaderboard-list li:first-child .leaderboard-name-clickable {
    color: #fbbf24;
}

.leaderboard-list li:first-child .leaderboard-name-clickable:hover {
    color: #f59e0b;
}

.leaderboard-choose{
    display: flex;
    margin-top: 5px;
}

.led-c-button {
    margin-right: 5px;
    margin-left: 5px;
    padding: 4px 7px;
    box-shadow: 3px 3px var(--accent);
    margin-bottom: 0px;
}

.led-c-button:hover {
    box-shadow: 5px 5px var(--accent);
}

.led-active {
    background-color: var(--accent);
    color: var(--bg-color);
}
.led-active:hover {
    background-color: var(--accent-hover);
    box-shadow: 3px 3px var(--accent-hover);
}

/* marquee{
    margin-top: 30px; 
    display: block; 
    margin-bottom: -20px; 
    padding-top: 3px;
    padding-bottom: 3px;
    font-size: 13px; font-family: "Red Hat Display", monospace; 
    color: var(--text-muted);
    border-top: 0.5px solid var(--accent);
    border-bottom: 0.5px solid var(--accent);
} */

/* Style the modal box itself */
dialog {
  position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: none;
    border-radius: 8px;
    padding: 24px;
    /* width: 90%; */
    max-width: 500px;
    background-color: var(--card-bg);
    border-radius: 16px;
    border: 3px solid var(--accent);
    box-shadow: 5px 5px var(--accent);
    border-radius: 10px;
    /* margin: 0 auto */
    transition: all 1s ease-in-out;
}

/* Style the dark overlay behind the modal */
dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px); /* Adds a modern blur effect */
}

footer{
    background-color: var(--accent);
    color: white;
    text-align: center;
        padding-top: 4px;
    font-family: "Red Hat Mono", monospace;
    font-size: 0.8rem;
}