* {
    --color-bg: #1b1b1b;
    --color-header: #ffffff;
    --color-tile-bg: #262626;
    --color-tile-bg-hover: #323232;
    --color-tile-bg-active: #ffffff7e;
    --color-tile-group-title: #ffffff;
    --color-tile-text: #e0e0e0;
    --color-tile-icon: #0078d7;
    --color-tile-shadow: rgba(0, 0, 0, .35);
    --color-tile-glow: #ffffff1f;
    --color-tile-glow2: #ffffff05;
    --color-tile-glow-border: #ffffff77;
    --color-tile-glow-mask: white;
    --color-tile-glow-transparent: transparent;

    --body-padding: 50px;

    --small-tile-height: 56px;
    --small-tile-width: 56px;
    --medium-tile-height: 122px;
    --medium-tile-width: 122px;
    --big-tile-height: 254px;
    --big-tile-width: 254px;
    --wide-tile-height: 122px;
    --wide-tile-width: 254px;

    --main-text-size: 3rem;
    --header-text-size: 2rem;
    --tile-group-title-text-size: 1.2rem;
    --tile-text-size: .9rem;
    --tile-icon-size: 30px;
    --tile-groups-gap: 40px;
    --tile-group-gap: 10px;

    user-select: none;
}

.rolling-text
{
    font-family: sans-serif;
    font-weight: 600;
    font-size: var(--main-text-size);
    
    color: white;
    opacity: 0;
    animation: stupid-swoosh-up 2s ease 500ms 1 normal forwards;
    user-select: none;
}

.rolling-text p
{
    display: inline-flex;
    margin: 0;
    vertical-align: top;
}
.rolling-text p .word
{
    position: absolute;
    display: flex;
    opacity: 0;
}
.rolling-text p .word .letter
{
    transform-origin: center center 25px;
}
.rolling-text p .word .letter.out
{
    transform: rotateX(90deg);
    transition: .32s cubic-bezier(.6, 0, .7, .2);
}
.rolling-text p .word .letter.in
{
    transition: .38s ease;
}
.rolling-text p .word .letter.behind
{
    transform: rotateX(-90deg);
}

.word
{
    color: #bb004e;
}

@keyframes stupid-swoosh-up
{
    0%
    {
        transform: translateY(100%) translateX(-80px);
        opacity: 0;
        filter: blur(50px);
        text-shadow: 1px 3px 6px transparent;
    }

    100%
    {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0%) translateX(-80px);
        text-shadow: 1px 3px 6px black;
    }
}


body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Segoe UI", Arial, sans-serif;
    overflow-x: hidden;
}

.desktop {
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 600% 600%;
    animation: gradientMove 20s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: var(--color-header);
    text-align: center;
}

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

.desktop-content h1 {
    font-size: 3rem;
    margin: 0;
}

.start-button {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-tile-bg);
    color: var(--color-header);
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    box-shadow: unset;
    transition: box-shadow.3s, background.3s;
}

.start-button:hover {
    background: var(--color-tile-bg-hover);
    box-shadow: 0 4px 12px var(--color-tile-shadow);
}

.start-button:active {
    background: var(--color-tile-bg-active);
    box-shadow: unset;
}

.start-menu {
    position: fixed;
    justify-self: center;
    background: rgba(27, 27, 27, .95);
    padding: var(--body-padding);
    overflow-y: auto;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .5);
    transform: translateY(150%);
    transition: transform.5s cubic-bezier(.4, 1.4, .6, 1);
}

.start-menu.active {
    transform: translateY(-120%);
}

.tile-groups {
    display: flex;
    gap: var(--tile-groups-gap) 8px;
    flex-flow: row wrap;
    max-width: 518px;
}

.tile-group {
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateX(40px) scale(.8);
    transition: opacity.5s cubic-bezier(.4, 2, .6, 1), transform.5s cubic-bezier(.4, 2, .6, 1);
}

.tile-group.animated {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.tile-group-title {
    color: var(--color-tile-group-title);
    font-size: var(--tile-group-title-text-size);
    margin-bottom: 20px;
    letter-spacing: 1px;
    transition: font-weight.3s ease;
}

.tile-group:hover .tile-group-title {
    font-weight: bold;
}

.tiles-grid {
    display: grid;
    gap: var(--tile-group-gap);
}

.tiles-small {
    grid-template-columns: repeat(2, var(--small-tile-width));
    /* grid-template-rows: repeat(2, var(--small-tile-height)); */
}

.tiles-medium {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, var(--medium-tile-height));
}

.tiles-medium-vertical {
    grid-template-columns: repeat(2, var(--medium-tile-width));
    grid-template-rows: 1fr;
}

.tiles-wide {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(1, var(--wide-tile-height));
}

