@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@100..900&display=swap");

/* VARS */
:root {
    --eerie-black: rgb(33, 34, 36);

    --eerie-black-mild: rgb(30, 30, 30);

    --eerie-black-light: rgb(44, 45, 48);

    --eerie-black-dark: rgb(22, 23, 24);

    --pure-black: rgb(17, 17, 17);

    --quick-silver: rgb(161, 161, 161);

    --main-shadow: 0px 5px var(--pure-black);

    --accent-color: rgb(133, 76, 224);

    --secondary-accent-color: #a7e04c;

    --input-color: rgb(27, 27, 27);

    --medium-size-font: 20px;

    --main-text-color: rgb(223, 223, 223);

    --secondary-text-color: rgb(185, 185, 185);

    --tertiary-text-color: rgb(139, 139, 139);

    --border-color: rgb(50, 50, 50);

    --bg-dark: hsl(210, 7%, 6%);

    --bg-dark-2: hsl(240, 4%, 5%);

    --glass-gradient: linear-gradient(180deg,
            rgba(255, 255, 255, 0.02),
            rgba(255, 255, 255, 0.01));

    --border: 1px solid rgba(255, 255, 255, 0.03);

    --hover: hsl(0, 0%, 10%);
}

body.light-mode {
    --eerie-black: hsl(0 0% 98% / 1);

    --eerie-black-mild: hsl(350, 0%, 93%);

    --eerie-black-light: rgba(228, 228, 228, 0.247);

    --eerie-black-dark: hsl(0 0% 95% / 1);

    --pure-black: hsl(0, 0%, 72%);

    --quick-silver: #a1a1a1ff;

    --main-shadow: 0px 5px var(--pure-black);

    --accent-color: rgb(133, 76, 224);

    --input-color: hsl(0, 0%, 89%);

    --medium-size-font: 20px;

    --main-text-color: rgb(123 121 121);

    --secondary-text-color: rgb(156, 154, 154);

    --tertiary-text-color: rgb(185, 184, 184);

    --border-color: rgb(255, 255, 255);

    --bg-dark: hsl(210, 7%, 94%);

    --bg-dark-2: hsl(240, 4%, 95%);

    --glass-gradient: linear-gradient(180deg,
            hsla(0, 0%, 100%, 99.98),
            hsla(0, 0%, 100%, 99.99));

    --border: 1px solid rgba(255, 255, 255, 0.03);

    --hover: hsl(0, 0%, 90%);
}

/* RESET */
html {
    box-sizing: border-box;
    font-size: 16px;
}

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

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ol,
ul {
    margin: 0;
    padding: 0;
    font-weight: normal;
}

ol,
ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

form {
    all: unset;
    display: contents;
}

.material-symbols-rounded,
.material-symbols-outlined {
    visibility: hidden;
    position: relative;
}

.icons-ready .material-symbols-rounded,
.icons-ready .material-symbols-outlined {
    visibility: visible;
}

.icons-ready .material-symbols-rounded::before,
.icons-ready .material-symbols-outlined::before {
    content: none;
}

/* MAIN */
html,
body {
    height: 100%;
}

body {
    background-color: var(--eerie-black-dark);
    font-family: "Roboto", sans-serif;
    font-weight: 300;
    color: var(--main-text-color);
    overscroll-behavior: contain;
    overscroll-behavior-y: contain;
    display: flex;
    flex-direction: column;
}

main {
    padding-top: 20px;
}

footer {
    /* position: absolute; */
    /* bottom: 2px; */
    /* left: 50%; */
    /* transform: translate(-50%); */
    text-align: center;
    margin-top: auto;
    margin-bottom: 10px;
}

footer.browse {
    /*border: dotted red;*/
}

footer a {
    padding: 5px;
    border-radius: 10px;
}

footer a:hover {
    background-color: rgba(80, 80, 80, 0.2);
}

::selection {
    color: rgb(253, 253, 115);
    background: var(--accent-color);
}

.hidden {
    display: none !important;
}

/* NAVBAR */
ul.header {
    display: flex;
    position: relative;
    align-items: center;
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: var(--eerie-black);
    box-shadow: 0 4px var(--pure-black);
    z-index: 1;
}

ul.header li a {
    display: block;
    text-align: center;
    padding: 18px 16px;
    text-decoration: none;
    font-size: 22px;
    color: var(--main-text-color);
    position: relative;
    user-select: none;
    -webkit-user-drag: none;
}

ul.header li a:hover {
    background-color: var(--eerie-black-mild);
    transition: background-color 0.4s;
}

ul.header a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background-color: rgb(149, 104, 221);
}

ul.header .right {
    margin-left: auto;
    margin-right: 10px;
    display: flex;
    align-items: center;
    gap: 20px;
}

ul.header .right img {
    height: 40px;
    width: 40px;
}

/* NAVBAR END */

/* TEXT */

/* ----------- */

/* CONTAINERS */
.daddy-container {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.box-container {
    display: inline-flex;
    flex-direction: column;
    margin-left: 20px;
    margin-right: 20px;
}

.box-container-center {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 90vh;
}

.box-container-center:has(#feedback) {
    height: 88vh;
}

.box {
    background-color: var(--eerie-black);
    width: 300px;
    height: 130px;
    border-radius: 10px;
    display: flex;
    position: relative;

    align-items: center;
    font-size: 28px;
    padding-left: 30px;
    margin-bottom: 18px;
    box-shadow: var(--main-shadow);
}

.box.x-card {
    width: 340px;
    height: 75px;
    padding-left: 25px;
    font-size: var(--medium-size-font);
}

.box#huge-card {
    width: 600px;
    height: 261px;
}

.box#fullscreen-card {
    width: 80%;
    height: 90%;
}

.box.x-card img {
    margin-right: 15px;
}

#kakure-no-hako {
    /* background-color: rgba(255, 0, 0, 0.438); */
    width: 100px;
    height: 100px;
    display: block;
    position: absolute;
    bottom: 0;
    right: 0;
    overflow: hidden;
}

#kakure-no-hako:hover {
    box-shadow: -1px -1px 50px #2e2e2e;
    border-radius: 50px;
    transition: all 0.3s;
}

/* --------------------------- */

/* BROWSE */
main.browse {
    display: flex;
    justify-content: center;
    padding: 20px 30px 0 30px;


    /*margin-bottom: 250px;*/
    /*margin-left: 50px;
    margin-right: 50px;*/
    /*flex: 0.99;*/
}

main.browse .projects {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    /*justify-content: center;*/
    gap: 30px;
    max-width: 1800px;
    /*border: dotted red 2px;*/
}

main.browse .box {
    width: 330px;
    height: auto;
    align-items: flex-start;
    padding-left: 0;
    margin-bottom: 0;
    flex-direction: column;
    transition: all 0.4s;
}

main.browse .box:hover {
    box-shadow: 0px 20px 20px var(--pure-black);
}

main.browse .box h4 {
    padding-top: 10px;
    padding-left: 20px;
    font-size: 25px;
}

main.browse .box p {
    font-size: 17px;
    padding-left: 20px;
    padding-bottom: 10px;
}

main.browse a {
    text-decoration: none;
    color: inherit;
}

footer a.nostyle {
    text-decoration: none;
}

