Files
hejyou_content_creation/frontend/src/index.css
admin 469e8dc385 Generieren-Seite: Objekte-Sidebar, Prompt-Editor mit Layouts, Wörter-Spalte
- Details-Panel unter dem Bild entfernt
- Prompt-Editor unter dem Bild mit Layout-Speicherung (localStorage)
- Standard-Layout mit verbessertem Sprachlern-Prompt (10 Niveaus + Wortliste)
- Neue Wörter-Spalte (links neben Sätze) extrahiert Tokens aus Sätzen
- Sidebar --words CSS-Klasse ergänzt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 22:37:02 +02:00

1166 lines
23 KiB
CSS

/* =====================================================
DESIGN TOKENS
===================================================== */
:root {
--font: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
--bg: #F2F4F9;
--canvas-bg: #E6E9F2;
--surface: #FFFFFF;
--surface-2: #F6F8FC;
--surface-3: #EDF0F7;
--border: #DDE1EE;
--border-focus: #6366F1;
--primary: #5C6CF6;
--primary-hover: #4A5AE5;
--primary-active: #3A4AD5;
--primary-muted: #EEF0FE;
--primary-muted-fg: #4A5AE5;
--text-1: #0D1526;
--text-2: #4B5568;
--text-3: #8C95A8;
--text-inv: #FFFFFF;
--success: #059669;
--success-bg: #ECFDF5;
--danger: #DC2626;
--danger-bg: #FEF2F2;
--warning: #D97706;
--shadow-xs: 0 1px 2px rgba(13,21,38,.05);
--shadow-sm: 0 2px 6px rgba(13,21,38,.07);
--shadow-md: 0 6px 20px rgba(13,21,38,.09);
--shadow-lg: 0 16px 40px rgba(13,21,38,.12);
--r-sm: 5px;
--r-md: 8px;
--r-lg: 12px;
--r-xl: 16px;
--r-full: 999px;
--topbar-h: 56px;
--sidebar-w: 252px;
--sidebar-rw: 276px;
--panel-gap: 1px;
}
[data-theme="dark"] {
--bg: #0C0F1A;
--canvas-bg: #080B14;
--surface: #141828;
--surface-2: #1A1F32;
--surface-3: #1F253A;
--border: #272D45;
--primary: #7B8BFF;
--primary-hover: #8D9BFF;
--primary-active: #6A7AEE;
--primary-muted: #1C2348;
--primary-muted-fg: #A5B4FC;
--text-1: #EDF0FA;
--text-2: #8892B0;
--text-3: #4A5270;
--text-inv: #0D1526;
--success: #34D399;
--success-bg: #052E1E;
--danger: #F87171;
--danger-bg: #3B0E0E;
--warning: #FBBF24;
--shadow-xs: 0 1px 2px rgba(0,0,0,.25);
--shadow-sm: 0 2px 6px rgba(0,0,0,.30);
--shadow-md: 0 6px 20px rgba(0,0,0,.40);
--shadow-lg: 0 16px 40px rgba(0,0,0,.55);
}
/* =====================================================
RESET
===================================================== */
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html, body, #root {
height: 100%;
}
body {
font-family: var(--font);
font-size: 13.5px;
line-height: 1.5;
background: var(--bg);
color: var(--text-1);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
overflow: hidden;
}
/* =====================================================
APP SHELL
===================================================== */
.app-shell {
display: flex;
flex-direction: column;
height: 100vh;
overflow: hidden;
}
/* =====================================================
TOPBAR
===================================================== */
.topbar {
height: var(--topbar-h);
flex-shrink: 0;
background: var(--surface);
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
padding: 0 16px;
gap: 4px;
z-index: 50;
}
.topbar-brand {
display: flex;
align-items: center;
gap: 8px;
margin-right: 8px;
user-select: none;
}
.topbar-logo-icon {
display: flex;
align-items: center;
color: var(--primary);
}
.topbar-brand-name {
font-size: 14px;
font-weight: 650;
letter-spacing: -0.01em;
color: var(--text-1);
}
.topbar-nav {
display: flex;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--r-md);
padding: 3px;
gap: 2px;
margin-right: 8px;
}
.topbar-tab {
padding: 5px 14px;
border-radius: 6px;
border: none;
background: transparent;
color: var(--text-2);
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: all 0.15s ease;
box-shadow: none;
}
.topbar-tab:hover:not(.active) {
background: var(--surface-3);
color: var(--text-1);
transform: none;
box-shadow: none;
}
.topbar-tab.active {
background: var(--surface);
color: var(--text-1);
font-weight: 600;
box-shadow: var(--shadow-xs);
transform: none;
}
.topbar-center {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
}
.topbar-actions {
display: flex;
align-items: center;
gap: 6px;
margin-left: auto;
}
.topbar-divider {
width: 1px;
height: 20px;
background: var(--border);
margin: 0 2px;
}
/* =====================================================
IMAGE NAVIGATION (in topbar)
===================================================== */
.image-nav {
display: flex;
align-items: center;
gap: 10px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--r-md);
padding: 5px 10px;
}
.image-counter {
display: flex;
align-items: baseline;
gap: 4px;
min-width: 80px;
justify-content: center;
font-variant-numeric: tabular-nums;
}
.image-counter-num {
font-size: 15px;
font-weight: 700;
color: var(--text-1);
}
.image-counter-sep {
font-size: 13px;
color: var(--text-3);
}
.image-counter-total {
font-size: 13px;
font-weight: 500;
color: var(--text-2);
}
.image-counter-empty {
font-size: 13px;
color: var(--text-3);
font-style: italic;
}
/* =====================================================
WORKSPACE
===================================================== */
.workspace {
display: flex;
flex: 1;
overflow: hidden;
min-height: 0;
}
/* =====================================================
SIDEBAR
===================================================== */
.sidebar {
width: var(--sidebar-w);
flex-shrink: 0;
background: var(--surface);
border-right: 1px solid var(--border);
overflow-y: auto;
overflow-x: hidden;
display: flex;
flex-direction: column;
scrollbar-width: thin;
scrollbar-color: var(--border) transparent;
}
.sidebar--right {
width: var(--sidebar-rw);
border-right: none;
border-left: 1px solid var(--border);
}
.sidebar--words {
width: 180px;
border-left: 1px solid var(--border);
border-right: none;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.sidebar-panel {
padding: 14px 14px;
border-bottom: 1px solid var(--border);
}
.sidebar-panel:last-child {
border-bottom: none;
flex: 1;
}
.sidebar-heading {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--text-3);
margin-bottom: 10px;
display: flex;
align-items: center;
gap: 6px;
}
/* =====================================================
CANVAS AREA
===================================================== */
.canvas-area {
flex: 1;
background: var(--canvas-bg);
overflow: auto;
display: flex;
align-items: flex-start;
justify-content: center;
padding: 28px;
scrollbar-width: thin;
scrollbar-color: var(--border) transparent;
}
.canvas-frame {
background: var(--surface);
border-radius: var(--r-lg);
box-shadow: var(--shadow-lg);
overflow: hidden;
display: inline-flex;
max-width: 100%;
}
canvas {
display: block;
max-width: 100%;
height: auto;
}
/* =====================================================
BUTTONS
===================================================== */
button {
font-family: var(--font);
font-size: 13px;
cursor: pointer;
transition: all 0.15s ease;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
white-space: nowrap;
border: none;
border-radius: var(--r-md);
}
/* Primary */
.btn-primary,
button:not([class]) {
background: var(--primary);
color: var(--text-inv);
font-weight: 600;
padding: 7px 14px;
box-shadow: 0 1px 3px rgba(92,108,246,.35);
}
.btn-primary:hover:not(:disabled),
button:not([class]):hover:not(:disabled) {
background: var(--primary-hover);
box-shadow: 0 3px 10px rgba(92,108,246,.45);
transform: translateY(-1px);
}
.btn-primary:active:not(:disabled),
button:not([class]):active:not(:disabled) {
background: var(--primary-active);
transform: translateY(0);
box-shadow: none;
}
/* Ghost */
.btn-ghost {
background: transparent;
color: var(--text-2);
border: 1px solid var(--border);
font-weight: 500;
padding: 7px 12px;
}
.btn-ghost:hover:not(:disabled) {
background: var(--surface-2);
color: var(--text-1);
border-color: var(--text-3);
transform: none;
box-shadow: none;
}
/* Danger ghost */
.btn-danger {
color: var(--danger);
border-color: transparent;
}
.btn-danger:hover:not(:disabled) {
background: var(--danger-bg);
border-color: var(--danger);
color: var(--danger);
}
/* Icon button */
.btn-icon {
background: transparent;
color: var(--text-2);
width: 32px;
height: 32px;
border-radius: var(--r-md);
padding: 0;
flex-shrink: 0;
}
.btn-icon:hover:not(:disabled) {
background: var(--surface-2);
color: var(--text-1);
transform: none;
box-shadow: none;
}
.btn-icon:disabled {
opacity: 0.3;
cursor: not-allowed;
background: transparent;
}
/* Sizes */
.btn-sm {
font-size: 12.5px;
padding: 5px 11px;
}
.btn-block {
width: 100%;
margin-top: 6px;
}
/* Disabled state */
button:disabled {
opacity: 0.45;
cursor: not-allowed;
box-shadow: none;
transform: none;
}
/* =====================================================
BADGE
===================================================== */
.badge {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 18px;
height: 18px;
padding: 0 5px;
border-radius: var(--r-full);
background: var(--primary-muted);
color: var(--primary-muted-fg);
font-size: 11px;
font-weight: 700;
line-height: 1;
}
/* =====================================================
FORM ELEMENTS
===================================================== */
.field {
margin-bottom: 8px;
}
.field:last-of-type {
margin-bottom: 0;
}
.field-label {
display: block;
font-size: 11.5px;
font-weight: 600;
color: var(--text-2);
margin-bottom: 4px;
letter-spacing: 0.01em;
}
.field-input,
input[type="text"],
input[type="email"],
input[type="password"] {
width: 100%;
padding: 7px 10px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--r-md);
color: var(--text-1);
font-family: var(--font);
font-size: 13px;
transition: border-color 0.15s, box-shadow 0.15s;
outline: none;
}
.field-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(92,108,246,.12);
background: var(--surface);
}
select {
width: 100%;
padding: 7px 10px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--r-md);
color: var(--text-1);
font-family: var(--font);
font-size: 13px;
cursor: pointer;
outline: none;
transition: border-color 0.15s;
min-width: unset;
}
select:focus {
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(92,108,246,.12);
}
/* =====================================================
MODE SELECTOR (Rect / Polygon toggle)
===================================================== */
.mode-group {
display: flex;
gap: 4px;
}
.mode-btn {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
padding: 6px 10px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--r-md);
color: var(--text-2);
font-size: 12.5px;
font-weight: 500;
cursor: pointer;
transition: all 0.15s;
user-select: none;
}
.mode-btn input[type="radio"] {
display: none;
}
.mode-btn:hover {
background: var(--surface-3);
color: var(--text-1);
}
.mode-btn.active {
background: var(--primary-muted);
border-color: var(--primary);
color: var(--primary-muted-fg);
font-weight: 600;
}
/* =====================================================
ACTION GROUP
===================================================== */
.action-group {
display: flex;
flex-direction: column;
gap: 4px;
margin-top: 10px;
}
/* =====================================================
SELECTIONS LIST
===================================================== */
.selections-list {
display: flex;
flex-direction: column;
gap: 4px;
max-height: 140px;
overflow-y: auto;
margin-bottom: 2px;
scrollbar-width: thin;
scrollbar-color: var(--border) transparent;
}
.selection-chip {
display: flex;
align-items: center;
gap: 6px;
padding: 5px 8px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--r-sm);
font-size: 12px;
}
.selection-chip-num {
display: inline-flex;
align-items: center;
justify-content: center;
width: 18px;
height: 18px;
border-radius: 50%;
background: var(--primary-muted);
color: var(--primary-muted-fg);
font-size: 10px;
font-weight: 700;
flex-shrink: 0;
}
.selection-chip-type {
font-weight: 600;
color: var(--text-1);
}
.selection-chip-info {
color: var(--text-3);
font-variant-numeric: tabular-nums;
margin-left: auto;
}
/* =====================================================
OBJECTS LIST
===================================================== */
.objects-list {
display: flex;
flex-direction: column;
gap: 4px;
max-height: calc(100vh - 240px);
overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: var(--border) transparent;
}
.object-item {
display: flex;
flex-direction: column;
border-radius: var(--r-md);
border: 1px solid var(--border);
background: var(--surface-2);
cursor: pointer;
transition: border-color 0.15s, background 0.15s;
overflow: hidden;
}
.object-item:hover {
background: var(--surface-3);
border-color: var(--text-3);
}
.object-item.selected {
border-color: var(--primary);
background: var(--primary-muted);
}
.object-item-header {
display: flex;
align-items: center;
gap: 6px;
padding: 7px 8px;
flex-wrap: nowrap;
}
.object-item-header input[type="checkbox"] {
width: 14px;
height: 14px;
flex-shrink: 0;
accent-color: var(--primary);
cursor: pointer;
}
.object-item img {
width: 36px;
height: 36px;
object-fit: cover;
border-radius: var(--r-sm);
border: 1px solid var(--border);
flex-shrink: 0;
}
.object-hierarchy-select {
width: 42px !important;
min-width: 0 !important;
padding: 3px 4px !important;
font-size: 11px !important;
border-radius: var(--r-sm) !important;
flex-shrink: 0;
}
.object-parent-select {
width: 48px !important;
min-width: 0 !important;
padding: 3px 4px !important;
font-size: 11px !important;
border-radius: var(--r-sm) !important;
background: var(--primary-muted) !important;
border-color: var(--primary) !important;
color: var(--primary-muted-fg) !important;
flex-shrink: 0;
}
.object-item-text {
display: flex;
flex-direction: column;
font-size: 12px;
flex: 1;
min-width: 0;
gap: 1px;
}
.object-item-text strong {
font-size: 12.5px;
font-weight: 600;
color: var(--text-1);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.object-item-text span {
color: var(--text-3);
font-size: 11px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.object-icon-button {
padding: 4px 6px !important;
font-size: 12px !important;
background: transparent !important;
color: var(--text-3) !important;
border: none !important;
box-shadow: none !important;
border-radius: var(--r-sm) !important;
flex-shrink: 0;
}
.object-icon-button:hover:not(:disabled) {
background: var(--surface-3) !important;
color: var(--text-1) !important;
transform: none !important;
box-shadow: none !important;
}
.object-item-details {
display: none;
flex-direction: column;
gap: 6px;
padding: 8px 10px;
border-top: 1px solid var(--border);
background: var(--surface);
}
.object-item-details.visible {
display: flex;
}
.object-item-details label {
font-size: 11px;
font-weight: 600;
color: var(--text-3);
text-transform: uppercase;
letter-spacing: 0.04em;
}
.object-item-details input[type="text"] {
padding: 5px 8px;
font-size: 12px;
border-radius: var(--r-sm);
}
.objects-tags {
margin-top: 8px;
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.object-tag {
padding: 2px 8px;
border-radius: var(--r-full);
background: var(--surface-3);
border: 1px solid var(--border);
font-size: 11px;
color: var(--text-2);
white-space: nowrap;
}
/* =====================================================
DETAILS PANEL
===================================================== */
.sidebar-section {
margin-bottom: 0;
}
.sidebar-section h2 {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--text-3);
margin-bottom: 8px;
}
.sidebar-section h3 {
font-size: 11px;
font-weight: 600;
color: var(--text-2);
margin-top: 10px;
margin-bottom: 6px;
letter-spacing: 0.03em;
}
.sidebar-row {
display: flex;
flex-direction: column;
gap: 3px;
margin-bottom: 6px;
}
.sidebar-row label {
font-size: 11px;
font-weight: 600;
color: var(--text-3);
text-transform: uppercase;
letter-spacing: 0.04em;
}
.sidebar-row input[type="text"] {
padding: 6px 8px;
font-size: 12.5px;
border-radius: var(--r-sm);
}
.detail-value {
padding: 5px 8px;
border-radius: var(--r-sm);
border: 1px solid var(--border);
background: var(--surface-2);
font-size: 12.5px;
color: var(--text-1);
min-height: 26px;
word-break: break-word;
}
/* =====================================================
SENTENCES LIST
===================================================== */
.sentences-list {
display: flex;
flex-direction: column;
gap: 10px;
max-height: 100%;
overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: var(--border) transparent;
}
.sentence-item {
padding: 12px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--r-md);
display: flex;
flex-direction: column;
gap: 6px;
}
.sentence-level {
font-size: 10.5px;
font-weight: 700;
letter-spacing: 0.05em;
text-transform: uppercase;
color: var(--primary-muted-fg);
margin-bottom: 2px;
}
.sentence-item-question {
font-weight: 600;
color: var(--text-1);
font-size: 13px;
}
.sentence-item-answer {
color: var(--text-2);
font-size: 12.5px;
padding-left: 10px;
border-left: 2px solid var(--primary-muted);
line-height: 1.5;
}
.sentence-item-empty,
.empty-state {
padding: 20px 12px;
text-align: center;
color: var(--text-3);
font-size: 12.5px;
font-style: italic;
}
/* =====================================================
WORDS CLOUD
===================================================== */
.words-cloud {
display: flex;
flex-wrap: wrap;
gap: 5px;
}
.word-chip {
display: inline-flex;
align-items: center;
padding: 3px 8px;
border-radius: var(--r-full);
background: var(--surface-2);
border: 1px solid var(--border);
font-size: 12px;
color: var(--text-1);
cursor: default;
transition: background 0.12s, border-color 0.12s;
}
.word-chip:hover {
background: var(--primary-muted);
border-color: var(--primary);
color: var(--primary-muted-fg);
}
/* =====================================================
PROMPT EDITOR
===================================================== */
.prompt-editor {
width: 100%;
display: flex;
flex-direction: column;
gap: 6px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--r-lg);
padding: 10px;
flex: 1;
min-height: 0;
}
.prompt-editor-toolbar {
display: flex;
align-items: center;
gap: 6px;
flex-wrap: wrap;
}
.prompt-layout-select {
width: auto !important;
min-width: 120px;
max-width: 200px;
font-size: 12.5px !important;
padding: 4px 8px !important;
}
.prompt-save-dialog {
display: flex;
align-items: center;
gap: 6px;
padding: 8px 10px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--r-md);
}
.prompt-save-dialog input[type="text"] {
flex: 1;
padding: 5px 8px;
font-size: 12.5px;
}
.prompt-textarea {
width: 100%;
flex: 1;
min-height: 180px;
resize: vertical;
padding: 10px 12px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--r-md);
color: var(--text-1);
font-family: var(--font);
font-size: 12.5px;
line-height: 1.6;
outline: none;
transition: border-color 0.15s, box-shadow 0.15s;
}
.prompt-textarea:focus {
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(92,108,246,.12);
background: var(--surface);
}
/* =====================================================
STATUS MESSAGE
===================================================== */
.status-msg {
display: flex;
align-items: center;
gap: 6px;
margin-top: 8px;
padding: 7px 10px;
border-radius: var(--r-md);
font-size: 12px;
font-weight: 500;
}
.status-msg.ok {
background: var(--success-bg);
color: var(--success);
border: 1px solid var(--success);
}
.status-msg.error {
background: var(--danger-bg);
color: var(--danger);
border: 1px solid var(--danger);
}
/* Legacy compat */
.status { font-size: 12px; }
.status.ok { color: var(--success); }
.status.error { color: var(--danger); }
/* =====================================================
AUTH / LOGIN PAGE
===================================================== */
.auth-page {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: var(--bg);
padding: 24px;
}
.auth-card {
width: 100%;
max-width: 380px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--r-xl);
box-shadow: var(--shadow-lg);
overflow: hidden;
}
.auth-card-header {
padding: 28px 28px 20px;
border-bottom: 1px solid var(--border);
background: var(--surface-2);
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}
.auth-logo {
width: 44px;
height: 44px;
border-radius: var(--r-lg);
background: var(--primary);
color: white;
display: flex;
align-items: center;
justify-content: center;
}
.auth-title {
font-size: 18px;
font-weight: 700;
color: var(--text-1);
letter-spacing: -0.02em;
}
.auth-subtitle {
font-size: 13px;
color: var(--text-3);
text-align: center;
}
.auth-card-body {
padding: 24px 28px 28px;
display: flex;
flex-direction: column;
gap: 14px;
}
.auth-field {
display: flex;
flex-direction: column;
gap: 5px;
}
.auth-field label {
font-size: 12px;
font-weight: 600;
color: var(--text-2);
letter-spacing: 0.02em;
}
.auth-error {
padding: 9px 12px;
background: var(--danger-bg);
border: 1px solid var(--danger);
border-radius: var(--r-md);
color: var(--danger);
font-size: 12.5px;
font-weight: 500;
}
.auth-submit {
background: var(--primary);
color: white;
font-size: 14px;
font-weight: 600;
padding: 10px 16px;
border-radius: var(--r-md);
border: none;
cursor: pointer;
width: 100%;
margin-top: 4px;
box-shadow: 0 2px 8px rgba(92,108,246,.35);
transition: all 0.15s;
}
.auth-submit:hover:not(:disabled) {
background: var(--primary-hover);
box-shadow: 0 4px 14px rgba(92,108,246,.45);
transform: translateY(-1px);
}
.auth-submit:disabled {
opacity: 0.55;
cursor: not-allowed;
transform: none;
box-shadow: none;
}