@import url('https://fonts.googleapis.com/css2?family=Geologica:wght@100..900&display=swap');

@view-transition {
    navigation: auto;
}

::view-transition-group(*) {
    animation-duration: 0.35s;
    animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.25s;
}

@font-face {
    font-family: Normal;
    src: url('/assets/fonts/Normal.ttf');
}

@font-face {
    font-family: Bold;
    src: url('/assets/fonts/Bold.ttf');
}

@media (prefers-color-scheme: dark) {
    table {
        background-color: #181818 !important;
    }

    body {
        background-color: #232323 !important;
        color: white !important;
    }

    tr:hover {
        background-color: #3d3d3d;
    }

    a {
        color: #fd73ff;
    }

    .commentBlock {
        background-color: #3d3d3d;
    }

    .usernamDisplay>a {
        color: white;
    }

    .topnav {
        background-color: #181818;
    }

    .topnav a {
        color: #d3a7ff;
    }

    .topnav a:hover {
        background-color: #8000ff;
        color: white;
    }

    .topnav a.active {
        background-color: #4d009a;
        color: white;
    }

    input[type="checkbox"] {
        border: 2px solid #df40ff !important;
    }

    .hamburger .bar,
    .hamburger:after,
    .hamburger:before {
        background-color: white !important;
    }

    .mobile-nav {
        background-color: #181818 !important;
    }

    .project-card-footer {
        background-color: black;
    }
}

@media (prefers-color-scheme: light) {
    .topnav {
        background-color: #FFFFFF;
    }

    .topnav a {
        color: #373097;
    }

    .topnav a:hover {
        background-color: #e9d3ff;
        color: #8000ff;
    }

    .topnav a.active {
        background-color: #4d009a;
        color: white;
    }

    tr:hover {
        background-color: #ddd;
    }

    .commentBlock {
        background-color: #FCFAFA;
    }

    .usernamDisplay>a {
        color: black;
    }

    .project-card-footer {
        background-color: white;
    }

    .project-card-title {
        color: black;
    }
}

body::-webkit-scrollbar {
    display: none;
}

body {
    background-color: #F8ECEC;
    margin: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    font-family: "Geologica", 'Normal', sans-serif;
}

#fakeLogo {
    position: fixed;
    height: 5vw;
    display: flex;
    align-items: center;
    margin-left: 5vw;
    font-family: "Geologica", 'Bold', sans-serif;
    font-weight: 900;
    font-size: 2vw;
    line-height: 0.85;
    z-index: 40;
}

#circularLogo {
    z-index: 40;
    position: fixed;
    margin: 0.4vw;
    border-radius: 40%;
    height: 4vw;
}

#myTopnav {
    view-transition-name: my-topnav;
}

.topnav {
    z-index: 30;
    height: 5vw;
    top: 0;
    position: -webkit-sticky;
    position: sticky;
}

.topnav a {
    font-family: "Geologica", 'Bold', sans-serif;
    font-weight: 900;
    float: right;
    display: block;
    text-align: center;
    padding: 1.2vw 1.5vw;
    text-decoration: none;
    font-size: 2vw;
    transition: 0.15s;
}

.topnav a.active {
    cursor: pointer;
}

.topnav .icon {
    display: none;
}

#mobileNav {
    display: none;
}

.hamburger {
    margin: 2vw;
    margin-left: 85vw;
    z-index: 200;
    display: none;
    position: fixed;
    width: 50px;
    cursor: pointer;
    appearance: none;
    background: none;
    outline: none;
    border: none;
}

.hamburger .bar,
.hamburger:after,
.hamburger:before {
    content: '';
    display: block;
    width: 100%;
    height: 5px;
    background-color: #4229B9;
    margin: 6px 0px;
    transition: 0.4s;
}

.hamburger.is-active:before {
    transform: rotate(-45deg) translate(-8px, 6px);
}

.hamburger.is-active:after {
    transform: rotate(45deg) translate(-9px, -8px);
}

.hamburger.is-active .bar {
    opacity: 0;
}

h2 {
    font-family: "Geologica", 'Bold', sans-serif;
    font-weight: 900;
    font-size: 3vw;
    margin-top: 5vh;
    margin-left: 10vw;
    margin-bottom: 6vh;
}

h3 {
    font-family: "Geologica", 'Bold', sans-serif;
    font-weight: 900;
    font-size: 2.75vw;
}

.section {
    font-family: "Geologica", 'Normal', sans-serif;
    font-weight: 500;
    line-height: 4.5vh;
    font-size: 1.5vw;
    padding-bottom: 8vh;
    text-align: center;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 100%;
    width: 100%;
    min-height: 100vh;
    background-color: white;
    padding-top: 120px;
    transition: 0.4s;
}

.mobile-nav.is-active {
    left: 0;
}

