:root {
    --bg-color: rgb(235, 235, 235);
    --card-color: rgb(230, 230, 230);
    --card-background-color: rgba(255, 255, 255, 0.1);
    --card-before-gradient: rgba(0, 0, 0, 0.15);
    --card-after-gradient: rgba(0, 0, 0, 0.4);
    --font-color: rgb(15, 15, 15);
    --subtitle-color: rgba(0, 0, 0, 0.5);
    --gradient-radius: 500px;
}

body {
    background-color: var(--bg-color);
}

#theme-toggle {
    height: 100%;
    width: 2rem;
    cursor: pointer;
    position: fixed;
    right: 5px;
    top: 5px;
    z-index: 10000;
}
#light-toggle {
    display: inline;
}
#dark-toggle {
    display: none;
}

.container {
    align-items: center;
    display: flex;
    height: 100vh;
    justify-content: center;
    margin: 0px;
    overflow: hidden;
    padding: 0px;
}

#cards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 916px;
    width: calc(100% - 20px);
}

#cards:hover > .card::after {
    opacity: 1;
}

.card {
    background-color: var(--card-background-color);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    height: clamp(130px,260px,260px);
    flex-direction: column;
    position: relative;
    width: clamp(150px,300px,300px);
    aspect-ratio: 13/15;
}

.card:hover::before {
    opacity: 1;
}

.card::before,
.card::after {
    border-radius: inherit;
    content: "";
    height: 100%;
    left: 0px;
    opacity: 0;
    position: absolute;
    top: 0px;
    transition: opacity 500ms;
    width: 100%;
}

.card::before {
    background: radial-gradient(
            var(--gradient-radius) circle at var(--mouse-x) var(--mouse-y),
            var(--card-before-gradient),
            transparent 40%
    );
    z-index: 3;
}

.card::after {
    background: radial-gradient(
            600px circle at var(--mouse-x) var(--mouse-y),
            var(--card-after-gradient),
            transparent 40%
    );
    z-index: 1;
}

.card > .card-content {
    background-color: var(--card-color);
    border-radius: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    inset: 1px;
    padding: 10px;
    position: absolute;
    z-index: 2;
}

/* -- ↓ ↓ ↓ extra card content styles ↓ ↓ ↓ -- */

h1, h2, h3, h4, span {
    color: var(--font-color);
    font-family: "Rubik", sans-serif;
    font-weight: 400;
    margin: 0px;
}

i {
    color: var(--font-color);
}

.card-image {
    align-items: center;
    display: flex;
    height: 140px;
    justify-content: center;
    overflow: hidden;
}

.card-image > i {
    font-size: 6em;
    opacity: 0.25;
}

.imagelight {
    display: inline;
}

.imagedark {
    display: none;
}

.card-info-wrapper {
    align-items: center;
    display: flex;
    flex-grow: 1;
    justify-content: flex-start;
    padding: 0px 20px;
}

.card-info {
    align-items: flex-start;
    display: flex;
    gap: 10px;
}

.card-info > i {
    font-size: 1em;
    height: 20px;
    line-height: 20px;
}

.card-info-title > h3 {
    font-size: 1.1em;
    line-height: 20px;
}

.card-info-title > h4 {
    color: var(--subtitle-color);
    font-size: 0.85em;
    margin-top: 8px;
}

#logo {
    height: 2rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
}

#logo > img {
    max-width: 100%;
    max-height: 100%;
}

/* -- ↓ ↓ ↓ some responsiveness ↓ ↓ ↓ -- */

@media(max-width: 1000px) {
    .container {
        align-items: flex-start;
        overflow: auto;
    }

    #cards {
        max-width: 1000px;
        padding: 10px 0px;
    }

    .card {
        flex-shrink: 1;
        width: calc(50% - 4px);
    }
}

@media(max-width: 500px) {
    .card {
        height: 180px;
    }

    .card-image {
        height: 80px;
    }

    .card-image > i {
        font-size: 3em;
    }

    .card-info-wrapper {
        padding: 0px 10px;
    }

    .card-info > i {
        font-size: 0.8em;
    }

    .card-info-title > h3 {
        font-size: 0.9em;
    }

    .card-info-title > h4 {
        font-size: 0.8em;
        margin-top: 4px;
    }
}

@media(max-width: 320px) {
    .card {
        width: 100%;
    }
}

/* -- ↓ ↓ ↓ YouTube link styles ↓ ↓ ↓ -- */

#youtube-link {
    bottom: 10px;
}

#youtube-link > i {
    color: rgb(239, 83, 80);
}

#source-link {
    bottom: 60px;
}

#source-link > i {
    color: rgb(94, 106, 210);
}

.link {
    align-items: center;
    backdrop-filter: blur(3px);
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: inline-flex;
    gap: 5px;
    left: 10px;
    padding: 10px 20px;
    position: fixed;
    text-decoration: none;
    z-index: 100;
}

.link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.link > i, .link > span {
    height: 20px;
    line-height: 20px;
}

.link > span {
    color: white;
}

.card-image > img {
    max-width: 100%;
    max-height: 100%;
}

.gsc-control-cse {
    background-color: transparent !important;
    max-width: 916px;
    width: calc(100% - 20px);
    margin-left: auto;
    margin-right: auto;
}

input.gsc-input {
    background-color: transparent !important;
}

.search {
    width: clamp(200px,90vw,800px);
    margin-left: auto;
    margin-right: auto;
    margin-top: 1em;
}