body {
    margin: 0;
    overflow: hidden;
    font-family: 'Nunito', sans-serif;
    color: #f1f1f1;
    background-color: #1d2329;
}

h1 {
    font-size: 16px;
    margin-top: 0.5em;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    font-weight: normal;
    color: #f1f1f1;
  }

h2, h3 {
    font-weight: 400;
}

h3 {
    margin-top: 36px;
}

a:link, a:visited {
    color: #d298ff;
    text-decoration: none;
}

a:hover, a:active {
    color: #a4a0d9;
}

.top {
    position: absolute;
    display: flex;
    width: 100%;
    height: 50px;
}

.top_logo {
    width: 220px;
    align-items: center;
    display: flex;
    font-size: 22px;
    justify-content: center;
}

.top_left {
    width: calc(50% - 200px);
    align-items: center;
    display: flex;
    font-size: 14px;
}

.top_center {
    width: 180px;
    align-items: center;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.top_right {
    flex-grow: 1;
    align-items: center;
    display: flex;
    justify-content: flex-end;
    margin-right: 10px;
    gap: 8px;
}

.prizepool {
    background-color: #232a31;
    display: flex;
    border-radius: 18px;
    padding: 2px 12px;
    color: #f1f1f1;
    border: 1px solid #272f37;
}

.prizepool-left {
    display: flex;
    align-items: center;
    margin-right: 8px;
}

.prizepool-left i {
    font-size: 16px;
}

.prizepool-right {
    line-height: 1.1;
}

.mobile-menu-bar {
    background-color: #1d2329;
    display: flex;
    border-radius: 18px;
    padding: 0 12px;
    color: #f1f1f1;
    border: 1px solid #272f37;
    font-size: 12px;
}

.left {
    position: absolute;
    top: 50px; 
    bottom: 0;
    left: 0;
    width: 220px;
    font-size: 15px;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 6px 14px;
    box-sizing: border-box;
}

.left::-webkit-scrollbar { 
    display: none;
}

.main {
    background: #191e23;
    position: absolute;
    left: 220px;
    top: 80px;
    right: 0;
    bottom: 0;
}

.main-top {
    background: linear-gradient(90deg, rgba(35,42,49,0.5) 0%, rgba(35,42,49,1) 40%, rgba(35,42,49,1) 60%, rgba(35,42,49,0.5) 100%);
    height: 30px;
    line-height: 30px;
    position: absolute;
    left: 220px;
    top: 50px;
    right: 0;
    bottom: 0;
    font-family: monospace;
    font-size: 15px;
    display: flex;
    justify-content: center;
}

#logo {
    margin-right: 10px;
    image-rendering: pixelated;
}

#canvas_display {
    display: block;
    margin: 0 auto;
    top: 30px;
}

#canvas_map {
     display: none;
}

.color {
    height: 26px;
    width: 26px;
    border-radius: 13px;
    margin: 3px;
    transition: transform 0.2s ease;
}

.color:hover {
    transform: scale(1.1);
}

.color:active {
    transform: scale(1.0);
}

.dropdown-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    background-color: #1d2329;
    width: min(440px, 94vw);
    top: 50px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    transition: opacity 0.2s, visibility 0.2s linear 0.2s;
    border-radius: 7px;
    border: 1px solid #272f37;
    text-align: center;
}

@media (hover: hover) {
    .top_center:hover .dropdown-content {
        visibility: visible;
        opacity: 1;
        transition-delay: 0s;
    }
}

.dropdown-content.active {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

#rank_list {
    background-color: #21252e;
    width: 100%;
    border-collapse: collapse;
    border-style: hidden;
    text-align: center;
}

#rank_list th {
    background-color: #252932;
    border-bottom: 1px solid #373b43;
    padding: 6px;
    min-width: 40px;
    font-weight: 400;
}

#rank_list td {
    border-bottom: 1px solid #373b43;
    padding: 6px;
    min-width: 40px;
    font-weight: 200;
}

#rank_list tr {
    background-color: transparent;
    transition: background-color 0.2s ease;
}