.mobile-nav a {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 0 auto 16px;
    text-align: center;
    padding: 12px 16px;
    text-decoration: none;
}

.hidden {
    height: 4.5vw;
}

/* --- Project List Styles (/project) --- */
.container {
    display: flex;
    row-gap: 5vh;
    flex-wrap: wrap;
    margin-left: 10vw;
    margin-top: 10vh;
    margin-bottom: 10vh;
    width: 90vw;
}

.knowSelect {
    margin-left: 10vw;
    font-family: "Geologica", 'Bold', sans-serif;
    z-index: 97;
    height: 7vh;
    font-size: 3.5vh;
    border: none;
    border-radius: 2vw;
    padding: 5px 10px;
    cursor: pointer;
    font-weight: bold;
}

.box {
    width: 35vw;
    height: fit-content;
    overflow: hidden;
    box-sizing: border-box;
    border-radius: 30px;
    transition: 0.3s;
    margin-right: 5vw;
}

.box a {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: fit-content;
    color: white;
    text-decoration: none;
}

.box img,
.project-card-image {
    display: block;
    width: 100%;
    height: auto;
    transition: 0.3s;
    object-fit: cover;
}

.project-card-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 28px 30px;
}

.project-card-title {
    min-width: 0;
    width: 100%;
    font-size: 1.8vw;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-card-type {
    align-self: flex-end;
    flex-shrink: 0;
    padding: 8px 20px;
    background-color: #343436;
    border: 1px solid #888;
    border-radius: 999px;
    color: #ddd;
    transition: transform 0.3s;
    font-size: 1.1vw;
    font-weight: 600;
}

.box:hover {
    transform: scale(1.05);
}

.box:hover>.project-card>.project-card-footer>.project-card-type {
    transform: scale(1.2);
}

/* --- Project Detail Styles (/projects/id) --- */
#content {
    padding-left: 15vw;
    padding-right: 15vw;
}

#video {
    width: 70vw;
    height: 80vh;
}

#content>img {
    border-radius: 20px;
    width: 70vw;
}

#content>video {
    border-radius: 20px;
    width: 70vw;
}

.project-banner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    padding-bottom: 5vh;
}

.project-banner-image {
    width: 70vw;
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    display: block;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

iframe {
    width: 70vw;
    height: calc((70vw * 9) / 16);
    border-radius: 20px;
}

.downloadSection {
    display: flex;
    width: 100vw;
    font-size: 2vw;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

input[type="checkbox"] {
    transform: scale(3) translateY(-1px);
    margin-right: 40px;
    appearance: none;
    border: 2px solid #4d009a;
    width: 20px;
    height: 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

input[type="checkbox"]:checked {
    content: "\2713";
    color: #fff;
    background-color: #4d009a;
    animation: checkboxPulse 0.4s;
}

input[type="checkbox"]:checked:after {
    content: "✓";
    color: #fff;
    position: absolute;
    left: 50%;
    top: 50%;
    -webkit-transform: translate(-50%, -50%);
    -moz-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

.warning {
    font-family: "Geologica", 'Normal', sans-serif;
    font-weight: 400;
    color: red;
    font-size: 1.5vw;
    width: 100vw;
    height: 10vh;
    text-align: center;
}

.compiler {
    display: none;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    position: fixed;
    z-index: 48;
    top: 0;
    align-items: center;
    justify-content: center;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.2;
}

.genericButton {
    margin: 2.5vw;
    border: none;
    border-radius: 0.5vw;
    padding-left: 20px;
    padding-right: 20px;
    background-color: #4229B9;
    color: #FFFFFF;
    font-family: "Geologica", 'Bold', sans-serif;
    font-weight: 900;
    font-size: 3vw;
    transition: 0.25s;
}

.genericButton:hover {
    border-radius: 1vw;
    background-color: #1b0879;
    color: #fcf2ff;
}

.genericButton:active {
    border-radius: 1.5vw;
    background-color: #100546;
    transform: translate(10px, 10px);
}

.buttonWrapper {
    width: 100vw;
    height: 15vh;
    display: flex;
    justify-content: center;
}

#creditFormat {
    text-align: left;
    padding-left: 10vw;
    width: 80vw;
}

#creditFormat>img {
    margin-left: 5vw;
    border-radius: 20px;
    width: 70vw;
}

dialog {
    background-color: #F8ECEC;
    padding: 2vw;
    font-size: 2vw;
    user-select: none;
    font-family: "Geologica", 'Bold', sans-serif;
    font-weight: 900;
    border: none;
    border-radius: 1vw;
}

dialog form>button {
    margin-left: 2vw;
    height: 7vh;
    width: 7vw;
    font-size: 2vw;
    font-family: "Geologica", 'Normal', sans-serif;
    font-weight: 400;
    border: none;
    border-radius: 0.5vw;
    background-color: #4229B9;
    color: white;
}

::backdrop {
    background-color: black;
    opacity: 0.75;
}

#coffee {
    color: black;
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    background-color: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
}

#coffee>div {
    width: 70vw;
    height: 70vh;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    flex-direction: row;
    overflow: hidden;
}

