body {
    margin: 0;
    overflow: hidden;
    background: #246d6d;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 0px;
    touch-action: none;
}
h1, h2, h3, h4, h5, h6 {
    font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.hidden {
    display: none !important;
}
.container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: grid;
    gap: 0px;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}
.label {
    position: fixed;
    right: 0px;
    left: 0px;
    text-align: center;
    bottom: 10px;
    color: white;
    opacity: 0.5;
    font-size: 12px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", sans-serif;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 999;
    padding: 0 10px;
}
#screen {
    grid-area: 1 / 1 / 1 / 1;
    width: 100%;
    touch-action: none;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}
#screen .paused-notification {
    position: absolute;
    bottom: 0px;
    left: 0px;
    font-size: 16px;
    padding: 4px 8px 4px 4px;
    font-weight: bold;
    color: #fff;
    background-color: #e12929;
    z-index: 999;
    border-top-right-radius: 4px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
#screen.paused {
    border: 4px solid #e12929;
}
.p5Canvas {
    transform: scale(1.02);
}
#controls {
    position: fixed;
    bottom: 100px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    touch-action: none;
}
.control-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    width: 100%;
}
.control-row.time-controller {
    position: absolute;
    bottom: -38px;
    right: 10px;
    width: 80vw;
}
#instructions {
    display: none;
}
.buttons {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
}
button {
    padding: 12px 16px;
    border-radius: 10px;
    background: #c5c5c5;
    color: #3b3b3b;
    cursor: pointer;
    font-family: Arial, sans-serif;
    min-width: 44px;
    font-size: 16px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    border: 2px solid #dddddd;
    box-shadow: 0 2px 0px 0px rgb(0 0 0 / 23%);
    transition: all 0.1s ease-in-out;
}
button.small {
    padding: 8px 12px; /* Smaller touch targets */
    min-height: 36px; /* Minimum touch target size */
    min-width: 36px;
    font-size: 14px; /* Readable text size */
}
button.active, button:active {
    background: #b3b2b2;
    box-shadow: 0 1px 0px 0px rgb(0 0 0 / 23%);
    transform: translateY(1px)
}
button:hover {
    background: #b3b2b2;
}
button.circle {
    min-width: 20px;
    min-height: 20px;
    border-radius: 100px;
    font-size: 11px;
    padding: 0px;
    flex: none;
    font-weight: bold;
}
.painting-reference {
    display: none;
}
#model-status {
    position: absolute;
    bottom: 135px;
    left: 10px;
    z-index: 999;
    font-size: 12px;
    color: #fff;
    background-color: #000;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