#rank_list tr:hover {
    background-color: #252932;
}

.buttons {
    text-align: center;
}

.controller {
    font-size: 11px;
    width: 44px;
    height: 44px;
    line-height: 12px;
    padding: 0;
    display: inline-block;
    border: none;
    border-radius: 5px;
    margin: 8px 0;
    background: transparent;
    font-family: 'Nunito', sans-serif;
    color: #a4a0d9;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.controller svg {
    stroke: currentColor;
    fill: none;
    transition: stroke 0.2s ease-in-out, fill 0.2s ease-in-out;
}

.controller:hover,
.controller:active {
    background-color: #2a3139;
    color: #f1f1f1;
}

.controller:hover svg,
.controller:active svg {
    stroke: currentColor;
}

.left .activated {
    background-image: radial-gradient(116.48% 116.48% at 50% 2.27%, #6259bf, #7b71cc);
    color: #f1f1f1;
}

.middot {
    margin: 0 10px;
}

.color-palette {
    display: flex;
    flex-flow: row wrap;
    margin: 16px 0;
}

#color_0 {
    background-color: #FFFFFF;
}

#color_1 {
    background-color: #C3C3C3;
}

#color_2 {
    background-color: #585858;
}

#color_3 {
    background-color: #000000;
}

#color_4 {
    background-color: #88001B;
}

#color_5 {
    background-color: #EC1C24;
}

#color_6 {
    background-color: #FF7F27;
}

#color_7 {
    background-color: #FFCA18;
}

#color_8 {
    background-color: #FDECA6;
}

#color_9 {
    background-color: #FFF200;
}

#color_10 {
    background-color: #C4FF0E;
}

#color_11 {
    background-color: #0ED145;
}

#color_12 {
    background-color: #8CFFFB;
}

#color_13 {
    background-color: #00A8F3;
}

#color_14 {
    background-color: #3F48CC;
}

#color_15 {
    background-color: #B83DBA;
}

#color_16 {
    background-color: #FFAEC8;
}

#color_17 {
    background-color: #B97A56;
}

#pixelx, #pixely {
    display: inline-block;
    min-width: 28px;
}

#price {
    display: inline-block;
    min-width: 106px;
    text-align: left;
}

#owner {
    display: inline-block;
    text-align: left;
}

#nxtt {
    filter: invert(100%);
    margin: 4px 6px;
}

#header_uppercase {
    font-size: 13px;
    color: #a4a0d9;
    font-family: monospace;
    white-space: nowrap;
}

#buy-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

#buy {
    border: 0;
    border-radius: 5px;
    color: #f1f1f1;
    background-image: radial-gradient(116.48% 116.48% at 50% 2.27%, #6259bf, #7b71cc);
    font-family: 'Nunito', sans-serif;
    padding: 0.25rem 0.5rem;
    width: 100%;
    cursor: pointer;
    transition: background-image 0.2s ease, transform 0.2s ease;
}

#account_enable, #withdraw, #withdrawLastPixel, #withdrawMostPixel, #referrer {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 5px;
    background-image: radial-gradient(116.48% 116.48% at 50% 2.27%, #6259bf, #7b71cc);
    color: #f1f1f1;
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    padding: 0.25rem 0.5rem;
    width: 100%;
    margin: 8px 0;
    gap: 6px;
    cursor: pointer;
    transition: background-image 0.2s ease, transform 0.2s ease;
}

#account_enable:hover, #withdraw:hover, #withdrawLastPixel:hover, #withdrawMostPixel:hover, #referrer:hover, #buy:hover {
    background-image: radial-gradient(116.48% 116.48% at 50% 2.27%, rgba(98, 89, 191, 0.8), rgba(123, 113, 204, 0.8));
    color: #f1f1f1;
}

#account_enable:active, #withdraw:active, #withdrawLastPixel:active, #withdrawMostPixel:active, #referrer:active, #buy:active {
    background-image: radial-gradient(116.48% 116.48% at 50% 2.27%, #6259bf, #7b71cc);
    transform: scale(0.98);
}

