Files

882 lines
17 KiB
CSS

:root {
/* Nord Color Palette */
/* Polar Night - Dark backgrounds */
--nord-bg: #1c1f26;
--nord0: #2e3440;
--nord1: #3b4252;
--nord2: #434c5e;
--nord3: #4c566a;
/* Snow Storm - Light text */
--nord4: #d8dee9;
--nord5: #e5e9f0;
--nord6: #eceff4;
/* Frost - Blues/Accents */
--nord7: #8fbcbb;
--nord8: #88c0d0;
--nord9: #81a1c1;
--nord10: #5e81ac;
/* Aurora - Semantic colors */
--nord11: #bf616a; /* Red */
--nord12: #d08770; /* Orange */
--nord13: #ebcb8b; /* Yellow */
--nord14: #a3be8c; /* Green */
--nord15: #b48ead; /* Purple */
/* Semantic mappings */
--color-bg: var(--nord-bg);
--color-surface: var(--nord0);
--color-border: var(--nord1);
--color-border-subtle: var(--nord2);
--color-muted: var(--nord3);
--color-text: var(--nord4);
--color-text-secondary: var(--nord9);
--color-text-bright: var(--nord6);
--color-primary: var(--nord8);
--color-primary-hover: var(--nord7);
--color-success: var(--nord14);
--color-success-hover: #8faa78;
--color-danger: var(--nord11);
--color-danger-hover: #a54e56;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
background: var(--color-bg);
color: var(--color-text);
padding: 20px;
overflow: hidden;
height: 100vh;
}
.container {
max-width: 1400px;
margin: 0 auto;
height: 100%;
display: flex;
flex-direction: column;
}
.header-section {
flex-shrink: 0;
}
h1 {
color: var(--color-text-bright);
margin-bottom: 30px;
font-size: 28px;
}
.controls {
display: none; /* Hide old controls */
}
.search-box {
flex: 1;
max-width: 400px;
}
.search-box input {
width: 100%;
padding: 10px 15px;
background: var(--color-surface);
border: 1px solid var(--color-border);
border-radius: 6px;
color: var(--color-text);
font-size: 14px;
}
.search-box input:focus {
outline: none;
border-color: var(--color-primary);
}
button {
padding: 10px 20px;
background: var(--color-primary);
color: var(--color-surface);
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: background 0.2s;
}
button:hover {
background: var(--color-primary-hover);
}
button.delete {
background: var(--color-danger);
color: var(--color-text-bright);
margin-right: auto;
}
button.delete:hover {
background: var(--color-danger-hover);
}
button.save {
background: var(--color-success);
color: var(--color-surface);
}
button.save:hover {
background: var(--color-success-hover);
}
.character-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 15px;
margin-top: 20px;
}
.character-card {
background: var(--color-surface);
border-radius: 8px;
border: 2px solid var(--color-border);
cursor: pointer;
transition: all 0.2s;
text-align: center;
aspect-ratio: 1;
display: flex;
flex-direction: column;
overflow: hidden;
position: relative;
background-size: cover;
background-position: center;
}
.character-card:hover {
border-color: var(--color-primary);
transform: translateY(-2px);
}
.character-card.drag-over {
border-color: var(--color-success);
}
.character-card.drag-over::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(163, 190, 140, 0.2);
pointer-events: none;
}
.character-card-placeholder {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 64px;
color: var(--color-border);
pointer-events: none;
}
.character-card-name {
padding: 12px;
font-size: 14px;
font-weight: 600;
color: var(--color-text-bright);
word-break: break-word;
background: rgba(46, 52, 64, 0.85);
backdrop-filter: blur(4px);
border-top: 1px solid rgba(59, 66, 82, 0.5);
margin-top: auto;
z-index: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.upload-hint {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: var(--color-muted);
font-size: 12px;
text-align: center;
pointer-events: none;
opacity: 0;
transition: opacity 0.2s;
background: rgba(28, 31, 38, 0.9);
padding: 8px 12px;
border-radius: 4px;
}
.character-card:hover .upload-hint {
opacity: 1;
}
.character-card.has-image .character-card-placeholder {
display: none;
}
.status {
position: fixed;
top: 20px;
right: 20px;
padding: 12px 20px;
border-radius: 6px;
display: none;
z-index: 10001;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
min-width: 250px;
animation: slideIn 0.3s ease-out;
}
.status.success {
background: var(--color-success);
color: var(--color-surface);
border: 1px solid var(--color-success-hover);
}
.status.error {
background: var(--color-danger);
color: var(--color-text-bright);
border: 1px solid var(--color-danger-hover);
}
.status.show {
display: block;
}
.status.hiding {
animation: slideOut 0.3s ease-out forwards;
}
@keyframes slideIn {
from {
transform: translateX(400px);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}
@keyframes slideOut {
from {
transform: translateX(0);
opacity: 1;
}
to {
transform: translateX(400px);
opacity: 0;
}
}
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
z-index: 1000;
overflow-y: auto;
}
.modal.show {
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
.modal-container {
background: var(--color-surface);
border-radius: 8px;
max-width: 600px;
width: 100%;
display: flex:
flex-direction: vertical;
}
.modal-content {
padding: 20px;
overflow-y: auto;
max-height: 80vh;
}
.modal-content.drag-over {
border: 2px solid var(--color-success);
background: rgba(163, 190, 140, 0.05);
}
.modal-header {
font-size: 20px;
color: var(--color-text-bright);
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
padding: 20px;
border-bottom: 1px solid rgba(236, 239, 244, 0.2);
}
.button-cancel {
padding: 0px 15px;
aspect-ratio: 1;
background: var(--color-bg);
color: var(--color-text);
}
.button-cancel:hover {
background: var(--color-border);
}
.field-group {
margin-bottom: 15px;
}
label {
display: block;
margin-bottom: 5px;
color: var(--color-text-secondary);
font-size: 13px;
font-weight: 500;
}
input, textarea {
width: 100%;
padding: 10px;
background: var(--color-bg);
border: 1px solid var(--color-border);
border-radius: 4px;
color: var(--color-text);
font-family: inherit;
font-size: 14px;
}
input:focus, textarea:focus {
outline: none;
border-color: var(--color-primary);
}
textarea {
resize: vertical;
min-height: 80px;
}
.modal-actions {
display: flex;
gap: 10px;
margin-top: 20px;
justify-content: flex-end;
}
.empty-state {
text-align: center;
padding: 60px 20px;
color: var(--color-muted);
}
.empty-state p {
font-size: 18px;
margin-bottom: 20px;
}
/* Drag and drop image target */
.image-upload-container {
width: 100%;
display: flex;
gap: 10px;
flex-direction: horizontal;
}
.image-drop-zone {
position: relative;
width: 100%;
aspect-ratio: 1;
max-width: 200px;
border: 2px dashed var(--color-border-subtle);
border-radius: 8px;
background: var(--color-bg);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s;
overflow: hidden;
}
.image-drop-zone:hover {
border-color: var(--color-primary);
background: #242933;
}
.image-drop-zone.drag-over {
border-color: var(--color-success);
background: rgba(163, 190, 140, 0.1);
}
.drop-zone-content {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
color: var(--color-muted);
pointer-events: none;
}
.drop-zone-text {
font-size: 14px;
text-align: center;
}
.drop-zone-preview {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
.image-drop-zone.has-image .drop-zone-content {
display: none;
}
.image-drop-zone.has-image {
border-color: var(--color-border);
}
/* Tabs */
.tabs {
display: flex;
gap: 5px;
border: none;
}
.tab-button {
padding: 12px 24px;
background: transparent;
color: var(--color-muted);
border: none;
border-radius: 0px;
border-bottom: 2px solid transparent;
cursor: pointer;
font-size: 14px;
font-weight: 600;
transition: all 0.2s;
margin-bottom: -2px;
}
.tab-button:hover {
background: transparent;
color: var(--color-text-secondary);
}
.tab-button.active {
color: var(--color-primary);
border-bottom-color: var(--color-primary);
}
.tab-content {
display: none;
flex: 1;
min-height: 0;
overflow: hidden;
}
.tab-content.active {
display: flex;
flex-direction: column;
}
/* Preset Grid (for models and styles without images) */
.preset-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 15px;
margin-top: 20px;
}
.preset-card {
background: var(--color-surface);
border-radius: 8px;
border: 2px solid var(--color-border);
cursor: pointer;
transition: all 0.2s;
padding: 20px;
min-height: 120px;
display: flex;
flex-direction: column;
}
.preset-card:hover {
border-color: var(--color-primary);
transform: translateY(-2px);
}
.preset-card-name {
font-size: 16px;
font-weight: 600;
color: var(--color-text-bright);
margin-bottom: 10px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.preset-card-content {
font-size: 13px;
color: var(--color-muted);
line-height: 1.5;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.tag-preview {
display: flex;
flex-direction: column;
gap: 8px;
}
.tag-positive {
color: var(--color-success);
font-weight: 500;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
text-overflow: ellipsis;
}
.tag-negative {
color: var(--color-danger);
font-weight: 500;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
text-overflow: ellipsis;
}
.tag-empty {
color: var(--color-muted);
font-style: italic;
}
/* Sidebar Layout */
.content-with-sidebar {
display: flex;
gap: 20px;
flex: 1;
min-height: 0;
overflow: hidden;
}
.sidebar {
width: 220px;
background: var(--color-surface);
border-radius: 8px;
padding: 15px;
flex-shrink: 0;
display: flex;
flex-direction: column;
overflow: hidden;
/* Transition transform for better performance than width */
transition: width 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}
.sidebar.collapsed {
width: 0;
padding: 0;
margin-right: 0;
/* Hide overflow to prevent text peek-through during transition */
overflow: hidden;
}
/* Adjust the sidebar header since the button is moving out */
.sidebar-header {
font-size: 14px;
font-weight: 600;
color: var(--color-text-bright);
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 1px solid var(--color-border);
white-space: nowrap;
}
.sidebar.collapsed .sidebar-header {
border-bottom: none;
margin-bottom: 0;
padding-bottom: 0;
}
.sidebar.collapsed .sidebar-header span {
display: none;
}
.sidebar-toggle {
background: transparent;
color: var(--color-muted);
border: none;
padding: 4px;
font-size: 20px;
line-height: 1;
cursor: pointer;
border-radius: 4px;
transition: all 0.2s;
width: 28px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.sidebar-toggle:hover {
background: var(--color-border);
color: var(--color-text-bright);
}
.sidebar.collapsed .category-list {
display: none;
}
/* Adjust content-with-sidebar for smooth transition */
.content-with-sidebar {
display: flex;
gap: 20px;
flex: 1;
min-height: 0;
overflow: hidden;
}
/* Ensure main content adjusts smoothly */
.main-content {
flex: 1;
min-width: 0;
overflow-y: auto;
}
.category-list {
display: flex;
flex-direction: column;
gap: 5px;
overflow-y: auto;
flex: 1;
}
.category-list::-webkit-scrollbar {
width: 8px;
}
.category-list::-webkit-scrollbar-track {
background: var(--color-bg);
border-radius: 4px;
}
.category-list::-webkit-scrollbar-thumb {
background: var(--color-border-subtle);
border-radius: 4px;
}
.category-list::-webkit-scrollbar-thumb:hover {
background: var(--color-muted);
}
.category-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 12px;
border-radius: 6px;
cursor: pointer;
transition: all 0.2s;
background: transparent;
}
.category-item:hover {
background: var(--color-border);
}
.category-item.active {
background: var(--color-primary);
color: var(--color-surface);
}
.category-name {
font-size: 14px;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.category-count {
font-size: 12px;
color: var(--color-muted);
background: var(--color-bg);
padding: 2px 8px;
border-radius: 10px;
min-width: 24px;
text-align: center;
}
.category-item.active .category-count {
background: rgba(46, 52, 64, 0.3);
color: var(--color-surface);
}
.main-content {
flex: 1;
min-width: 0;
overflow-y: auto;
}
.main-content::-webkit-scrollbar {
width: 8px;
}
.main-content::-webkit-scrollbar-track {
background: var(--color-bg);
border-radius: 4px;
}
.main-content::-webkit-scrollbar-thumb {
background: var(--color-border-subtle);
border-radius: 4px;
}
.main-content::-webkit-scrollbar-thumb:hover {
background: var(--color-muted);
}
/* Responsive adjustments */
@media (max-width: 768px) {
.content-with-sidebar {
flex-direction: row; /* Keep it horizontal */
}
.sidebar, #sidebarToggle {
display: none; /* Hide sidebar on narrow viewports */
}
.main-content {
width: 100%; /* Main content takes full width */
}
}
/* New Navbar */
.navbar {
display: flex;
align-items: center;
gap: 30px;
margin-bottom: 20px;
padding-bottom: 15px;
/* border-bottom: 2px solid var(--color-border); */
flex-shrink: 0;
}
.navbar h1 {
margin: 0;
font-size: 24px;
}
.navbar .tabs {
margin: 0;
border: none;
flex: 0 0 auto;
}
.navbar .tab-button {
padding: 8px 20px;
font-size: 13px;
}
.navbar .search-box {
margin-left: auto;
position: relative;
}
.clear-search {
position: absolute;
right: 8px;
top: 50%;
transform: translateY(-50%);
background: transparent;
color: var(--color-muted);
border: none;
padding: 4px 8px;
font-size: 20px;
line-height: 1;
cursor: pointer;
border-radius: 4px;
}
.clear-search:hover {
background: var(--color-border);
color: var(--color-text-bright);
}
/* Add button card */
.add-card {
background: var(--color-surface);
border-radius: 8px;
border: 2px dashed var(--color-border-subtle);
cursor: pointer;
transition: all 0.2s;
text-align: center;
aspect-ratio: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 64px;
color: var(--color-border-subtle);
}
.add-card:hover {
border-color: var(--color-primary);
color: var(--color-primary);
transform: translateY(-2px);
}
.preset-add-card {
background: var(--color-surface);
border-radius: 8px;
border: 2px dashed var(--color-border-subtle);
cursor: pointer;
transition: all 0.2s;
padding: 20px;
min-height: 120px;
display: flex;
align-items: center;
justify-content: center;
font-size: 48px;
color: var(--color-border-subtle);
}
.preset-add-card:hover {
border-color: var(--color-primary);
color: var(--color-primary);
transform: translateY(-2px);
}