:root {
    --background: #ffffff;

    --accent: #006896;
    --accent-gradient: linear-gradient(to right, #006896, #00b3ff);

    --title: #111111;
    --text: #222222;
    --subtext: #444444;

    --surface: rgba(175, 175, 175, 0.2);
    --surface_hover: rgba(100, 100, 100, 0.2);
    --surface_blur: blur(4px);
    --surface_shadow: 0 0 4px 2px var(--surface_outline) inset;
    --surface_title: #222222;
    --surface_text: #333333;
    --surface_subtext: #555555;
    --surface_outline: #bbbbbb;

    --surface_container: rgba(125, 125, 125, 0.2);
    --surface_container_hover: rgba(50, 50, 50, 0.2);
    --surface_container_blur: blur(2px);
    --surface_container_shadow: 0 0 4px 0px var(--surface_container_outline) inset;
    --surface_container_title: #333333;
    --surface_container_text: #444444;
    --surface_container_subtext: #666666;
    --surface_container_outline: #888888;
}

.dark {
    --background: #000000;

    --title: #ffffff;
    --text: #eeeeee;
    --subtext: #bbbbbb;

    --surface: rgba(100, 100, 100, 0.2);
    --surface_hover: rgba(175, 175, 175, 0.2);
    --surface_title: #eeeeee;
    --surface_text: #cccccc;
    --surface_subtext: #aaaaaa;
    --surface_outline: #333333;

    --surface_container: rgba(150, 150, 150, 0.2);
    --surface_container_hover: rgba(225, 225, 225, 0.2);
    --surface_container_title: #cccccc;
    --surface_container_text: #bbbbbb;
    --surface_container_subtext: #999999;
    --surface_container_outline: #666666;
}

* {
    box-sizing: border-box;

    margin: 0;
    padding: 0;

    scroll-behavior: smooth;
    scrollbar-color: var(--title) transparent;
    scrollbar-width: auto;
}

html {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-size: 16px;
    font-weight: normal;
    font-style: normal;
}

::selection {
    background-color: var(--accent);
    color: var(--title);
}

main {
    display: flex;
    flex-direction: column;
    gap: 25px;

    background-color: var(--background);
    background-image: 
        linear-gradient(0deg, rgba(0, 0, 0, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.3) 1px, transparent 1px);
    background-size: 50px 50px;
    box-shadow: 
        0 150px 256px -20px var(--background) inset,
        0 -150px 256px -20px var(--background) inset;

    padding: 25px;

    height: 100%;
    min-height: 100dvh;
    width: 100%;
}

html.dark main {
    background-image: 
        linear-gradient(0deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
}

.main-title {
    color: var(--title);
    font-size: 1.75rem;
    font-weight: bold;
}

.tool-container {
    display: flex;
    align-items: center;
    gap: 15px;

    height: 50px;
    width: auto;
}

.tool-go-home {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    background-color: var(--surface);
    backdrop-filter: var(--surface_blur);
    border-radius: 25px;
    box-shadow: var(--surface_shadow);

    color: var(--surface_title);
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;

    padding: 0 15px;

    height: 100%;
    width: auto;
}

.tool-go-home:hover {
    background-color: var(--surface_hover);
}

.language-selector-container {
    display: flex;

    background-color: var(--surface);
    backdrop-filter: var(--surface_blur);
    border-radius: 25px;
    box-shadow: var(--surface_shadow);

    overflow: hidden;

    height: 100%;
    width: auto;
}

.language-selector-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--surface_title);
    font-size: 1rem;

    height: 100%;
    aspect-ratio: 1/1;
}

#language-selector {
    background-color: var(--surface_container);
    border: none;

    color: var(--surface_container_title);
    font-size: 1rem;
    font-weight: normal;

    cursor: pointer;

    padding: 0 10px;

    height: 100%;
    width: auto;

    transition: background 200ms ease;
}

#language-selector:hover {
    background-color: var(--surface_container_hover);
}

#theme-toggle {
    display: none;
}

label[for="theme-toggle"] {
    display: flex;
    align-items: center;
    justify-content: center;

    background-color: var(--surface);
    backdrop-filter: var(--surface_blur);
    border-radius: 100%;
    box-shadow: var(--surface_shadow);

    cursor: pointer;

    user-select: none;
    
    height: 100%;
    aspect-ratio: 1/1;
}

label[for="theme-toggle"]:hover {
    background-color: var(--surface_hover);
}

label[for="theme-toggle"] span {
    position: absolute;

    color: var(--surface_title);
    font-size: 1.25rem;
    font-weight: normal;

    transition: 
        opacity 200ms ease,
        transform 200ms ease;
}

.bright-icon {
    opacity: 1;

    transform: rotate(0);
}

.dark-icon {
    opacity: 0;

    transform: rotate(90deg);
}

#theme-toggle:checked + label[for="theme-toggle"] .bright-icon {
    opacity: 0;

    transform: rotate(-90deg);
}

#theme-toggle:checked + label[for="theme-toggle"] .dark-icon {
    opacity: 1;

    transform: rotate(0deg);
}

.face-detection-analysis {
    display: flex;
    gap: 25px;

    height: auto;
    width: auto;
}

.face-detection-container {
    display: inline-block;

    position: relative;

    height: fit-content;
    width: fit-content;
}

#video {
    display: block;
    border-radius: 25px;

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

#overlay {
    border-radius: 25px;

    position: absolute;
    top: 0;
    left: 0;

    pointer-events: none;

    height: 100%;
    width: 100%;
}

.face-info-container {
    display: flex;
    flex-direction: column;
    gap: 15px;

    flex: 1;
}

.face-about {
    display: flex;
    flex-direction: column;
    gap: 25px;

    background: var(--surface);
    backdrop-filter: var(--surface_blur);
    border-radius: 25px;
    box-shadow: var(--surface_shadow);

    padding: 25px;

    height: fit-content;
    width: 100%;
}

.face-about-title {
    display: flex;
    align-items: center;
    gap: 10px;

    height: auto;
    width: 100%;
}

.face-about-title i {
    color: var(--accent);
    font-size: 1.25rem;
}

.face-about-title h2 {
    color: var(--surface_title);
    font-size: 1.25rem;
}

.face-about-info-container {
    display: flex;
    flex-direction: column;
    gap: 10px;

    height: auto;
    width: 100%;
}

.face-about-info {
    display: flex;
    align-items: center;
    justify-content: space-between;

    height: auto;
    width: 100%;
}

.face-about-info h2 {
    color: var(--surface_title);
    font-size: 1.1rem;
    font-weight: bold;
}

.face-about-info span {
    color: var(--surface_text);
    font-size: 1rem;
    font-weight: normal;
}

@media (max-width: 700px) {
    .face-detection-analysis {
        flex-direction: column;
    }
}