main.browse img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
    filter: brightness(0.92);
    -webkit-user-drag: none;
}

#feedback-link {
    /*position: absolute;*/
    margin: 0 auto;
    width: fit-content;
    background-color: rgba(80, 80, 80, 0.2);
    border-radius: 15px;
    padding: 10px;
    /*margin-bottom: 50px;*/
    /*left: 50%;*/
    /*transform: translateX(-50%);*/
    /*bottom: 50px;*/
    cursor: pointer;
    margin-bottom: 15px;
}

a:has(#feedback-link) {
    all: unset;
}

#feedback-link:hover {
    background-color: rgba(80, 80, 80, 0.1);
}

/* --------------------------- */

/* WATCH */
main.watch {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-dark);
    color: var(--main-text-color);
    height: 100%;
    overflow: auto;
}

body:has(main.watch) ul.header {
    background: var(--glass-gradient);
}

body:has(main.watch) {
    /* background: var(--glass-gradient); */
}

main.watch .top-container {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    gap: 2rem;
}

.video-container {
    position: relative;
    display: flex;
    /* flex: 0 0 50%; */
    overflow: hidden;
    border-radius: 10px;
    flex: 0.9;
    aspect-ratio: 16 / 9;
    background: black;
    container-type: inline-size;
    /* box-shadow: 0 8px 30px rgba(0,0,0,0.6); */
    /* box-shadow:  0 0 17px rgb(0, 0, 0, 25); */
}

body.light-mode .video-container {
    background: var(--bg-dark);
}

.video-container video {
    border-radius: 14px;
    display: block;
    width: 100%;
    height: auto;
}

.video-container .controls {
    position: absolute;
    /* left: 0; */
    /* right: 0; */
    bottom: 0;
    display: flex;
    /* align-items: center; */
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    width: 100%;
    height: 4rem;
    opacity: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.6) 0%,
            rgba(0, 0, 0, 0.2) 50%,
            rgba(0, 0, 0, 0) 100%);
    transition: opacity 0.3s ease;
}

.video-container:hover .controls,
.video-container.show-controls .controls {
    opacity: 1;
}

main.watch button,
.video-container button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background-color: transparent;
    transition: ease-in 0.2s;
    box-shadow: none;
    /* border: red solid 1px; */
}

main.watch button:hover,
main.clips .video-container button:hover {
    color: white;
    transition: ease-in 0.2s;
}

.volume-control {
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: width 0.2s ease;
    width: 32px;
}

.volume-control:hover {
    width: 110px;
}

.volume-control input.volume {
    width: 75px;
}

.volume-control .volume {
    -webkit-appearance: none;
    appearance: none;
    height: 20px;
    background: transparent;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.volume-control .volume::-webkit-slider-runnable-track {
    height: 4px;
    background: linear-gradient(to right,
            var(--main-text-color) var(--value, 100%),
            hsla(225, 0%, 30%, 0.6) var(--value, 50%));
    /* background: var(--accent-color); */
    /* background: #d4d4d4; */
    border-radius: 2px;
}

.volume-control .volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 12px;
    width: 12px;
    background: #e1e1e1;
    border-radius: 50%;
    border: none;
    margin-top: -4px;
    transition: transform 0.2s ease;
}

.volume-control .volume::-moz-range-thumb {
    /* this block has to be duplicated else it won't work lmao */
    appearance: none;
    height: 12px;
    width: 12px;
    background: #e1e1e1;
    border-radius: 50%;
    border: none;
    margin-top: -4px;
    transition: transform 0.2s ease;
}

.volume-control .volume::-moz-range-track {
    height: 4px;
    background: #838282;
    border-radius: 2px;
}

.volume-control .volume::-moz-range-progress {
    height: 4px;
    background: #ccc;
    border-radius: 2px;
}

.video-container #play span {
    font-size: 28px;
    margin-top: -1px;
}

.video-container #time {
    padding-inline: 0.5rem;
}

body.light-mode .video-container #time {
    color: white;
}

.video-container #settings {
    margin-left: auto;
    transition: transform 0.2s ease-out;
}

.video-container #settings.spin {
    transform: rotate(120deg);
}

@keyframes half-spin {
    to {
        transform: rotate(120deg);
    }
}

.video-container .control-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    /* padding-top: .3rem; */
    gap: 3px;
    padding-bottom: 0.3rem;
    padding-inline: 0.3rem;
    user-select: none;
}

.video-container .controls .progress {
    cursor: pointer;
    height: 20%;
    display: flex;
    justify-items: center;
    align-items: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.video-container .controls progress {
    display: block;
    width: 100%;
    height: 0.25em;
    border: none;
    margin: 0;
}

.video-container .controls .progress:hover progress {
    height: 0.4rem;
}

@-moz-document url-prefix() {

    /* firefox progress-bar */
    progress {
        background-color: rgb(44, 45, 48);
        border-radius: 4px;
    }
}

.video-container .controls progress::-webkit-progress-bar {
    background-color: rgb(44, 45, 48);
    border-radius: 4px;
}

.controls progress::-webkit-progress-value {
    /* background-color: var(--accent-color); */
    background: linear-gradient(to right,
            var(--accent-color),
            rgb(216, 76, 224));
    border-radius: 4px;
}

.controls progress::-moz-progress-bar {
    background: linear-gradient(to right,
            var(--accent-color),
            rgb(216, 76, 224));
    border-radius: 4px;
}

.video-container .hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(0);
}

.video-container .collapsed {
    display: none !important;
}

.settings-modal {
    position: absolute;
    bottom: 2.5rem;
    right: 0.5rem;
    transform: translateY(-8px);
    /* width: clamp(200px, 40vw, 300px); */
    /* height: 100px; */
    background: hsla(0, 0%, 15%, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 10px 12px;
    z-index: 20;
    transition:
        opacity 0.15s ease,
        transform 0.15s ease;
}

body.light-mode .settings-modal {
    color: white;
}

.settings-modal:first-child {
    margin-bottom: 0;
}

.settings-modal:last-child {
    margin-bottom: 0;
}

main.watch .menu {
    display: flex;
    flex-direction: column;
    user-select: none;
}

main.watch .menu p {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 8rem;
    height: 2rem;
    padding: 4px 8px;
    margin: 4px 0;
    border-radius: 9px;
    transition: background 0.2s;
}

main.watch .menu p:hover {
    background: hsla(0, 0%, 30%, 0.2);
}

main.watch .menu p.active {
    color: var(--accent-color);
}

.settings-modal .back span {
    font-size: 16px;
}

.settings-modal .menu-item span {
    font-size: 18px;
    margin-right: 5px;
}

.menu-item:hover::after {
    background: rgba(0, 0, 0, 0.2);
}

.subtitle-overlay {
    -webkit-font-smoothing: antialiased;
    position: absolute;
    bottom: 5cqh;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-family: Roboto, Helvetica, Arial, sans-serif;
    font-weight: 700;
    text-shadow:
        0 0 3px #000000,
        0 0 3px #000000,
        0 0 3px #000000,
        0 0 3px #000000;
    font-size: 2.5cqw;
    line-height: 1.4;
    text-align: center;
    width: 90%;
    pointer-events: auto;
    user-select: text;
    cursor: text;
    z-index: 5;
}

:fullscreen .subtitle-overlay {
    font-size: 36px;
}

.video-container .video-container.loading::after {
    content: "";
    top: 50%;
    left: 50%;
    position: absolute;
    width: 8%;
    transform: translate(-50%, -50%);
    aspect-ratio: 1;
    border: 4px solid rgba(255, 255, 255, 0);
    border-top-color: hsl(0, 0%, 100%);
    border-left-color: hsl(0, 0%, 100%);
    border-radius: 50%;
    display: block;
    animation: spin-center 0.8s linear infinite;
}

@keyframes spin-center {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

main.watch .under-section {
    display: flex;
    width: 50%;
    margin-top: 10px;
    user-select: none;
}

main.watch #viewers {
    margin-left: auto;
    font-size: 15px;
    color: #818181;
}

main.watch #viewers::after {
    content: " viewers";
}

