/* Character Sheet UI */
#CharacterSheet {
    position: fixed;
    font-family: 'press_start_2pregular', monospace;
    background-color: #ffffffbb;
    color: #000000;
    font-size: 0.6em;
    font-weight: 300;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.9);
    border: 4px groove #555;
    border-radius: 12px;
    padding: 25px 30px;
    top: 10%;
    max-width: 800px;
    min-width: 600px;
    z-index: 1000;
    gap: 12px;
    backdrop-filter: blur(2px);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    transition: 0.1s;
    appearance: none;
    outline: none;
    cursor: url(../../media/UI/cursor.png), pointer !important;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    margin: 0;
    left: 20%;
    transform: translateX(-20%);
}


#CharacterSheet .sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000000;
    padding-bottom: 10px;
    cursor: url(../../media/UI/drag.png), pointer !important;

}

#CharacterSheet .sheet-header h2 {
    margin: 0;
}

#CharacterSheet #closeSheetBtn {
    justify-self: end;
    background: #aa0000;
    color: white;
    font-family: 'press_start_2pregular', monospace;
    border: 2px solid #440000;
    border-radius: 4px;
    font-size: 1em;
    padding: 12px 24px;
    cursor: pointer;
    transition: background 0.2s;

}

#CharacterSheet #closeSheetBtn:hover {
    background: #ff0000;

}

#CharacterSheet  .sheet-content {
    margin-top: 10px;
}

#CharacterSheet .sheet-section {
    margin-bottom: 15px;
}

#CharacterSheet .sheet-section h3 {
    background: #000000;
    padding: 5px;
    border-radius: 5px;
    color: #ffffff;
}

#CharacterSheet .appearance-preview {
    display: flex;
    gap: 10px;
}

#CharacterSheet .char-face, .char-hair, .char-eyes {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 20px;
}


#CharacterSheet  .character-image-container {
    position: relative;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#CharacterSheet .character-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#CharacterSheet  .hairImg {
    position: absolute !important;
    top: -30px !important;
}

#CharacterSheet  .stat-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#CharacterSheet  .stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
    border-bottom: 1px solid #ddd;
}

#CharacterSheet .stat-item strong {
    flex: 1;
}


#CharacterSheet .stat-btn:hover {
    background-color: #45a049;
}
.hp-bar-container, .mp-bar-container, .xp-bar-container {
    position: relative;
    cursor: help;
}

.hp-bar-container:hover, .mp-bar-container:hover, .xp-bar-container:hover {
    opacity: 0.9;
}

.stat-btn.minus-btn {
    background-color: #e74c3c;
    color: white;
    margin-right: 5px;
}

.stat-btn.plus-btn {
    background-color: #2ecc71;
    color: white;
    margin-left: 5px;
}


.stat-btn:hover {
    opacity: 0.8;
}

.character-sheet {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    max-width: 90vw;
    max-height: 90vh;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid #444;
    border-radius: 8px;
    color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    overflow-y: auto;
    z-index: 1000;
}

.sheet-header {
    padding: 12px 16px;
    border-radius: 15px;
    border-bottom: 1px solid #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1;
}

.sheet-header h2 {
    margin: 0;
    color: #000000;
    font-size: 18px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.close-btn {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 5px;
}

.close-btn:hover {
    color: #fff;
}

.sheet-content {
    padding: 20px;
}

.sheet-row {
    display: flex;
    margin-bottom: 20px;
    gap: 20px;
}

.sheet-section {
    flex: 1;
}

.sheet-section h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #ffd700;
    border-bottom: 1px solid #444;
    padding-bottom: 6px;
}

.basic-info p {
    margin: 8px 0;
    line-height: 1.3;
    font-size: 12px;
}

.stat-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 12px;
}

.stat-points {
    color: #ffd700;
    font-weight: bold;
}

.stat-list {
    display: grid;
    gap: 14px;
    margin-top: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border: 1px solid #333;
}

.stat-name {
    font-weight: 500;
}

.stat-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-value {
    font-weight: bold;
    font-size: 16px;
    width: 25px;
    text-align: center;
    color: #fff;
}

.stat-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.minus-btn:hover {
    background-color: #e67e22;
}

.plus-btn:hover {
    background-color: #2ecc71;
}

.sheet-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #444;
    margin-top: 15px;
}

.sheet-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.save-btn {
    background: #2980b9;
    color: white;
}

.save-btn:hover {
    background: #3498db;
}

.cancel-btn {
    background: #7f8c8d;
    color: white;
}

.cancel-btn:hover {
    background: #95a5a6;
}

.stat-btn.plus-btn:disabled,
.stat-btn.minus-btn:disabled {
    background-color: #555555; /* Gray color for disabled state */
    color: #aaaaaa; /* Light gray text */
    cursor: not-allowed;
    opacity: 0.6;
}

/* This will override the current disabled style at the bottom of your CSS */
.stat-btn:disabled {
    background-color: #555555; /* Gray color */
    color: #aaaaaa;
    cursor: not-allowed;
    opacity: 0.6;
    border-color: #444444;
}