body {
    margin: 0;
    overflow: hidden;
    font-family: 'Nunito', sans-serif;
    color: #222255;
}

h2, h3 {
    font-weight: 400;
}

a:link {
    color: #436AAC;
    text-decoration: none;
  }
  
  a:visited {
    color: #436AAC;
    text-decoration: none;
  }
  
  a:hover {
    color: #436AAC;
    text-decoration: underline;
  }
  
  a:active {
    color: #436AAC;
    text-decoration: underline;
  }

.top {
    background: #45484d;
    background: linear-gradient(to right, #45484d 220px,#5a5e64 50%,#5a5e64 calc(50% + 220px),#45484d 100%);
    color: white;
    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;
}

.top_right {
    flex-grow: 1;
    align-items: center;
    display: flex;
    justify-content: flex-end;
}

.left {
    background-color: #f0f2f3;
    position: absolute;
    left: 0; top: 50px; bottom: 0;
    width: 220px;
    font-size: 15px;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
}

.left::-webkit-scrollbar { 
    display: none;
}

.main {
    background: #bcbfbe;
    background: radial-gradient(ellipse at center, #bcbfbe 0%,#a5a7a6 100%);
    position: absolute;
    left: 220px; top: 80px; right: 0; bottom: 0;
    box-shadow: inset 10px 10px 10px 0px #999999;
}

.main-top {
    background-color: #e7e8e9;
    height: 30px;
    text-align: center;
    vertical-align: middle;
    line-height: 30px;
    position: absolute;
    left: 220px; top: 50px; right: 0; bottom: 0;
    font-family: monospace;
    font-size: 15px;
}

#logo {
    margin-right: 8px;
    background: linear-gradient(180deg, white 0%, #f0f2f3 100%);
    border-radius: 4px;
    padding: 2px;
}

#canvas_display {
    display: block;
    margin: 0 auto;
    top: 30px;
    filter: drop-shadow(rgba(0, 0, 0, 0.1) 0px 8px 16px);
}

#canvas_map {
     display: none;
}

.color {
    height: 32px;
    width: 32px;
}

.dropdown-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    background: rgb(42,42,42);
    background: linear-gradient(0deg, rgba(42,42,42,1) 50%, rgba(69,72,77,1) 100%);
    width: 460px;
    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;
}

.top_center:hover .dropdown-content {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.controller {
    font-size: 11px;
    width: 48px;
    height: 48px;
    padding: 0;
    display: inline-block;
    border: none;
    border-radius: 0.25rem;
    margin: 8px -2px;
    text-decoration: none;
    background: transparent;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    text-align: center;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.controller:hover {
    border: 1px solid #436AAC;
    background: white;
    color: #436AAC;
}

.left .activated {
    border: 1px solid #436AAC;
    background: white;
    color: #436AAC;
}

.middot {
    margin: 0 10px;
}

#buy-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

#buy {
    border: 0;
    border-radius: 0.25rem;
    color: white;
    background: #436AAC;
    background: linear-gradient(225deg, #8929AD 0%, #436AAC 100%);
    font-family: 'Nunito', sans-serif;
    padding: 0.25rem 0.5rem;
    width: 100%;
    cursor: pointer;
}

#buy:hover {
    background: #436AAC;
    background: linear-gradient(45deg, #8929AD 0%, #436AAC 100%);
}

.left-content {
    margin: 14px;        
}
.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;
}

 #color_0:hover, #color_1:hover, #color_2:hover, #color_3:hover, #color_4:hover, #color_5:hover, #color_6:hover, #color_7:hover, #color_8:hover, #color_9:hover, #color_10:hover, #color_11:hover, #color_12:hover, #color_13:hover, #color_14:hover, #color_15:hover, #color_16:hover, #color_17:hover {
    box-shadow: 0px 0px 2px 0px black;
    z-index: 0;
}
#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: #CCCCCC;
    font-family: monospace;
    white-space: nowrap;
}