main.watch .episode-select,
main.watch .chat {
    display: flex;
    background: var(--glass-gradient);
    backdrop-filter: blur(6px);
    width: 20%;
    max-width: 400px;
    border-radius: 14px;
    box-shadow:
        0 1px 2px #00000030,
        0 2px 4px #00000015;
    /* box-shadow: 0 8px 30px rgba(0,0,0,0.6); */
    /* padding: 10px 12px; */
    border: var(--border);
    transition:
        width 0.4s,
        height 0.3s;
}

main.watch .chat {
    display: flex;
    flex-direction: column;
}

main.watch .chat>.header,
main.watch .menu>.header {
    padding: 6px 14px;
    border-bottom: var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

main.watch .chat>.header .title,
main.watch .episode-select .header .title {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.2px;
}

main.watch .messages {
    /* border: 1px dotted yellow; */
    width: 100%;
    flex: 1;
    /* height: 82%; */
    padding: 16px;
    overflow-y: scroll;
}

main.watch .bottom {
    margin-top: auto;
    position: relative;
    padding: 14px;
    border-top: var(--border);
}

main.watch .chat textarea {
    width: 100%;
    height: 45px;
    max-height: 100px;
    border-radius: 12px;
    padding: 12px;
    font-family: "Roboto", sans-serif;
    font-size: 0.9rem;
    box-shadow:
        0 1px 2px #00000030,
        /* inset 0 1px 2px #ffffff14 */
        0 2px 4px #00000015;

    border-radius: 12px;
    background: var(--bg-dark-2);
}

main.watch .chat .message {
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 6px;
    border-radius: 10px;
    animation: fadeIn 0.2s ease;
    /* transition: background .1s; */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

main.watch .chat .message:hover {
    background: hsla(0, 0%, 30%, 0.05);
}

main.watch .chat .avatar {
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    user-select: none;
}

/* main.watch .chat .avatar { */
main.watch .chat .header {
    font-weight: bold;
    font-size: 0.9rem;
}

main.watch .chat .timestamp {
    font-size: 0.7rem;
    color: #aaa;
    margin-left: 6px;
    font-weight: 500;
}

main.watch .chat .text {
    margin: 2px 0 0 0;
    font-size: 0.9rem;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.5rem;
}

main.watch .chat .typing-indicator {
    color: #8a8a8a;
    font-size: 0.8rem;
    margin-left: 10px;
    margin-bottom: 4px;
}

main.watch .chat .separator {
    width: 100%;
    height: 20px;
    position: absolute;
    z-index: 100;
    top: -20px;
    left: 0;
}

main.watch .chat .separator:has(.typing-indicator.typing) {
    background: linear-gradient(to top, var(--bg-dark), hsla(210, 7%, 6%, 0));
}

main.watch .chat .delete-btn {
    position: absolute;
    top: 1px;
    right: 1px;
    /* transform: translateY(-50%); */
    border: var(--border);
    color: #aaa;
    font-weight: bold;
    font-size: 20px;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    /* line-height: 22px; */
    cursor: pointer;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s ease;
}

main.watch .chat .delete-btn:hover {
    background: hsl(0, 0%, 15%);
}

body.light-mode main.watch .chat .delete-btn:hover {
    background: hsl(0, 0%, 85%);
}

main.watch .chat .message:hover .delete-btn {
    visibility: visible;
}

main.watch .episode-select .header span.material-symbols-rounded:hover,
main.watch .chat .header span.material-symbols-rounded:hover {
    cursor: pointer;
}

main.watch .button {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 8px;
}

main.watch .button:hover {
    background: var(--hover);
}

main.watch .episode-select .dock-button {
    display: flex;
    justify-content: center;
    user-select: none;
}

main.watch .episode-select .dock-button:hover {
    /* background: hsla(0, 0%, 30%, 0.1); */
    cursor: pointer;
}

#dock-button-outer {
    position: relative;
    /* right: auto; */
    /* left: 0; */
    /* top: 15px; */
    display: none;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--glass-gradient);
    border-radius: 14px;
    border: var(--border);
}

#dock-button-outer:hover {
    background: hsl(0, 0%, 10%);
    cursor: pointer;
}

main.watch .episode-select .episodes {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px;
    gap: 14px;
}

main.watch .episode-select .episode {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    border-radius: 12px;
    transition:
        background 0.05s,
        box-shadow 0.12s;
}

