body, html {
    height: 100%;
    margin: 5px;
    background-color: #fff;
    font-family: 'Courier New', Courier, monospace;
}

.grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-columns: repeat(auto-fill, 40px);
    grid-template-rows: repeat(auto-fill, 40px);
    z-index: 0;
}

.content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1, h2 {
    margin-top: 80px;
    margin-bottom: 10px;
    color: black;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(21, 20px);
    grid-template-rows: repeat(21, 20px);
    gap: 0;
    margin: 20px;
    border: 1px solid #ccc;
    padding: 5px;
    background-color: #ffffff;
    width: 420px;
}

.grid-item {
    width: 20px;
    height: 20px;
    cursor: pointer;
    position: relative;
    border: none;
}

.grid-item.white { background-color: white !important; }
.grid-item.black { background-color: black !important; }
.grid-item.yellow { background-color: yellow !important; }
.grid-item.blue { background-color: blue !important; }

.grid-item:hover {
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.grid-item:hover::after {
    content: attr(data-index);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.5);
}

.wallet-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 420px;
    margin: 10px 0;
}

.wallet-icon {
    width: 20px;
    height: 20px;
    background-color: black;
    margin-right: 10px;
}

.button-row {
    display: flex;
    justify-content: space-between;
    width: 420px;
    margin: 10px 0;
}

.button-row button {
    flex: 1;
    margin: 0 3px;
    text-align: center;
}

.mediabutton {
    padding: 10px 20px;
    background-color: black;
    color: white;
    border: none;
    cursor: pointer;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

.mediabutton:hover {
    background-color: white;
    color: black;
    border: 1px solid black;
}

.stats {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #ffffff;
    width: 420px;
    box-sizing: border-box;
}

#owners {
    margin-top: 20px;
    width: 420px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 10px;
    box-sizing: border-box;
    background-color: #ffffff;
}

ul {
    list-style-type: none;
    padding: 0;
}

li {
    margin-bottom: 10px;
}

.square {
    width: 40px;
    height: 40px;
    background-color: #fff;
    transition: background-color 1s;
}

.color-0 { background-color: black; }
.color-1 { background-color: #1a1a1a; }
.color-2 { background-color: #333333; }
.color-3 { background-color: #4d4d4d; }
.color-4 { background-color: #666666; }
.color-5 { background-color: #808080; }
.color-6 { background-color: #999999; }
.color-7 { background-color: #b3b3b3; }
.color-8 { background-color: #cccccc; }
.color-9 { background-color: #e6e6e6; }
.color-10 { background-color: white; }

.hidden {
    display: none;
}

.header-links {
    width: 420px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.header-links a {
    color: black;
    text-decoration: none;
    font-family: 'Courier New', Courier, monospace;
    transition: all 0.3s ease;
}

.header-links a:hover {
    color: white;
    background-color: black;
    padding: 2px 5px;
    border: 1px solid black;
}

.wallet-warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #ccc;
    padding: 20px;
    text-align: center;
    z-index: 1000;
    display: none;
}

.wallet-warning.show {
    display: block;
}

.color-selection {
    margin: 10px 0;
    width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 15px;
}

.color-selection .color-options {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
}

.color-selection .color-option {
    width: 20px;
    height: 20px;
    cursor: pointer;
    border: 1px solid black;
}

.color-option.color-0 { background-color: white; }
.color-option.color-1 { background-color: black; }
.color-option.color-2 { background-color: yellow; }
.color-option.color-3 { background-color: blue; }

#currentImage {
    margin-bottom: 80px;
}
