body {
    background-color: #1a1a2e;
    color: #e0e0e0;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

#app-container {
    width: 100%;
    max-width: 1200px;
    background-color: #16213e;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-family: 'Bangers', cursive;
    font-size: 3.5rem;
    color: #e94560;
    letter-spacing: 3px;
    text-shadow: 2px 2px 0 #0f3460, 4px 4px 0 #000;
    margin: 0;
}

main {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

#canvas-container {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #0f3460;
    border-radius: 10px;
    padding: 10px;
    min-width: 300px; /* Adjusted for smaller screens */
    min-height: 500px;
}

#glove-canvas {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

#controls-container {
    flex: 1;
    background-color: #1f4068;
    padding: 20px;
    border-radius: 10px;
    min-width: 300px;
}

h2, h3 {
    font-family: 'Bangers', cursive;
    color: #e94560;
    letter-spacing: 2px;
}

h2 {
    font-size: 2.5rem;
    margin-top: 0;
    text-align: center;
}

h3 {
    font-size: 2rem;
    margin-top: 20px;
}

.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.control-group label.inline-label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.control-group label.inline-label input {
    margin-right: 10px;
}

input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    height: 40px;
    border: none;
    padding: 0;
    cursor: pointer;
    background: none;
    border-radius: 5px;
}
input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}
input[type="color"]::-webkit-color-swatch {
    border: 2px solid #e0e0e0;
    border-radius: 5px;
}

input[type="text"],
textarea,
select {
    width: calc(100% - 20px);
    padding: 10px;
    border: 2px solid #0f3460;
    background-color: #e0e0e0;
    color: #1a1a2e;
    border-radius: 5px;
    font-size: 1rem;
    font-family: Arial, sans-serif;
}

input[type="range"] {
    width: 100%;
    cursor: pointer;
}

textarea {
    resize: vertical;
}

#decal-controls {
    margin-bottom: 15px;
}

.decal-tabs {
    display: flex;
    margin-bottom: 10px;
    border-bottom: 2px solid #0f3460;
}

.decal-tab-btn {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    color: #e0e0e0;
    font-family: 'Bangers', cursive;
    font-size: 1.5rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px; /* Align with container border */
}

.decal-tab-btn.active {
    color: #e94560;
    border-bottom-color: #e94560;
}

.decal-tab-btn:hover:not(.active) {
    background-color: #1f4068;
}

.decal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

#decal-options {
    border-top: 1px solid #0f3460;
    padding-top: 15px;
}

#decal-options .control-group {
    display: grid;
    grid-template-columns: 100px 1fr;
    align-items: center;
    gap: 10px;
}

#decal-options label {
    margin-bottom: 0;
}

.decal-btn {
    background-color: #0f3460;
    border: 2px solid #e94560;
    border-radius: 8px;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s, background-color 0.2s;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Bangers', cursive;
    color: white;
    font-size: 1.2rem;
}

#custom-decal-btn {
    font-size: 2.5rem;
    line-height: 1;
}

.decal-btn:hover, .decal-btn.active {
    background-color: #e94560;
    border-color: #fff;
    transform: scale(1.1);
}

.decal-btn img {
    max-width: 90%;
    max-height: 90%;
    pointer-events: none;
}

#ability-type-group div {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

#ability-type-group input[type="radio"] {
    margin-right: 10px;
}

#ability-type-group label {
    font-weight: normal;
    margin-bottom: 0;
}

#generate-concept-btn {
    width: 100%;
    padding: 10px 15px;
    font-family: 'Bangers', cursive;
    font-size: 1.3rem;
    color: #fff;
    background-color: #e94560;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
    letter-spacing: 1px;
}

#generate-concept-btn:hover {
    background-color: #d83a56;
}

#download-btn {
    width: 100%;
    padding: 15px;
    font-family: 'Bangers', cursive;
    font-size: 1.5rem;
    color: #fff;
    background-color: #5cb85c;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.2s;
    letter-spacing: 2px;
}

#download-btn:hover {
    background-color: #4cae4c;
}

#download-btn:disabled {
    background-color: #5a6268;
    cursor: not-allowed;
}

.hidden {
    display: none;
}

#custom-material-controls {
    margin-top: 10px;
}

#custom-material-controls input[type="file"] {
    width: calc(100% - 16px);
    padding: 8px;
    background-color: #e0e0e0;
    color: #1a1a2e;
    border-radius: 5px;
    border: 2px solid #0f3460;
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
}

#custom-material-controls input[type="file"]::file-selector-button {
    font-family: 'Bangers', cursive;
    background-color: #e94560;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 3px;
    margin-right: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#custom-material-controls input[type="file"]::file-selector-button:hover {
    background-color: #d83a56;
}