main.watch .episode-select .episode.active {
    color: white;
    background: linear-gradient(90deg, var(--accent-color), #b07bfb);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.12);
}

main.watch .episode-select .episode:not(.active):hover {
    /* transform: translateY(-3px); */
    background: hsla(0, 0%, 30%, 0.05);
}

.episode-select .episode::before {
    content: attr(data-episode);
    min-width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #161618;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 15px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

body.light-mode .episode-select .episode::before {
    background: hsl(240, 4%, 95%);
}

.episode-select .episode.active::before {
    background: hsl(263, 70%, 63%);
}

body.light-mode .episode.active::before {
    background: hsl(263, 70%, 63%);
}

main.watch .episode-select .episode span {
    margin-left: auto;
    min-width: 36px;
    height: 36px;
    font-size: 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

main.watch .episode-select .bottom {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 12px;
}

main.watch .episode-select .bottom span {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.light-mode main.watch .episode-select .bottom span {
    background: rgba(221, 221, 221, 0.397);
}

main.watch .episode-select .animelist {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 16px;
    overflow-y: auto;
    max-height: 500px;
}

main.watch .episode-select .animelist .anime {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    color: rgb(240, 240, 240);
    background: #111;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    flex-shrink: 0;
}

main.watch .episode-select .animelist .anime img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: auto;
    object-fit: cover;
}

main.watch .episode-select .animelist .anime span {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    z-index: 2;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
    padding: 4px 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

main.watch .episode-select .animelist .anime::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    pointer-events: none;
    z-index: 1;
    backface-visibility: hidden;
    transform: translateZ(0);
}

main.watch .episode-select .animelist .anime:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* CLIPS */
main.clips {
    flex: 1;
    font-family: "Noto Sans", sans-serif;
    position: relative;
}

main.clips_gallery {
    width: min(1200px, 100%);
    margin-inline: auto;
    padding-inline: 1rem;
    display: flex;
    align-items: flex-start;
}

main.clips .top-container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 90%;
    gap: 2rem;
}

main.clips .card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background-color: var(--eerie-black-mild);
    transition: transform .3s ease, box-shadow .3s ease;
}

main.clips .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

main.clips .thumbnail {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    height: 150px;
    background-color: black;
    text-align: center;
}

main.clips .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

main.clips .card-bottom {
    padding: 1rem;
}

main.clips .add {
    position: absolute;
    bottom: 5%;
    left: 50%;
}

main.clips .add span {
    font-size: 36px;
    width: auto;
    height: auto;
    text-shadow: 2px 0px 2px black;
}


/* KANBAN */
main.kanban {
    display: flex;
    flex: 1;
    gap: 1rem;
    justify-content: center;
    align-items: flex-start;
    font-family: "Noto Sans", sans-serif;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem;
}

main.kanban .board {
    display: flex;
    flex-direction: column;
    background: var(--eerie-black);
    border-radius: 10px;
    width: 270px;
    max-height: 100%;
    padding: 10px;
    box-shadow: 0 1px 2px #00000030,
        0 2px 4px #00000015;
    border: 1px solid var(--border-color);
    overflow-y: auto;
    user-select: none;
    -webkit-user-select: none;
}

main.kanban .board .header {
    display: flex;
    width: 100%;
    align-items: center;
    padding: 0 5px;
    margin-bottom: 1rem;
}

main.kanban .board .header .title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

main.kanban .board .header :last-child {
    margin-left: auto;
    cursor: pointer;
}

main.kanban .board .content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

main.kanban .board .content .card {
    font-size: 0.9em;
    width: 100%;
    background: var(--eerie-black-light);
    padding: 0.7em;
    border-radius: 10px;
    word-break: break-all;
    line-height: 1.5;
    box-shadow: 0 1px 2px #00000030,
        0 2px 4px #00000015;
    cursor: pointer;
    touch-action: none;
    position: relative;
    box-sizing: border-box;
}

main.kanban .board [contenteditable="true"] {
    outline: none;
}

main.kanban .board .header .menu-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.add {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
}

.add span:hover {
    background: rgba(255, 255, 255, 0.1);
}

.add span {
    cursor: pointer;
    background: var(--eerie-black-light);
    border-radius: 25px;
    width: 1.8rem;
    height: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0px 2px #00000030,
        0 0px 4px #00000015;
}

main.kanban .board input {
    all: unset;
    font: inherit;
    padding: 0;
    margin: 0;
    width: 85%;
    background: inherit;
    box-shadow: none;
}

main.kanban .board .content input.edit {
    width: 92%;
}

main.kanban .board .card.dragging {
    opacity: 0.7;
}

main.kanban .board .card.placeholder {
    opacity: 0.7;
    outline: 2px dashed #aaa;
}

main.kanban .trashcan {
    position: fixed;
    bottom: -100px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: var(--eerie-black-light, #222);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: bottom 0.4s ease,
        transform 0.2s ease,
        background 0.2s;
    z-index: 1000;
}

main.kanban .trashcan span {
    font-size: 32px;
    color: #ccc;
    transition: color 0.2s;
}

main.kanban .trashcan.visible {
    bottom: 20px;
}

main.kanban .trashcan.expanded {
    transform: scale(1.3);
    background: #c0392b;
}

main.kanban .trashcan.expanded span {
    color: white;
}

main.kanban .trashcan * {
    pointer-events: none;
}

main.kanban .board-menu {
    position: fixed;
    background: var(--eerie-black);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeInMenu 0.15s ease-out;
    font-size: 14px;
    z-index: 2000;
}

main.kanban .board-menu .menu-item {
    display: flex;
    align-items: center;
    gap: 0.6em;
    padding: 0.5em 0.7em;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

main.kanban .board-menu .menu-item span {
    font-size: 20px;
}

main.kanban .board-menu .menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

@keyframes fadeInMenu {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* WHISPER */
main.whisper {
    display: flex;
    flex: 1;
    gap: 2rem;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    font-family: "Noto Sans", sans-serif;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem;
}

body.light-mode main.whisper {
    background: hsl(270, 10%, 91%);
}

main.whisper .screen {
    display: block;
    position: relative;
    white-space: normal;
    word-wrap: break-word;
    height: 50%;
    width: 50%;
    background-color: var(--secondary-accent-color);
    border-radius: 10px;
    padding: 1rem;
    overflow-y: hidden;
}

main.whisper .graffiti-text {
    display: inline;
    font-weight: bold;
    color: white;
    /* padding: 0 5px; */
    /* font-size: 3rem; */
    /* white-space: pre-wrap; */
}

body.light-mode main.whisper .graffiti-text {
    font-family: "Noto Sans", sans-serif;
    color: white;
    text-shadow: 1px 1px 0px rgb(133, 76, 224),
        2px 2px 0px rgb(117, 67, 199),
        3px 3px 0px rgb(108, 62, 184);
}

main.whisper .graffiti-text:not(:first-child) {
    margin-left: 10px;
}

main.whisper .graffiti-text.active {
    background-color: hsla(0, 0%, 5%, 0.1);
    border-radius: 6px;
}

main.whisper .controls {
    display: flex;
    gap: 1rem;
    flex-direction: column;
    align-items: center;
    user-select: none;
}

main.whisper .controls button {
    border-radius: 50%;
    width: 45px;
    height: 45px;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

main.whisper .controls button:disabled {
    background-color: rgba(133, 76, 224, 0.731);
}

main.whisper .controls button.control {
    background-color: transparent;
    color: var(--main-text-color);
}

main.whisper .controls button.control:hover {
    background-color: hsla(0, 0%, 30%, 0.2);
}

main.whisper .controls .upper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

main.whisper .controls #speed {
    background-color: hsl(0, 0%, 13%);
    color: hsl(0, 0%, 50%);
    font-weight: 500;
    width: 40px;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

body.light-mode main.whisper .controls #speed {
    background-color: hsl(0, 0%, 87%);
}

main.whisper .controls #speed:hover {
    background-color: #222222a7;
}

main.whisper .controls #noop {
    width: 40px;
}

main.whisper .controls #mute {
    background-color: transparent;
    color: var(--main-text-color);
}

/* main.whisper .progress-container {
    position: relative;
    width: 300px;
    height: 10px;
    background-color: #222;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
}
main.whisper .progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background-color: #A7E04C;
    border-radius: 4px 0 0 4px;
    transition: width 0.1s linear;
} */
main.whisper #progress-canvas {
    cursor: pointer;
}

main.whisper .volume-control {
    position: relative;
    width: 45px;
    overflow: visible;
}

main.whisper .volume-control:hover {
    width: auto;
}

main.whisper .volume-control input.volume {
    position: absolute;
    left: 42px;
    top: 50%;
    transform: translateY(-52%);
    width: 0;
    opacity: 0;
    transition: width 0.2s ease,
        opacity 0.2s ease;
}

main.whisper .volume-control:hover input.volume {
    width: 75px;
    height: 70px;
    opacity: 1;
}

main.whisper .volume-control .volume::-webkit-slider-runnable-track {
    background: linear-gradient(to right,
            var(--secondary-accent-color) var(--value, 100%),
            hsl(0, 0%, 13%) var(--value, 50%));
}

main.whisper .volume-control .volume::-webkit-slider-thumb {
    background: var(--secondary-accent-color);
}

