body {
    font-family: sans-serif;
    margin: 0;
    overflow: hidden; /* Prevent scrollbars during game */
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
}

#start-screen {
    background-color: white;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
}

h1 {
    margin-top: 0;
    color: #007bff;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

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

input[type="text"],
input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding in width */
}

input[type="file"] {
    cursor: pointer;
}

#preview-container-wrapper {
     margin-top: 20px;
     border: 1px dashed #ccc;
     padding: 10px;
     border-radius: 4px;
     min-height: 180px; /* Ensure space even before preview loads */
     position: relative; /* For positioning canvas */
     display: flex;
     flex-direction: column;
     align-items: center;
     min-height: 250px; /* Increased min-height to accommodate controls */
}

#preview-container-wrapper p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #555;
}

#preview-container {
    width: 150px;
    height: 150px;
    margin: 10px auto;
    background-color: #eee;
    border-radius: 4px;
    position: relative; /* Ensure canvas is positioned correctly */
}

#preview-canvas {
     display: block; /* Remove extra space below canvas */
     width: 100%;
     height: 100%;
}


#helia-status {
    margin-top: 15px;
    font-size: 0.8em;
    color: #888;
}

#upload-status {
    font-size: 0.9em;
    color: #888;
    margin-top: 5px;
}


button#enter-game {
    background-color: #ccc; /* Disabled color */
    color: #666;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: not-allowed;
    transition: background-color 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

button#enter-game:not(:disabled) {
    background-color: #28a745; /* Green when enabled */
    color: white;
    cursor: pointer;
}

button#enter-game:not(:disabled):hover {
    background-color: #218838;
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative; /* To position info text */
}

#game-canvas {
    display: block; /* Remove extra space below canvas */
    width: 100%;
    height: 100%;
}

#label-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Prevent mouse events from interfering with game controls */
    pointer-events: none;
    overflow: hidden; /* Hide potential overflow */
}

/* Style for the nickname labels */
.nickname-label {
    color: white;
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent black background */
    padding: 2px 6px;
    border-radius: 4px;
    font-family: sans-serif;
    font-size: 12px;
    /* Center the text (optional) */
    text-align: center;
    /* Prevent text selection */
    user-select: none;
    /* Ensure it doesn't block pointer events if container setting fails */
    pointer-events: none;
}

#info {
    /* Ensure info text is above labels if needed, though labels have pointer-events: none */
    z-index: 10;
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.8em;
}

#rotation-controls button {
    padding: 5px 10px;
    margin: 0 5px;
    cursor: pointer;
    border: 1px solid #ccc;
    background-color: #f8f8f8;
    border-radius: 4px;
}

#rotation-controls button:hover {
    background-color: #eee;
}

#rotation-controls button:active {
    background-color: #ddd;
}

#debug-connections {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 300px; /* Adjust width as needed */
    max-height: 200px; /* Limit height */
    overflow-y: auto; /* Add scroll if content exceeds height */
    background-color: rgba(0, 0, 0, 0.7);
    color: #0f0; /* Green text */
    font-family: monospace;
    font-size: 10px;
    padding: 5px;
    border: 1px solid #0f0;
    border-radius: 4px;
    z-index: 100; /* Ensure it's on top */
    pointer-events: none; /* Prevent interaction */
}

#debug-connections p {
    margin: 0 0 5px 0;
    font-weight: bold;
    border-bottom: 1px dashed #0f0;
    padding-bottom: 3px;
}

#debug-connections ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#debug-connections li {
    margin-bottom: 2px;
    word-break: break-all; /* Wrap long addresses/IDs */
}

/* Container for default model buttons */
#default-models-container {
    display: flex;
    justify-content: space-around; /* Distribute buttons evenly */
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 10px; /* Space between buttons */
    margin-bottom: 10px;
}

/* Styling for default model buttons */
.default-model-btn {
    padding: 8px 12px;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    flex-grow: 1; /* Allow buttons to grow */
    text-align: center;
}

.default-model-btn:hover {
    background-color: #e0e0e0;
    border-color: #bbb;
}

/* Style for the selected default model button */
.default-model-btn.selected {
    background-color: #007bff;
    color: white;
    border-color: #0056b3;
    font-weight: bold;
}

/* Status message area for default models */
.model-status {
    font-size: 0.85em;
    color: #888;
    min-height: 1.2em; /* Reserve space */
    margin-top: 5px;
}

/* Ensure preview container shows status text initially */
#preview-container-wrapper #upload-status {
    font-size: 0.9em;
    color: #888;
    margin-top: 5px;
}

/* Ensure rotation controls are centered */
#rotation-controls {
    text-align: center;
}
