@font-face {
    font-family: 'Cabin Condensed';
    src: local('Cabin Condensed'), url(resources/Cabin\ Condensed.ttf) format('truetype');
}

page {
    opacity: 0;
    animation: fadeIn 1.25s ease forwards;
    animation-delay: 0.05s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

:root {
    --tooth-space: 1.25;
    --tooth-y: 2vh;
    --screen: calc(6.103vw + 10.807vh);
    --screen-scale: calc(var(--screen) / 2);
    --rest-color: white;
    --hover-color: #b8e9fc;
    --bounciness: 1.5;
    --switch-width: 3.5vw;
    --switch-height: 4vh;
    --slider-color: #ccc;
    --slider-knob-size: calc(var(--switch-height) - 8px);
    --slider-knob-offset: 4px;
}

html, body{
    height: 100%;
    font-family: "Cabin Condensed";
}

body{
    background-color: white;
    overflow: hidden;
}

.text{
    font-size: calc(var(--screen) / 9); /* calc / 8 = 1.3*/
    color: white;
}

.pricing {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    z-index: 10;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 250px;
}

.featured {
    border: 3px solid black;
}

button {
    padding: 12px 25px;
    cursor: pointer;
}

#autobuyer-logo {
    position: fixed;
    z-index: 4;
    width: 23vh;
    height: auto;
    left: 0;
    transform: translate(45%, 90.7vh);
    user-select: none;
}

#background-top {
    background: radial-gradient(#3ac7ff 60%, #1d94c3);
}

#background-top-shadow{
    height: 15vh;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
    mix-blend-mode: multiply;
    opacity: 0.6;
}

#bottom-text-warning {
    position: relative;
    display: flex;
    justify-content: center;
    font-size: calc(var(--screen) / 11); /* calc / 8 = 1.3*/
    top: 2vh;
    z-index: 4;
    user-select: none;
}

#background-bottom {
    background: radial-gradient(#3ac7ff 60%, #1d94c3);
    clip-path: polygon(0 0, 100% 0, 100% 6.5vh, 0 6.5vh);
    top: 94%;
    bottom: 0;
}

#background-bottom-shadow {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 30vw;
    background-repeat: no-repeat;
    mix-blend-mode: difference;
    background-size: 100% auto;
    opacity: 0.9;
    transform: translateY(50%);
    background-image: url('/resources/bottom-shadow.png');
}

#background{
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-image: url("resources/BG.png");
}

.background-properties{
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    left: 50%;
    translate: -50% 0%;
    opacity: 1;
}

#background-container{
    clip-path: polygon(
        0% 100%, 2.9412% calc(100% - (var(--tooth-y) * var(--tooth-space))), 
        5.8824% 100%, 8.8235% calc(100% - (var(--tooth-y) * var(--tooth-space))), 
        11.7647% 100%, 14.7059% calc(100% - (var(--tooth-y) * var(--tooth-space))), 
        17.6471% 100%, 20.5882% calc(100% - (var(--tooth-y) * var(--tooth-space))), 
        23.5294% 100%, 26.4706% calc(100% - (var(--tooth-y) * var(--tooth-space))), 
        29.4118% 100%, 32.3529% calc(100% - (var(--tooth-y) * var(--tooth-space))), 
        35.2941% 100%, 38.2353% calc(100% - (var(--tooth-y) * var(--tooth-space))), 
        41.1765% 100%, 44.1176% calc(100% - (var(--tooth-y) * var(--tooth-space))), 
        47.0588% 100%, 50% calc(100% - (var(--tooth-y) * var(--tooth-space))), 
        52.9412% 100%, 55.8824% calc(100% - (var(--tooth-y) * var(--tooth-space))), 
        58.8235% 100%, 61.7647% calc(100% - (var(--tooth-y) * var(--tooth-space))), 
        64.7059% 100%, 67.6471% calc(100% - (var(--tooth-y) * var(--tooth-space))), 
        70.5882% 100%, 73.5294% calc(100% - (var(--tooth-y) * var(--tooth-space))), 
        76.4706% 100%, 79.4118% calc(100% - (var(--tooth-y) * var(--tooth-space))), 
        82.3529% 100%, 85.2941% calc(100% - (var(--tooth-y) * var(--tooth-space))), 
        88.2353% 100%, 91.1765% calc(100% - (var(--tooth-y) * var(--tooth-space))), 
        94.1176% 100%, 97.0588% calc(100% - (var(--tooth-y) * var(--tooth-space))), 
        100% 100%, 100% 75%, 0% 75%
    );

    translate: -50% -90%;
    pointer-events: none;
    z-index: 5;
}

