706 lines
13 KiB
CSS
706 lines
13 KiB
CSS
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
min-height: 100vh;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
}
|
|
|
|
.container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
}
|
|
|
|
/* 页面标题 */
|
|
.page-header {
|
|
text-align: center;
|
|
color: black;
|
|
margin-bottom: 30px;
|
|
animation: fadeInDown 0.8s ease;
|
|
}
|
|
|
|
.page-header h1 {
|
|
font-size: 36px;
|
|
margin-bottom: 10px;
|
|
text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
|
|
}
|
|
|
|
.page-header p {
|
|
font-size: 16px;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
/* 活跃度卡片 */
|
|
.activity-card {
|
|
background: white;
|
|
border-radius: 20px;
|
|
padding: 30px;
|
|
margin-bottom: 30px;
|
|
box-shadow: 0 10px 40px rgba(0,0,0,0.1);
|
|
animation: fadeInUp 0.8s ease;
|
|
}
|
|
|
|
.activity-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.activity-title {
|
|
font-size: 20px;
|
|
font-weight: bold;
|
|
color: #333;
|
|
}
|
|
|
|
.activity-points {
|
|
font-size: 24px;
|
|
font-weight: bold;
|
|
background: linear-gradient(135deg, #667eea, #764ba2);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
}
|
|
|
|
/* 进度条 */
|
|
.progress-container {
|
|
position: relative;
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.layui-progress {
|
|
border-radius: 15px;
|
|
background: #f0f0f0;
|
|
overflow: visible;
|
|
}
|
|
|
|
.layui-progress-bar {
|
|
border-radius: 15px;
|
|
background: linear-gradient(90deg, #667eea, #764ba2);
|
|
position: relative;
|
|
transition: width 1s ease;
|
|
}
|
|
|
|
/* 宝箱 */
|
|
.treasure-boxes {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
position: relative;
|
|
margin-top: -15px;
|
|
padding: 0 10px;
|
|
}
|
|
|
|
.treasure-box {
|
|
position: relative;
|
|
cursor: pointer;
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
.treasure-box:hover {
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
.treasure-icon {
|
|
width: 50px;
|
|
height: 50px;
|
|
background: linear-gradient(135deg, #ffd700, #ffed4e);
|
|
border-radius: 10px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 24px;
|
|
color: white;
|
|
box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
|
|
position: relative;
|
|
}
|
|
|
|
.treasure-icon.unlocked {
|
|
background: linear-gradient(135deg, #4CAF50, #8BC34A);
|
|
animation: bounce 0.5s ease;
|
|
}
|
|
|
|
.treasure-icon.locked {
|
|
background: #ccc;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.treasure-icon.received {
|
|
background: #95a5a6;
|
|
animation: none;
|
|
}
|
|
|
|
.treasure-label {
|
|
position: absolute;
|
|
bottom: -20px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
font-size: 12px;
|
|
color: #666;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* 任务分类标签 */
|
|
.task-tabs {
|
|
background: white;
|
|
border-radius: 15px;
|
|
padding: 10px;
|
|
margin-bottom: 20px;
|
|
box-shadow: 0 5px 20px rgba(0,0,0,0.08);
|
|
display: flex;
|
|
gap: 10px;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.task-tab {
|
|
padding: 12px 24px;
|
|
border-radius: 10px;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
white-space: nowrap;
|
|
font-weight: 500;
|
|
position: relative;
|
|
}
|
|
|
|
.task-tab:hover {
|
|
background: #f5f5f5;
|
|
}
|
|
|
|
.task-tab.active {
|
|
background: linear-gradient(135deg, #667eea, #764ba2);
|
|
color: white;
|
|
}
|
|
|
|
.task-tab .badge {
|
|
position: absolute;
|
|
top: -5px;
|
|
right: -5px;
|
|
background: #ff4757;
|
|
color: white;
|
|
border-radius: 10px;
|
|
padding: 2px 6px;
|
|
font-size: 11px;
|
|
}
|
|
|
|
/* 任务列表 */
|
|
.task-list {
|
|
background: white;
|
|
border-radius: 20px;
|
|
padding: 20px;
|
|
box-shadow: 0 10px 40px rgba(0,0,0,0.1);
|
|
animation: fadeInUp 0.8s ease 0.2s both;
|
|
}
|
|
|
|
.task-item {
|
|
background: #f8f9fa;
|
|
border-radius: 15px;
|
|
padding: 20px;
|
|
margin-bottom: 15px;
|
|
display: flex;
|
|
align-items: center;
|
|
transition: all 0.3s ease;
|
|
position: relative;
|
|
overflow: hidden;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.task-item:hover {
|
|
transform: translateX(5px);
|
|
box-shadow: 0 5px 20px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
.task-item.completed {
|
|
background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
|
|
}
|
|
|
|
.task-icon {
|
|
width: 50px;
|
|
height: 50px;
|
|
border-radius: 12px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 24px;
|
|
margin-right: 20px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.task-content {
|
|
flex: 1;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.task-title {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: #333;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.task-desc {
|
|
font-size: 14px;
|
|
color: #666;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.task-progress {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.task-progress-bar {
|
|
flex: 1;
|
|
height: 6px;
|
|
background: #e0e0e0;
|
|
border-radius: 3px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.task-progress-fill {
|
|
height: 100%;
|
|
background: linear-gradient(90deg, #667eea, #764ba2);
|
|
border-radius: 3px;
|
|
transition: width 0.5s ease;
|
|
}
|
|
|
|
.task-progress-text {
|
|
font-size: 12px;
|
|
color: #666;
|
|
}
|
|
|
|
.task-reward {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
margin: 0 20px;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.reward-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 5px;
|
|
padding: 5px 10px;
|
|
background: white;
|
|
border-radius: 20px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.reward-icon {
|
|
color: #ffd700;
|
|
}
|
|
|
|
.task-button {
|
|
padding: 8px 20px;
|
|
border-radius: 20px;
|
|
border: none;
|
|
font-size: 14px;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
font-weight: 500;
|
|
margin-left: 20px;
|
|
pointer-events: all;
|
|
}
|
|
|
|
.task-button.go {
|
|
background: linear-gradient(135deg, #667eea, #764ba2);
|
|
color: white;
|
|
}
|
|
|
|
.task-button.go:hover {
|
|
transform: scale(1.05);
|
|
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
|
|
}
|
|
|
|
.task-button.receive {
|
|
background: linear-gradient(135deg, #4CAF50, #8BC34A);
|
|
color: white;
|
|
animation: pulse 2s infinite;
|
|
}
|
|
|
|
.task-button.receive:hover {
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.task-button.done {
|
|
background: #e0e0e0;
|
|
color: #999;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
/* 奖励弹窗样式 */
|
|
.reward-popup {
|
|
display: none;
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
z-index: 9999;
|
|
animation: fadeIn 0.3s ease;
|
|
}
|
|
|
|
.reward-content {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
background: white;
|
|
border-radius: 20px;
|
|
padding: 30px;
|
|
max-width: 400px;
|
|
width: 90%;
|
|
animation: slideIn 0.3s ease;
|
|
}
|
|
|
|
.reward-header {
|
|
text-align: center;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.reward-header h2 {
|
|
color: #333;
|
|
font-size: 24px;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.reward-icon-large {
|
|
font-size: 60px;
|
|
color: #ffd700;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.reward-list {
|
|
background: #f8f9fa;
|
|
border-radius: 15px;
|
|
padding: 20px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.reward-item-detail {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 10px 0;
|
|
border-bottom: 1px solid #e0e0e0;
|
|
}
|
|
|
|
.reward-item-detail:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.reward-item-name {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
font-size: 16px;
|
|
color: #333;
|
|
}
|
|
|
|
.reward-item-amount {
|
|
font-size: 18px;
|
|
font-weight: bold;
|
|
color: #667eea;
|
|
}
|
|
|
|
.reward-confirm {
|
|
width: 100%;
|
|
padding: 12px;
|
|
background: linear-gradient(135deg, #667eea, #764ba2);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 10px;
|
|
font-size: 16px;
|
|
cursor: pointer;
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
.reward-confirm:hover {
|
|
transform: scale(1.02);
|
|
}
|
|
|
|
/* 任务详情弹窗 */
|
|
.task-detail-popup {
|
|
display: none;
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
z-index: 9999;
|
|
animation: fadeIn 0.3s ease;
|
|
}
|
|
|
|
.task-detail-content {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
background: white;
|
|
border-radius: 20px;
|
|
padding: 30px;
|
|
max-width: 500px;
|
|
width: 90%;
|
|
animation: slideIn 0.3s ease;
|
|
}
|
|
|
|
.task-detail-header {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.task-detail-icon {
|
|
width: 60px;
|
|
height: 60px;
|
|
border-radius: 15px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 30px;
|
|
margin-right: 20px;
|
|
}
|
|
|
|
.task-detail-title h3 {
|
|
font-size: 20px;
|
|
color: #333;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.task-detail-title p {
|
|
font-size: 14px;
|
|
color: #666;
|
|
}
|
|
|
|
.task-detail-section {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.task-detail-section h4 {
|
|
font-size: 16px;
|
|
color: #333;
|
|
margin-bottom: 10px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.task-detail-description {
|
|
background: #f8f9fa;
|
|
border-radius: 10px;
|
|
padding: 15px;
|
|
font-size: 14px;
|
|
color: #666;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.task-detail-progress {
|
|
background: #f8f9fa;
|
|
border-radius: 10px;
|
|
padding: 15px;
|
|
}
|
|
|
|
.task-detail-progress-bar {
|
|
height: 10px;
|
|
background: #e0e0e0;
|
|
border-radius: 5px;
|
|
overflow: hidden;
|
|
margin: 10px 0;
|
|
}
|
|
|
|
.task-detail-progress-fill {
|
|
height: 100%;
|
|
background: linear-gradient(90deg, #667eea, #764ba2);
|
|
border-radius: 5px;
|
|
transition: width 0.5s ease;
|
|
}
|
|
|
|
.task-detail-rewards {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
|
gap: 10px;
|
|
}
|
|
|
|
.task-detail-reward-item {
|
|
background: #f8f9fa;
|
|
border-radius: 10px;
|
|
padding: 15px;
|
|
text-align: center;
|
|
}
|
|
|
|
.task-detail-reward-icon {
|
|
font-size: 24px;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.task-detail-reward-name {
|
|
font-size: 12px;
|
|
color: #666;
|
|
margin-bottom: 3px;
|
|
}
|
|
|
|
.task-detail-reward-amount {
|
|
font-size: 16px;
|
|
font-weight: bold;
|
|
color: #333;
|
|
}
|
|
|
|
/* 预览弹窗 */
|
|
.preview-popup {
|
|
display: none;
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
z-index: 9999;
|
|
animation: fadeIn 0.3s ease;
|
|
}
|
|
|
|
.preview-content {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
background: white;
|
|
border-radius: 20px;
|
|
padding: 30px;
|
|
max-width: 400px;
|
|
width: 90%;
|
|
animation: slideIn 0.3s ease;
|
|
}
|
|
|
|
.preview-header {
|
|
text-align: center;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.preview-header h2 {
|
|
color: #333;
|
|
font-size: 24px;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.preview-icon {
|
|
font-size: 60px;
|
|
color: #ccc;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.preview-requirement {
|
|
background: #fff3cd;
|
|
border-radius: 10px;
|
|
padding: 15px;
|
|
margin-bottom: 20px;
|
|
text-align: center;
|
|
color: #856404;
|
|
}
|
|
|
|
.preview-rewards {
|
|
background: #f8f9fa;
|
|
border-radius: 15px;
|
|
padding: 20px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.preview-rewards h3 {
|
|
font-size: 16px;
|
|
color: #333;
|
|
margin-bottom: 15px;
|
|
text-align: center;
|
|
}
|
|
|
|
/* 动画 */
|
|
@keyframes fadeInDown {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(-20px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
@keyframes fadeInUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(20px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
@keyframes bounce {
|
|
0%, 100% { transform: translateY(0); }
|
|
50% { transform: translateY(-10px); }
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
|
|
70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
|
|
100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; }
|
|
to { opacity: 1; }
|
|
}
|
|
|
|
@keyframes slideIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: translate(-50%, -60%);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translate(-50%, -50%);
|
|
}
|
|
}
|
|
|
|
/* 响应式 */
|
|
@media (max-width: 768px) {
|
|
.container {
|
|
padding: 10px;
|
|
}
|
|
|
|
.page-header h1 {
|
|
font-size: 28px;
|
|
}
|
|
|
|
.task-tabs {
|
|
padding: 5px;
|
|
}
|
|
|
|
.task-tab {
|
|
padding: 10px 16px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.task-item {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.task-icon {
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.task-reward {
|
|
margin: 10px 0;
|
|
}
|
|
|
|
.task-button {
|
|
margin-left: 0;
|
|
margin-top: 10px;
|
|
}
|
|
} |