Files
gamercomp/frontend/src/pages/Achievements.css
T
2026-04-30 02:14:25 +00:00

285 lines
4.4 KiB
CSS

.achievements-page {
min-height: calc(100vh - 60px);
padding: 2rem 1rem;
background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
max-width: 1000px;
margin: 0 auto;
}
.achievements-header {
text-align: center;
margin-bottom: 2rem;
background: white;
border-radius: 1rem;
padding: 2rem;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
.achievements-header h1 {
margin: 0;
font-size: 2rem;
color: #1e293b;
}
.achievements-subtitle {
color: #64748b;
margin: 0.5rem 0 1.5rem;
}
.achievements-stats {
display: flex;
justify-content: center;
gap: 2rem;
margin-bottom: 1.5rem;
}
.stat-box {
text-align: center;
}
.stat-box .stat-value {
font-size: 1.75rem;
font-weight: 700;
color: #1e293b;
}
.stat-box .stat-label {
font-size: 0.85rem;
color: #64748b;
}
.stat-box.highlight .stat-value {
color: #6366f1;
}
.progress-bar-container {
background: #e2e8f0;
border-radius: 1rem;
height: 12px;
overflow: hidden;
max-width: 400px;
margin: 0 auto;
}
.progress-bar-fill {
height: 100%;
background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
border-radius: 1rem;
transition: width 0.5s ease;
}
/* Category Filters */
.category-filters {
display: flex;
justify-content: center;
gap: 0.5rem;
margin-bottom: 2rem;
flex-wrap: wrap;
}
.filter-btn {
background: white;
border: 2px solid #e2e8f0;
padding: 0.5rem 1rem;
border-radius: 2rem;
font-size: 0.9rem;
cursor: pointer;
transition: all 0.2s;
}
.filter-btn:hover {
border-color: #6366f1;
}
.filter-btn.active {
background: #6366f1;
color: white;
border-color: #6366f1;
}
/* Achievements Grid */
.achievements-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 1rem;
}
.achievement-card {
display: flex;
gap: 1rem;
background: white;
border-radius: 1rem;
padding: 1.25rem;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
transition: all 0.2s;
}
.achievement-card.earned {
border-left: 4px solid #10b981;
}
.achievement-card.locked {
opacity: 0.6;
filter: grayscale(30%);
}
.achievement-card.locked:hover {
opacity: 0.8;
}
.achievement-icon-wrap {
position: relative;
flex-shrink: 0;
width: 60px;
height: 60px;
display: flex;
align-items: center;
justify-content: center;
background: #f8fafc;
border-radius: 50%;
}
.achievement-card.earned .achievement-icon-wrap {
background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}
.achievement-card.locked .achievement-icon-wrap {
background: #f1f5f9;
}
.achievement-icon {
font-size: 1.75rem;
}
.earned-check {
position: absolute;
bottom: -2px;
right: -2px;
background: #10b981;
color: white;
width: 20px;
height: 20px;
border-radius: 50%;
font-size: 0.75rem;
display: flex;
align-items: center;
justify-content: center;
border: 2px solid white;
}
.achievement-info {
flex: 1;
min-width: 0;
}
.achievement-name {
margin: 0 0 0.25rem;
font-size: 1rem;
color: #1e293b;
}
.achievement-description {
margin: 0 0 0.5rem;
font-size: 0.85rem;
color: #64748b;
line-height: 1.4;
}
.achievement-meta {
display: flex;
gap: 1rem;
align-items: center;
flex-wrap: wrap;
}
.xp-reward {
background: #f0f9ff;
color: #0369a1;
padding: 0.2rem 0.5rem;
border-radius: 0.25rem;
font-size: 0.75rem;
font-weight: 600;
}
.earned-date {
font-size: 0.75rem;
color: #94a3b8;
}
/* Progress for unearned achievements */
.achievement-progress {
margin-top: 0.5rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.mini-progress-bar {
flex: 1;
height: 6px;
background: #e2e8f0;
border-radius: 3px;
overflow: hidden;
}
.mini-progress-fill {
height: 100%;
background: #6366f1;
border-radius: 3px;
transition: width 0.3s;
}
.progress-text {
font-size: 0.75rem;
color: #64748b;
white-space: nowrap;
}
.empty-state {
text-align: center;
padding: 3rem;
color: #64748b;
}
.loading {
text-align: center;
padding: 4rem;
color: #64748b;
}
@media (max-width: 640px) {
.achievements-page {
padding: 1rem;
}
.achievements-header {
padding: 1.5rem;
}
.achievements-header h1 {
font-size: 1.5rem;
}
.achievements-stats {
gap: 1rem;
}
.stat-box .stat-value {
font-size: 1.25rem;
}
.category-filters {
justify-content: flex-start;
overflow-x: auto;
padding-bottom: 0.5rem;
}
.filter-btn {
white-space: nowrap;
}
.achievements-grid {
grid-template-columns: 1fr;
}
}