main.whisper .volume-control .volume::-moz-range-thumb {
    background: var(--secondary-accent-color);
}

main.whisper .volume-control .volume::-moz-range-progress {
    background: var(--secondary-accent-color);
}

main.whisper .tooltiptext {
    position: absolute;
    left: -250px;
    top: -10px;
    box-shadow: 0 3px 0 #131313;
    font-size: 16px;
    width: auto;
    padding: 10px;
    border-radius: 6px;
}

main.whisper .tooltiptext::after,
main.whisper .tooltiptext::before {
    left: 100%;
    border-color: transparent transparent transparent var(--eerie-black);
}

.upload {
    position: fixed;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--eerie-black-mild);
    padding: 20px;
    border-radius: 10px;
    min-width: 300px;
    box-shadow: 0 0px 20px hsla(229, 0%, 5%, 0.45);
    border: 1px solid hsla(0, 0%, 100%, 0.04);
    z-index: 100;
}

.upload .drop {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border: 1px solid var(--eerie-black-light);
    border-radius: 10px;
    height: 100px;
    user-select: none;
}

.upload .drop.dragover {
    background: var(--eerie-black-light);
    opacity: 0.05;
}

.upload .drop span {
    font-size: 50px;
}

.upload .drop p {
    opacity: 0.6;
}

.upload .buttons {
    display: flex;
    width: 100%;
    gap: 0.5rem;
}

.upload button {
    flex: 1;
}

main.whisper select span.notice {
    font-size: 8px;
    font-weight: bold;
    color: var(--tertiary-text-color);
}

main:has(.upload) .blur-overlay {
    position: absolute;
    height: 92%;
    width: 100%;
    top: 61px;
    /*border: 3px dotted yellow;*/
    backdrop-filter: blur(4px);
    z-index: 1;
}

.loader {
    position: absolute;
    bottom: 1rem;
    right: 2rem;
    width: 25px;
    aspect-ratio: 0.75;
    --c: no-repeat linear-gradient(#a7e04c 0 0);
    --g: no-repeat radial-gradient(circle closest-side, white 98%, transparent 100%);
    background: var(--c) 0% 50%,
        var(--c) 50% 50%,
        var(--c) 100% 50%;
    background-size: 20% 50%;
    animation: l6 1s infinite linear;
}

@keyframes l6 {
    20% {
        background-position: 0% 0%,
            50% 50%,
            100% 50%;
    }

    40% {
        background-position: 0% 100%,
            50% 0%,
            100% 50%;
    }

    60% {
        background-position: 0% 50%,
            50% 100%,
            100% 0%;
    }

    80% {
        background-position: 0% 50%,
            50% 50%,
            100% 100%;
    }
}

/* LLMCHAT */
main.llmchat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    overflow: auto;
}

main.llmchat .messages-container {
    display: flex;
    /* flex: 1; */
    flex-direction: column;
    width: 50%;
    padding: 1.5vh;
    gap: 1.5em;
    overflow-y: auto;
    /* border: 1px dotted yellow; */
    transition: all 0.4s ease;
}

main.llmchat article {
    background-color: var(--eerie-black);
    max-width: 75%;
    border-radius: 20px;
    word-break: break-word;
    padding: 1.2rem 1.5rem;
    box-shadow: 0 0 2px var(--pure-black);
    white-space: pre-wrap;
    animation: fadeIn 0.2s;
}

body.light-mode main.llmchat article {
    box-shadow: 0 0 1px var(--pure-black);
}

main.llmchat article.assistant {
    box-shadow: 0 0 2px rgba(29, 29, 29, 0.849) !important;
}

main.llmchat article.mine {
    align-self: flex-end;
}

main.llmchat article.assistant {
    align-self: flex-start;
    background-color: var(--accent-color);
    color: rgb(236, 236, 236);
}

main.llmchat article.assistant::selection {
    background-color: rgb(147, 43, 196);
}

main.llmchat .input {
    position: relative;
    background-color: var(--eerie-black);
    width: 50%;
    /* min-height: 10vh; */
    border-radius: 25px;
    /* margin-top: auto; */
    margin-bottom: 2vh;
    box-shadow: 0 0 5px var(--pure-black);
    /* padding: 20px; */
    cursor: text;
}

body.light-mode main.llmchat .input {
    box-shadow: 0 0 2px var(--pure-black) !important;
}

main.llmchat button#send {
    position: absolute;
    right: 0.5vh;
    bottom: 1vh;
    padding: 5px 8px;
    width: auto;
    border-radius: 50px;
    width: 40px;
    height: 36px;
}

main.llmchat button#send span {
    font-size: 25px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

main.llmchat textarea {
    all: unset;
    /* background-color: rgba(255, 255, 0, 0.035); */
    box-sizing: border-box;
    height: auto;
    width: 100%;
    padding-top: 20px;
    padding-left: 20px;
    max-height: 300px;
    overflow-y: auto;
    overflow-wrap: break-word;
}

body.light-mode main.llmchat .input {
    box-shadow: 0 0 10px var(--pure-black);
}

main.llmchat .thinking {
    position: relative;
    display: none;
    background-color: rgb(53, 53, 53);
    width: 105px;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 10px;
    animation: pulse 3s infinite;
    cursor: pointer;
    user-select: none;
    transition: width 0.4s;
}

main.llmchat .thinking>span:first-child {
    background: linear-gradient(90deg,
            #d4ff5f,
            #fa5393,
            #975fff,
            #69edff,
            #d4ff5f,
            #fa5393,
            #975fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    background-size: 600% auto;
    animation: moveGradient 3s linear infinite alternate;
}

main.llmchat .thinking span.material-symbols-outlined {
    position: absolute;
    right: 5px;
    font-size: 20px;
}

main.llmchat .tokens {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease,
        opacity 0.3s ease;
}

main.llmchat .thinking.expanded .tokens {
    max-height: 1000px;
    opacity: 1;
    overflow-y: auto;
}

main.llmchat .thinking.expanded {
    width: 80%;
    text-align: left;
}

main.llmchat .loading {
    width: 20px;
    height: 20px;
    margin-left: 10%;
    margin-top: 3%;
    border-radius: 50px;
    background-color: rgb(73, 73, 73);
    animation: pulse 1s infinite;
}

main.llmchat span.select {
    display: block;
    width: 130px;
    margin-left: 10px;
    margin-bottom: 10px;
}

main.llmchat span.select span.material-symbols-outlined {
    position: absolute;
    right: 5px;
    top: 8px;
}

.disclaimer {
    display: none;
    position: relative;
    padding: 15px;
    margin: 2vh;
    border-radius: 25px;
    background-color: var(--eerie-black);
}

.disclaimer:hover .close {
    opacity: 1;
}

@keyframes pulse {
    0% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.8;
    }
}