#account_enable, #withdraw, #withdrawLastPixel, #withdrawMostPixel, #referrar {
    border: 1px solid #dcdcdc;
    border-radius: 0.25rem;
    background: #f4f6f7;
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    white-space: nowrap;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    margin: 8px 0;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

#account_enable:hover, #withdraw:hover, #withdrawLastPixel:hover, #withdrawMostPixel:hover, #referrar:hover {
    background: #fafafb;
    border-color: #436AAC;
    color: #436AAC;
}

#metamask {
    width: 20px;
    vertical-align: text-top;
    padding-right: 10px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0,0,0);
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  position: relative;
  background-color: #fefefe;
  margin: 70px auto;
  padding: 0;
  max-width: 800px;
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
  -webkit-animation-name: animatetop;
  -webkit-animation-duration: 0.2s;
  animation-name: animatetop;
  animation-duration: 0.2s
}

@-webkit-keyframes animatetop {
  from {top:-300px; opacity:0} 
  to {top:0; opacity:1}
}

@keyframes animatetop {
  from {top:-300px; opacity:0}
  to {top:0; opacity:1}
}

.close {
  color: white;
  float: right;
  font-size: 28px;
}

.close:hover,
.close:focus {
  color: #BBBBBB;
  text-decoration: none;
  cursor: pointer;
}

.modal-header {
  padding: 1px 12px 1px 24px;
  background-color: #45484d;
  color: white;
}

.modal-body {
    padding: 2px 16px;
}

.discord {
    display: flex;
    background: #5865F2;
    margin-right: 10px;
    font-size: 20px;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: white;
}

.top a:link, .top a:visited, .top a:hover, .top a:active {
    color: white;
    text-decoration: none;
}

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #d8dadb;
    margin-top: 1em;
    padding: 0;
}
.buttons {
    text-align: center;
}

.buttons i {
    font-size: 24px;
    margin: 2px 0;
    background-color: #436AAC;
    background-image: linear-gradient(45deg, #8929AD 0%, #436AAC 50%, #43B7B8 100%);
    background-size: 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -moz-background-clip: text;
    -webkit-text-fill-color: transparent; 
    -moz-text-fill-color: transparent;
}

li {
    padding-bottom: 10px;
}

.form-switch {
  display: inline-block;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.form-switch i {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
  background-color: #e6e6e6;
  border-radius: 11px;
  vertical-align: text-bottom;
  transition: all 0.3s linear;
}

.form-switch i::before {
  content: "";
  position: absolute;
  left: 0;
  width: 38px;
  height: 18px;
  background-color: white;
  border-radius: 9px;
  transform: translate3d(2px, 2px, 0) scale3d(1, 1, 1);
  transition: all 0.25s linear;
}

.form-switch i::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 18px;
  background-color: white;
  border-radius: 9px;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
  transform: translate3d(2px, 2px, 0);
  transition: all 0.2s ease-in-out;
}

.form-switch:active i::after {
  width: 28px;
  transform: translate3d(2px, 2px, 0);
}

.form-switch:active input:checked + i::after { transform: translate3d(16px, 2px, 0); }

.form-switch input { display: none; }

.form-switch input:checked + i { background-color: #436AAC; }

.form-switch input:checked + i::before { transform: translate3d(18px, 2px, 0) scale3d(0, 0, 0); }

.form-switch input:checked + i::after { transform: translate3d(22px, 2px, 0); }

h1 {
  font-size: 16px;
  margin-top: 0.5em;
  margin-bottom: 0;
  margin-left: 0;
  margin-right: 0;
  font-weight: normal;
  color: #436AAC;
}

#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    text-align: center;
    background: linear-gradient(225deg, rgba(137, 41, 173, 0.9) 0%, rgba(67, 106, 172, 0.9) 100%);
    padding: 6px 18px;
    border-radius: 8px;
    box-shadow: 0 0 4px 0px rgba(0, 0, 0, 0.4);
    color: white;/* Pulsating animation */
    animation: pulsate 1.5s ease-out infinite;
}

/* Keyframes for pulsating effect */
@keyframes pulsate {
    0% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.7;
    }
}

