body {
    font-family: 'Press Start 2P', cursive;
    padding: 20px;
    background-color: #cccccc !important;
    color: #333333;
    position: relative;
    min-height: 100vh;
}

.page-wrapper {
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
}

.main-container {
    width: 100%;
    max-width: 800px; /* Adjust based on your needs */
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.tomasz-svg-container {
    position: fixed;
    top: 0;
    right: -100px; /* Adjust as needed */
    width: 100%;
    max-width: 612px;
    z-index: 0;
    pointer-events: none; /* This allows clicks to pass through to elements behind */
}

#tomasz-svg {
    width: 100%;
    height: auto;
    max-height: 100vh;
    object-fit: contain;
}

#main-container {
    max-width: 1000px; /* Increased from 800px */
    width: calc(100% - 240px);
    margin-left: 64px; /* Changed from 240px to 64px */
    background-color: #f9f9f9; /* Slightly darker background */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
}

.attribute-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.attribute-option {
    flex: 1 1 0;
    min-width: 0;
    margin: 0 5px 10px;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: auto;
    min-height: 60px; /* Adjust this value as needed */
}

.attribute-option span {
    font-size: 12px; /* Start with a small font size */
    line-height: 1.2;
    word-break: break-word;
}

/* Ensure buttons don't get too small on larger screens */
@media (min-width: 768px) {
    .attribute-option {
        flex-basis: calc(20% - 10px);
        max-width: calc(20% - 10px);
    }
}

/* Allow buttons to stack on smaller screens */
@media (max-width: 767px) {
    .attribute-option {
        flex-basis: calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
}

/* For very small screens, full width buttons */
@media (max-width: 480px) {
    .attribute-option {
        flex-basis: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

#connection-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#imagePromptContainer {
    position: relative;
    cursor: pointer;
}

.copy-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

#imagePromptContainer:hover .copy-overlay {
    opacity: 1;
}

.copy-notification {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.copy-notification.show {
    opacity: 1;
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.loading-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
}

/* Custom styles for better spacing */
.nes-field, .nes-container {
    margin-bottom: 20px;
}

.nes-btn {
    margin: 10px 0;
}

#concept {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    position: relative;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.button-container {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.button-container .nes-btn {
    min-width: 200px; /* Adjust this value as needed */
}

#pachinko-container {
    margin-top: 20px;
    margin-bottom: 20px;
    background-color: #ffffff; /* White background */
    padding: 20px;
    border-radius: 8px;
}

#results {
    margin-top: 20px;
    background-color: #ffffff; /* White background */
    padding: 20px;
    border-radius: 8px;
}

/* Adjust input fields for better visibility */
.nes-input, .nes-textarea {
    background-color: #ffffff;
    border: 1px solid #d3d3d3;
}

/* Adjust slider track color for better visibility */
.nes-progress {
    background-color: #d3d3d3;
}

/* Media query for larger screens */
@media (min-width: 1200px) {
    .page-wrapper {
        justify-content: flex-start;
        padding-left: calc(50% - 600px); /* Adjust based on your main container width */
    }

    .tomasz-svg-container {
        right: calc(50% - 800px); /* Adjust based on your main container width */
    }
}

/* Media query for smaller screens */
@media (max-width: 1199px) {
    #main-container {
        width: calc(100% - 120px); /* Adjust as needed */
        margin-left: 32px; /* Adjust as needed */
    }

    .tomasz-svg-container {
        right: -200px; /* Move it even more to the right on smaller screens */
    }
}
