/* Material Design 暗黑主题样式 */
/* 基础样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
height: 100%;
margin: 0;
padding: 0;
font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
background-color: #121212;
color: #ffffff;
line-height: 1.6;
}
/* Material Icons */
.material-icons {
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
font-size: 24px;
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
-webkit-font-feature-settings: 'liga';
-webkit-font-smoothing: antialiased;
}
/* 容器 */
.container {
min-height: 100vh;
background: linear-gradient(135deg, #121212 0%, #1e1e1e 100%);
}
/* 应用栏 */
.app-bar {
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
box-shadow: 0 2px 8px rgba(0,0,0,0.3);
position: sticky;
top: 0;
z-index: 100;
}
.app-bar-content {
max-width: 1200px;
margin: 0 auto;
padding: 16px 24px;
}
.app-title {
display: flex;
align-items: center;
gap: 12px;
}
.app-logo {
width: 42px;
height: 42px;
object-fit: contain;
filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.app-title h1 {
font-size: 1.5rem;
font-weight: 600;
margin: 0;
color: #ffffff;
display: inline-block;
}
.subtitle {
background: rgba(255,255,255,0.1);
color: white;
padding: 4px 12px;
border-radius: 12px;
font-size: 0.75rem;
font-weight: 500;
margin-left: 12px;
vertical-align: middle;
}
/* 搜索和统计区域 */
.search-stats-section {
max-width: 1200px;
margin: 0 auto;
padding: 24px;
display: grid;
grid-template-columns: 1fr auto;
gap: 24px;
align-items: center;
}
.search-container {
position: relative;
display: flex;
align-items: center;
gap: 12px;
}
.search-box {
position: relative;
display: flex;
align-items: center;
background: #1e1e1e;
border-radius: 24px;
padding: 0 16px;
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
border: 1px solid #333;
transition: all 0.3s ease;
flex: 1;
}
.search-box:focus-within {
border-color: #90caf9;
box-shadow: 0 2px 12px rgba(144, 202, 249, 0.3);
}
.search-icon {
color: #666;
margin-right: 12px;
font-size: 20px;
}
.search-box input {
flex: 1;
background: none;
border: none;
outline: none;
color: #ffffff;
font-size: 16px;
padding: 12px 0;
min-width: 300px;
}
.search-box input::placeholder {
color: #666;
}
.clear-btn {
background: none;
border: none;
color: #666;
cursor: pointer;
padding: 4px;
border-radius: 50%;
transition: all 0.2s ease;
}
.clear-btn:hover {
background: rgba(255,255,255,0.1);
color: #999;
}
.search-action-btn,
.add-action-btn {
width: 48px;
height: 48px;
border-radius: 24px;
border: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.search-action-btn {
background: #1e1e1e;
color: #90caf9;
border: 1px solid #333;
}
.search-action-btn:hover {
background: #333;
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(144, 202, 249, 0.3);
}
.add-action-btn {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.add-action-btn:hover {
background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}
.stats-card {
background: #1e1e1e;
border-radius: 16px;
padding: 20px;
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
border: 1px solid #333;
min-width: 200px;
}
.stats-content {
text-align: center;
}
.stats-label {
display: block;
color: #999;
font-size: 0.875rem;
margin-bottom: 8px;
}
.stats-value {
display: block;
color: #90caf9;
font-size: 2rem;
font-weight: 600;
line-height: 1;
}
.stats-search {
display: block;
color: #666;
font-size: 0.75rem;
margin-top: 4px;
}
/* 记忆网格 */
.memories-grid {
max-width: 1200px;
margin: 0 auto;
padding: 0 24px 100px;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
gap: 24px;
}
/* 记忆卡片 */
.memory-card {
background: #1e1e1e;
border-radius: 16px;
padding: 24px;
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
border: 1px solid #333;
cursor: pointer;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.memory-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 20px rgba(0,0,0,0.15);
border-color: #90caf9;
}
.memory-card:hover .memory-actions {
opacity: 1;
}
/* 拖拽相关样式 */
.memory-card.dragging {
opacity: 0.6;
transform: rotate(3deg) scale(1.02);
z-index: 1000;
box-shadow: 0 8px 32px rgba(0,0,0,0.3);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.memory-card.drag-over {
border-color: #4caf50;
background: rgba(76, 175, 80, 0.1);
transform: scale(1.02);
transition: all 0.2s ease;
}
/* 拖拽动画效果 */
@keyframes dragSuccess {
0% { transform: scale(1); }
50% { transform: scale(1.05); }
100% { transform: scale(1); }
}
.memory-card.drag-success {
animation: dragSuccess 0.3s ease;
}
.memory-title {
font-size: 1.25rem;
font-weight: 600;
color: #ffffff;
margin-bottom: 8px;
line-height: 1.4;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.memory-meta {
color: #666;
font-size: 0.75rem;
margin-bottom: 16px;
}
.memory-preview {
color: #ccc;
font-size: 0.875rem;
line-height: 1.6;
margin-bottom: 16px;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.memory-actions {
display: flex;
gap: 8px;
opacity: 0;
transition: opacity 0.3s ease;
}
.action-btn {
background: none;
border: none;
color: #666;
cursor: pointer;
padding: 8px 12px;
border-radius: 8px;
font-size: 0.75rem;
font-weight: 500;
transition: all 0.2s ease;
display: flex;
align-items: center;
gap: 4px;
}
.action-btn:hover {
background: rgba(255,255,255,0.1);
}
.action-btn.copy {
color: #4caf50;
}
.action-btn.copy:hover {
background: rgba(76, 175, 80, 0.1);
}
.action-btn.edit {
color: #ff9800;
}
.action-btn.edit:hover {
background: rgba(255, 152, 0, 0.1);
}
.action-btn.delete {
color: #f44336;
}
.action-btn.delete:hover {
background: rgba(244, 67, 54, 0.1);
}
/* 加载状态 */
.loading-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 200px;
color: #666;
}
.loading-spinner {
width: 40px;
height: 40px;
border: 3px solid #333;
border-top: 3px solid #90caf9;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 16px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* 空状态 */
.empty-state {
text-align: center;
padding: 80px 20px;
color: #666;
max-width: 1200px;
margin: 0 auto;
}
.empty-icon {
font-size: 4rem;
margin-bottom: 24px;
}
.empty-state h3 {
color: #ffffff;
font-size: 1.5rem;
font-weight: 500;
margin-bottom: 12px;
}
.empty-state p {
font-size: 1rem;
margin-bottom: 24px;
}
/* 模态框 */
.modal {
display: none;
position: fixed;
z-index: 2000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.7);
backdrop-filter: blur(4px);
animation: fadeIn 0.3s ease;
}
.modal-content {
background: #1e1e1e;
margin: 5% auto;
border-radius: 16px;
width: 90%;
max-width: 720px;
max-height: 90vh;
overflow-y: auto;
box-shadow: 0 8px 32px rgba(0,0,0,0.5);
border: 1px solid #333;
animation: slideIn 0.3s ease;
}
.modal-large {
max-width: 800px;
}
.modal-small {
max-width: 400px;
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
height: 55px;
padding: 0 29px;
border-bottom: 1px solid #333;
}
.modal-header h2 {
color: #ffffff;
font-size: 1.25rem;
font-weight: 600;
margin: 0;
}
.warning-header {
display: flex;
align-items: center;
gap: 8px;
}
.warning-icon {
color: #f44336;
font-size: 24px;
}
.modal-actions {
display: flex;
gap: 8px;
align-items: center;
}
.icon-btn {
background: none;
border: none;
color: #666;
cursor: pointer;
padding: 8px;
border-radius: 8px;
transition: all 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
}
.icon-btn:hover {
background: rgba(255,255,255,0.1);
color: #999;
}
.modal-body {
padding: 24px 29px;
}
.modal-body h3 {
color: #ffffff;
font-size: 1.5rem;
font-weight: 600;
margin-bottom: 8px;
}
.memory-content-view {
background: #121212;
padding: 20px;
border-radius: 12px;
border: 1px solid #333;
white-space: pre-wrap;
word-wrap: break-word;
line-height: 1.7;
font-family: 'Courier New', monospace;
font-size: 14px;
color: #ccc;
margin-top: 16px;
}
.warning-text {
color: #f44336;
font-weight: 500;
margin-top: 12px;
}
/* 表单样式 */
.form-group {
margin-bottom: 24px;
}
.form-group label {
display: block;
margin-bottom: 8px;
margin-left: 40px;
font-weight: 500;
color: #ffffff;
font-size: 0.875rem;
}
.form-group input,
.form-group textarea {
width: calc(100% - 80px);
margin: 0 40px;
padding: 12px 16px;
background: #121212;
border: 1px solid #333;
border-radius: 8px;
color: #ffffff;
font-size: 14px;
font-family: inherit;
outline: none;
transition: border-color 0.3s ease;
resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
border-color: #90caf9;
box-shadow: 0 0 0 2px rgba(144, 202, 249, 0.2);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
color: #666;
}
.form-actions {
display: flex;
justify-content: flex-end;
align-items: center;
gap: 12px;
height: 70px;
padding: 0 29px;
border-top: 1px solid #333;
}
/* 按钮样式 */
.btn {
padding: 12px 24px;
border: none;
border-radius: 8px;
font-size: 0.875rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
display: flex;
align-items: center;
gap: 8px;
text-transform: none;
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.btn-primary:hover {
background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
.btn-secondary {
background: #333;
color: #ccc;
}
.btn-secondary:hover {
background: #444;
color: #fff;
}
.btn-danger {
background: #f44336;
color: white;
}
.btn-danger:hover {
background: #d32f2f;
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}
/* 消息提示 */
.message-container {
position: fixed;
top: 24px;
right: 24px;
z-index: 3000;
max-width: 400px;
}
.message {
padding: 16px 20px;
margin-bottom: 12px;
border-radius: 8px;
color: white;
font-weight: 500;
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
animation: slideInRight 0.3s ease;
position: relative;
overflow: hidden;
}
.message::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 4px;
height: 100%;
background: currentColor;
}
.message.success {
background: #2e7d32;
border-left: 4px solid #4caf50;
}
.message.error {
background: #c62828;
border-left: 4px solid #f44336;
}
.message.info {
background: #1565c0;
border-left: 4px solid #2196f3;
}
.message.warning {
background: #ef6c00;
border-left: 4px solid #ff9800;
}
.message.warning {
background: #ef6c00;
border-left: 4px solid #ff9800;
}
/* 动画 */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes slideIn {
from {
transform: translateY(-30px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
@keyframes slideInRight {
from {
transform: translateX(100%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}
/* 自定义滚动条 */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: #2a2a2a;
}
::-webkit-scrollbar-thumb {
background: #555;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #777;
}
/* 响应式设计 */
@media (max-width: 768px) {
.search-stats-section {
grid-template-columns: 1fr;
gap: 16px;
padding: 16px;
}
.search-box input {
min-width: auto;
}
.memories-grid {
grid-template-columns: 1fr;
padding: 0 16px 100px;
gap: 16px;
}
.modal-content {
margin: 10% auto;
width: 95%;
}
.form-actions {
flex-direction: column;
height: auto;
padding: 16px;
}
.form-actions .btn {
width: 100%;
justify-content: center;
}
.app-bar-content {
padding: 12px 16px;
}
.app-title {
gap: 8px;
}
.app-logo {
width: 36px;
height: 36px;
}
.app-title h1 {
font-size: 1.25rem;
}
.subtitle {
display: block;
margin-left: 0;
margin-top: 4px;
}
.message-container {
left: 16px;
right: 16px;
max-width: none;
}
.search-action-btn,
.add-action-btn {
width: 44px;
height: 44px;
border-radius: 22px;
}
}
@media (max-width: 480px) {
.memories-grid {
padding: 0 12px 100px;
}
.memory-card {
padding: 16px;
}
.modal-content {
margin: 5% auto;
}
.modal-header {
height: 55px;
padding: 0 16px;
}
.modal-body {
padding: 16px;
}
.form-actions {
height: auto;
padding: 16px;
}
}