Implement theme toggle functionality and refactor styles for light/dark mode support

This commit is contained in:
2025-10-03 12:00:38 +08:00
parent 765ef6f9fc
commit 7597e8db33
8 changed files with 290 additions and 76 deletions

View File

@@ -0,0 +1,43 @@
.theme-toggle {
background: transparent;
border: 1px solid var(--border-color);
color: var(--text-primary);
padding: 0.5rem;
border-radius: 6px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
width: 40px;
height: 40px;
}
.theme-toggle:hover {
background: var(--primary-red);
border-color: var(--primary-red);
transform: scale(1.05);
}
.theme-icon {
width: 20px;
height: 20px;
transition: transform 0.3s ease;
}
.theme-toggle:hover .theme-icon {
transform: rotate(15deg);
}
/* Mobile responsive */
@media (max-width: 768px) {
.theme-toggle {
width: 36px;
height: 36px;
}
.theme-icon {
width: 18px;
height: 18px;
}
}