@keyframes dotdotdot {
    0% {
        content: "";
    }

    25% {
        content: ".";
    }

    50% {
        content: "..";
    }

    75% {
        content: "...";
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

    100% {
        background-position: 100% 50%;
    }
}

/* --------------------------- */

/* FLASHCARDS */
.flashcard {
    /* display: flex;
    justify-content: center; */
    padding-left: 0;
    /* nulifying .box property */
    margin-bottom: 0;
    /* nulifying .box property */
    width: 280px;
    height: 350px;
    position: relative;
    transition: transform 0.4s,
        box-shadow 0.4s,
        margin 0.4s;
    transform-style: preserve-3d;
}

.flashcard:hover {
    box-shadow: 0px 20px 20px var(--pure-black);
}

.flashcard input {
    text-align: center;
    height: 30px;
}

.flashcard .front,
.flashcard .back {
    position: absolute;
    backface-visibility: hidden;
    height: 100%;
    width: 100%;
    transform: rotateX(0deg);
}

.flashcard .front {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
}

.flashcard .back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    padding-top: 10px;
    /* line-height: 1.5; */
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.flashcard h1,
.flashcard h2,
.flashcard h3,
.flashcard h4,
.flashcard h5 {
    text-align: center;
    padding-left: 3px;
    padding-right: 3px;
}

.flashcard h5 {
    margin-bottom: 10px;
}

.flashcard p {
    font-size: 18px;
    padding-left: 20px;
    padding-right: 10px;
}

.flashcard span {
    color: var(--secondary-text-color);
    user-select: none;
}

.flashcard a {
    color: var(--tertiary-text-color);
    text-decoration: none;
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 16px;
    user-select: none;
}

.flashcard.correct {
    box-shadow: 0px 0px 10px rgb(0 255 90);
}

.flashcard.incorrect {
    box-shadow: 0px 0px 10px rgb(255 0 70);
}

#kanji-settings {
    position: absolute;
    top: 80px;
    right: 10px;
    color: var(--tertiary-text-color);
    cursor: pointer;
}

#kanji-settings-panel {
    position: absolute;
    top: 110px;
    right: 30px;
    height: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background-color: var(--eerie-black);
    border-radius: 10px;
    transition: all 0.3s;
    box-shadow: 0 10px 15px var(--pure-black);
}

#kanji-settings-panel.open {
    height: 200px;
    padding: 20px;
}

#kanji-settings-panel div {
    display: flex;
    align-items: center;
    gap: 8px;
}

#kanji-settings-panel a {
    color: inherit;
    text-align: center;
    margin-top: 10px;
}

/* --------------------------- */

/* GRAPH */
.graph {
    /* background-color: var(--eerie-black-dark); */
    display: flex;
    align-items: flex-end;
    width: 95%;
    height: 80%;
    overflow: hidden;
    /* box-shadow: inset 0 0px 4px 1px black; */
}

.graph .bar {
    display: inline-block;
    height: 10px;
    width: 25px;
    margin-right: 10px;
    margin-left: 10px;
    margin-bottom: 5px;
    background-color: var(--accent-color);
    border-radius: 2px;
    box-shadow: 4px 3px var(--pure-black);
    transition: margin 0.4s,
        transform 0.4s;
}

.graph .bar::before {
    /* hover area */
    content: "";
    display: block;
    height: 777px;
    width: 180%;
    transform: translate(-20%, -50%);
    /* border: 1px solid purple; */
}

.graph .bar:hover,
.graph .bar:active {
    transform: translateY(-10px);
    z-index: 10;
}

/* select only the last 3 .bar elements */
.bar:nth-last-child(-n + 3) .tooltiptext {
    left: -500%;
}

.bar:nth-last-child(-n + 3) .tooltiptext::after {
    left: 100%;
    border-color: transparent transparent transparent var(--eerie-black);
}

.bar:nth-last-child(-n + 3) .tooltiptext::before {
    left: 100%;
    border-color: transparent transparent transparent #131313;
}

.bar .tooltiptext p:first-child {
    font-size: 12px;
}

.bar .tooltiptext#raised {
    top: -30px;
}

/* GRAPH END */

/* TOOLTIPS */
.tooltip .tooltiptext {
    visibility: hidden;
    font-size: 14px;
    width: 230px;
    background-color: var(--eerie-black);
    color: var(--main-text-color);
    text-align: center;
    padding: 12px;
    border-radius: 3px;
    border: solid #131313 1px;
    box-shadow: 3px 3px 0 #131313;
    position: absolute;
    z-index: 100;
    top: 25%;
    left: 105%;
    transition: opacity 0.4s;
    opacity: 0;
    pointer-events: none;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.tooltip .tooltiptext::after {
    content: " ";
    position: absolute;
    top: 50%;
    right: 100%;
    margin-top: -10px;
    border-width: 10px;
    border-style: solid;
    border-color: transparent var(--eerie-black) transparent transparent;
}

.tooltip .tooltiptext::before {
    content: " ";
    position: absolute;
    top: 50%;
    right: 100%;
    margin-top: -11px;
    border-width: 11px;
    border-style: solid;
    border-color: transparent #131313 transparent transparent;
    z-index: 0;
}

.bar .tooltiptext {
    width: 110px;
    top: 0;
    left: 140%;
    padding: 5px;
    font-size: 14px;
    position: absolute;
}

/* TOOLTIPS END */

/* INPUTS */
input[type="button"],
input[type="submit"],
button,
a.button,
input[type="file"]::file-selector-button {
    display: inline-block;
    background-color: var(--accent-color);
    border: none;
    color: rgb(245, 245, 245);
    /* font-weight: bold; */
    padding: 6px 10px;
    text-decoration: none;
    cursor: pointer;
    /* width: 50px; */
    border-radius: 5px;
    box-shadow: 0px 5px #512d8a;
    transition: transform 0.15s,
        box-shadow 0.15s,
        background-color 0.4s;
}

input[type="button"]:hover,
input[type="submit"]:hover,
button:hover,
a.button:hover {
    background-color: #9260e0;
}

input[type="button"]:active,
input[type="submit"]:active,
button:active,
a.button:active {
    background-color: var(--accent-color);
    box-shadow: 0px 0px #512d8a;
    transform: translateY(5px);
}

input[type="button"]:disabled,
input[type="submit"]:disabled,
button:disabled,
a.button:disabled {
    cursor: not-allowed;
}

input[type="text"],
input[type="password"],
textarea {
    border: 0;
    outline: none;
    background-color: var(--input-color);
    box-shadow: 0px 5px var(--pure-black);
    min-height: 25px;
    color: var(--main-text-color);
    border-radius: 5px;
}

/* Button Color Schemes */
input[type="button"].neutral,
input[type="submit"].neutral,
button.neutral,
a.button.neutral {
    background-color: hsl(0, 0%, 14%);
    box-shadow: 0px 5px hsl(0, 0%, 9%);
}

input[type="button"].neutral:hover,
input[type="submit"].neutral:hover,
button.neutral:hover,
a.button.neutral:hover {
    background-color: hsl(0, 0%, 16%);
}

input[type="button"].neutral:active,
input[type="submit"].neutral:active,
button.neutral:active,
a.button.neutral:active {
    background-color: hsl(0, 0%, 14%);
    box-shadow: 0px 0px hsl(0, 0%, 9%);
}

textarea {
    padding: 10px;
    resize: none;
}

textarea#feedback {
    min-width: 25%;
    min-height: 25%;
    font-size: 14px;
    padding: 1rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 34px;
    background-color: #585858;
    transition: 0.4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 0px;
    bottom: 0px;
    border-radius: 50%;
    background-color: rgb(48, 48, 48);
    transition: 0.4s;
}