.tile {
    aspect-ratio: 1 / 1;
    min-width: var(--small-tile-width);
    min-height: var(--small-tile-height);
    background: var(--color-tile-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    opacity: 0;
    transform: translateX(40px) scale(.8);
    transition: opacity.5s cubic-bezier(.4, 2, .6, 1),
                transform.5s cubic-bezier(.4, 2, .6, 1), 
                background.2s,
                box-shadow.2s;
}

.tile.animated {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.tile:hover, .tile:focus {
    background: var(--color-tile-bg-hover);
    box-shadow: 0 4px 20px var(--color-tile-shadow);
    transform: scale(1.05);
}

.tile:active {
    background: var(--color-tile-bg-active);
    box-shadow: unset;
    transform: scale(1.01);
}

.tile-small {
    width: var(--small-tile-width);
    height: var(--small-tile-height);
}

.tile-medium {
    width: var(--medium-tile-width);
    height: var(--medium-tile-height);
}

.tile-big {
    width: var(--big-tile-width);
    height: var(--big-tile-height);
}

.tile-wide {
    width: var(--wide-tile-width);
    height: var(--wide-tile-height);
    aspect-ratio: unset;
}

.tile-icon {
    font-size: var(--tile-icon-size);
    width: var(--tile-icon-size);
    height: var(--tile-icon-size);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform.4s ease, scale.4s ease;
    transform: translateY(0px);
    color: var(--color-tile-icon);
}

.tile-icon img,
.tile-icon svg {
    width: var(--tile-icon-size);
    height: var(--tile-icon-size);
    object-fit: contain;
    display: block;
}

.tile-text {
    position: absolute;
    bottom: 5px;
    left: 5px;
    transform: translateY(30px);
    font-size: var(--tile-text-size);
    text-align: center;
    margin-top: 14px;
    color: var(--color-tile-text);
    letter-spacing: .5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}

.tile:hover .tile-text {
    opacity: 1;
    transform: translateY(0);
    transition: opacity.3s ease, transform.4s ease;
}

.tile-glow { --glow-x: 50%; --glow-y: 50%; }

.tile-glow::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient( circle 60px at var(--glow-x) var(--glow-y), var(--color-tile-glow) 0%, var(--color-tile-glow2) 60%, var(--color-tile-glow-transparent) 100% );
    opacity: 1;
    z-index: 1;
    transition: opacity.2s;
}

.tile-glow::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    border: 2px solid var(--color-tile-glow-border);
    box-sizing: border-box;
    z-index: 2;
    opacity: 1;
    mask-image: radial-gradient( circle 60px at var(--glow-x) var(--glow-y), var(--color-tile-glow-mask) 0%, var(--color-tile-glow-mask) 40%, var(--color-tile-glow-transparent) 100% );
    -webkit-mask-image: radial-gradient( circle 60px at var(--glow-x) var(--glow-y), var(--color-tile-glow-mask) 0%, var(--color-tile-glow-mask) 40%, var(--color-tile-glow-transparent) 100% );
    transition: opacity.2s;
}

.tile:not(.tile-glow)::before, .tile:not(.tile-glow)::after { opacity: 0; }

.back-button {
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--color-tile-bg);
    color: var(--color-header);
    border: none;
    padding: 14px 14px;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 2px 6px var(--color-tile-shadow);
}

.back-button:active {
    background: var(--color-tile-bg-active);
    border: 2px solid var(--color-tile-bg-active);
    box-shadow: unset;
    transform: scale(1.01);
}

.tiles-social {
    display: grid;
    grid-template-columns: repeat(4, var(--medium-tile-height));
    grid-auto-rows: auto;
    gap: var(--tile-group-gap);
    justify-items: center;
    max-width: 100px;
}

.tile-group:nth-child(3n) {
    flex-basis: 100%;
}

#notification-container {
    position: fixed;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    max-width: 320px;
}

.notification {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--color-tile-bg);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    padding: 12px;
    position: relative;
    overflow: hidden;

    transition: transform 0.3s ease, opacity 0.3s ease, margin 0.3s ease, max-height 0.3s ease, padding 0.3s ease;

    opacity: 1;
    transform: translateX(100%);
    max-height: 200px;
}

.notification.show {
    transform: translateY(0);
}

.notification.closing {
    transform: translateX(100%);
    margin: 0;
    padding: 0;
    max-height: 0;
}

.notification-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    object-fit: contain;
    color: var(--color-tile-text);
}

.notification.only-header .notification-icon {
    align-self: center;
    width: 32px;
    height: 32px;
}

.notification-content {
    flex: 1;
}

.notification-header {
    color: var(--color-tile-text);
    font-weight: bold;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-message {
    font-size: 14px;
    color: var(--color-tile-text);
}

.notification-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    line-height: 1;
    color: var(--color-tile-text);
}

.notification-close:hover {
  color: #000;
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: var(--color-tile-text);
    width: 100%;
    transition: width linear;
}

@media (max-width: 700px) {
    .start-menu {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0 !important;
        width: 100%;
        height: 100%;
        padding: 20px 20px 20px;
    }

    .start-menu.active {
        transform: translateY(0%);
    }    
    
    .tiles-social {
        display: grid;
        grid-template-columns: repeat(2, var(--medium-tile-height));
        grid-auto-rows: auto;
        gap: var(--tile-group-gap);
        justify-items: center;
    }

    .tile-group:nth-child(3n) {
        flex-basis: unset;
    }

    .back-button {
        display: block;
    }

    .tile-groups {
        flex-direction: column;
        gap: var(--tile-groups-gap);
        align-content: center;
    }

    *{
        --body-padding: 30px;

        --main-text-size: 2rem;
        --header-text-size: 1.5rem;         
        --tile-group-title-text-size: 1rem;
        --tile-text-size: .7rem;
        --tile-groups-gap: 20px;
        --tile-group-gap: 10px;
    }
}

@media (max-width: 540px) { *{ --main-text-size: 1.5rem; } }

/* @media (max-width: 1400px) { *{ --tile-groups-gap: 8px; }} */

@media (max-width: 450px) {
    *{
        --small-tile-height: 48px;
        --small-tile-width: 48px;
        --medium-tile-height: 104px;
        --medium-tile-width: 104px;
        --big-tile-height: 218px;
        --big-tile-width: 218px;
        --wide-tile-height: 104px;
        --wide-tile-width: 218px;
    }
}
