apix/static/style.css
2025-11-22 00:23:18 +07:00

853 lines
17 KiB
CSS

:root {
--bd-bg: radial-gradient(circle at 15% 20%, #2e2ce0 0%, #0b0b1b 35%, #03030b 100%);
--panel-bg: rgba(10, 11, 22, 0.95);
--panel-backdrop: rgba(6, 7, 20, 0.7);
--border-color: rgba(255, 255, 255, 0.12);
--text-primary: #f5f5f5;
--text-secondary: #cbd5f5;
--accent-color: #fbbf24;
--accent-hover: #fcd34d;
--danger-color: #ff4444;
--input-bg: rgba(255, 255, 255, 0.06);
--card-bg: rgba(6, 7, 23, 0.8);
--shadow-glow: 0 20px 45px rgba(251, 191, 36, 0.25);
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Be Vietnam Pro', sans-serif;
background: var(--bd-bg);
color: var(--text-primary);
min-height: 100vh;
overflow: hidden;
display: flex;
justify-content: center;
align-items: stretch;
background-attachment: fixed;
transition: background 0.6s ease;
}
a {
color: var(--accent-color);
text-decoration: none;
transition: color 0.2s;
}
a:hover {
color: var(--accent-hover);
text-decoration: underline;
}
.app-container {
display: flex;
height: 100vh;
width: 100%;
gap: 1rem;
padding: 1rem;
position: relative;
z-index: 1;
}
/* Sidebar */
.sidebar {
width: 320px;
background: var(--panel-backdrop);
background-image: radial-gradient(circle at 20% -20%, rgba(251, 191, 36, 0.15), transparent 45%);
border-right: 1px solid var(--border-color);
display: flex;
flex-direction: column;
padding: 1.5rem;
overflow-y: auto;
flex-shrink: 0;
box-shadow: inset -1px 0 0 var(--border-color);
backdrop-filter: blur(24px);
border-radius: 1rem;
}
.top-toolbar {
background: transparent;
border: 1px solid rgba(255, 255, 255, 0.08);
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;
gap: 0.75rem;
padding: 1rem;
border-radius: 1rem;
width: 100%;
}
.content-area {
flex: 1;
display: flex;
flex-direction: column;
gap: 1rem;
align-items: stretch;
overflow: hidden;
padding: 0;
min-height: 0;
}
.toolbar-info {
display: flex;
gap: 0.5rem;
}
.toolbar-info-btn {
border: 1px solid rgba(255, 255, 255, 0.2);
background: rgba(255, 255, 255, 0.04);
color: var(--text-secondary);
padding: 0.2rem 0.6rem;
border-radius: 999px;
font-size: 0.7rem;
cursor: pointer;
transition: border-color 0.2s, color 0.2s, background 0.2s, box-shadow 0.2s;
line-height: 1.2;
}
.toolbar-info-btn:hover:not(:disabled) {
border-color: var(--accent-color);
color: #111;
background: rgba(251, 191, 36, 0.18);
box-shadow: 0 15px 35px rgba(251, 191, 36, 0.15);
}
.toolbar-info-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.brand {
margin-bottom: 2rem;
}
.brand h1 {
font-size: 1.5rem;
font-weight: 700;
color: var(--accent-color);
font-family: 'Playwrite AU SA', cursive;
letter-spacing: 0.5px;
text-transform: uppercase;
}
.badge {
font-size: 0.5rem;
/* background-color: rgba(245, 197, 24, 0.15); */
color: var(--accent-color);
padding: 0.2rem 0.3rem;
/* border-radius: 999px; */
font-weight: 600;
}
.controls-section {
display: flex;
flex-direction: column;
gap: 1rem;
flex: 1;
min-height: 0;
}
.controls-content {
display: flex;
flex-direction: column;
gap: 1.5rem;
flex: 1;
min-height: 0;
overflow-y: auto;
}
.controls-footer {
display: flex;
justify-content: flex-end;
}
.controls-footer #generate-btn {
padding: 0.4rem 1rem;
font-size: 0.95rem;
height: 28px;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 0.45rem;
min-width: 90px;
}
.controls-footer #generate-btn {
padding: 0.35rem 0.9rem;
font-size: 0.85rem;
line-height: 1.1;
}
.input-group {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
label {
font-size: 0.875rem;
font-weight: 500;
color: var(--text-secondary);
}
input[type="text"],
input[type="password"],
textarea,
select {
padding: 0.75rem;
background-color: var(--input-bg);
border: 1px solid var(--border-color);
border-radius: 0.5rem;
color: var(--text-primary);
font-family: inherit;
font-size: 0.875rem;
transition: all 0.2s;
backdrop-filter: blur(6px);
appearance: none;
-webkit-appearance: none;
}
select {
background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(15, 15, 25, 0.3)),
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 8'%3E%3Cpath fill='rgba(249, 203, 42, 0.85)' d='M7 8L0.928 0.5h12.144L7 8z'/%3E%3C/svg%3E");
background-repeat: no-repeat, no-repeat;
background-size: 100% 100%, 0.75rem 0.4rem;
background-position: center, right 0.75rem center;
padding-right: 2.5rem;
border-radius: 0.85rem;
border: 1px solid rgba(255, 255, 255, 0.15);
background-color: rgba(6, 7, 20, 0.95);
box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.3), 0 10px 25px rgba(0, 0, 0, 0.25);
transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
select:focus,
select:hover {
border-color: var(--accent-color);
background-color: rgba(6, 7, 20, 0.9);
box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.5), 0 15px 35px rgba(0, 0, 0, 0.35);
}
select option {
background-color: rgba(3, 3, 10, 0.95);
color: var(--text-primary);
padding: 0.35rem 0.75rem;
}
select option:checked,
select option:hover,
select option:focus {
background-color: rgba(251, 191, 36, 0.25);
color: #111;
}
select::-ms-expand {
display: none;
}
input:focus,
textarea:focus,
select:focus {
outline: none;
border-color: var(--accent-color);
box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}
textarea {
resize: vertical;
min-height: 100px;
}
/* Reference image input grid */
.image-inputs {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.image-input-header {
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 0.5rem;
font-size: 0.75rem;
color: var(--text-secondary);
}
.image-input-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0.75rem;
}
.image-slot {
border: 1px dashed var(--border-color);
border-radius: 0.5rem;
padding: 0.75rem;
background-color: rgba(15, 23, 42, 0.8);
color: var(--text-secondary);
font-size: 0.75rem;
min-height: 90px;
display: flex;
align-items: center;
justify-content: center;
position: relative;
cursor: pointer;
transition: border-color 0.2s, background-color 0.2s;
overflow: hidden;
}
.image-slot:hover {
border-color: var(--accent-color);
}
.image-slot.drag-over {
border-color: var(--accent-hover);
background-color: rgba(99, 102, 241, 0.1);
}
.image-slot.empty .slot-placeholder {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.25rem;
font-size: 0.75rem;
}
.image-slot .slot-icon {
font-size: 1.5rem;
color: var(--accent-color);
}
.slot-preview {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 0.5rem;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
pointer-events: none;
}
.image-slot.filled {
border-style: solid;
background-color: transparent;
}
.image-slot .slot-placeholder {
z-index: 1;
}
.slot-preview.hidden,
.slot-remove.hidden,
.slot-placeholder.hidden {
display: none;
}
.slot-remove {
position: absolute;
top: 0.35rem;
right: 0.35rem;
background: rgba(15, 23, 42, 0.85);
border: none;
border-radius: 999px;
color: var(--text-primary);
width: 1.75rem;
height: 1.75rem;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
z-index: 3;
}
.slot-input {
display: none;
}
button#generate-btn {
position: relative;
padding: 1rem;
background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
color: #111;
border: none;
border-radius: 0.75rem;
font-size: 1rem;
font-weight: 700;
cursor: pointer;
overflow: hidden;
box-shadow: 0 10px 15px rgba(245, 197, 24, 0.25);
transition: transform 0.1s, filter 0.2s;
}
button#generate-btn:active {
transform: scale(0.98);
}
button#generate-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
}
/* Main Content */
.main-content {
flex: 1;
display: flex;
flex-direction: column;
gap: 1rem;
color: var(--text-primary);
border-radius: 1.25rem;
padding: 0.75rem;
height: 100%;
min-height: 0;
overflow: hidden;
width: 100%;
border: 1px solid rgba(255, 255, 255, 0.08);
background: transparent;
}
.image-display-area {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
overflow: hidden;
position: relative;
background: radial-gradient(circle at top, rgba(27, 38, 102, 0.4), rgba(6, 6, 18, 0.95));
border-radius: 1.5rem;
cursor: grab;
user-select: none;
touch-action: none;
border: 1px solid rgba(255, 255, 255, 0.08);
box-shadow: 0 30px 60px rgba(9, 5, 25, 0.65), inset 0 0 40px rgba(251, 191, 36, 0.1);
min-height: 0;
}
.image-display-area.drag-over {
border-color: rgba(251, 191, 36, 0.8);
box-shadow: 0 30px 60px rgba(9, 5, 25, 0.7), inset 0 0 60px rgba(250, 204, 21, 0.25);
background: radial-gradient(circle at top, rgba(255, 255, 255, 0.08), rgba(6, 6, 18, 0.95));
backdrop-filter: blur(8px);
}
.state-view {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
}
.hidden {
display: none !important;
}
.icon-placeholder {
width: 100%;
height: 100%;
border-radius: 0.75rem;
border: 1px dashed rgba(251, 191, 36, 0.6);
background: radial-gradient(circle at center, rgba(251, 191, 36, 0.15), transparent 60%);
margin-bottom: 0;
}
#generated-image {
width: auto;
height: auto;
max-width: 100%;
max-height: 100%;
object-fit: contain;
border-radius: 0.5rem;
box-shadow: none;
transition: transform 0.2s;
pointer-events: none;
transform-origin: center center;
display: block;
margin: 0 auto;
}
.image-actions {
margin-top: 1rem;
}
.action-btn {
display: inline-block;
background-color: rgba(245, 197, 24, 0.1);
color: var(--accent-color);
text-decoration: none;
padding: 0.5rem 1rem;
border-radius: 0.5rem;
font-size: 0.875rem;
transition: background-color 0.2s, color 0.2s;
}
.action-btn:hover {
background-color: rgba(245, 197, 24, 0.25);
color: #111;
}
.canvas-toolbar {
position: absolute;
bottom: 1rem;
right: 1rem;
display: flex;
gap: 0.35rem;
background: rgba(15, 15, 15, 0.9);
padding: 0.35rem 0.45rem;
border-radius: 999px;
border: 1px solid rgba(255, 255, 255, 0.18);
backdrop-filter: blur(10px);
z-index: 10;
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.55);
}
.canvas-btn {
background: rgba(255, 255, 255, 0.06);
border: none;
color: var(--accent-color);
width: 34px;
height: 34px;
padding: 0;
font-size: 0.9rem;
border-radius: 50%;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
transition: background 0.2s, color 0.2s;
}
.canvas-btn:hover {
background: rgba(245, 197, 24, 0.35);
}
.canvas-btn svg {
width: 16px;
height: 16px;
color: inherit;
}
.canvas-btn svg {
width: 16px;
height: 16px;
color: inherit;
}
.popup-overlay {
position: fixed;
inset: 0;
background: rgba(3, 3, 10, 0.75);
display: flex;
align-items: center;
justify-content: center;
z-index: 50;
padding: 1rem;
}
.popup-card {
width: min(520px, 100%);
background: rgba(10, 11, 22, 0.96);
border: 1px solid var(--border-color);
border-radius: 1rem;
box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
padding: 1.25rem;
}
.popup-header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 0.5rem;
}
.popup-header h2 {
font-size: 1rem;
letter-spacing: 0.3px;
color: var(--text-primary);
}
.popup-close {
border: none;
background: rgba(255, 255, 255, 0.08);
color: var(--text-primary);
width: 32px;
height: 32px;
border-radius: 999px;
cursor: pointer;
font-size: 1.25rem;
line-height: 1;
display: inline-flex;
align-items: center;
justify-content: center;
}
.popup-close:hover {
background: rgba(255, 255, 255, 0.18);
}
.popup-body {
margin-top: 0.75rem;
display: flex;
flex-direction: column;
gap: 1rem;
}
.popup-section h3 {
font-size: 0.9rem;
color: var(--text-secondary);
margin-bottom: 0.35rem;
letter-spacing: 0.5px;
text-transform: uppercase;
}
.popup-section ul {
list-style: none;
display: flex;
flex-direction: column;
gap: 0.35rem;
padding-left: 0;
}
.popup-section li {
font-size: 0.8rem;
color: var(--text-primary);
padding-left: 1rem;
position: relative;
}
.popup-section li::before {
content: '•';
position: absolute;
left: 0;
color: var(--accent-color);
}
/* Gallery Section */
.history-section {
border-radius: 1.25rem;
border: 1px solid rgba(255, 255, 255, 0.08);
padding: 1rem;
display: flex;
flex-direction: column;
height: 180px;
flex-shrink: 0;
width: 100%;
background: transparent;
}
.history-section h3 {
font-size: 0.875rem;
color: var(--text-secondary);
margin-bottom: 0.5rem;
font-weight: 600;
letter-spacing: 0.5px;
text-transform: uppercase;
}
.gallery-grid {
display: flex;
gap: 0.75rem;
overflow-x: auto;
padding-bottom: 0.5rem;
height: 100%;
}
.gallery-item {
height: 100%;
aspect-ratio: 1;
border-radius: 0.5rem;
overflow: hidden;
cursor: pointer;
border: 2px solid transparent;
transition: all 0.2s;
flex-shrink: 0;
background: rgba(255, 255, 255, 0.02);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}
.gallery-item:hover {
transform: translateY(-2px);
}
.gallery-item.active {
border-color: var(--accent-color);
box-shadow: 0 0 25px rgba(251, 191, 36, 0.4);
}
.gallery-item img {
width: 100%;
height: 100%;
object-fit: cover;
}
.gallery-item .delete-btn {
position: absolute;
top: 4px;
right: 4px;
width: 20px;
height: 20px;
border-radius: 50%;
background: rgba(0, 0, 0, 0.6);
color: white;
border: none;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
opacity: 0;
transition: opacity 0.2s, background 0.2s;
font-size: 14px;
line-height: 1;
z-index: 10;
}
.gallery-item:hover .delete-btn {
opacity: 1;
}
.gallery-item .delete-btn:hover {
background: rgba(255, 68, 68, 0.9);
}
/* Spinner */
.spinner {
width: 50px;
height: 50px;
border: 4px solid rgba(255, 255, 255, 0.08);
border-left-color: var(--accent-hover);
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 1rem;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Scrollbar */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--border-color);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--text-secondary);
}
@media (max-width: 1024px) {
body {
overflow: auto;
}
.app-container {
flex-direction: column;
height: auto;
padding: 0.75rem 0.75rem 1.5rem;
gap: 0.75rem;
}
.sidebar {
width: 100%;
border-radius: 1rem;
max-height: 420px;
padding: 1.25rem;
}
.content-area {
flex: none;
width: 100%;
padding: 0;
}
.main-content {
padding: 0.5rem;
}
.image-display-area {
padding: 1.25rem;
min-height: 260px;
}
.canvas-toolbar {
bottom: 0.75rem;
right: 0.75rem;
}
.toolbar-info {
flex-wrap: wrap;
justify-content: flex-start;
}
.top-toolbar {
flex-direction: column;
align-items: stretch;
}
}
@media (max-width: 640px) {
.sidebar {
padding: 1rem;
}
.image-input-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.top-toolbar {
gap: 0.5rem;
}
.toolbar-generate {
width: 100%;
justify-content: flex-end;
}
.history-section {
height: auto;
padding: 0.75rem;
}
.gallery-grid {
gap: 0.5rem;
}
button#generate-btn {
width: 100%;
justify-content: center;
}
.canvas-toolbar {
position: static;
margin-top: 1rem;
}
.image-display-area {
padding: 1rem;
}
.history-section .gallery-item {
max-height: 140px;
}
}