input:checked+.slider {
    background-color: var(--accent-color);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--accent-color);
}

input:checked+.slider:before {
    transform: translateX(18px);
}

select,
::picker(select) {
    appearance: base-select;
}

select {
    border: 1px solid var(--eerie-black-light);
    transition: 0.3s;
    /* position: relative; */
}

select::picker-icon {
    color: var(--tertiary-text-color);
    font-size: 15px;
    transition: 0.3s rotate;
}

select:open::picker-icon {
    rotate: 180deg;
}

::picker(select) {
    border: none;
    left: -75px;
}

option {
    display: flex;
    justify-content: flex-start;
    /* gap: 10px; */
    color: var(--main-text-color);
    /* border: 2px solid var(--eerie-black-light); */
    background: var(--eerie-black-dark);
    padding: 10px;
    transition: 0.4s;
}

option:first-of-type {
    border-radius: 10px 10px 0 0;
}

option:last-of-type {
    border-radius: 0 0 10px 10px;
}

::picker(select) {
    border-radius: 10px;
}

option:not(option:last-of-type) {
    border-bottom: none;
}

option:hover,
option:focus {
    background: var(--eerie-black-mild);
}

option::checkmark {
    order: 1;
    margin-left: auto;
}

option::after {
    content: attr(data-notice);
    font-size: 11px;
    opacity: 0.6;
}

#theme-toggle {
    cursor: pointer;
    position: relative;
    user-select: none;
}

#theme-toggle::after {
    content: "";
    opacity: 0;
    position: absolute;
    display: block;
    left: 50%;
    top: 50%;
    transform: translate(-52%, -55%);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: rgba(190, 190, 190, 0.2);
    pointer-events: none;
    transition: opacity 0.2s;
}

#theme-toggle:hover::after {
    opacity: 1;
}

span.select {
    position: relative;
    padding: 10px;
    /* border: 1px solid gray; */
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
}

span.select:hover {
    background-color: rgba(190, 190, 190, 0.1);
}

body.light-mode span.select:hover {
    background-color: rgba(48, 48, 48, 0.05);
}

div.close {
    position: absolute;
    opacity: 0;
    right: -20px;
    top: -20px;
    width: 30px;
    height: 30px;
    border-radius: 25px;
    user-select: none;
    cursor: pointer;
    background-color: var(--eerie-black);
}

div.close span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
}

.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    gap: 0.5rem;
    font-size: 16px;
    align-items: flex-start;
    /* justify-content: center; */
    flex-direction: column;
    background: var(--eerie-black, #222);
    color: var(--main-text-color);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    animation: popIn 0.25s ease;
    z-index: 6969;
    border: 1px solid var(--border-color);
}

.notification h3 {
    font-size: 22px;
    padding-left: 0;
}

.notification .button {
    margin-top: 0.5rem;
    margin-left: auto;
}

.notification span.close-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 16px;
    cursor: pointer;
}

.notification span.close-btn:hover {
    color: hsla(0, 0%, 95%, 0.8);
}

.notification h3 {
    display: flex;
    align-items: center;
    gap: 5px;
}

@keyframes popIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ---------------- */

/* COLOR & TEXT */
p.error {
    color: #ff8383;
}

p.warning {
    color: orange;
}

p.success {
    color: #00db6e;
}

main.stats span.green,
main.stats span.red {
    padding: 5px 10px 5px 10px;
    background-color: var(--eerie-black-dark);
    margin-left: 10px;
    border-radius: 5px;
    position: absolute;
    margin-right: 25px;
    font-size: 20px;
    right: 0;
}

span.green {
    color: #4fff7e;
}

body.light-mode span.green {
    color: #21ef58;
}

span.red,
h1.red,
h2.red,
h3.red {
    color: #ff5b4f;
}

p.underline {
    font-size: 12px;
    display: block;
}

.graffiti-text {
    font-size: 45px;
    color: #eeeeee;
    /* background: #005DFF; */
    text-shadow: 1px 1px 0px rgb(133, 76, 224),
        2px 2px 0px rgb(117, 67, 199),
        3px 3px 0px rgb(108, 62, 184);
    z-index: 1;
}

body.light-mode .graffiti-text {
    font-size: 45px;
    /* background-color: #A7E04C; */
    /* color: white; */
    /* background-color: #18181823; */
    /* text-shadow: 1px 1px 0px rgb(133, 76, 224), 2px 2px 0px rgb(117, 67, 199), 3px 3px 0px rgb(108, 62, 184), 4px 4px 0px rgb(108, 62, 184), 4px 4px 0px rgb(108, 62, 184); */
    /* border-radius: 10px; */
    /* outline: 2px solid #a7e04cbf; */
    color: #854ce0;
    font-family: "Arial Black", Gadget, sans-serif;
    text-shadow: 0px 0px 0 rgb(121, 64, 212),
        1px 1px 0 rgb(109, 52, 200),
        2px 2px 0 rgb(97, 40, 188),
        3px 3px 0 rgb(85, 28, 176),
        4px 4px 0 rgb(73, 16, 164),
        5px 5px 4px rgba(0, 0, 0, 0.4),
        5px 5px 1px rgba(0, 0, 0, 0.3),
        0px 0px 4px rgba(0, 0, 0, 0.2);
}

.score {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 30px;
    /* color:#5a5a5a; */
}

a.nostyle {
    color: inherit;
}

/* COLOR & TEXT END */

/* IMAGES */
img.avatar {
    border-radius: 50%;
    width: 45px;
    height: 45px;
    -webkit-user-drag: none;
}

/* ================ */

/* MISCELLANEOUS */
div.centered {
    justify-content: center;
    padding-left: 0;
}

.stick-to-bottom {
    display: flex;
    align-items: flex-end;
    height: 100%;
}

.log-box.box {
    width: 200px;
    height: 130px;
    justify-content: center;
    padding-left: 0;
    padding-top: 20px;
}

.box .title {
    position: absolute;
    top: 10px;
    left: 15px;
    color: var(--tertiary-text-color);
    font-size: 18px;
    text-shadow: 1px 1px var(--pure-black);
    user-select: none;
}

.log-box.box p {
    font-size: 30px;
}

.log-box.box input[type="button"] {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 50px;
    height: 20px;
    padding: 0px 0px;
    font-size: 12px;
}

ul.errorlist {
    margin-bottom: 10px;
}

.toast {
    display: block;
    position: absolute;
    top: 2%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--eerie-black);
    border-radius: 10px;
    align-items: center;
    /* font-size: 28px; */
    width: 80%;
    padding: 20px;
    box-shadow: 0px 20px 20px var(--pure-black);
}

/* -------------------------------------- */

/* Raspberry Box */
.raspberry {
    width: 270px;
    height: 200px;
    padding: 30px;
    position: relative;
}

.fan {
    width: 50px;
    height: 50px;
    position: absolute;
    right: 20px;
    top: 20px;
    border-radius: 50%;
    box-shadow: inset 0px 1px 3px 1px var(--pure-black);
    display: grid;
    place-items: center;
}

.fan .spinner {
    transform-origin: center;
    width: 10px;
    height: 10px;
    display: block;
    border-radius: 50%;
    box-shadow: 0px 0px 3px 1px var(--pure-black);
    transform: rotate(20deg);
    transition: all 0.4s;
}