#critique-results {
    margin: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
}
#artwork-history {
    position: absolute;
    max-height: 440px;
    overflow-y: scroll;
    width: -webkit-fill-available;
    background-color: rgb(247, 240, 228);
    padding: 10px;
    pointer-events: auto;
    border: 1px solid #888;
}
/* hide scrollbar */
#artwork-history::-webkit-scrollbar {
    display: none;
}
.history-item {
    margin-bottom: 40px;
    position: relative;
}
.history-item>* {
    margin-bottom: 10px;
}
.history-item .grade {
    position: absolute;
    top: 0px;
    right: 0px;
    background-color: #bdc1e3;
    border-bottom-left-radius: 6px;
    padding: 4px 8px;
    box-shadow: 0px 2px 0px 1px rgb(0 0 0 / 23%);
    color: #000;
    font-size: 14px;
    font-weight: bold;
}
.history-item .timestamp {
    font-size: 12px;
    color: #888;
}
.history-item .student-art {
    width: 100%;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 2px 2px 0px 1px rgb(0 0 0 / 23%);
}
#portfolio {
    grid-area: 1 / 1 / 1 / 1;
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    touch-action: none;
    background-color: antiquewhite;
    z-index: 800;
    box-sizing: border-box;
    padding: 20px;
    font-family: Georgia, 'Times New Roman', Times, serif;
    line-height: 1.2em;
    position: relative;
}
#portfolio::-webkit-scrollbar {
    display: none;
}
.hide-on-mobile {
    display: none !important;
}
#about {
    grid-area: 1 / 1 / 1 / 1;
    width: 100%;
    height: 100%;
    touch-action: none;
    background-color: antiquewhite;
    z-index: 800;
    box-sizing: border-box;
    padding: 20px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.2em;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.claude-monet {
    position: absolute;
    width: 200px;
    height: 200px;
    z-index: 999;
    bottom: 0;
    left: 0;
    transition: all 0.3s ease-in-out;
}
.claude-monet.hide {
    transform: translateX(-250px);
}
.claude-monet img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}
.claude-monet .grass {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 120%;
    height: 40px;
    background-color: #557b55;
    border-top-right-radius: 300px;
    z-index: -1;
}
.p5Canvas {
    transition: all 0.3s ease-in-out;
}
.population-container, .time-controls, .wallet-container {
    flex-grow: 1;
    font-family: 'Atkinson Hyperlegible Mono', monospace;
    pointer-events: auto;
    padding: 8px 12px;
    background-color: #202a41;
    border-radius: 80px;
    color: #fff;
    border: none;
    box-shadow: inset 0px 3px 0px 0px rgb(0 0 0 / 30%);
}
.population-container .population-stat, .time-controls, .wallet-container .wallet {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
}
.population-container .population-stat-title {
    font-size: 12px;
    font-weight: bold;
    flex-grow: 1;
}
.population-container .population-stat-value {
    font-size: 16px;
    font-weight: bold;
    flex-grow: 1;
    text-align: right;
}
.time-controls {
    padding: 0px;
    font-size: 14px;
    color: white;
    max-height: 38px;
    position: relative;
}
.time-controls .current-date {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 16px;
}
.play-pause-btn, .game-menu-btn {
    padding: 2px 0px 0px 0px;
    background-color: #333a4b;
    color: #fff;
    border: 2px solid #333a4b;
    box-shadow: none;
    cursor: pointer;
    color: white;
    min-height: 38px;
}
.play-pause-btn {
    border-right: none;
    border-top-left-radius: 80px;
    border-bottom-left-radius: 80px;
}
.game-menu-btn {
    border-top-right-radius: 80px;
    border-bottom-right-radius: 80px;
    border-left: none;
}
.play-pause-btn:hover, .game-menu-btn:hover {
    background-color: #3f4557;
}
.play-pause-btn:active, .game-menu-btn:active {
    transform: none;
}
.play-pause-btn svg {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}
.game-menu {
    position: absolute;
    bottom: 40px;
    right: 6px;
    background-color: #333a4b;
    padding: 8px;
    box-shadow: 0px 2px 0px 1px rgb(0 0 0 / 23%);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    z-index: 9;
    width: max-content;
    height: fit-content;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    border-radius: 16px;
    border-bottom-right-radius: 6px;
}
.game-menu .control-btn {
    pointer-events: auto;
    background: #354875;
    border: 2px solid #4f6597;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.game-menu .control-btn:hover {
    background: #4f6597;
}
/* desktop */
@media screen and (min-width: 900px) {
    .container {
        width: 600px;
        height: fit-content;
        border-radius: 10px;
        grid-template-rows: 30px 460px 1fr;
        border: 1px solid #e8e8e8;
        overflow: hidden;
    }
    .label {
        position: inherit;
        background-color: #bdc1e3;
        border-radius: 6px;
        padding: 12px;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        color: #2b79ff;
        background: linear-gradient(to bottom, #e8e8e8, #d0d0d0);
        font-size: 13px;
        color: #000;
        grid-area: 1 / 1 / 1 / 1;
        bottom: inherit;
        left: inherit;
        right: inherit;
        top: inherit;
        opacity: 1;
        border-bottom: 1px solid #888;
    }
    #screen {
        grid-area: 2 / 1 / 2 / 1;
        width: 100%;
        height: 100%;
        touch-action: none;
        perspective: 1000px;
    }
    #defaultCanvas0.claude-mode {
        width: 600px;
        height: 460px;
        transform-style: preserve-3d;
        transform: rotateX(65deg) scale(0.7) translateY(150px) translateZ(-50px);
    }
    #controls {
        position: relative;
        padding: 10px 6px;
        background: linear-gradient(to bottom, #e8e8e8, #d0d0d0);
        display: flex;
        flex-direction: column;
        gap: 10px;
        justify-content: space-around;
        align-items: center;
        border-radius: 6px;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        grid-area: 3 / 1 / 3 / 1;
        bottom: inherit;
        left: inherit;
        right: inherit;
        top: inherit;
        border-top: 1px solid #888;
    }
    #portfolio {
        grid-area: 2 / 1 / 4 / 1;
        max-height: 75vh;
    }
    #about {
        grid-area: 2 / 1 / 4 / 1;
    }
    .control-row:not(:last-child) {
        margin-bottom: 10px;
    }
    .control-row.time-controller {
        position: inherit;
        bottom: inherit;
        right: inherit;
        width: 100%;
    }
    .painting-reference {
        display: block;
        position: absolute;
        top: 40px;
        left: -170px;
        transform: rotate(-3deg);
        background-color: wheat;
        border-radius: 6px;
        padding: 6px;
        box-shadow: 2px 2px 0px 1px rgb(0 0 0 / 23%);
        z-index: 1000;
    }
    .painting-reference img {
        width: 180px;
    }
    .painting-reference .sticker {
        position: absolute;
        top: -26px;
        left: 78px;
        pointer-events: none;
        height: 50px;
        width: 34px;
    }
    /* make an octagon */
    .sticker::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #2B79FF;
        clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    }
    .hide-on-mobile {
        display: inline !important;

    }
}