body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    padding: 2rem;
    margin: 0;
}

h1 {
    color: #ffffff;
    margin-bottom: 1rem;
}

input[type="file"] {
    background-color: #1e1e1e;
    color: #e0e0e0;
    border: 1px solid #333;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    background-color: #2c2c2c;
    color: #e0e0e0;
    border: none;
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    border-radius: 4px;
    cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
    background-color: #ac5c01;
}

button {
    background-color: #2c2c2c;
    color: #e0e0e0;
    border: none;
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #ac5c01;
}

.section {
    margin-bottom: 1.5rem;
}

strong {
    color: #fff;
}

#character-information ul.attribute {
    margin: 0px;
}

.navbar {
    background-color: #1e1e1e;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    font-family: sans-serif;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Logo */
.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Nav links */
.navbar .nav-links {
    display: flex;
    gap: 1.5rem;
}

.navbar .nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.navbar .nav-links a:hover {
    color: #ac5c01;
}

.mt-2 {
    margin-top: 2em;
}

#editor-container {
    display: grid;
    grid-template-columns: repeat(2,50%);
    background-color: #1e1e1e;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid #333;
    margin-top: 1.5rem;
    visibility: hidden;
}

#inventory {
    display: grid;
    grid-template-columns: repeat(8, 12%);
    gap: 4px;
    background-color: #444;
    border-radius: 10px;
    padding: 10px;
    box-sizing: border-box;
    max-width: 100%;
}

.slot {
    aspect-ratio: 1 / 1;
    /* Keeps square shape */
    background-color: #222;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-size: cover;
    position: relative;
}

.slot:hover {
    border: 3px solid #d0cfcc;
    background-color: #3a3a3a;
}

.slot img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.slot.selected {
    border: 3px solid #bfa26d;
    background-color: #656565;
}

.itemcount{
    background-color: #474747ac;
    position: absolute;
    bottom: 0;
    right: 0;
    border-radius: 4px 0px 0px 0px;
    padding: 0 4px;
}

/* ========== Popup Styling ========== */
#popup {
    display: none;
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #2b2b2b;
    border: 1px solid #1a1a1a;
    padding: 20px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    text-align: left;
    border-radius: 8px;
    color: #e0e0e0;
    font-family: Arial, sans-serif;
}

#popup h3 {
    margin-top: 0;
    font-size: 1.2rem;
    color: #fff;
}

/* Close button */
#close-popup {
    position: absolute;
    top: 6px;
    right: 6px;
    background: transparent;
    color: #ccc;
    border: none;
    font-size: 14px;
    cursor: pointer;
}

/* Inputs */
#item-form label {
    display: block;
    margin-top: 10px;
    margin-bottom: 4px;
    font-size: 0.9rem;
    color: #ccc;
}

#item-form input[type="number"],
#item-form select {
    padding: 6px 10px;
    background-color: #1f1f1f;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 0.9rem;
}

#popup-update {
    margin-top: 15px;
    padding: 8px 16px;
    background-color: #444;
    color: #fff;
    border: 1px solid #666;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}

#popup-update:hover {
    background-color: #555;
}

/* ========== Select2 Dark Theme ========== */
.select2-container--default .select2-selection--single {
    background-color: #1f1f1f;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 4px;
    height: 36px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #e0e0e0;
    line-height: 36px;
    padding-left: 10px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
    right: 10px;
    color: #ccc;
}

/* Dropdown styling */
.select2-container--default .select2-dropdown {
    background-color: #2b2b2b;
    border: 1px solid #444;
    border-radius: 4px;
    width: 200px !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: #1f1f1f;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
}

/* Options list */
.select2-container--default .select2-results__options {
    background-color: #2b2b2b;
    color: #e0e0e0;
    border-radius: 4px;
}

/* Individual options */
.select2-container--default .select2-results__option {
    padding: 6px 10px;
    font-size: 0.9rem;
}

.select2-container--default .select2-results__option--highlighted {
    background-color: #444 !important;
    color: #fff;
}

/* For multi-select (if needed later) */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #444;
    border: 1px solid #666;
    color: #e0e0e0;
    border-radius: 4px;
    padding: 2px 6px;
    margin: 2px;
}
