734 lines
12 KiB
CSS
734 lines
12 KiB
CSS
:root {
|
|
/* Colors */
|
|
--accent: #38bdf8;
|
|
--accent-hover: #0ea5e9;
|
|
--accent-bg: rgba(56, 189, 248, 0.1);
|
|
|
|
/* Neutrals */
|
|
--bg-primary: #ffffff;
|
|
--bg-secondary: #f8fafc;
|
|
--bg-tertiary: #f1f5f9;
|
|
--border: #e2e8f0;
|
|
--border-focus: #38bdf8;
|
|
--text-primary: #0f172a;
|
|
--text-secondary: #475569;
|
|
--text-muted: #94a3b8;
|
|
|
|
/* Status colors */
|
|
--success: #22c55e;
|
|
--warning: #f59e0b;
|
|
--error: #ef4444;
|
|
|
|
/* Border radii */
|
|
--radius-sm: 4px;
|
|
--radius-md: 8px;
|
|
--radius-lg: 12px;
|
|
--radius-xl: 16px;
|
|
|
|
/* Shadows */
|
|
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
|
|
/* Typography */
|
|
--font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
|
|
--font-mono: 'Space Mono', ui-monospace, Consolas, monospace;
|
|
|
|
font-family: var(--font-body);
|
|
line-height: 1.5;
|
|
font-weight: 400;
|
|
color: var(--text-primary);
|
|
background-color: var(--bg-primary);
|
|
font-synthesis: none;
|
|
text-rendering: optimizeLegibility;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
#root {
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* Three-column layout */
|
|
.editor-layout {
|
|
display: flex;
|
|
flex: 1;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.sidebar {
|
|
width: 320px;
|
|
background: var(--bg-secondary);
|
|
border-right: 1px solid var(--border);
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.canvas-area {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: var(--bg-tertiary);
|
|
overflow: auto;
|
|
padding: 2rem;
|
|
}
|
|
|
|
.properties-panel {
|
|
width: 280px;
|
|
background: var(--bg-secondary);
|
|
border-left: 1px solid var(--border);
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
button {
|
|
font-family: inherit;
|
|
cursor: pointer;
|
|
outline: none;
|
|
}
|
|
|
|
button:focus-visible {
|
|
box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--accent);
|
|
}
|
|
|
|
input, textarea, select {
|
|
font-family: inherit;
|
|
}
|
|
|
|
/* App Layout - Three Column */
|
|
.app-layout {
|
|
display: flex;
|
|
min-height: 100vh;
|
|
background: var(--bg-secondary);
|
|
}
|
|
|
|
.sidebar-container {
|
|
width: 280px;
|
|
background: var(--bg-primary);
|
|
border-right: 1px solid var(--border);
|
|
flex-shrink: 0;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.canvas-container {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 2rem;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.properties-container {
|
|
width: 260px;
|
|
background: var(--bg-primary);
|
|
border-left: 1px solid var(--border);
|
|
flex-shrink: 0;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.app-title {
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
margin: 0 0 0.25rem 0;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.app-subtitle {
|
|
color: var(--text-secondary);
|
|
margin: 0;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.canvas-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
margin-bottom: 1rem;
|
|
width: 100%;
|
|
max-width: 400px;
|
|
}
|
|
|
|
.undo-redo-buttons {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.icon-btn {
|
|
padding: 0.5rem 0.75rem;
|
|
background: var(--bg-primary);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
font-size: 0.75rem;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.icon-btn:hover:not(:disabled) {
|
|
background: var(--accent);
|
|
border-color: var(--accent);
|
|
color: white;
|
|
}
|
|
|
|
.icon-btn.disabled {
|
|
opacity: 0.4;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.icon-btn:disabled {
|
|
opacity: 0.4;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.canvas-wrapper {
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.debug-info {
|
|
padding: 1rem;
|
|
background: var(--bg-tertiary);
|
|
border-radius: var(--radius-md);
|
|
font-size: 0.875rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.debug-info p {
|
|
margin: 0.25rem 0;
|
|
}
|
|
|
|
.debug-info .tip {
|
|
color: var(--text-muted);
|
|
font-size: 12px;
|
|
}
|
|
|
|
/* Sidebar */
|
|
.sidebar {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
}
|
|
|
|
.sidebar-tabs {
|
|
display: flex;
|
|
border-bottom: 1px solid var(--border);
|
|
background: var(--bg-tertiary);
|
|
}
|
|
|
|
.sidebar-tab {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 0.75rem 0.5rem;
|
|
background: transparent;
|
|
border: none;
|
|
border-bottom: 2px solid transparent;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
font-size: 0.75rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.sidebar-tab:hover {
|
|
background: var(--bg-primary);
|
|
}
|
|
|
|
.sidebar-tab.active {
|
|
border-bottom-color: var(--accent);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.tab-icon {
|
|
font-size: 1.25rem;
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.tab-label {
|
|
font-size: 0.625rem;
|
|
}
|
|
|
|
.sidebar-content {
|
|
padding: 1rem;
|
|
flex: 1;
|
|
}
|
|
|
|
/* Upload Tab */
|
|
.upload-tab h3 {
|
|
font-size: 0.875rem;
|
|
margin: 0 0 1rem 0;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.upload-zone {
|
|
border: 2px dashed var(--border);
|
|
border-radius: var(--radius-md);
|
|
padding: 2rem 1rem;
|
|
text-align: center;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
background: var(--bg-secondary);
|
|
}
|
|
|
|
.upload-zone:hover {
|
|
border-color: var(--accent);
|
|
background: var(--accent-bg);
|
|
}
|
|
|
|
.upload-zone.dragging {
|
|
border-color: var(--accent);
|
|
background: var(--accent-bg);
|
|
}
|
|
|
|
.upload-zone.uploading {
|
|
opacity: 0.7;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.upload-icon {
|
|
font-size: 2.5rem;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.upload-zone p {
|
|
margin: 0.25rem 0;
|
|
font-size: 0.875rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.upload-hint {
|
|
font-size: 0.75rem !important;
|
|
color: var(--text-muted) !important;
|
|
}
|
|
|
|
.uploading-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.spinner {
|
|
width: 24px;
|
|
height: 24px;
|
|
border: 2px solid var(--border);
|
|
border-top-color: var(--accent);
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* Stickers Tab */
|
|
.stickers-tab h3 {
|
|
font-size: 0.875rem;
|
|
margin: 0 0 1rem 0;
|
|
}
|
|
|
|
.category-pills {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 0.5rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.category-pill {
|
|
padding: 0.25rem 0.75rem;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
background: var(--bg-secondary);
|
|
font-size: 0.75rem;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.category-pill:hover {
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.category-pill.active {
|
|
background: var(--accent);
|
|
border-color: var(--accent);
|
|
color: white;
|
|
}
|
|
|
|
.sticker-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(6, 1fr);
|
|
gap: 0.5rem;
|
|
max-height: 400px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.sticker-button {
|
|
font-size: 1.5rem;
|
|
padding: 0.5rem;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
background: var(--bg-primary);
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.sticker-button:hover {
|
|
transform: scale(1.1);
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
/* Text Tab */
|
|
.text-tab h3 {
|
|
font-size: 0.875rem;
|
|
margin: 0 0 1rem 0;
|
|
}
|
|
|
|
.text-input-group {
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.text-input-group label {
|
|
display: block;
|
|
font-size: 0.75rem;
|
|
color: var(--text-secondary);
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.text-input,
|
|
.font-select {
|
|
width: 100%;
|
|
padding: 0.5rem;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.text-input:focus,
|
|
.font-select:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.size-slider {
|
|
width: 100%;
|
|
}
|
|
|
|
.color-picker-row {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.color-picker {
|
|
width: 40px;
|
|
height: 36px;
|
|
padding: 0;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.color-input {
|
|
flex: 1;
|
|
padding: 0.5rem;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
|
|
.add-text-btn {
|
|
width: 100%;
|
|
padding: 0.75rem;
|
|
background: var(--accent);
|
|
color: white;
|
|
border: none;
|
|
border-radius: var(--radius-md);
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.add-text-btn:hover {
|
|
background: var(--accent-hover);
|
|
}
|
|
|
|
.text-preview {
|
|
margin-top: 1rem;
|
|
padding: 1rem;
|
|
background: var(--bg-secondary);
|
|
border-radius: var(--radius-md);
|
|
text-align: center;
|
|
}
|
|
|
|
/* Templates Tab */
|
|
.templates-tab h3 {
|
|
font-size: 0.875rem;
|
|
margin: 0 0 1rem 0;
|
|
}
|
|
|
|
.templates-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 0.75rem;
|
|
max-height: 400px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.template-card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding: 0.75rem;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-md);
|
|
background: var(--bg-primary);
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
text-align: left;
|
|
}
|
|
|
|
.template-card:hover {
|
|
border-color: var(--accent);
|
|
transform: translateY(-2px);
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
.template-preview {
|
|
height: 60px;
|
|
background: var(--bg-tertiary);
|
|
border-radius: var(--radius-sm);
|
|
margin-bottom: 0.5rem;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 0.25rem;
|
|
flex-wrap: wrap;
|
|
padding: 0.25rem;
|
|
}
|
|
|
|
.template-preview-element {
|
|
font-weight: 500;
|
|
}
|
|
|
|
.template-info {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.25rem;
|
|
}
|
|
|
|
.template-name {
|
|
font-size: 0.75rem;
|
|
font-weight: 500;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.template-category {
|
|
font-size: 0.625rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* Properties Panel */
|
|
.properties-panel {
|
|
padding: 1rem;
|
|
}
|
|
|
|
.properties-panel h3 {
|
|
font-size: 0.875rem;
|
|
margin: 0 0 1rem 0;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.no-selection {
|
|
padding: 2rem 1rem;
|
|
text-align: center;
|
|
color: var(--text-muted);
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.element-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
padding: 0.75rem;
|
|
background: var(--bg-tertiary);
|
|
border-radius: var(--radius-md);
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.element-icon {
|
|
font-size: 1.25rem;
|
|
}
|
|
|
|
.element-name {
|
|
font-weight: 500;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.property-group {
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.property-group label {
|
|
display: block;
|
|
font-size: 0.75rem;
|
|
color: var(--text-secondary);
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.property-row {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.property-input {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.property-label {
|
|
font-size: 0.75rem;
|
|
color: var(--text-muted);
|
|
min-width: 12px;
|
|
}
|
|
|
|
.property-input input {
|
|
flex: 1;
|
|
padding: 0.5rem;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
font-size: 0.875rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.property-input input:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.rotation-slider {
|
|
width: 100%;
|
|
}
|
|
|
|
.delete-btn {
|
|
width: 100%;
|
|
padding: 0.75rem;
|
|
background: transparent;
|
|
color: var(--error);
|
|
border: 1px solid var(--error);
|
|
border-radius: var(--radius-md);
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.delete-btn:hover {
|
|
background: var(--error);
|
|
color: white;
|
|
}
|
|
|
|
.bg-removal-container {
|
|
margin-top: 1rem;
|
|
padding-top: 1rem;
|
|
border-top: 1px solid var(--border);
|
|
}
|
|
|
|
.bg-removal-btn {
|
|
width: 100%;
|
|
padding: 0.75rem;
|
|
background: linear-gradient(135deg, #8b5cf6, #ec4899);
|
|
color: white;
|
|
border: none;
|
|
border-radius: var(--radius-md);
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.bg-removal-btn:hover:not(:disabled) {
|
|
transform: translateY(-1px);
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
.bg-removal-btn:disabled {
|
|
opacity: 0.7;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.bg-removal-hint {
|
|
font-size: 0.7rem;
|
|
color: var(--text-muted);
|
|
margin: 0.5rem 0 0 0;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.spinner-small {
|
|
width: 16px;
|
|
height: 16px;
|
|
border: 2px solid rgba(255, 255, 255, 0.3);
|
|
border-top-color: white;
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
|
|
/* Filerobot Editor Overlay */
|
|
.filerobot-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(0, 0, 0, 0.8);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.filerobot-container {
|
|
width: 90%;
|
|
height: 90%;
|
|
background: #1e1e1e;
|
|
border-radius: var(--radius-lg);
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 900px) {
|
|
.app-layout {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.sidebar-container,
|
|
.properties-container {
|
|
width: 100%;
|
|
border: none;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.sidebar-tabs {
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.sticker-grid {
|
|
grid-template-columns: repeat(8, 1fr);
|
|
}
|
|
}
|