.modal {
    opacity: 0;
    visibility: hidden;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  
  .modal.show {
    opacity: 1;
    visibility: visible;
  }
  
  .modal-header {
    padding: 0 8px;
    border-bottom: 1px solid #373b43;
  }
  
  .modal-body {
    padding: 2px 16px;
  }
  
  .modal-content {
    position: relative;
    background-color: #1d2329;
    margin: 70px auto;
    padding: 16px;
    width: min(740px, 90vw);
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    border-radius: 7px;
    border: 1px solid #272f37;
  }
  
  .close {
    color: #f1f1f1;
    float: right;
    font-size: 38px;
    border: none;
    background: none;
    position: absolute;
    top: 18px;
    right: 24px;
    transition: color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    transform-origin: center;
  }
  
.close:hover {
    color: #8695aa;
    transform: scale(1.1);
}

.close:hover,
.close:focus {
    color: #BBBBBB;
    text-decoration: none;
    cursor: pointer;
}

.top a:link, .top a:visited, .top a:hover, .top a:active {
    color: #f1f1f1;
    text-decoration: none;
}

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #d8dadb;
    margin-top: 1em;
    padding: 0;
}

li {
    padding-bottom: 6px;
    padding-top: 6px;
}

.switch-container {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.label-text {
    user-select: none;
    margin-right: 4px;
}

.switch-container .slider {
    font-size: 12.75px;
    position: relative;
    display: inline-block;
    width: 2.625em;
    height: 1.5em;
}

.switch-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    border: 2px solid #414141;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.slider:before {
    position: absolute;
    content: "";
    height: 1.1em;
    width: 1.1em;
    left: 0.2em;
    bottom: 0.2em;
    background-color: white;
    border-radius: inherit;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

.switch-container input:checked + .slider {
    box-shadow: 0 0 15px rgba(123, 113, 204, 0.8);
    border: 2px solid #7b71cc;
}

.switch-container input:checked + .slider:before {
    transform: translateX(1.125em);
}

#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    text-align: center;
    background-color: #6a67f3;
    padding: 6px 18px;
    border-radius: 8px;
    box-shadow: 0 0 4px 0px rgba(0, 0, 0, 0.4);
    color: #f1f1f1;
    animation: pulsate 1.5s ease-out infinite;
}

@keyframes pulsate {
    0% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.7;
    }
}

.center {
    display: block;
    margin-left: auto;
    margin-right: auto;
  }

#payout, #sold_pixels, #last_buyer {
    font-weight: 200;
    margin-left: 10px;
}

#rules {
    font-weight: 200;
    color: #cccccc;
    font-size: 14px;
}

#discord {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    cursor: pointer;
    text-align: center;
}

#howtoplay {
    cursor: pointer;
}

#remaining_time {
    font-size: 28px;
    font-weight: 200;
}

.show-on-mobile {
    display: none;
}

.hamburger {
    cursor: pointer;
}

.ch-down {
    font-size: 12px;
    padding: 4px;
    color: #aaa;
}

@media screen and (max-width: 768px) {
    .hide-on-mobile {
        display: none;
    }

    .show-on-mobile {
        display: flex;
        
    }

    .left {
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        width: 100%;
        height: 184px;
        background-color: #1d2329;
        overflow-y: auto;
    }

    .left .buttons {
        display: inline-flex;
        flex-wrap: nowrap;
        width: 100%;
        gap: 10px;
        margin: 0;
        justify-content: center;
    }

    .color-palette {
        display: flex;
        flex-flow: nowrap;
        margin: 12px 0;
        justify-content: center;
    }

    .main {
        position: absolute;
        left: 0;
        top: 80px;
        right: 0;
        bottom: 184px;
    }

    .top_logo {
        width: calc(50% - 85px);
        font-size: 16px;
        margin: 0 10px;
        line-height: 18px;
        justify-content: left;
    }
    
    .top_center {
        width: 130px;
    }

    .dropdown-content {
        left: 0;
        right: 0;
        margin: 0 auto;
    }

    #remaining_time {
        font-size: 22px;
    }

    .main-top {
        left: 0;
    }
}