.fan .spinner .wing {
    position: absolute;
    transform-origin: top;
    width: 10px;
    height: 17px;
    background-color: var(--eerie-black);
    border-radius: 50%;
    margin-top: 5px;
    box-shadow: 1.5px 0px 3px 1px rgb(17, 17, 17, 1);
}

.fan .spinner .wing:nth-child(1) {
    top: 6px;
}

.fan .spinner .wing:nth-child(2) {
    right: 6px;
    transform: rotate(90deg);
}

.fan .spinner .wing:nth-child(3) {
    top: -6px;
    transform: rotate(180deg);
}

.fan .spinner .wing:nth-child(4) {
    right: -6px;
    transform: rotate(270deg);
}

.raspberry.active .fan .spinner {
    animation: spin 0.75s linear infinite;
}

.raspberry.active .fan .spinner .wing {
    box-shadow: 2px 0px 3px 1px rgb(17, 17, 17, 1) !important;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.raspberry .screen {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    position: absolute;
    left: 26%;
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.6);
    text-align: end;
    padding: 10px;
    background-color: rgb(23, 23, 23);
    box-shadow: inset 0 0 5px 2px var(--pure-black);
    user-select: none;
    transition: all 0.4s;
}

.raspberry.active .screen {
    box-shadow: inset 0 0 5px 2px var(--pure-black),
        inset 0 0 250px 2px rgba(66, 224, 35, 0.15);
}

.raspberry .lamp {
    width: 12px;
    height: 12px;
    border-radius: 50px;
    position: absolute;
    left: 5%;
    top: 6%;
    background-color: rgba(175, 48, 39, 0.555);
    box-shadow: inset 0 0 1px 0.5px rgb(17, 17, 17, 0.8),
        0 0 20px 0.5px rgb(206, 20, 20);
}

.raspberry.active .lamp {
    background-color: rgba(56, 179, 72, 0.5);
    box-shadow: inset 0 0 1px 0.5px rgb(17, 17, 17, 0.8),
        0 0 20px 0.5px rgb(36, 185, 31);
}

/* ------------- */

/* Side Bar */
.side-bar {
    position: absolute;
    right: 20px;
    width: 80px;
    top: 82px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding-left: 0;
    margin-bottom: 0;
    /* center horizontal*/
    /* align-items: center; */
}

.side-bar ul li a {
    display: block;
    text-align: center;
    padding: 16px 16px;
    text-decoration: none;
    font-size: 22px;
    color: var(--main-text-color);
}

.side-bar ul li a img {
    height: 30px;
    width: 30px;
}

.side-bar ul li a:hover {
    background-color: var(--eerie-black-mild);
    border-radius: 10px;
    transition: background-color 0.4s;
}

/* -------- */

/* Panel Logs */
.box .box-content {
    /* background-color: red; */
    width: 100%;
    height: 90%;
    margin-right: 30px;
    overflow-y: scroll;
}

.box .box-content p {
    font-size: 16px;
    font-weight: 200;
    padding: 5px 5px 5px 5px;
    word-wrap: break-word;
    white-space: pre-line;
}

.box .box-content p:hover {
    background-color: var(--eerie-black-dark);
}

/* #panel-logs p {
    font-size: 12px;
} */
/* ---------- */

/* Sroll Bar */
::-webkit-scrollbar {
    width: 0.5em;
}

::-webkit-scrollbar-track {
    background-color: var(--eerie-black-dark);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--eerie-black-light);
    border-radius: 2px;
    /* outline: 1px solid slategrey; */
    /* box-shadow: var(--main-shadow); */
}

main.watch ::-webkit-scrollbar,
main.clips ::-webkit-scrollbar {
    width: 10px;
}

main.watch ::-webkit-scrollbar-thumb,
main.clips ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: padding-box;
}

main.watch ::-webkit-scrollbar-track,
main.clips ::-webkit-scrollbar-track {
    background: transparent;
}

/* --------- */

canvas#petals {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

@media only screen and (max-width: 1100px) {
    .daddy-container {
        flex-direction: column;
    }

    .flashcard {
        width: 40% !important;
    }

    main.llmchat .messages-container,
    main.llmchat .input {
        width: 90%;
    }

    main.browse {
        flex-direction: column;
    }

    #feedback-link {
        position: static;
        margin: 0 auto;
        transform: none;
        margin-bottom: 15px;
    }

    main.kanban {
        justify-content: flex-start;
    }

    main.watch .top-container,
    main.clips .top-container {
        flex-direction: column;
        align-items: center;
    }

    main.watch .episode-select,
    main.watch .chat,
    main.watch .video-container,
    .video-container {
        width: 90%;
        min-height: 200px;
    }

    main.watch .chat {
        height: 400px;
    }

    .video-container {
        order: -1;
    }

    .episode-select,
    #dock-button-outer {
        order: 2;
    }

    main.watch .under-section {
        width: 89%;
    }

    main.whisper .screen {
        width: 100%;
    }
}

@media only screen and (max-width: 768px) {
    .box-container {
        width: 92%;
    }

    .box#huge-card {
        width: 100%;
    }

    textarea#feedback {
        width: 85%;
        font-size: 18px;
    }

    .tooltip .tooltiptext {
        top: 110%;
        left: 10%;
    }

    .tooltip .tooltiptext::after {
        left: 50%;
        top: -15%;
        border-color: transparent transparent var(--eerie-black) transparent;
    }

    main.browse .box {
        width: 90% !important;
    }

    main.browse a {
        all: unset;
        display: contents;
    }

    main.llmchat article.assistant {
        max-width: 100%;
    }

    main.kanban {
        justify-content: center;
    }

    main.kanban .board {
        width: 200px;
        flex: 0 0 auto;
    }

    main.whisper .screen {
        height: 75%;
    }

    .box-container-center .graffiti-text {
        font-size: 35px;
    }

    main.whisper .graffiti-text {
        font-size: 30px;
    }

    main.whisper .loader {
        bottom: 3px;
    }
}

@media only screen and (max-width: 480px) {
    .box {
        width: 100% !important;
    }

    .graph .bar {
        width: 20px;
        margin-right: 2px;
        margin-left: 2px;
    }

    .graph .bar::before {
        /* hover area */
        width: 160%;
    }

    .box.x-card {
        font-size: 23px;
        padding-left: 23px;
        height: 80px;
    }

    .box.x-card span {
        font-size: 24px;
        margin-right: 23px;
    }

    .box.x-card img.avatar {
        width: 50px;
        height: 50px;
    }

    .box#fullscreen-card {
        width: 98%;
        height: 98%;
    }

    .box .box-content {
        margin-right: 5px;
    }

    .box .box-content p {
        font-size: 14px;
    }

    ::-webkit-scrollbar {
        width: 0.2em;
    }

    /* Side Bar */
    .side-bar {
        position: relative;
        width: 102%;
        top: 0;
        margin-bottom: 20px;
    }

    /* -------- */
    .flashcard {
        width: 80% !important;
        height: 60%;
        top: -100px;
    }

    .flashcard input {
        font-size: 16px;
    }

    .score {
        top: 80px;
    }
}
