:root { --bg-color: #ffffff; --text-color: #333333; --card-bg: #ffffff; --border-color: #e0e0e0; /* Color System */ --lora-accent: oklch(68% 0.28 256); --lora-surface: oklch(100% 0 0 / 0.4); --lora-border: oklch(90% 0.02 256 / 0.15); --lora-text: oklch(95% 0.02 256); --lora-error: oklch(75% 0.32 29); /* Spacing Scale */ --space-1: calc(8px * 1); --space-2: calc(8px * 2); --space-3: calc(8px * 3); /* Z-index Scale */ --z-base: 10; --z-modal: 30; --z-overlay: 50; } [data-theme="dark"] { --bg-color: #1a1a1a; --text-color: #e0e0e0; --card-bg: #2d2d2d; --border-color: #404040; --lora-accent: oklch(68% 0.28 256); --lora-surface: oklch(25% 0.02 256 / 0.85); --lora-border: oklch(90% 0.02 256 / 0.15); --lora-text: oklch(98% 0.02 256); } body { margin: 0; font-family: 'Segoe UI', sans-serif; background: var(--bg-color); color: var(--text-color); } .container { max-width: 1400px; margin: 20px auto; padding: 0 15px; } /* 文件夹标签样式 */ .folder-tags { display: flex; gap: 4px; overflow-x: auto; padding: 4px 0; flex-wrap: wrap; } .tag { cursor: pointer; padding: 2px 8px; margin: 2px; border: 1px solid #ccc; border-radius: 3px; display: inline-block; line-height: 1.2; font-size: 14px; } .tag.active { background-color: #007bff; color: white; } /* 卡片网格布局 */ .card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); /* Adjusted from 320px */ gap: 12px; /* Reduced from var(--space-2) for tighter horizontal spacing */ margin-top: var(--space-2); max-width: 1400px; /* Container width control */ margin-left: auto; margin-right: auto; } .lora-card { background: var(--lora-surface); border: 1px solid var(--lora-border); border-radius: 12px; backdrop-filter: blur(16px); transition: transform 160ms ease-out; aspect-ratio: 896/1152; max-width: 260px; /* Adjusted from 320px to fit 5 cards */ margin: 0 auto; } .lora-card:hover { transform: translateY(-2px); background: oklch(100% 0 0 / 0.6); } .lora-card:focus-visible { outline: 2px solid var(--lora-accent); outline-offset: 2px; } /* Responsive adjustments */ @media (max-width: 1400px) { .card-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } .lora-card { max-width: 240px; } } @media (max-width: 768px) { .card-grid { grid-template-columns: minmax(260px, 1fr); } .lora-card { max-width: 100%; } } /* Card Preview and Footer Overlay */ .card-preview { position: relative; width: 100%; height: 100%; } .card-preview img { width: 100%; height: 100%; object-fit: cover; } .card-preview video { width: 100%; height: 100%; object-fit: cover; } .card-footer { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent 15%, oklch(0% 0 0 / 0.75)); backdrop-filter: blur(8px); color: white; padding: var(--space-1); display: flex; justify-content: space-between; align-items: flex-start; /* Changed from flex-end to allow for text wrapping */ min-height: 32px; gap: var(--space-1); /* Add gap between model info and actions */ } .model-name { font-weight: bold; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); font-size: 0.95em; word-break: break-word; /* Allow long words to break */ display: block; /* Ensure the text wraps */ max-height: 2.8em; /* Limit to roughly 2 lines */ overflow: hidden; } .model-meta { font-size: 0.9em; opacity: 0.9; } .card-header { position: absolute; top: 0; left: 0; right: 0; background: linear-gradient(oklch(0% 0 0 / 0.75), transparent 85%); backdrop-filter: blur(8px); color: white; padding: var(--space-1); display: flex; justify-content: space-between; align-items: center; z-index: 1; min-height: 20px; } .card-actions i { margin-left: var(--space-1); cursor: pointer; color: white; transition: opacity 0.2s; font-size: 0.9em; } .card-actions i:hover { opacity: 0.8; } /* 响应式设计 */ @media (max-width: 768px) { .card-grid { grid-template-columns: minmax(260px, 1fr); /* Adjusted minimum size for mobile */ } .controls { flex-direction: column; gap: 15px; } .lora-card { max-width: 100%; /* Allow cards to fill available space on mobile */ } } /* 新增元数据相关样式 */ .model-info { flex: 1; min-width: 0; /* Allow flex item to shrink below content size */ overflow: hidden; /* Prevent content from spilling out */ padding-bottom: 4px; /* 为了与底部对齐的图标留出一些空间 */ } .model-meta { font-size: 0.8em; color: #666; margin-top: 4px; } .base-model { display: inline-block; background: #f0f0f0; padding: 2px 6px; border-radius: 4px; margin-right: 6px; } .file-size, .modified { display: block; margin-top: 2px; } .tooltip { position: relative; cursor: help; } .tooltip::after { content: attr(data-tooltip); position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, 0.8); color: white; padding: 4px 8px; border-radius: 4px; font-size: 0.8em; white-space: nowrap; opacity: 0; transition: opacity 0.2s; pointer-events: none; } .tooltip:hover::after { opacity: 1; } /* 模态窗口样式 */ .modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); z-index: 1000; overflow-y: auto; /* 允许模态窗口内容滚动 */ } /* 当模态窗口打开时,禁止body滚动 */ body.modal-open { overflow: hidden; } .modal-content { position: relative; max-width: 800px; margin: 2rem auto; background: var(--lora-surface); border-radius: 12px; padding: var(--space-3); border: 1px solid var(--lora-border); } .carousel { display: grid; grid-auto-flow: column; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; } .carousel img { scroll-snap-align: start; max-height: 60vh; object-fit: contain; } .carousel video { scroll-snap-align: start; max-height: 60vh; object-fit: contain; } /* 主题切换按钮 */ .theme-toggle { position: fixed; top: 20px; right: 20px; cursor: pointer; padding: 8px; border-radius: 50%; background: var(--card-bg); } .base-model-label { max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; color: white; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); background: rgba(255, 255, 255, 0.2); padding: 2px var(--space-1); border-radius: 4px; backdrop-filter: blur(2px); font-size: 0.85em; } .loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: oklch(0% 0 0 / 0.7); display: flex; justify-content: center; align-items: center; z-index: var(--z-overlay); } .loading-content { background: var(--lora-surface); backdrop-filter: blur(24px); padding: var(--space-3); border-radius: 12px; text-align: center; border: 1px solid var(--lora-border); } .loading-spinner { border: 4px solid #f3f3f3; border-top: 4px solid #3498db; border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 0 auto 1rem; } .loading-status { margin-bottom: 1rem; color: #333; } .progress-container { width: 300px; background-color: #f0f0f0; border-radius: 4px; overflow: hidden; } .progress-bar { width: 0%; height: var(--space-2); background-color: var(--lora-accent); transition: width 200ms ease-out; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } @media (prefers-reduced-motion: reduce) { .lora-card, .progress-bar { transition: none; } } .card-actions { flex-shrink: 0; /* Prevent actions from shrinking */ display: flex; align-items: center; gap: var(--space-1); align-items: flex-end; /* 将图标靠下对齐 */ align-self: flex-end; /* 将整个actions容器靠下对齐 */ } .model-link { margin-top: var(--space-1); } .model-link a { color: #34b4eb; text-decoration: none; font-size: 1.3em; opacity: 0.9; transition: opacity 0.2s; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); } .model-link a:hover { opacity: 1; text-decoration: underline; }