.dropdown-p {
    text-align: center;
}

#rank_list {
    background: rgb(42,42,42);
    background: linear-gradient(0deg, rgba(42,42,42,1) 0%, rgba(58,58,58,1) 100%);
    width: 100%;
    border-collapse: collapse;
    border-style: hidden;
    text-align: center;
}

#rank_list th {
    border: 1px solid #5f5f5f;
    padding: 8px;
    min-width: 40px;
    font-weight: 400;
}

#rank_list td {
    border: 1px solid #5f5f5f;
    padding: 8px;
    min-width: 40px;
    font-weight: 200;
}

.center {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 20%;
  }

#payout, #sold_pixels, #last_buyer {
    font-weight: 200;
    margin-left: 10px;
}

#rules {
    font-weight: 200;
    color: #cccccc;
    font-size: 14px;
}

#modeToggle {
    font-size: 18px;
    cursor: pointer;
    border: none;
    background: none;
}
  
/* Dark Mode Styles */
body.dark-mode {
    background-color: #222e3c;
    color: #fafafa;
}

body.dark-mode .left {
    background-color: #222e3c;
}

body.dark-mode .main-top {
    background-color: #222e3c;
}

body.dark-mode h1 {
    color: #fafafa;
}

body.dark-mode .left .activated {
    border: 1px solid #518be1;
    background: #2b3947;
    color: #fafafa;
}

body.dark-mode .controller:hover {
    background: #2b3947;
}

body.dark-mode .main {
    background: #19222c;
    box-shadow: none;
}

body.dark-mode .controller {
    color: #fafafa;
}

body.dark-mode .modal-body {
    background: #19222c;
}

body.dark-mode #account_enable,
body.dark-mode #withdraw,
body.dark-mode #withdrawLastPixel,
body.dark-mode #withdrawMostPixel,
body.dark-mode #referrar {
    border: 1px solid #518be1;
    background: #2b3947;
    color: #fafafa;
}

body.dark-mode #account_enable:hover,
body.dark-mode #withdraw:hover,
body.dark-mode #withdrawLastPixel:hover,
body.dark-mode #withdrawMostPixel:hover,
body.dark-mode #referrar:hover {
    border-color: #fafafa;
}

body.dark-mode .buttons i {
    background-image: linear-gradient(45deg, #a638d0 0%, #518be1 50%, #66c6c7 100%);
}

body.dark-mode a {
    color: #518be1;
}

body.dark-mode .modal-header {
    background-color: #222e3c;
}

body.dark-mode .top {
    background: #19222c;
    background: linear-gradient(to right, #19222c 220px,#2b3947 50%,#2b3947 calc(50% + 220px),#19222c 100%);
}

.show-on-mobile {
    display: none;
}

.hamburger {
    cursor: pointer;
    margin: 10px;
}

.ch-down {
    font-size: 16px;
    color: #aaa;
}

@media screen and (max-width: 768px) {
    .hide-on-mobile {
        display: none;
    }

    .show-on-mobile {
        display: flex;
    }

    .left {
        display: none;
        position: absolute;
        left: auto; top: 80px; right: 0; bottom: 0;
        background-color: #f0f2f3; 
        z-index: 1000;
        overflow-y: auto;
    }

    .main {
        left: 0; top: 80px; right: 0; bottom: 0;
    }

    .main-top {
        background-color: #e7e8e9;
        height: 30px;
        text-align: center;
        vertical-align: middle;
        line-height: 30px;
        position: absolute;
        left: 0; top: 50px; right: 0; bottom: 0;
        font-family: monospace;
        font-size: 15px;
    }

    .top {
        background: linear-gradient(to right, #45484d 0%,#5a5e64 50%,#45484d 100%);
    }

    .top_logo {
        width: 220px;
        align-items: center;
        display: flex;
        font-size: min(5vw, 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;
    }
}
