@import url('https://fonts.googleapis.com/css2?family=Nothing+You+Could+Do&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@100..900&display=swap');

:root {
    --bg: rgb(252, 186, 255);
    --font-title: 'Nothing You Could Do', Roboto;
    --font-body: 'Lexend Deca', Roboto;
    --font-size: 1.1rem;
    --weight: 400;
    --text: rgb(0, 0, 0);
    --link: rgb(183, 100, 187);
    --lock: rgb(85, 85, 85);
}

body {
    background: var(--bg);
    font-family: var(--font-body);
    font-weight: var(--weight);
    font-size: var(--font-size);
}

.intro img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.intro #story {
    text-align: left;
}

.intro {
    margin-bottom: 3rem;
    text-align: center;
}

.content {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    width: 900px;
}

#credit {
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.6);
    transform: translateY(-2.5rem);
    text-align: center;
}

#title {
    font-family: var(--font-title);
    font-size: 6rem;
    margin-top: 3rem;
    margin-bottom: 0;
    display: inline-block;
    text-align: center;
}

#title:link {
    color: var(--text);
    text-decoration: none;
}

#title:visited {
    color: var(--text);
    text-decoration: none;
}

#title:hover {
    color: rgb(119, 46, 122);
    text-decoration: none;
}

#title:active {
    color: rgb(67, 24, 73);
    text-decoration: none;
}

.entry {
    display: grid;
    grid-template-columns: 1fr var(--diameter) 8rem;
    align-items: stretch;
    column-gap: 1rem;
    justify-content: right;
}

.entry > .railtop, .entry > .railseg {
    justify-self: center;
}

.puzzle-entry {
    justify-self: end;
    text-align: right;
    margin-top: 3rem;
    margin-bottom: 3rem;
    margin-right: 1rem;
}

.first {
    justify-content:right;
}

.puzzlelist {
    --diameter: 160px;
    --line-width: 60px;
    width: 100%;
    margin: 0 auto;
}

.daycount {
    width: 8rem;
    font-size: 2rem;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.puzztitle {
    font-weight: bold;
    font-size: 3rem;
}

.puzzdesc {
    min-height: 1.5rem;
}

.puzztitle:link {
    color: var(--link);
    text-decoration: underline;
}

.puzztitle:visited {
    color: var(--link);
    text-decoration: underline;
}

.puzztitle:hover {
    color: rgb(119, 46, 122);
    text-decoration: underline;
}

.puzztitle:active {
    color: rgb(67, 24, 73);
    text-decoration: underline;
}

/* creating rail shapes */

.railtop {
    --thickness: 40px;
    --line-height: 60px;

    width: var(--diameter);
    height: calc(var(--diameter) + var(--line-height) - var(--thickness));
    position: relative;
}

.railbottom {
    --thickness: 40px;
    --line-height: 60px;

    width: var(--diameter);
    height: calc(var(--diameter) + var(--line-height) - var(--thickness));
    position: relative;
}

.railbottom::before {
    content: "";
    position: absolute;
    left: 0;
    top: calc(var(--line-height) - var(--thickness));
    width: var(--diameter);
    height: var(--diameter);
    border: var(--thickness) solid var(--lock);
    border-radius: 50%;
    background: transparent;
    box-sizing: border-box;
}

.railbottom::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: var(--line-width);
    height: var(--line-height);
    background: var(--lock);
}


.railtop::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: var(--diameter);
    height: var(--diameter);
    border: var(--thickness) solid var(--link);
    border-radius: 50%;
    background: transparent;
    box-sizing: border-box;
}

.railtop::after {
    content: "";
    position: absolute;
    left: 50%;
    top: calc(var(--diameter) - var(--thickness));
    transform: translateX(-50%);
    width: var(--line-width);
    height: var(--line-height);
    background: var(--link);
}

.railseg {
    --hole: 20px;
    align-self: stretch;
    min-height: 1px;
    width: var(--line-width);
    background: radial-gradient(circle at 50% 50%, transparent var(--hole), var(--link) calc(var(--hole) + 1px));
}

.railtop, .railseg, .railbottom {
    justify-self: center;
}

.first .daycount {
    transform: translateY(-10px);
}

.locked .puzzle-entry {
    color: var(--lock);
}

.locked .railseg {
    background: radial-gradient(circle at 50% 50%, transparent var(--hole), var(--lock) calc(var(--hole) + 1px));
}

.locked .puzztitle {
    margin: 0;
    transform: translateY(1.7rem);
}

.locked .puzztitle:link {
    color: var(--lock);
    text-decoration: none;
}

.locked .puzztitle:visited {
    color: var(--lock);
    text-decoration: none;
}

.locked .puzztitle:hover {
    color: var(--lock);
    text-decoration: none;
}

.locked .puzztitle:active {
    color: var(--lock);
    text-decoration: none;
}

.meta .daycount {
    transform: translateY(10px);
}

.footer {
    min-height: 6rem;
}

.puzzhead {
    margin-top: 3rem;
    text-align: center;
    justify-content: center;
}

#ptitle {
    font-weight: bold;
    font-size: 3rem;
    color: var(--link);
    margin: 1rem;
}

.line {
    margin-bottom: 3rem;
}

#submissiontext {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--font-body);
    font-size: 1.3rem;
    background: transparent;

}

.submission {
    margin: 0 auto;
    display: flex;
    align-items: center;
    border: 0.25rem solid var(--link);
    border-radius: 40px;
    padding-left: 1.2rem;
    height: 40px;
    width: 700px;
    background: rgba(255, 255, 255, 0.4);
}

.submission.input-focused {
    border-color: rgb(119, 46, 122);
    background: rgba(255, 255, 255, 0.6);
}

#submissionbutton {
    height: 100%;
    width: 40px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.2rem;
    cursor: pointer;
    border: none;
    outline: none;
}

.arrow {
    --t: 45%; /* control the tail part */
    --h: 40%; /* control the head part */

    aspect-ratio: 3/2;
    width: 30px;
    background: rgb(67, 24, 73);
    clip-path: polygon(0 calc(50% - var(--t)/2),calc(100% - var(--h)) 
    calc(50% - var(--t)/2),calc(100% - var(--h)) 0,100% 50%,calc(100% - var(--h)) 100%,
    calc(100% - var(--h)) calc(50% + var(--t)/2),0 calc(50% + var(--t)/2));
}

#submissionResult {
    margin-top: 1rem;
}

#hints:link {
    color: var(--link);
}

#hints:visited {
    color: var(--link);
}

#hints:hover {
    color: rgb(119, 46, 122);
}

#hints:active {
    color: rgb(67, 24, 73);
}

#notyet {
    text-decoration: underline dotted;
    cursor: help;
    color: rgba(0, 0, 0, 0.6);
}

.hintlist li {
    margin-bottom: 2rem;
}

.hint {
    display: inline;
    padding: 0.15em 0.6em;
    border-radius: 0px;
    cursor: pointer;
    user-select: none;

    color: transparent;
    background: rgba(67, 24, 73, 1);
    filter: blur(0.6px);
    opacity: 1;

    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;

    transition: opacity 0.1s ease, background 0.1s ease, filter 0.1s ease, color 0.1s ease;
}

.hint.revealed {
    color: inherit;
    background: transparent;
    filter: none;
    opacity: 1;
}