:root { --primary: #c5ff27; --black: #231F20; --white: white; --gutter-sm: .5rem; --gutter-md: 1rem; --gutter-lg: 3rem; --font-size-base: 1rem; } @font-face { font-family: "WonderType"; src: local("WonderType"), url("WonderType-Regular.otf") format("opentype"), url("trickster-outline.woff") format("woff"); } html, body { width: 100%; height: 100%; margin: 0 0; padding: 0 0; } canvas { position: fixed; width: 100%; height: 100%; pointer-events: none; } * { box-sizing: border-box; } body { background-color: var(--primary); font-family: "WonderType"; } .container { max-width: 900px; margin: 0 auto; padding: var(--gutter-md); text-align: center; display: flex; flex-direction: column; height: 100%; justify-content: space-between; align-items: center; } audio { display: none; } a { color: var(--black); } button, .button, input::file-selector-button, input[type="submit"] { width: 100%; display: inline-flex; align-items: center; justify-content: center; text-transform: uppercase; background-color: var(--black); border: none; padding: var(--gutter-sm) var(--gutter-md); color: var(--white); font-weight: bolder; font-size: var(--font-size-base); transition: .2s all ease-in-out; font-family: "WonderType"; cursor: pointer; } input::file-selector-button { width: auto; } input[type="submit"] { margin-top: var(--gutter-lg); } .button--record { border-radius: 100%; max-width: 500px; max-height: 500px; aspect-ratio: 1 / 1; width: calc(100% - var(--gutter-lg) - var(--gutter-lg)); position: relative; background-color: transparent; } .button--record:after { content: "record"; } @keyframes recording { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .button--record:before { content: ''; width: 100%; height: 100%; position: absolute; top: 0; left: 0; background-color: var(--black); border-radius: 100%; z-index: -1; transform: scale(1); transition: transform .1s linear; } .button--record[state="recording"]:before, .button--record[state="uploading"]:before { transform: scale(0); } .button--record[state="recording"], .button--record[state="uploading"] { color: var(--black); animation-delay: 1s; border: none; border: 1rem dotted var(--black); background-color: transparent; border-right-color: transparent; border-left-color: transparent; animation: 8s linear recording infinite; } .button--record[state="recording"] { border-style: dashed; animation-duration: 2s; } .button--record[state="recording"]:after, .button--record[state="finished"]:after, .button--record[state="uploading"]:after { animation: 2s linear recording infinite; content: "...recording.."; animation-direction: reverse; } .button--record[state="uploading"]:after { animation-duration: 8s; content: "...uploading.."; } .button--record[state="finished"]:after { animation-duration: 8s; content: "File is uploaded"; } .button--icon { background: transparent; } dialog { width: auto; max-width: 400px; flex-direction: column; } dialog::backdrop { background-image: linear-gradient(45deg, magenta, rebeccapurple, dodgerblue, green); opacity: 0.75; } .dialog__close { align-self: flex-end; position: relative; } .dialog__close button { position: absolute; z-index: 99; top: 0; right: 0; display: block; width: auto; padding: 0 0; } dialog h3 { margin: 0 0; } label { margin: var(--gutter-sm) 0; display: block; } dialog[open] { display: flex; }