#coffee>div>img {
    width: 35vw;
    height: 70vh;
    object-fit: cover;
}

#coffee>div>div {
    width: 35vw;
    height: 70vh;
    padding: 2.5vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 1.75vw;
    font-family: "Geologica", 'Normal', sans-serif;
    font-weight: 400;
}

#closecoffee {
    position: absolute;
    top: 18vh;
    right: 17vw;
    width: 3vw;
    height: 3vw;
    fill: #4229B9;
}

#loginButton {
    width: fit-content;
    font-size: 2.5vw;
}

#exitReplyState {
    width: fit-content;
    font-size: 2.5vw;
}

#commentForm textarea {
    width: 100%;
    height: 15vh;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: none;
    font-family: "Geologica", 'Normal', sans-serif;
    font-weight: 400;
    font-size: 1.5vw;
}

#commentForm {
    width: 80vw;
    display: flex;
    flex-direction: column;
    align-items: right;
}

.commentBlock {
    user-select: none;
    width: 80vw;
    height: fit-content;
    display: flex;
    flex-direction: column;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 20px;
    padding-top: 0;
    margin-bottom: 10px;
    text-align: left;
    margin-bottom: 10vh;
}

.avatarHolder {
    margin-top: 5vh;
    height: fit-content;
    display: flex;
}

.usernamDisplay {
    font-family: "Geologica", 'Normal', sans-serif;
    font-weight: 400;
    font-size: 1.8vw;
    font-weight: bolder;
}

.usernamDisplay>a {
    text-decoration: none !important;
}

.avatarHolder>a>img {
    position: relative;
    top: 0;
    height: 10vh;
    width: 10vh;
    border-radius: 5px;
    margin-right: 12px;
    z-index: 10 !important;
}

.commentPointerArrow {
    position: relative;
    z-index: 9 !important;
    height: 20vh;
    margin-left: -7vh;
    margin-top: -14vh;
}

.commentPointerArrow polygon {
    fill: url(#gradient);
}

#commentCustomArea {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
}

#userAvatarImage {
    width: 15vh;
    height: 15vh;
    border-radius: 5px;
    margin-right: 12px;
}

#commentSectionView {
    margin-bottom: 10vh;
}

.commentOption {
    display: inline-block;
    transition: 0.25s;
}

.contextMenu {
    color: black;
    display: none;
    position: absolute;
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
    font-size: 1.75vw;
    font-family: "Geologica", 'Bold', sans-serif;
    font-weight: 700;
    z-index: 20;
    border-radius: 10px;
    overflow: hidden;
}

.contextMenu ul {
    list-style-type: none;
    margin: 0;
    padding-inline-start: 0;
}

.contextMenu ul li {
    display: flex;
    justify-content: left;
    align-items: center;
    list-style: none;
    padding: 20px;
    cursor: pointer;
}

.contextMenu ul li svg {
    width: 1.5vw;
    height: 1.5vw;
    margin-right: 10px;
}

.contextMenu ul li:hover {
    background-color: #f0f0f0;
}

.commentOption:hover {
    scale: 2.5;
    cursor: pointer;
}

.beingReplyAtState {
    border: #3E2AB2 5px solid;
    border-radius: 10px;
    z-index: 20;
}

.collage {
    display: flex;
    flex-direction: row;
    width: 70vw;
    height: 70vh;
    overflow: hidden;
    position: relative;
    border-radius: 20px;
}

.collage img {
    width: calc(100% / var(--image-count));
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: all 0.3s;
}

.collage img:hover {
    width: 90%;
}

.collage:hover img:not(:hover) {
    width: calc(10% / (var(--image-count) - 1));
    filter: brightness(0.2);
}

#languageSwitcher {
    font-family: "Geologica", 'Bold', sans-serif;
    font-weight: 900;
    font-size: 1.7vw;
    position: fixed;
    bottom: 1vw;
    right: 1vw;
    z-index: 100;
    background-color: black;
    color: white;
    border: none;
    padding: 5px;
}

#languageSwitcher option {
    font-family: "Geologica", 'Bold', sans-serif;
    font-weight: 900;
}

.tooltip {
    font-family: "Geologica", 'Normal', sans-serif;
    font-weight: 400;
}

#tosLabel {
    font-family: "Geologica", 'Normal', sans-serif;
    font-weight: 400;
    line-height: 5vh;
    font-size: 2vw;
}

