Files
diary-system/frontend-react/src/index.css

393 lines
5.8 KiB
CSS
Raw Normal View History

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 20px;
}
.container {
max-width: 1400px;
margin: 0 auto;
}
header {
text-align: center;
color: white;
margin-bottom: 30px;
}
header h1 {
font-size: 2.5em;
margin-bottom: 10px;
}
header p {
opacity: 0.9;
}
/* 统计面板 */
.stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 20px;
margin-bottom: 30px;
}
.stat-card {
background: white;
padding: 15px;
border-radius: 10px;
text-align: center;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.stat-card h3 {
color: #667eea;
font-size: 1.8em;
margin-bottom: 5px;
}
.stat-card p {
color: #666;
font-size: 0.9em;
}
/* 内容区域 */
.grid-2 {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
gap: 30px;
margin-bottom: 30px;
}
.section-box {
background: white;
border-radius: 10px;
padding: 20px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.section-box h2 {
color: #333;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 2px solid #667eea;
}
/* 日历组件 */
.calendar {
background: #f8f9fa;
padding: 15px;
border-radius: 8px;
}
.calendar-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
}
.calendar-header button {
background: #667eea;
color: white;
border: none;
padding: 8px 12px;
border-radius: 5px;
cursor: pointer;
}
.calendar-header button:hover {
background: #5568d3;
}
.calendar-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 2px;
}
.calendar-day-header {
text-align: center;
font-weight: bold;
color: #666;
padding: 5px;
font-size: 0.9em;
}
.calendar-day {
aspect-ratio: 1;
display: flex;
align-items: center;
justify-content: center;
background: white;
border-radius: 5px;
cursor: pointer;
position: relative;
transition: all 0.2s;
}
.calendar-day:hover {
background: #eef1f5;
transform: scale(1.05);
}
.calendar-day.today {
background: #667eea;
color: white;
font-weight: bold;
}
.calendar-day.selected {
border: 2px solid #667eea;
}
.calendar-day.has-diary::after {
content: '📝';
font-size: 0.7em;
position: absolute;
bottom: 2px;
}
.calendar-day.empty {
cursor: default;
background: transparent;
}
/* 日记详情 */
.diary-detail {
padding: 15px;
}
.diary-section {
margin: 15px 0;
}
.section-title {
font-weight: bold;
color: #555;
margin-bottom: 8px;
}
.section-content {
color: #666;
line-height: 1.6;
white-space: pre-wrap;
margin-left: 20px;
}
/* 经验总结 */
.experience-item {
padding: 15px;
border-left: 4px solid #f59e0b;
background: #fffbeb;
margin-bottom: 15px;
border-radius: 5px;
}
.experience-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}
.experience-title {
font-weight: bold;
color: #333;
}
.experience-category {
background: #f59e0b;
color: white;
padding: 4px 12px;
border-radius: 20px;
font-size: 0.85em;
}
.experience-problem, .experience-solution {
margin: 10px 0;
}
.experience-problem-title {
font-weight: bold;
color: #dc2626;
margin-bottom: 5px;
}
.experience-solution-title {
font-weight: bold;
color: #059669;
margin-bottom: 5px;
}
.experience-lesson {
margin: 10px 0;
padding: 10px;
background: #fef3c7;
border-radius: 5px;
}
.experience-lesson-title {
font-weight: bold;
color: #92400e;
margin-bottom: 5px;
}
/* 状态 */
.loading {
text-align: center;
padding: 40px;
color: white;
font-size: 1.2em;
}
.error {
background: #fee;
color: #c00;
padding: 20px;
border-radius: 10px;
margin-bottom: 20px;
}
.empty-state {
text-align: center;
padding: 40px;
color: #999;
}
/* 认证界面 */
.auth-container {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
padding: 20px;
}
.auth-card {
background: white;
padding: 40px;
border-radius: 10px;
box-shadow: 0 4px 20px rgba(0,0,0,0.2);
width: 100%;
max-width: 400px;
}
.auth-card h1 {
color: #667eea;
font-size: 2em;
text-align: center;
margin-bottom: 10px;
}
.auth-card h2 {
color: #333;
font-size: 1.5em;
text-align: center;
margin-bottom: 30px;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
color: #555;
font-weight: 500;
margin-bottom: 8px;
}
.form-group input {
width: 100%;
padding: 12px;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 1em;
transition: border-color 0.2s;
}
.form-group input:focus {
outline: none;
border-color: #667eea;
}
.btn-primary {
width: 100%;
padding: 12px;
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
border: none;
border-radius: 5px;
font-size: 1.1em;
font-weight: 600;
cursor: pointer;
transition: transform 0.2s;
}
.btn-primary:hover {
transform: translateY(-2px);
}
.btn-primary:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.auth-tip {
text-align: center;
margin-top: 20px;
color: #666;
}
.auth-tip a {
color: #667eea;
text-decoration: none;
}
.auth-tip a:hover {
text-decoration: underline;
}
/* 用户信息 */
.header-content {
display: flex;
justify-content: space-between;
align-items: center;
}
.user-info {
display: flex;
align-items: center;
gap: 15px;
color: white;
}
.btn-logout {
padding: 8px 16px;
background: rgba(255,255,255,0.2);
color: white;
border: 1px solid rgba(255,255,255,0.5);
border-radius: 5px;
cursor: pointer;
transition: background 0.2s;
}
.btn-logout:hover {
background: rgba(255,255,255,0.3);
}
/* 移动端 */
@media (max-width: 768px) {
.grid-2 {
grid-template-columns: 1fr;
}
}