html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Prevent scrolling on the body */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a;
    color: #f0f0f0;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    display: flex;
    gap: 20px;
    width: 95vw;
    height: 95vh;
    max-width: 1600px;
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.panel {
    width: 320px;
    background-color: #333;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    padding: 15px;
    overflow-y: auto; /* Add scroll only to panel if needed */
}

h2 {
    color: #00aaff;
    border-bottom: 1px solid #00aaff;
    padding-bottom: 8px;
    margin: 0 0 15px 0;
    font-size: 1.2em;
    text-align: center;
}

h3 {
    color: #00aaff;
    margin: 10px 0 10px 0;
    font-size: 1em;
}

.input-group {
    margin-bottom: 10px;
}

label {
    font-weight: bold;
    font-size: 0.85em;
    display: block;
    margin-bottom: 4px;
    color: #ccc;
}

input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #555;
    background-color: #444;
    color: #f0f0f0;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 0.9em;
}

.textures-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.textures-grid .input-group {
    margin-bottom: 0;
}

input[type="file"] {
    width: 100%;
    font-size: 0.8em;
    background-color: #444;
    border-radius: 4px;
    border: 1px solid #555;
}
/* Custom file input button */
input[type="file"]::-webkit-file-upload-button {
  background: #555;
  border: none;
  color: #fff;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
}

#btnCreate {
    margin-top: auto;
    padding: 12px;
    border: none;
    background: linear-gradient(45deg, #00aaff, #0077cc);
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 170, 255, 0.2);
}

#btnCreate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 170, 255, 0.4);
}

#preview {
    flex: 1;
    background-color: #111;
    border-radius: 10px;
    border: 1px solid #444;
    position: relative;
    height: 100%; /* Fill the container height */
}

#btnResetCamera {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 6px 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: 1px solid #555;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
    z-index: 10;
}

#btnResetCamera:hover {
    opacity: 1;
}

#status {
    margin-top: 10px;
    font-size: 0.85em;
    text-align: center;
    color: #999;
    min-height: 18px;
}

/* New styles for the custom link input */
.custom-link-group {
    display: flex;
    align-items: center;
    background-color: #444;
    border: 1px solid #555;
    border-radius: 4px;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.custom-link-group:focus-within {
    border-color: #00aaff;
    box-shadow: 0 0 0 2px rgba(0, 170, 255, 0.3);
}

.custom-link-group .url-prefix {
    padding: 8px;
    font-size: 0.9em;
    color: #999;
    background-color: #3a3a3a;
    border-right: 1px solid #555;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    white-space: nowrap; /* Prevent wrapping */
}

.custom-link-group input#customName {
    flex-grow: 1;
    width: 100%;
    padding: 8px;
    border: none;
    background-color: transparent; /* Make it see-through to the parent */
    color: #f0f0f0;
    font-size: 0.9em;
    outline: none; /* Remove default focus outline */
}
