@font-face {
    font-family: 'Type Machine';
    src: url('Type Machine.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Natural Mono';
    src: url('Natural Mono-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Angel wish';
    src: url('Angel wish.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

:root {
    --primary-font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    font-family: var(--primary-font);
    margin: 0;
    padding: 0;
    background-color: #000000;
    color: #ffffff;
    height: 100vh;
    overflow: hidden;
    font-size: 12px;
    transition: all 0.3s ease;
}

body.light-mode {
    background-color: #ffffff;
    color: #000000;
}

.container {
    width: 100vw;
    height: 100vh;
    background: #000000;
    padding: 10px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.character-info {
    display: flex;
    gap: 15px;
    padding: 6px 8px;
    background: #222222;
    border-radius: 4px;
    margin-bottom: 8px;
    border: 1px solid #444444;
    transition: all 0.3s ease;
    flex-shrink: 0;
    min-height: 0;
}

body.light-mode .character-info {
    background: #f2f0f5;
    border: 1px solid #ddd8e3;
}

.character-info-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    max-width: 200px;
}

.character-info-field label {
    font-size: 10px;
    font-weight: bold;
    color: #ffffff;
    transition: all 0.3s ease;
}

body.light-mode .character-info-field label {
    color: #000000;
}

.character-info-field input {
    padding: 4px 6px;
    border: 1px solid #666666;
    border-radius: 3px;
    font-size: 11px;
    background: #333333;
    color: #ffffff;
    transition: all 0.3s ease;
}

body.light-mode .character-info-field input {
    border: 1px solid #c2bcc7;
    background: #ffffff;
    color: #000000;
}

.character-info-field input:focus {
    outline: none;
    border-color: #ffffff;
}

body.light-mode .character-info-field input:focus {
    border-color: #000000;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

body.light-mode .container {
    background: #ffffff;
}

.bottom-controls {
    position: absolute;
    bottom: 5px;
    right: 5px;
    padding: 5px;
    background: #333333;
    border-radius: 3px;
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    gap: 5px;
    align-items: center;
}

body.light-mode .bottom-controls {
    background: #ddd8e3;
}

.bottom-controls button {
    padding: 4px 8px;
    border: none;
    border-radius: 2px;
    background: #666666;
    color: #ffffff;
    cursor: pointer;
    font-size: 10px;
}

body.light-mode .bottom-controls button {
    background: #c2bcc7;
    color: #000000;
}

.bottom-controls button:hover {
    background: #444444;
}

body.light-mode .bottom-controls button:hover {
    background: #a8a0ad;
}

.bottom-controls input[type="file"] {
    margin: 2px;
}

.font-selector {
    padding: 4px 8px;
    border: none;
    border-radius: 2px;
    background: #666666;
    color: #ffffff;
    cursor: pointer;
    font-size: 10px;
    font-family: inherit;
}

body.light-mode .font-selector {
    background: #c2bcc7;
    color: #000000;
}

.font-selector:hover {
    background: #444444;
}

body.light-mode .font-selector:hover {
    background: #a8a0ad;
}

.font-selector:focus {
    outline: none;
}

.categories-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 40%;
    margin-right: 10px;
    overflow-y: auto;
    max-height: 100%;
}

.middle-column {
    width: 40%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 100%;
    margin-right: 10px;
}

.rightmost-column {
    width: 40%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 100%;
}

.category-row {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}

.category-main {
    flex: 0 0 260px;
}

.category-section {
    flex: 0.33;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category {
    border: 1px solid #ffffff;
    border-radius: 3px;
    padding: 4px;
    background: #000000;
    transition: all 0.3s ease;
}

body.light-mode .category {
    border: 1px solid #000000;
    background: #ffffff;
}

.category.heart { border-color: #e74c3c; }
.category.mind { border-color: #3498db; }
.category.balance { border-color: #f39c12; }
.category.body { border-color: #27ae60; }

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
    padding-bottom: 2px;
    border-bottom: 1px solid #ecf0f1;
}

.category-name {
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.category-modifier {
    display: flex;
    align-items: center;
    gap: 4px;
}

.category-modifier select {
    padding: 2px 4px;
    border: 1px solid #ffffff;
    border-radius: 2px;
    font-size: 10px;
    background: #333333;
    color: #ffffff;
    transition: all 0.3s ease;
}

body.light-mode .category-modifier select {
    border: 1px solid #000000;
    background: #ffffff;
    color: #000000;
}

.health-track {
    margin-bottom: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px;
    background: #333333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

body.light-mode .health-track {
    background: #ddd8e3;
}

.health-track-name {
    font-weight: 500;
    font-size: 10px;
}

.health-track-value {
    display: flex;
    align-items: center;
    gap: 4px;
}

.health-track-input {
    width: 30px;
    padding: 2px 4px;
    border: 1px solid #ffffff;
    border-radius: 2px;
    text-align: center;
    font-size: 10px;
    background: #000000;
    color: #ffffff;
    transition: all 0.3s ease;
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
}

.health-track-input::-webkit-outer-spin-button,
.health-track-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

body.light-mode .health-track-input {
    border: 1px solid #000000;
    background: #ffffff;
    color: #000000;
}

.health-boxes {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.health-box {
    width: 10px;
    height: 10px;
    border: 1px solid #ffffff;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s;
    background: #000000;
}

body.light-mode .health-box {
    border: 1px solid #000000;
    background: #ffffff;
}

.health-box.marked {
    background-color: #ffffff;
    border-color: #ffffff;
}

body.light-mode .health-box.marked {
    background-color: #000000;
    border-color: #000000;
}

.skills {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.skill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px;
    background: #333333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

body.light-mode .skill {
    background: #ddd8e3;
}

.skill.combat {
    background: #555555;
    border-left: 2px solid #ffffff;
}

body.light-mode .skill.combat {
    background: #c2bcc7;
    border-left: 2px solid #000000;
}

.skill-name {
    font-weight: 500;
    font-size: 10px;
}

.skill-value {
    display: flex;
    align-items: center;
    gap: 4px;
}

.skill-checkboxes {
    display: flex;
    gap: 2px;
}

.skill-checkbox {
    width: 10px;
    height: 10px;
    border: 1px solid #ffffff;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s;
    background: #000000;
}

body.light-mode .skill-checkbox {
    border: 1px solid #000000;
    background: #ffffff;
}

.skill-checkbox.checked {
    background-color: #ffffff;
    border-color: #ffffff;
}

body.light-mode .skill-checkbox.checked {
    background-color: #000000;
    border-color: #000000;
}

.skill-checkbox.modifier-box {
    background-color: #ffffff;
    border-color: #ffffff;
    cursor: default;
    opacity: 1.0;
}

body.light-mode .skill-checkbox.modifier-box {
    background-color: #000000;
    border-color: #000000;
}

.skill-checkbox.modifier-box.checked {
    background-color: #ffffff;
    border-color: #ffffff;
}

body.light-mode .skill-checkbox.modifier-box.checked {
    background-color: #000000;
    border-color: #000000;
}

.section-box {
    display: flex;
    flex-direction: column;
    border: 1px solid #ffffff;
    border-radius: 3px;
    background: #000000;
    transition: all 0.3s ease;
}

body.light-mode .section-box {
    border: 1px solid #000000;
    background: #ffffff;
}

.section-header {
    font-weight: bold;
    padding: 4px 6px;
    background: #333333;
    border-bottom: 1px solid #ffffff;
    font-size: 10px;
    transition: all 0.3s ease;
}

body.light-mode .section-header {
    background: #ddd8e3;
    border-bottom: 1px solid #000000;
}

.section-content {
    min-height: 40px;
    resize: none;
    border: none;
    padding: 6px;
    font-family: var(--primary-font);
    font-size: 10px;
    line-height: 1.2;
    background: #000000;
    color: #ffffff;
    transition: all 0.3s ease;
    overflow: hidden;
}

body.light-mode .section-content {
    background: #ffffff;
    color: #000000;
}

.section-content:focus {
    outline: none;
}

.conditions-input {
    width: calc(100% - 10px);
    padding: 2px 4px;
    border: 1px solid #ffffff;
    border-radius: 2px;
    font-size: 10px;
    background: #333333;
    color: #ffffff;
    margin-top: 6px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

body.light-mode .conditions-input {
    border: 1px solid #000000;
    background: #ffffff;
    color: #000000;
}

.conditions-input:focus {
    outline: none;
    border-color: #ffffff;
}

body.light-mode .conditions-input:focus {
    border-color: #000000;
}

/* Dropdown Maker Styles */
.dropdown-maker {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #ffffff;
    border-radius: 3px;
    background: #000000;
    transition: all 0.3s ease;
}

body.light-mode .dropdown-maker {
    border: 1px solid #000000;
    background: #ffffff;
}

.dropdown-maker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 6px;
    background: #333333;
    border-bottom: 1px solid #ffffff;
    font-size: 10px;
    font-weight: bold;
    transition: all 0.3s ease;
}

body.light-mode .dropdown-maker-header {
    background: #ddd8e3;
    border-bottom: 1px solid #000000;
}

.add-dropdown-btn {
    background: #555555;
    color: #ffffff;
    border: none;
    width: 18px;
    height: 18px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

body.light-mode .add-dropdown-btn {
    background: #c2bcc7;
    color: #000000;
}

.add-dropdown-btn:hover {
    background: #777777;
}

body.light-mode .add-dropdown-btn:hover {
    background: #a8a0ad;
}

.dropdowns-container {
    flex: 1;
    overflow-y: auto;
    padding: 4px;
}

.custom-dropdown {
    margin-bottom: 4px;
    border: 1px solid #ffffff;
    border-radius: 3px;
    background: #000000;
    transition: all 0.3s ease;
}

body.light-mode .custom-dropdown {
    border: 1px solid #000000;
    background: #ffffff;
}

.custom-dropdown-header {
    display: flex;
    align-items: center;
    padding: 4px 6px;
    background: #333333;
    border-bottom: 1px solid #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 4px;
}

body.light-mode .custom-dropdown-header {
    background: #ddd8e3;
    border-bottom: 1px solid #000000;
}

.custom-dropdown-header:hover {
    background: #444444;
}

body.light-mode .custom-dropdown-header:hover {
    background: #d2cdd8;
}

.custom-dropdown.collapsed .custom-dropdown-header {
    border-bottom: none;
}

.dropdown-toggle {
    font-size: 8px;
    color: #ffffff;
    min-width: 10px;
    transition: transform 0.2s ease;
}

body.light-mode .dropdown-toggle {
    color: #000000;
}

.dropdown-toggle.collapsed {
    transform: rotate(-90deg);
}

.dropdown-name-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    padding: 0;
    outline: none;
    cursor: pointer;
}

body.light-mode .dropdown-name-input {
    color: #000000;
}

.dropdown-name-input:focus {
    cursor: text;
    background: #444444;
    padding: 1px 2px;
    border-radius: 2px;
}

body.light-mode .dropdown-name-input:focus {
    background: #d2cdd8;
}

.dropdown-delete-btn {
    background: #cc0000;
    color: #ffffff;
    border: none;
    width: 14px;
    height: 14px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: auto;
}

.dropdown-delete-btn:hover {
    background: #ff0000;
}

.custom-dropdown-content {
    padding: 6px;
    transition: all 0.3s ease;
    overflow: hidden;
    max-height: 500px;
}

.custom-dropdown-content.collapsed {
    max-height: 0;
    padding: 0;
    opacity: 0;
    display: none;
}

.dropdown-content-textarea {
    width: 100%;
    min-height: 40px;
    resize: vertical;
    border: none;
    border-radius: 0;
    padding: 0;
    font-family: var(--primary-font);
    font-size: 10px;
    line-height: 1.2;
    background: #000000;
    color: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

body.light-mode .dropdown-content-textarea {
    background: #ffffff;
    color: #000000;
}

.dropdown-content-textarea:focus {
    outline: none;
}
