@font-face {
    font-family: "Splatoon1";
    src: url("../splatoon1.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Regular";
    src: url("../regular.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background-image: url("/assets/en/bg/@2x/bg_stage-e8fe89423bce5899a3edea3884841d9eed10a3099b29482277d0dbd4a25d8b9e.png"); 
    background-repeat: repeat;
    background-size: 800px 800px;
    background-attachment: fixed;
}

.main-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    background: transparent;
    overflow-x: hidden;
}

.content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    max-width: 100vw;
}

.logo-left-align {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px; 
    margin-left: 0;
    gap: 20px;
}

#stage-header-logo {
    position: relative;
    width: 400px; 
    height: 80px; 
    cursor: default;
    pointer-events: none;
    flex-shrink: 0;
}

#stage-header-logo .bg-layer {
    width: 400px;
    height: auto;
    position: relative;
    display: block;
}

#stage-header-logo .icon-layer {
    position: absolute;
    width: 65px; 
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    margin-left: 10px;
}

#stage-header-logo .label-layer {
    position: absolute;
    width: 200px; 
    left: 110px;
    top: 45%;
    transform: translateY(-50%);
    z-index: 2;
}

.stage-info-text {
    margin: 0 auto;
    padding-top: 0px;
    max-width: 1200px;
    text-align: center;
    color: white;
    font-family: "Regular", sans-serif;
    font-size: 24px;
    line-height: 1.3;
}

.stages-container {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding-bottom: 40px;
}

.stages-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 14px;
    padding: 20px;
    box-sizing: border-box;
}

.mode-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.mode-title {
    display: block;
    max-width: 120px;
    height: auto;
    margin: 20px;
}

.mode-text {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mode-text img {
    height: 60px;
    width: auto;
    display: block;
}

.stages {
    display: flex;
    flex-direction: row; 
    gap: 18px;
    width: 100%;
    justify-content: center;
}

.stage-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 400px;
}

.stages img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 10px;
}

.stage-title {
    font-family: "Regular", sans-serif;
    text-align: center;
    font-size: 22px;
    color: white;
    margin: 0 0 15px 0;
}

.ranked-mode-labels {
    text-align: center;
    margin-bottom: 10px;
    margin-top: 0;
}

.battle-mode-text {
    margin-bottom: 4px;
    display: flex;
    justify-content: center;
}

.battle-mode-text img {
    height: 55px;
    width: auto;
    display: block;
}

.ranked-mode-text {
    font-family: "Regular", sans-serif;
    color: white;
    font-size: 22px;
    letter-spacing: 0.7px;
    text-align: center;
}

.rotation-time {
    text-align: center;
    color: white;
    font-family: "Regular", sans-serif;
    font-size: 28px;
    margin: 28px 0 10px 0;
    letter-spacing: 0.7px;
}

.error-message {
    color: white;
    font-family: "Splatoon1", sans-serif;
    text-align: center;
    margin-top: 30px;
}

.loading-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 250px;
    background-color: rgba(0,0,0,0.8);
    border: 3px solid white;
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    user-select: none;
    pointer-events: none;
    box-sizing: border-box;
}

#squid-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

#squid-canvas {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 1920px;
    height: 1080px;
    will-change: transform;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    display: block;
}

#loading-canvas {
    image-rendering: pixelated;
    width: 100px;
    height: 100px;
    display: block;
    margin: 0 auto;
}

#loading-text {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#loading-text img {
    height: 35px;
    width: auto;
    display: block;
}

/* spammed important here since browser didnt want to listen */
@media screen and (max-width: 768px) {
    .content {
        padding: 0;
        width: 100%;
    }

    .stages-container {
        width: 100%;
        max-width: 100%;
        padding: 0 10px 40px 10px;
        box-sizing: border-box;
    }

    .stages-section {
        border-radius: 0;
        width: 100%;
        border-radius: 14px;
    }

    .mode-header {
        flex-direction: column !important;
        gap: 5px !important;
    }

    .mode-title {
        margin: 10px 0 0 0 !important;
        max-width: 100px !important;
    }

    .mode-text img {
        height: 50px !important;
    }

    .stages {
        flex-direction: column !important;
        align-items: center !important;
        gap: 25px !important;
        width: 100% !important;
    }

    .stage-item {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
    }

    .stages img {
        margin-bottom: 5px !important;
        border-radius: 0 !important;
    }

    #stage-header-logo {
        margin-top: 60px !important;
        margin-bottom: 30px !important;
        transform: scale(0.8);
    }

    #stage-header-logo .bg-layer {
        width: 400px !important;
    }

    #stage-header-logo .label-layer {
        width: 200px !important;
        left: 110px !important;
    }

    #stage-header-logo .icon-layer {
        width: 65px !important;
        left: 10px !important;
    }

    .stage-info-text {
    margin: 0 auto;
    padding: 10px;
    max-width: 1200px;
    text-align: center;
    color: white;
    font-family: "Regular", sans-serif;
    font-size: 24px;
    line-height: 1.3;
    }

    .rotation-time {
    text-align: center;
    color: white;
    font-family: "Regular", sans-serif;
    font-size: 28px;
    margin: 28px 0 10px 0;
    letter-spacing: 0.7px;
}
}