main {
    display: block;
    width: 100vw;
    align-items: center;

}

.major-section {
    display: block;
    position: relative;
    overflow: hidden;
}

.centered-section {
    position: relative;
    max-width: 80vw;
    margin-left: auto;
    margin-right: auto;
}

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

.carousel {
    position: relative;
    aspect-ratio: 16/9;
    overflow: visible;
    margin: .2em;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.carousel-slide {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-duration, 0.5s) ease-in-out;
}

.carousel-slide.clickable {
    cursor: pointer;
}

.carousel-slide-current {
    width: 80% !important;
    opacity: 1 !important;
    pointer-events: auto;
    z-index: 2;
}

.carousel-slide-prev, .carousel-slide-next {
    width: 80% !important;
    opacity: 0.5 !important;
    pointer-events: none;
    z-index: 1;
    transform: scale(0.8);
}

.carousel-slide-prev {
    transform: scale(0.8) translateX(-100%);
}

.carousel-slide-next {
    transform: scale(0.8) translateX(100%);
}

.carousel-slide img {
    display: block;
    object-fit: cover;
    width: 100%;
    height: 100%;
    border-radius: 1em;
}

.carousel-slide-content {
    position: absolute !important;
    padding: 2em 1em;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    z-index: 3;
}

.carousel-slide-content.left {
    left: 0;
    right: auto;
}

.carousel-slide-content.right {
    right: 0;
    left: auto;
}

.carousel-slide-content.center {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

.carousel-slide-content.top {
    top: 0;
    bottom: auto;
}

.carousel-slide-content.bottom {
    bottom: 1em;
    top: auto;
}

.carousel-slide-content.center:not(.top):not(.bottom) {
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
}

.carousel-slide-content.top.left,
.carousel-slide-content.top.right,
.carousel-slide-content.bottom.left,
.carousel-slide-content.bottom.right {
    transform: none;
}

.carousel-slide-content.top.center,
.carousel-slide-content.bottom.center {
    transform: translateX(-50%);
}

.carousel-slide-content.center.left,
.carousel-slide-content.center.right {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
}

.carousel-slide-content.default-header-style h3 {
    margin: 0 0 0.5em 0;
    font-size: 1.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.carousel-slide-content.default-content-style {
    font-family: inherit;
    font-size: 1em;
    font-weight: normal;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.carousel-slide-content.default-content-style p {
    margin: 0;
    font-size: 1em;
    opacity: 0.9;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 3em;
    height: 3em;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-nav-left {
    left: 1em;
}

.carousel-nav-right {
    right: 1em;
}

.carousel-controls {
    position: absolute;
    bottom: 1em;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.carousel-dots {
    display: flex;
    gap: 0.5em;
    align-items: center;
}

.carousel-dot {
    width: 0.5em;
    height: 0.5em;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all var(--transition-duration, 0.5s) ease;
    padding: 0;
}

.carousel-dot:hover {
    background: red;
}

.carousel-dot.active {
    width: 1.5em;
    border-radius: 0.25em;
}

.carousel-nav-arrow {
    color: white;
    font-size: 1.2em;
    cursor: pointer;
    padding: 0.3em 0.5em;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 0.2em;
    transition: background var(--transition-duration, 0.5s) ease;
}

.carousel-nav-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
}

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

.genre-card {
    display: inline-block;
    min-width: 6em;
    height: 2em;
    border-radius: 1em;
    background-color: green;
    border: 1px solid var(--font-color);
    padding: 1em;
    margin: 0.5em;
    text-align: center;
    vertical-align: middle;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--font-color);
    cursor: pointer;
    transition: all var(--transition-duration, 0.5s) ease;
}

.genre-card:hover {
    background-color: blue;
}

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

.games-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    padding: 1em;
    width: 100%;
    box-sizing: border-box;
    grid-template-columns: repeat(auto-fill, minmax(min(var(--card-width), 100%), 1fr));
}

.game-card {
    position: relative;
    width: 16vmax;
    height: 16vmax;
    aspect-ratio: 1;
    cursor: pointer;
    overflow: hidden;

    &:hover {
        scale: 1.1;
        transition: all var(--transition-duration, 0.5s) ease-in-out;
    }
}

.game-card-image {
    width: 16vmax;
    height: 16vmax;
    object-fit: cover;
    border-radius: 2em;
    display: block;
}

.game-card-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5em;
    text-align: center;
    font-size: 1.2em;
    font-weight: 400;
    color: white;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4), transparent);
    padding: 0.8em 0.5em 0.5em 0.5em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    z-index: 55;
}

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

.chat-button {
    position: fixed;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    right: 2em;
    bottom: 2em;
    background-color: blue;
    border-radius: .8em;
    padding: 1em;
    min-width: 1.6em;
    text-align: center;
}

.chat-button::after {
    content: '';
    position: absolute;
    bottom: -0.6em;
    right: 0;
    width: 0;
    height: 0;
    border-top: 1em solid blue;
    border-right: 1em solid transparent;
    transform: rotate(-45deg);
}

.chat-button-content {
    font-size: 1.2em;
    font-weight: 400;
    color: white;
    text-align: center;
}

.chat-button-message-count {
    font-size: 0.8em;
    font-weight: 400;
    color: white;
    background-color: red;
    border-radius: 50%;
    padding: 0.4em 0.4em;
    text-align: center;
    position: absolute;
    top: 0;
    right: 0;
}

@keyframes wiggle {
    0% { transform: rotate(0deg); }
   10% { transform: rotate(20deg) scale(1.4); }
   20% { transform: rotate(0deg) scale(1.2); }
   30% { transform: rotate(-20deg) scale(1.4); }
   40% { transform: rotate(0deg) scale(1.2); }
   50% { transform: rotate(10deg) scale(1.2); }
   60% { transform: rotate(0deg) scale(1.1); }
   70% { transform: rotate(-10deg) scale(1.2); }
   80% { transform: rotate(0deg) scale(1.1); }
   90% { transform: rotate(5deg) scale(1.1); }
   100% { transform: rotate(0deg); }
}

.animated {
    display: inline-block;
    animation: wiggle 2s infinite;
}