/* --- Mobile Styles --- */
@media (max-aspect-ratio: 3/4) {
    .box {
        width: 80vw !important;
        margin-right: 0;
    }

    .box img,
    .project-card-image {
        width: 100% !important;
    }

    .project-card-footer {
        padding: 18px 22px 24px;
    }

    .project-card-title {
        font-size: 5vw;
    }

    .project-card-type {
        padding: 7px 16px;
        font-size: 3.5vw;
    }

    .box:hover {
        transform: scale(1.03);
        transform-origin: center;
    }

    #circularLogo {
        height: 13.5vw;
    }

    #fakeLogo {
        height: 15vw;
        margin-left: 16vw;
        font-size: 3vh;
        z-index: 40;
    }

    .hidden {
        height: 7vh;
    }

    .mobile-nav {
        display: flex;
        flex-direction: column;
    }

    .hamburger {
        display: block;
    }

    #desktopNav {
        display: none;
    }

    .topnav {
        height: 15vw;
    }

    .topnav a {
        padding: 4vw 2vw;
        font-size: 8vw;
    }

    h2 {
        margin-left: 5vw !important;
        font-size: 7vw !important;
        margin-top: 2vh !important;
        margin-bottom: 2vh !important;
    }

    h3 {
        font-size: 3.5vh !important;
        margin: 0 !important;
    }

    .knowSelect {
        font-size: 2.75vh;
        height: 5.5vh;
    }

    .container {
        margin-top: 5vh !important;
        row-gap: 2.5vh !important;
    }

    .tableContainer {
        width: 95vw;
        overflow-x: scroll;
    }

    .collage {
        width: 95vw;
        height: 35vh;
    }

    #commentSectionView {
        margin-bottom: 25vh;
    }

    .contextMenu ul li {
        padding: 10px;
    }

    .contextMenu ul li svg {
        width: 4vh;
        height: 4vh;
    }

    .contextMenu {
        font-size: 3vh;
    }

    .usernamDisplay {
        font-size: 2.75vh;
        user-select: none;
    }

    #commentForm textarea {
        font-size: 2.6vh;
        height: 40vh;
    }

    .avatarHolder>a>img {
        height: 8vh;
        width: 8vh;
    }

    .avatarHolder {
        margin-top: 2.5vh;
    }

    #userAvatarImage {
        width: 8vh;
        height: 8vh;
        margin-bottom: 2.5vh;
    }

    #commentCustomArea {
        flex-direction: column-reverse;
        align-items: flex-start !important;
    }

    #loginButton {
        font-size: 3.75vh;
    }

    #exitReplyState {
        font-size: 3.75vh;
    }

    dialog form>button {
        font-size: 2.5vh;
        margin-left: 12vw;
        height: 5vh;
        width: 17vw;
        border-radius: 2vw;
    }

    dialog {
        font-size: 3.2vh;
        width: 90vw;
    }

    .warning {
        font-size: 2vh;
        height: 17vh;
    }

    .downloadSection {
        font-size: 2vh;
        width: 90vw;
        margin-left: 5vw;
        margin-bottom: 5vh;
    }

    input[type="checkbox"] {
        margin-right: 20px;
        width: 15px;
        height: 15px;
        margin-top: 20px;
    }

    #tosLabel {
        line-height: 5vh;
        font-size: 2.5vh;
    }

    .genericButton {
        border: none;
        border-radius: 1vh;
        margin-top: 1.5vh;
        padding-left: 20px;
        padding-right: 20px;
        font-family: "Geologica", 'Bold', sans-serif;
        font-weight: 900;
        font-size: 8vw;
        transition: 0.25s;
    }

    .section {
        line-height: 3.5vh;
        width: 95vw;
        font-size: 2.5vh;
    }

    #content {
        padding-left: 2.5vw;
        padding-right: 2.5vw;
    }

    #content>img {
        border-radius: 10px;
        width: 95vw;
    }

    .project-banner-container {
        padding-bottom: 3vh;
    }

    .project-banner-image {
        width: 95vw;
        border-radius: 12px;
    }

    #creditFormat>img {
        margin-left: -7.5vw;
        border-radius: 10px;
        width: 95vw;
    }

    #content>video {
        border-radius: 10px;
        width: 95vw;
    }

    iframe {
        width: 95vw;
        height: calc((95vw * 9) / 16);
        border-radius: 10px;
    }

    .buttonWrapper {
        height: 7.5vh;
    }

    #coffee>div {
        width: 90vw;
        height: 85vh;
        border-radius: 20px;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        overflow: hidden;
    }

    #coffee>div>img {
        width: 90vw;
        height: 40vh;
        object-fit: cover;
    }

    #coffee>div>div {
        width: 90vw;
        height: 45vh;
        font-size: 2.75vh;
    }

    #closecoffee {
        top: 9vh;
        right: 9vw;
        width: 7.5vh;
        height: 7.5vh;
        fill: #150857;
    }

    #languageSwitcher {
        font-size: 2.5vh;
    }
}