#background-gradient {
    background: radial-gradient(circle, transparent 75%, #1d94c3);
    z-index: 4;
}

#star-pattern {
    background-size: 10%;  
    translate: -50% 0%;
    z-index: 2;
    max-width: 100%;
    opacity: 0.10;
    animation: pan 50s linear infinite;
    will-change: background-position;
    background-image: url("resources/pattern.svg");
}

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

#manual-wrapper {
    position: absolute;
    bottom: 1.5vh;
    transition: bottom 0.25s ease-out;
    transform-origin: left bottom;
    width: 6.103vw;
    height: 12vh;
}

#manual-wrapper:hover {
    bottom: 3vh;
}

#manual-wrapper a {
    -webkit-user-drag: none;
}

#manual {
    position: relative;
}

.manual-scale {
    width: var(--screen-scale);
    height: calc(var(--screen-scale) * 1.2);
}

#manual-button {
    position: absolute;
    user-select: none;
    -webkit-user-drag: none;
}

#manual-tag-handle {
    position: absolute;
    z-index: -1;
    transform: translateX(99%);
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

#manual-icon {
    position: relative;
    width: calc(var(--screen) / 2.2);
    height: calc(var(--screen) / 2.2);
    transition: filter 0.25s ease-out, transform 0.25s ease-out;
    will-change: transform;
    transform: rotate(0deg);
    scale: 0.6;
    transform: translate(7%, -20%);
    pointer-events: none;
    user-select: none;
}

#manual-wrapper:hover #manual-icon {
    filter: brightness(130%);
}

.manual-text {
    position: absolute;
    z-index: 3;
    font-size: calc(var(--screen) / 7.5);
    transform: translate(18%, 170%);
    user-select: none;
    pointer-events: none;
}

/*////////////////////////////////////////////////////////////////////////*/

#options-panel {
    /* From https://css.glass */
    background: rgba(255, 255, 255, 0.19);
    border-radius: calc(var(--screen) / 10);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(calc(var(--screen) / 60));
    border: calc(var(--screen) / 80) solid rgba(255, 255, 255, 0.45);

    position: fixed;
    left: 50%;
    top: 51%;
    width: 78%;
    height: 78%;
    transform: translate(-50%, -50%);
    
    box-sizing: border-box;
}

.flex-container {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: flex-start;
}

.left-column, .right-column {
    flex: 3;
    overflow: auto;
    box-sizing: border-box;
    user-select: none;
}

.left-column {
    transition: flex 0.17s ease-in-out;
    flex: 0.15;
    height: 100%;
    text-align: left;
    background: rgba(58, 199, 255, 1);
    border-radius: calc(var(--screen) / 10);
    padding: calc(var(--screen) / 15);
}

.left-column:hover {
    flex: 0.8;
}

.left-column:hover .image-button {
    width: 100%;
}

.button-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: calc(var(--screen) / 15);
}

.image-button {
    width: calc(var(--screen) / 3.3);
    height: calc(var(--screen) / 3.3);
    color: #525252;
    background-color: white;
    transition: width 0.17s ease-in-out, background-color 0.3s ease-in-out, color 0.3s ease-in-out, border 0.3s ease-in-out;
    display: flex;
    align-items: center;
    text-align: left;
    overflow: hidden;
    white-space: nowrap;
    padding: calc(var(--screen) / 20);
    border: calc(var(--screen) / 160) solid rgba(163, 163, 163, 0.5);
    border-radius: calc(var(--screen) / 5);
    cursor: pointer;
    font-family: "Cabin Condensed" !important;
}

.image-button:hover {
    background-color: rgb(135, 221, 255);
    border: calc(var(--screen) / 160) solid #1d94c3;
    color: white;
}

.image-button img {
    margin: calc(var(--screen) / 15);
    margin-left: calc(var(--screen) / 40);
    height: calc(var(--screen) / 6.5);
    transition: transform 0.3s ease-in-out, background-color 0.3s ease-in-out, filter 0.3s ease-in-out;
}

