/* ============================================ Image RAG Pipeline — Design System Premium dark theme with glassmorphism ============================================ */ /* --- Google Fonts --- */ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap'); /* --- CSS Variables --- */ :root { --bg-primary: #0a0e1a; --bg-secondary: #111827; --bg-card: rgba(17, 24, 39, 0.7); --bg-card-hover: rgba(17, 24, 39, 0.9); --bg-glass: rgba(255, 255, 255, 0.03); --bg-input: rgba(255, 255, 255, 0.05); --border-subtle: rgba(255, 255, 255, 0.06); --border-light: rgba(255, 255, 255, 0.1); --border-accent: rgba(99, 102, 241, 0.4); --text-primary: #f1f5f9; --text-secondary: #94a3b8; --text-muted: #64748b; --text-accent: #a5b4fc; --accent-indigo: #6366f1; --accent-violet: #8b5cf6; --accent-pink: #ec4899; --accent-cyan: #06b6d4; --accent-emerald: #10b981; --accent-amber: #f59e0b; --accent-red: #ef4444; --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%); --gradient-subtle: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.08)); --gradient-card: linear-gradient(145deg, rgba(17, 24, 39, 0.8), rgba(15, 23, 42, 0.6)); --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3); --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4); --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5); --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15); --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 20px; --transition-fast: 0.15s ease; --transition-normal: 0.25s ease; --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1); } /* --- Reset & Base --- */ *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; } html { scroll-behavior: smooth; } body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background-color: var(--bg-primary); color: var(--text-primary); line-height: 1.6; min-height: 100vh; overflow-x: hidden; } /* --- Animated Background --- */ body::before { content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(ellipse 80% 60% at 20% 10%, rgba(99, 102, 241, 0.08) 0%, transparent 60%), radial-gradient(ellipse 60% 50% at 80% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 60%), radial-gradient(ellipse 50% 40% at 50% 50%, rgba(236, 72, 153, 0.04) 0%, transparent 60%); pointer-events: none; z-index: 0; animation: bgPulse 15s ease-in-out infinite alternate; } @keyframes bgPulse { 0% { opacity: 0.6; } 100% { opacity: 1; } } /* --- Layout --- */ .app-container { position: relative; z-index: 1; max-width: 1400px; margin: 0 auto; padding: 24px 32px 60px; } /* --- Header --- */ .app-header { text-align: center; padding: 40px 0 32px; } .app-header h1 { font-size: 2.8rem; font-weight: 900; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: -0.02em; margin-bottom: 12px; animation: titleGlow 3s ease-in-out infinite alternate; } @keyframes titleGlow { 0% { filter: brightness(1); } 100% { filter: brightness(1.15); } } .app-header p { color: var(--text-secondary); font-size: 1.1rem; max-width: 650px; margin: 0 auto; font-weight: 400; line-height: 1.7; } /* --- Status Bar --- */ .status-bar { display: flex; align-items: center; justify-content: center; gap: 24px; margin-bottom: 32px; padding: 12px 24px; background: var(--bg-glass); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); backdrop-filter: blur(12px); } .status-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-secondary); } .status-dot { width: 8px; height: 8px; border-radius: 50%; animation: pulse 2s ease-in-out infinite; } .status-dot.online { background: var(--accent-emerald); } .status-dot.offline { background: var(--accent-red); animation: none; } @keyframes pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); } 50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); } } /* --- Tab Navigation --- */ .tab-nav { display: flex; gap: 4px; padding: 5px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); margin-bottom: 28px; backdrop-filter: blur(12px); } .tab-btn { flex: 1; padding: 14px 20px; border: none; background: transparent; color: var(--text-secondary); font-family: 'Inter', sans-serif; font-size: 0.92rem; font-weight: 600; cursor: pointer; border-radius: var(--radius-md); transition: all var(--transition-normal); display: flex; align-items: center; justify-content: center; gap: 8px; position: relative; overflow: hidden; } .tab-btn::before { content: ''; position: absolute; inset: 0; background: var(--gradient-primary); opacity: 0; transition: opacity var(--transition-normal); border-radius: var(--radius-md); } .tab-btn:hover { color: var(--text-primary); } .tab-btn.active { color: white; } .tab-btn.active::before { opacity: 1; } .tab-btn span { position: relative; z-index: 1; } .tab-btn .tab-icon { font-size: 1.1rem; position: relative; z-index: 1; } /* --- Tab Content --- */ .tab-content { display: none; animation: fadeSlideIn 0.35s ease; } .tab-content.active { display: block; } @keyframes fadeSlideIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } } /* --- Cards --- */ .card { background: var(--gradient-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); padding: 28px; backdrop-filter: blur(16px); box-shadow: var(--shadow-md); transition: border-color var(--transition-normal), box-shadow var(--transition-normal); } .card:hover { border-color: var(--border-light); } .card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; } .card-icon { width: 42px; height: 42px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; background: var(--gradient-subtle); border: 1px solid var(--border-subtle); } .card-header h2 { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); } .card-header p { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; } /* --- Form Elements --- */ .form-group { margin-bottom: 20px; } .form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; letter-spacing: 0.02em; } .form-input, .form-textarea, .form-select { width: 100%; padding: 12px 16px; background: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); color: var(--text-primary); font-family: 'Inter', sans-serif; font-size: 0.92rem; transition: all var(--transition-fast); outline: none; } .form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--accent-indigo); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); background: rgba(255, 255, 255, 0.07); } .form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); } .form-textarea { resize: vertical; min-height: 100px; } .form-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; } .form-select option { background: var(--bg-secondary); color: var(--text-primary); } .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } /* --- File Upload Zone --- */ .upload-zone { border: 2px dashed var(--border-light); border-radius: var(--radius-lg); padding: 40px; text-align: center; cursor: pointer; transition: all var(--transition-normal); position: relative; overflow: hidden; background: var(--bg-glass); } .upload-zone:hover, .upload-zone.dragover { border-color: var(--accent-indigo); background: rgba(99, 102, 241, 0.05); } .upload-zone.dragover { transform: scale(1.01); } .upload-zone .upload-icon { font-size: 2.5rem; margin-bottom: 12px; display: block; } .upload-zone .upload-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; } .upload-zone .upload-subtitle { font-size: 0.82rem; color: var(--text-muted); } .upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; } .upload-preview { margin-top: 16px; display: none; } .upload-preview img { max-height: 200px; border-radius: var(--radius-md); border: 1px solid var(--border-subtle); } .upload-preview.visible { display: block; } /* --- Buttons --- */ .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 28px; border: none; border-radius: var(--radius-md); font-family: 'Inter', sans-serif; font-size: 0.92rem; font-weight: 600; cursor: pointer; transition: all var(--transition-normal); position: relative; overflow: hidden; } .btn-primary { background: var(--gradient-primary); color: white; box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3); } .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4); } .btn-primary:active { transform: translateY(0); } .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; } .btn-secondary { background: var(--bg-input); color: var(--text-primary); border: 1px solid var(--border-subtle); } .btn-secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--border-light); } .btn-full { width: 100%; } /* Loading spinner */ .btn .spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; } .btn.loading .spinner { display: block; } .btn.loading .btn-text { opacity: 0.6; } @keyframes spin { to { transform: rotate(360deg); } } /* --- Result Panels --- */ .result-panel { margin-top: 24px; display: none; animation: fadeSlideIn 0.4s ease; } .result-panel.visible { display: block; } .result-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-subtle); } .result-badge { padding: 4px 12px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; } .result-badge.success { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.25); } .result-badge.error { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); border: 1px solid rgba(239, 68, 68, 0.25); } .result-badge.info { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); border: 1px solid rgba(6, 182, 212, 0.25); } /* --- Image Display --- */ .generated-image-container { margin: 16px 0; text-align: center; } .generated-image { max-width: 100%; max-height: 512px; border-radius: var(--radius-lg); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-lg); transition: transform var(--transition-smooth); } .generated-image:hover { transform: scale(1.02); } /* --- Detail Grid --- */ .detail-grid { display: grid; gap: 12px; margin-top: 16px; } .detail-item { padding: 14px 18px; background: var(--bg-glass); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); } .detail-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; } .detail-value { font-size: 0.9rem; color: var(--text-primary); line-height: 1.5; word-break: break-word; } /* --- Similar Images Grid --- */ .similar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 16px; } .similar-card { background: var(--bg-glass); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); overflow: hidden; transition: all var(--transition-normal); } .similar-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow-md); } .similar-card img { width: 100%; height: 180px; object-fit: cover; } .similar-card-body { padding: 14px; } .similar-card-body .score { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 700; background: rgba(99, 102, 241, 0.15); color: var(--accent-indigo); border: 1px solid rgba(99, 102, 241, 0.2); margin-bottom: 8px; } .similar-card-body .desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } /* --- History Table --- */ .history-table { width: 100%; border-collapse: separate; border-spacing: 0 6px; } .history-table th { text-align: left; padding: 10px 16px; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--border-subtle); } .history-table td { padding: 14px 16px; font-size: 0.88rem; color: var(--text-secondary); background: var(--bg-glass); vertical-align: middle; } .history-table tr td:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); } .history-table tr td:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; } .history-table tr:hover td { background: rgba(255, 255, 255, 0.04); } .history-table .thumb { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; border: 1px solid var(--border-subtle); } .history-table .prompt-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .history-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; } .page-info { font-size: 0.85rem; color: var(--text-secondary); } /* --- Empty State --- */ .empty-state { text-align: center; padding: 60px 20px; } .empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.4; } .empty-state h3 { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 6px; } .empty-state p { font-size: 0.88rem; color: var(--text-muted); } /* --- Toast Notifications --- */ .toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; } .toast { padding: 14px 20px; border-radius: var(--radius-md); font-size: 0.88rem; font-weight: 500; backdrop-filter: blur(12px); box-shadow: var(--shadow-lg); animation: toastIn 0.35s ease; display: flex; align-items: center; gap: 10px; min-width: 300px; border: 1px solid; } .toast.success { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); border-color: rgba(16, 185, 129, 0.25); } .toast.error { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); border-color: rgba(239, 68, 68, 0.25); } .toast.info { background: rgba(99, 102, 241, 0.15); color: var(--text-accent); border-color: rgba(99, 102, 241, 0.25); } @keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } } @keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(40px); } } /* --- Two Column Layout --- */ .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; } /* --- Responsive --- */ @media (max-width: 768px) { .app-container { padding: 16px; } .app-header h1 { font-size: 1.8rem; } .tab-nav { flex-wrap: wrap; } .tab-btn { flex: none; width: calc(50% - 2px); } .two-col { grid-template-columns: 1fr; } .form-row { grid-template-columns: 1fr; } .status-bar { flex-wrap: wrap; gap: 12px; } .similar-grid { grid-template-columns: 1fr; } }