300 lines
6.6 KiB
CSS
300 lines
6.6 KiB
CSS
:root {
|
|
--bg-color: #0f172a; /* Slate 900 */
|
|
--card-bg: #1e293b; /* Slate 800 */
|
|
--card-border: #334155; /* Slate 700 */
|
|
--text-primary: #f1f5f9; /* Slate 100 */
|
|
--text-secondary: #94a3b8; /* Slate 400 */
|
|
--accent-color: #3b82f6; /* Blue 500 */
|
|
--accent-hover: #2563eb; /* Blue 600 */
|
|
--primary-color: #3b82f6; /* Match accent color */
|
|
--border-radius: 12px;
|
|
--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
background-color: var(--bg-color);
|
|
color: var(--text-primary);
|
|
background-image: radial-gradient(circle at 50% 0%, #1e293b 0%, #0f172a 100%);
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.app-container {
|
|
max-width: 1400px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
}
|
|
|
|
/* Header */
|
|
.header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 30px;
|
|
padding: 20px 30px;
|
|
background: var(--card-bg);
|
|
border: 1px solid var(--card-border);
|
|
border-radius: var(--border-radius);
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.header h1 {
|
|
margin: 0;
|
|
font-size: 24px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
background: linear-gradient(to right, #60a5fa, #a78bfa);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
}
|
|
|
|
.header-subtitle {
|
|
color: var(--text-secondary);
|
|
font-size: 14px;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
/* Main Layout */
|
|
.main-layout {
|
|
display: grid;
|
|
grid-template-columns: 400px 1fr;
|
|
gap: 24px;
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
/* Input Section */
|
|
.input-card {
|
|
background: var(--card-bg);
|
|
border: 1px solid var(--card-border);
|
|
padding: 24px;
|
|
border-radius: var(--border-radius);
|
|
box-shadow: var(--shadow);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 20px;
|
|
height: fit-content;
|
|
}
|
|
|
|
.preset-tags {
|
|
display: flex;
|
|
gap: 8px;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.preset-tag {
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
background-color: rgba(59, 130, 246, 0.1);
|
|
border: 1px solid rgba(59, 130, 246, 0.2);
|
|
color: #93c5fd;
|
|
}
|
|
|
|
.preset-tag:hover {
|
|
transform: translateY(-2px);
|
|
background-color: rgba(59, 130, 246, 0.2);
|
|
color: white;
|
|
}
|
|
|
|
/* Overriding Element Plus Input styles for dark mode */
|
|
.el-textarea__inner {
|
|
background-color: #0f172a !important;
|
|
border-color: var(--card-border) !important;
|
|
color: var(--text-primary) !important;
|
|
box-shadow: none !important;
|
|
}
|
|
|
|
.el-textarea__inner:focus {
|
|
border-color: var(--accent-color) !important;
|
|
}
|
|
|
|
.generate-btn {
|
|
width: 100%;
|
|
height: 48px;
|
|
font-size: 16px;
|
|
margin-top: 10px;
|
|
background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
|
|
border: none;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.generate-btn:hover {
|
|
opacity: 0.9;
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
/* Preview Section */
|
|
.preview-card {
|
|
background: var(--card-bg);
|
|
border: 1px solid var(--card-border);
|
|
padding: 24px;
|
|
border-radius: var(--border-radius);
|
|
box-shadow: var(--shadow);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-height: 600px;
|
|
position: relative;
|
|
}
|
|
|
|
.preview-image {
|
|
max-width: 100%;
|
|
max-height: 600px;
|
|
border-radius: 8px;
|
|
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
|
|
transition: transform 0.3s;
|
|
}
|
|
|
|
.empty-state {
|
|
text-align: center;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.empty-icon {
|
|
font-size: 64px;
|
|
margin-bottom: 20px;
|
|
display: block;
|
|
opacity: 0.3;
|
|
}
|
|
|
|
/* History Section */
|
|
.history-section {
|
|
background: var(--card-bg);
|
|
border: 1px solid var(--card-border);
|
|
padding: 24px;
|
|
border-radius: var(--border-radius);
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.section-title {
|
|
margin-top: 0;
|
|
margin-bottom: 24px;
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
border-left: 4px solid var(--accent-color);
|
|
padding-left: 12px;
|
|
}
|
|
|
|
.history-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|
|
gap: 20px;
|
|
}
|
|
|
|
.history-item {
|
|
position: relative;
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
cursor: pointer;
|
|
aspect-ratio: 1;
|
|
border: 1px solid var(--card-border);
|
|
transition: transform 0.2s, box-shadow 0.2s;
|
|
}
|
|
|
|
.history-img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
transition: transform 0.5s;
|
|
}
|
|
|
|
.history-item:hover {
|
|
transform: translateY(-4px);
|
|
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
|
|
border-color: var(--accent-color);
|
|
}
|
|
|
|
.history-item:hover .history-img {
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
.history-overlay {
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
background: linear-gradient(to top, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.7));
|
|
color: var(--text-primary);
|
|
padding: 12px;
|
|
transform: translateY(100%);
|
|
transition: transform 0.3s;
|
|
font-size: 12px;
|
|
backdrop-filter: blur(4px);
|
|
}
|
|
|
|
.history-item:hover .history-overlay {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.history-prompt {
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
margin-bottom: 6px;
|
|
color: #e2e8f0;
|
|
}
|
|
|
|
.history-time {
|
|
color: #94a3b8;
|
|
font-size: 10px;
|
|
}
|
|
|
|
/* Loading Animation */
|
|
.generating-overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(30, 41, 59, 0.8);
|
|
backdrop-filter: blur(4px);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 10;
|
|
border-radius: var(--border-radius);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.loader {
|
|
width: 48px;
|
|
height: 48px;
|
|
border: 4px solid rgba(59, 130, 246, 0.3);
|
|
border-bottom-color: var(--accent-color);
|
|
border-radius: 50%;
|
|
display: inline-block;
|
|
box-sizing: border-box;
|
|
animation: rotation 1s linear infinite;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
@keyframes rotation {
|
|
0% { transform: rotate(0deg); }
|
|
100% { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* Overriding Element Plus generic styles */
|
|
.el-button--plain {
|
|
background-color: transparent !important;
|
|
border-color: var(--card-border) !important;
|
|
color: var(--text-secondary) !important;
|
|
}
|
|
|
|
.el-button--plain:hover {
|
|
border-color: var(--accent-color) !important;
|
|
color: var(--accent-color) !important;
|
|
background-color: rgba(59, 130, 246, 0.1) !important;
|
|
}
|
|
|
|
.el-tag--plain {
|
|
background-color: rgba(30, 41, 59, 0.5) !important;
|
|
border-color: var(--card-border) !important;
|
|
color: var(--text-secondary) !important;
|
|
}
|