.image-button:hover img {
    animation: squishStretchAndRotate 0.3s linear;
    transform: rotate(-20deg);
    filter: grayscale(100%) brightness(1000%) contrast(100%);
    -webkit-filter: grayscale(100%) brightness(1000%) contrast(100%);
}

@keyframes squishStretchAndRotate {
    0% {
        transform: rotate(0deg) scaleX(1) scaleY(1);
    }
    20% {
        transform: rotate(-4deg) scaleX(calc(1 + (0.2 * var(--bounciness)))) scaleY(calc(1 - (0.2 * var(--bounciness))));
    }
    40% {
        transform: rotate(-10deg) scaleY(calc(1 + (0.2 * var(--bounciness))));
    }
    60% {
        transform: rotate(-20deg) scaleY(calc(1 - (0.1 * var(--bounciness))));
    }
    80% {
        transform: rotate(-20deg) scaleX(calc(1 - (0.1 * var(--bounciness)))) scaleY(calc(1 + (0.1 * var(--bounciness))));
    }
    100% {
        transform: rotate(-20deg) scaleX(1) scaleY(1);
    }
}

.selected-menu {
    background-color: #3ac7ff;
    border: calc(var(--screen) / 160) solid #1d94c3;
    color: white;
}

.selected-menu img {
    filter: grayscale(100%) brightness(1000%) contrast(100%);
}

.right-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    height: 100%;
    width: 100%;
    overflow: auto;
    box-sizing: border-box;
}

.right-column td:first-child {
    color: #525252;
    left: 0;
    text-align: left;
    font-size: calc(var(--screen) / 9); /* calc / 8 = 1.3*/
    letter-spacing: 0.05px;
}

.table-center td:first-child {
    text-align: center;
}



/*////////////////////////////////////////////////////////////////////////*/

.home {
    display: flex;
    justify-content: flex-start;
    align-items: center; 
    text-align: center;
    height: 100%;
}

.home h1, .home h2, .home h3 {
    margin: 2px;
    color: #13b0f3;
}

.home h1 {
    font-size: calc(var(--screen) / 1.5); /* calc / 8 = 1.3*/
    letter-spacing: -2px;
}

.home h3 {
    font-size: calc(var(--screen) / 12); /* calc / 8 = 1.3*/
    margin: 0px;
}

.home .enabler {
    margin-top: 30px;
}

.home .separator {
    margin-bottom: 20px;
}

a{
    text-decoration: none;
}

.home a {
    color: #13b0f3;
}

.home-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 92%;
    text-align: center;
    padding: 20px;
}

.value {
    margin-top: 15px;
}

#page-indicator {
    margin: 15px;
}

.results-found {
    margin: 5px;
    text-align: left;
}

/* Customize the vertical and horizontal scrollbar width/height */
::-webkit-scrollbar {
    width: calc(var(--screen) / 12);   /* Vertical scrollbar width */
    height: calc(var(--screen) / 12);  /* Horizontal scrollbar height */
    overflow: auto;
}

/* Set the background color of the scrollbar track */
::-webkit-scrollbar-track {
    background: transparent;
}

/* Customize the scrollbar thumb */
::-webkit-scrollbar-thumb {
    background: #13b0f3;
    border-radius: 8px;
}

/* Change the appearance of the scrollbar thumb on hover */
::-webkit-scrollbar-thumb:hover {
    background: #56d2ff;
}

/* Customize the scrollbar buttons (arrows) */
::-webkit-scrollbar-button {
    display: none;
}

/*////////////////////////////////////////////////////////////////////////*/

.table {
    border-collapse: collapse;
    width: 100%;
}

.table tr {
    font-size: calc(var(--screen) / 9); /* calc / 8 = 1.3*/
    letter-spacing: -0.3px;
    font-weight: bold;

    background-color: rgba(82, 82, 82, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(calc(var(--screen) / 60));

    padding: 5px;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    margin-bottom: 5px;
    transition: background-color 0.3s ease-in-out;
}

.table td {
    flex: 2;
    margin-left: 10px;
}

/* Apply the checked-row class with higher specificity */
table:not(.ignore-alternate-rows) tr.checked-row {
    background-color: #c0ffb3;
}

table:not(.ignore-alternate-rows) tr.battledome-row {
    background-color: #ffb3b3;
}

table:not(.ignore-alternate-rows) tr.quest-row {
    background-color: #ffd9b3;
}

table:not(.ignore-alternate-rows) tr.deposit-row {
    background-color: #b3d0ff;
}

table:not(.ignore-alternate-rows) tr.gallery-row {
    background-color: #fcffb3;
}


.table-header th {
    flex: 2;
    padding: 10px;
    margin-left: 10px;
    text-align: center;
    background-color: #3ac7ff;
    color: white;
}

.table-header th::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;

    background-color: inherit;
    border-radius: 20px;
}

.table-header {
    text-align: center;
}

.center-buttons{
    display: flex;
    align-items: center;
    justify-content: center;
}

.button input {
    display: none;
}

.button, .autobuyerButton {
    font-family: "Cabin Condensed";
    font-size: calc(var(--screen) / 9); /* calc / 8 = 1.3*/
    font-weight: bold;

    color: #525252;
    background-color: white;

    transition: width 0.17s ease-in-out, background-color 0.3s ease-in-out, color 0.3s ease-in-out, border 0.3s ease-in-out;
    border: 2px solid rgba(163, 163, 163, 0.5);
    border-radius: 10px;

    width: 14.5vw;
    height: 8vh;
    margin: 15px;
}

.longButton {
    width: 400px;
}

.small-button {
    width: 8vw;
}

.button:hover, .autobuyerButton:hover {
    background-color: #3ac7ff;
    border: 2px solid #1d94c3;
    color: white;
}

.controller-container{
    display: flex;
}

.controller-name {
    display: flex;
    flex-grow: 1;
    margin-left: 8px;
    align-items: center;
}

.element-button {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 15px;
    left: 0px;
    margin: 0px;
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: calc(var(--screen-scale) / 4.5);
}

.switch {
    display: inline-block;
    width: var(--switch-width);
    height: var(--switch-height);
    position: relative;
    
}

.switch input {
    display: none;
}

.slider {
    background-color: var(--slider-color);
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    cursor: pointer;
    transition: background-color 0.4s;
}

.slider:before {
    content: "";
    position: absolute;
    left: var(--slider-knob-offset);
    bottom: var(--slider-knob-offset);
    width: var(--slider-knob-size);
    height: var(--slider-knob-size);
    background-color: #fff;
    transition: transform 0.4s;
}

input:checked + .slider {
    background-color: #13b0f3;
}

input:checked+.slider-danger {
    background-color: #ff515f;
}

input:focus+.slider-danger {
    box-shadow: 0 0 1px #ff515f;
}

input:checked + .slider:before {
    transform: translateX(calc(var(--switch-width) - var(--switch-height)));
}

.slider.round {
    border-radius: var(--switch-height);
}

.slider.round:before {
    border-radius: 50%;
}

.danger-input {
    background: linear-gradient(21deg, #d9181b, #f05e66) !important;
}

.input, select {
    position: relative;
    background-color: #13b0f3;
    padding: 2px;
    display: inline-block;
    border-radius: 9999em;
}

select, .battledome-weapon {
    background: white;
    width: 250px;
}

.input > * {
    position: relative;
    display: inherit;
    border-radius: inherit;
    margin: 0;
    border: none;
    outline: none;
    z-index: 1;
}

.input input, select, select option {
    font-family: "Cabin Condensed";
    line-height: inherit;
    color: #525252;
    padding-left: 5px;
    text-align: center;
    border: none;
    outline: none;
    font-size: calc(var(--screen) / 9); /* calc / 8 = 1.3*/
    letter-spacing: -0.5px;
    font-weight: bold;
    transition: all 0.5s;
}

.danger-input input:focus, 
.danger-input select:focus { 
    box-shadow: inset 0 0 0 3px #fff,
                0 0 0 4px #fff,
                3px -3px 30px #d9181b, 
                -3px 3px 30px #f05e66 !important;
}

/* Ensure .input does not get overridden */
.input:not(.danger-input) input:focus, 
.input:not(.danger-input) select:focus {
    box-shadow: inset 0 0 0 3px #fff,
                0 0 0 4px #fff,
                3px -3px 30px #18a3d9, 
                -3px 3px 30px #5fccf0 !important;
}

.input input:disabled {
    color: #9f9f9f;
    background-color: #f1f1f1;
    border-radius: inherit;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.notation { 
    color: white;
    font-size: calc(var(--screen) / 9); /* calc / 8 = 1.3*/
    padding-left: 10px;
    padding-right: 10px;
    font-weight: bold;
}

.tooltiptext {
    display: none;
}