Files
homeschool/public/tablet-menu.css
T
nmemmert 8d37038177 feat: Complete tablet UI overhaul with popup menu system and help bubble
Major Changes:
- 🪟 Popup Menu System: Converted slide-down navigation to draggable, minimizable popup window
- ❓ Help Bubble: Added contextual help system for admin dashboard (accessible via ? bubble)
- 🎨 Universal Theme Engine: All elements now properly match selected theme across all panels
- 📱 Enhanced Tablet Support: Comprehensive touch gestures, handwriting recognition, and Apple Pencil optimization
- 🖊️ Unified Write Mode: Combined handwriting and keyboard input with large canvas interface

Technical Implementation:
- Draggable popup with minimize/restore functionality and boundary constraints
- Dynamic theme switching using CSS variables throughout all components
- Help system with modal overlay and keyboard shortcuts (ESC to close)
- Responsive design optimizations for mobile, tablet, and desktop
- Comprehensive CSS overrides to eliminate hardcoded colors
- JavaScript fixes for canvas stroke colors and input styling

UI/UX Improvements:
- Clean admin dashboard without instruction clutter
- Professional popup interface with smooth animations
- Better contrast and readability across all themes (default, playground, chalkboard, galaxy, nature)
- Improved accessibility with proper focus management
- Enhanced mobile responsiveness with touch-optimized controls

Files Modified:
- Menu system: tablet-menu.js, tablet-menu.css
- Theme engine: styles.css, themes integration
- Admin interface: index.html, ui.js
- Input systems: game.js, unified-write.js, handwriting.js
- Authentication: auth.js with tablet menu cleanup
2025-10-02 14:26:04 -04:00

1380 lines
30 KiB
CSS

/* Enhanced Menu System for Spelling Practice App - Available on All Devices */
/* Hidden original navigation (kept for fallback) */
#nav {
display: none !important;
}
/* Popup Menu Styles */
.menu-popup {
position: fixed;
width: 480px;
max-width: 90vw;
max-height: 80vh;
background: var(--bg-primary);
border: 2px solid var(--border);
border-radius: 12px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
z-index: 1000;
overflow: hidden;
transition: all 0.3s ease;
}
.menu-popup.hidden {
opacity: 0;
visibility: hidden;
transform: scale(0.95);
}
.menu-popup.minimized {
height: auto;
}
.popup-header {
background: var(--primary);
color: white;
padding: 1rem 1.5rem;
cursor: move;
display: flex;
justify-content: space-between;
align-items: center;
user-select: none;
}
.popup-header:active {
cursor: grabbing;
}
.popup-title {
display: flex;
align-items: center;
gap: 0.5rem;
font-weight: 600;
font-size: 1.1rem;
}
.popup-icon {
font-size: 1.2rem;
}
.popup-controls {
display: flex;
gap: 0.5rem;
}
.minimize-btn, .close-btn {
background: rgba(255, 255, 255, 0.2);
border: none;
color: white;
width: 32px;
height: 32px;
border-radius: 6px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.2rem;
font-weight: bold;
transition: background 0.2s ease;
}
.minimize-btn:hover, .close-btn:hover {
background: rgba(255, 255, 255, 0.3);
}
.popup-content {
padding: 1.5rem;
max-height: 60vh;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 1.5rem;
color: var(--text-primary);
}
/* Popup content scrollbar styling */
.popup-content::-webkit-scrollbar {
width: 6px;
}
.popup-content::-webkit-scrollbar-track {
background: var(--bg-secondary);
border-radius: 3px;
}
.popup-content::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 3px;
}
.popup-content::-webkit-scrollbar-thumb:hover {
background: var(--text-secondary);
}
/* Help Bubble Styles */
.help-bubble-container {
position: fixed;
top: 1rem;
left: 1rem;
z-index: 1001;
}
.help-bubble {
width: 48px;
height: 48px;
border-radius: 50%;
background: var(--primary);
border: 2px solid var(--primary-dark);
color: white;
font-size: 1.2rem;
font-weight: bold;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
transition: all 0.3s ease;
}
.help-bubble:hover {
background: var(--primary-dark);
transform: scale(1.1);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}
.help-bubble:active {
transform: scale(0.95);
}
.help-icon {
font-size: 1.4rem;
line-height: 1;
}
/* Help Popup Overlay */
.help-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 1500;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
}
.help-overlay.visible {
opacity: 1;
visibility: visible;
}
.help-popup {
background: var(--bg-primary);
border: 2px solid var(--border);
border-radius: 16px;
max-width: 600px;
width: 90vw;
max-height: 80vh;
overflow-y: auto;
box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
transform: scale(0.9);
transition: transform 0.3s ease;
}
.help-overlay.visible .help-popup {
transform: scale(1);
}
.help-popup-header {
background: var(--primary);
color: white;
padding: 1rem 1.5rem;
border-radius: 14px 14px 0 0;
display: flex;
justify-content: space-between;
align-items: center;
}
.help-popup-title {
font-size: 1.1rem;
font-weight: 600;
display: flex;
align-items: center;
gap: 0.5rem;
}
.help-close-btn {
background: rgba(255, 255, 255, 0.2);
border: none;
color: white;
width: 32px;
height: 32px;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.2rem;
font-weight: bold;
transition: background 0.2s ease;
}
.help-close-btn:hover {
background: rgba(255, 255, 255, 0.3);
}
.help-popup-content {
padding: 1.5rem;
}
/* Menu toggle button */
.menu-toggle {
position: fixed;
top: 1rem;
right: 1rem;
width: 56px;
height: 56px;
background: var(--primary);
border: none;
border-radius: 50%;
color: white;
font-size: 1.5rem;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
cursor: pointer;
z-index: 1002;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
}
.menu-toggle:hover {
transform: scale(1.1);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}
.menu-toggle.active {
background: var(--error);
}
/* Body padding to account for potential expanded menu */
body.menu-expanded {
padding-top: 120px;
}
/* Admin tabs - horizontal scrolling on tablets */
#adminTabs {
display: flex;
overflow-x: auto;
overflow-y: hidden;
white-space: nowrap;
padding: 1rem;
gap: 0.75rem;
background: var(--bg-secondary);
border-radius: 12px;
margin: 1rem 0;
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
-webkit-overflow-scrolling: touch;
scrollbar-width: none; /* Firefox */
}
#adminTabs::-webkit-scrollbar {
display: none; /* Safari and Chrome */
}
#adminTabs button {
flex: 0 0 auto;
min-width: 140px;
height: 50px;
padding: 0.75rem 1.25rem;
font-size: 1rem;
font-weight: 600;
border-radius: 8px;
white-space: nowrap;
background: var(--bg-primary);
border: 2px solid var(--border);
color: var(--text-primary);
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
}
#adminTabs button:hover {
background: var(--primary-color);
color: white;
border-color: var(--primary-color);
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
#adminTabs button.active {
background: var(--primary-color);
color: white;
border-color: var(--primary-color);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
/* Compact dropdown styles for tablets */
select, .word-user-dropdown {
min-height: 48px;
padding: 0.75rem 1rem;
font-size: 1.125rem;
border-radius: 8px;
border: 2px solid var(--border);
background: var(--bg-primary);
color: var(--text-primary);
cursor: pointer;
transition: all 0.3s ease;
appearance: none;
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
background-position: right 0.5rem center;
background-repeat: no-repeat;
background-size: 1.5em 1.5em;
padding-right: 2.5rem;
}
select:focus, .word-user-dropdown:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
/* Floating action button for quick actions */
.quick-actions {
position: fixed;
bottom: 2rem;
right: 2rem;
display: flex;
flex-direction: column-reverse;
gap: 1rem;
z-index: 999;
}
.quick-action-btn {
width: 56px;
height: 56px;
border-radius: 50%;
border: none;
background: var(--primary-color);
color: white;
font-size: 1.25rem;
cursor: pointer;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
}
.quick-action-btn:hover {
transform: scale(1.1);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}
.quick-action-btn.secondary {
background: var(--bg-secondary);
color: var(--text-primary);
border: 2px solid var(--border);
}
/* Minimize admin panel content spacing on tablets */
.adminTab {
padding: 1.5rem;
margin: 1rem 0;
}
.card {
padding: 1.5rem;
margin: 0.75rem 0;
}
/* Grid layouts optimized for tablet viewing */
.admin-grid {
display: grid;
grid-template-columns: 1fr;
gap: 1rem;
margin-top: 1rem;
}
@media screen and (min-width: 900px) {
.admin-grid {
grid-template-columns: 1fr 1fr;
}
}
/* Enhanced card headers for tablet */
.card-header {
padding: 1rem 0;
border-bottom: 1px solid var(--border);
margin-bottom: 1.5rem;
}
.card-header h2, .card-header h3 {
margin: 0 0 0.5rem 0;
font-size: 1.5rem;
}
.card-header p {
margin: 0;
color: var(--text-secondary);
font-size: 1rem;
}
/* Tablet-specific navigation improvements */
#nav .flex {
flex-wrap: wrap;
justify-content: space-around;
gap: 1rem;
}
#nav button {
min-width: 120px;
min-height: 48px;
padding: 0.75rem 1.25rem;
font-size: 1rem;
font-weight: 600;
border-radius: 8px;
transition: all 0.3s ease;
}
#nav button:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
/* Hide menu when writing area is active */
.writing-focused #nav:not(.expanded) {
display: none;
}
.writing-focused .menu-toggle {
opacity: 0.7;
transform: scale(0.9);
}
/* Gesture indicators */
.swipe-indicator {
position: fixed;
top: 50%;
left: 1rem;
transform: translateY(-50%);
width: 4px;
height: 40px;
background: var(--primary-color);
border-radius: 2px;
opacity: 0.6;
z-index: 900;
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% { opacity: 0.6; }
50% { opacity: 1; }
}
/* Toast notification area (for menu state changes) */
.toast-container {
position: fixed;
top: 2rem;
left: 50%;
transform: translateX(-50%);
z-index: 1100;
pointer-events: none;
}
.toast {
background: var(--bg-primary);
border: 1px solid var(--border);
border-radius: 8px;
padding: 0.75rem 1.25rem;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
font-size: 0.875rem;
font-weight: 500;
opacity: 0;
transform: translateY(-20px);
transition: all 0.3s ease;
}
.toast.show {
opacity: 1;
transform: translateY(0);
}
/* Improved form layouts for tablets */
.form-row {
display: flex;
gap: 1rem;
margin-bottom: 1rem;
flex-wrap: wrap;
}
.form-row > * {
flex: 1;
min-width: 200px;
}
.form-group {
display: flex;
flex-direction: column;
gap: 1rem;
margin-bottom: 1.5rem;
}
.form-group label {
display: block;
margin-bottom: 0.5rem;
font-weight: 600;
color: var(--text-primary);
}
.form-group input,
.form-group select,
.form-group textarea {
min-height: 48px;
padding: 0.75rem 1rem;
font-size: 1rem;
border: 2px solid var(--border);
border-radius: 8px;
background: var(--bg-primary);
color: var(--text-primary);
transition: all 0.3s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
/* Better spacing for tablet touch targets */
.btn-group {
display: flex;
gap: 1rem;
flex-wrap: wrap;
margin-top: 1.5rem;
justify-content: center;
}
.btn-group button {
min-width: 120px;
min-height: 48px;
}
/* Landscape tablet optimizations */
@media screen and (orientation: landscape) and (min-width: 900px) {
#adminTabs {
justify-content: center;
}
#adminTabs button {
min-width: 100px;
}
.admin-grid {
grid-template-columns: 1fr 1fr 1fr;
}
/* Side navigation for landscape tablets */
#nav.landscape {
position: fixed;
left: 0;
top: 0;
bottom: 0;
width: 280px;
transform: translateX(-100%);
flex-direction: column;
overflow-y: auto;
}
#nav.landscape.expanded {
transform: translateX(0);
}
body.landscape-nav-expanded {
padding-left: 280px;
}
}
/* Scroll indicators for admin tabs */
.scroll-indicator {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 32px;
height: 32px;
background: rgba(255, 255, 255, 0.9);
border: 1px solid var(--border);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.25rem;
font-weight: bold;
color: var(--text-primary);
cursor: pointer;
z-index: 10;
opacity: 0.7;
transition: all 0.3s ease;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.scroll-indicator:hover {
opacity: 1;
transform: translateY(-50%) scale(1.1);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.scroll-indicator.left {
left: -16px;
}
.scroll-indicator.right {
right: -16px;
}
/* Admin tabs container positioning for indicators */
#adminTabs {
position: relative;
}
/* Enhanced Navigation Styles */
.nav-header {
text-align: center;
padding-bottom: 1rem;
border-bottom: 1px solid var(--border);
margin-bottom: 1rem;
}
.nav-header #userInfo {
font-size: 1.25rem;
color: var(--text-primary);
margin-bottom: 0.5rem;
}
.user-badge {
display: inline-block;
padding: 0.25rem 0.75rem;
background: var(--primary-color);
color: white;
border-radius: 20px;
font-size: 0.875rem;
font-weight: 600;
}
.nav-section {
margin-bottom: 1.5rem;
}
.nav-section {
background: var(--bg-secondary);
border-radius: 12px;
padding: 1.5rem;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
border: 1px solid var(--border);
}
.nav-section h4 {
margin: 0 0 1rem 0;
padding: 0.5rem 0;
font-size: 1rem;
font-weight: 700;
color: var(--primary);
border-bottom: 1px solid var(--border);
text-transform: uppercase;
letter-spacing: 0.5px;
}
.nav-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.75rem;
margin-bottom: 1rem;
}
.nav-activity-btn {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 1rem;
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 12px;
cursor: pointer;
transition: all 0.3s ease;
text-align: left;
min-height: 70px;
color: var(--text-primary);
font-weight: 500;
}
.nav-activity-btn:hover {
background: var(--primary);
color: white;
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}.nav-icon {
font-size: 1.5rem;
flex-shrink: 0;
}
.nav-title {
font-weight: 600;
font-size: 0.95rem;
line-height: 1.2;
margin-bottom: 0.25rem;
}
.nav-subtitle {
font-size: 0.8rem;
opacity: 0.8;
line-height: 1.2;
}
.nav-list {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.nav-list-btn {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem 1rem;
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
text-align: left;
font-size: 0.95rem;
color: var(--text-primary);
font-weight: 500;
width: 100%;
}
.nav-list-btn:hover {
background: var(--primary-color);
border-color: var(--primary-color);
color: white;
transform: translateY(-1px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}.nav-list-btn .nav-icon {
font-size: 1.125rem;
width: 20px;
text-align: center;
}
.nav-footer {
margin-top: auto;
border-top: 1px solid var(--border);
padding-top: 1rem;
}
.nav-logout-btn {
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
width: 100%;
padding: 0.75rem;
background: var(--danger-color);
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
font-weight: 600;
}
.nav-logout-btn:hover {
background: #dc2626;
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}
/* Responsive navigation grid */
@media screen and (max-width: 400px) {
.nav-grid {
grid-template-columns: 1fr;
}
}
@media screen and (min-width: 500px) {
.nav-grid {
grid-template-columns: 1fr 1fr;
}
}
@media screen and (min-width: 700px) {
.nav-grid {
grid-template-columns: 1fr 1fr 1fr;
}
}
/* Admin Dashboard Overview Styles */
.admin-overview {
margin: 2rem 0;
}
.overview-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1.5rem;
margin-bottom: 2rem;
}
.stat-card {
display: flex;
align-items: center;
gap: 1rem;
padding: 1.5rem;
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 12px;
transition: all 0.3s ease;
}
.stat-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.stat-icon {
font-size: 2.5rem;
width: 60px;
height: 60px;
display: flex;
align-items: center;
justify-content: center;
background: var(--primary-color);
color: white;
border-radius: 50%;
flex-shrink: 0;
}
.stat-content {
flex: 1;
}
.stat-number {
font-size: 2rem;
font-weight: 700;
color: var(--text-primary);
line-height: 1;
margin-bottom: 0.25rem;
}
.stat-label {
font-size: 0.9rem;
color: var(--text-secondary);
font-weight: 500;
}
.menu-instructions {
background: var(--bg-secondary);
border: 2px solid var(--border);
border-radius: 12px;
padding: 2rem;
margin-top: 2rem;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.menu-instructions h3 {
margin: 0 0 1rem 0;
color: var(--primary);
font-size: 1.25rem;
font-weight: 700;
}
.menu-instructions p {
margin: 0 0 1.5rem 0;
color: var(--text-primary);
line-height: 1.6;
font-weight: 500;
font-size: 1rem;
}
.instruction-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 1rem;
}
.instruction-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 1rem 1.25rem;
background: var(--bg-primary);
border: 1px solid var(--border);
border-radius: 8px;
transition: all 0.3s ease;
color: var(--text-primary);
font-weight: 500;
}
.instruction-item:hover {
border-color: var(--primary);
background: var(--bg-primary);
transform: translateX(4px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.instruction-icon {
font-size: 1.25rem;
width: 32px;
text-align: center;
flex-shrink: 0;
}
.menu-instructions strong {
color: var(--text-primary);
font-weight: 700;
}
.instruction-item strong {
color: var(--primary);
font-weight: 600;
}
/* Student Dashboard Styles */
.quick-start-section {
margin: 2rem 0;
padding: 2rem;
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 12px;
}
.quick-start-section h3 {
margin: 0 0 0.5rem 0;
color: var(--text-primary);
font-size: 1.25rem;
}
.quick-start-section p {
margin: 0 0 1.5rem 0;
color: var(--text-primary);
font-weight: 500;
opacity: 0.9;
}
.quick-actions-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
}
.quick-action-card {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.75rem;
padding: 1.5rem 1rem;
background: var(--bg-primary);
border: 2px solid var(--border);
border-radius: 12px;
cursor: pointer;
transition: all 0.3s ease;
text-align: center;
min-height: 100px;
font-family: inherit;
color: var(--text-primary);
}
.quick-action-card:hover {
border-color: var(--primary);
background: var(--primary);
color: white;
transform: translateY(-4px);
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.quick-icon {
font-size: 2rem;
line-height: 1;
}
.quick-title {
font-weight: 600;
font-size: 1rem;
line-height: 1.2;
color: var(--text-primary);
}
.quick-action-card .quick-title {
color: inherit;
}
.student-instructions {
background: var(--bg-secondary);
border: 2px solid var(--border);
}
.dashboard-section {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
margin: 2rem 0;
}
.dashboard-card {
padding: 1.5rem;
margin: 0;
}
/* Student Dashboard Card Improvements */
.dashboard-section .card {
background: var(--bg-primary);
border: 2px solid var(--border);
color: var(--text-primary);
}
.section-header h3 {
color: var(--primary);
font-weight: 700;
margin-bottom: 1rem;
}
.challenges-section, .leaderboards-section {
color: var(--text-primary);
}
.sr-info h4 {
color: var(--primary);
font-weight: 600;
}
.sr-info p {
color: var(--text-primary);
opacity: 0.9;
}
/* Universal Theme Enforcement for All Elements */
* {
box-sizing: border-box;
}
/* Dashboard Section Theme Override */
.dashboard-section .section-header h3 {
color: var(--primary) !important;
font-weight: 700 !important;
}
.dashboard-section .card {
background: var(--bg-primary) !important;
border: 2px solid var(--border) !important;
color: var(--text-primary) !important;
}
/* Challenges Section */
#challengesContainer,
#challengesContainer * {
color: var(--text-primary) !important;
}
#challengesContainer h4,
#challengesContainer h3 {
color: var(--primary) !important;
}
/* Leaderboards Section */
#leaderboardsContainer,
#leaderboardsContainer * {
color: var(--text-primary) !important;
}
#leaderboardsContainer h4,
#leaderboardsContainer h3 {
color: var(--primary) !important;
}
/* Spaced Repetition Section */
.sr-info,
.sr-info *,
.sr-stats-container,
.sr-stats-container *,
.sr-progress-container,
.sr-progress-container * {
color: var(--text-primary) !important;
}
.sr-info h4,
.sr-stats-container h4,
.sr-progress-container h3 {
color: var(--primary) !important;
}
/* Student Dashboard Container Styles */
#streakContainer .streak-container {
background: var(--bg-secondary);
border: 1px solid var(--border);
color: var(--text-primary);
}
#streakContainer .streak-days {
color: var(--text-primary);
}
#streakContainer .streak-subtitle {
color: var(--text-secondary);
}
#userStatsContainer .user-stats {
gap: 0.75rem;
}
#userStatsContainer .stat-card {
background: var(--bg-secondary);
border: 1px solid var(--border);
color: var(--text-primary);
}
#userStatsContainer .stat-value {
color: var(--primary);
}
#userStatsContainer .stat-label {
color: var(--text-secondary);
}
/* Student Instructions Enhancements */
.student-instructions .instruction-item {
background: var(--bg-primary);
border: 1px solid var(--border);
color: var(--text-primary);
}
.student-instructions .instruction-item:hover {
border-color: var(--primary);
background: var(--bg-secondary);
color: var(--text-primary);
}
.student-instructions strong {
color: var(--primary);
}
/* Admin Panel Theme Enforcement */
#adminPanel,
#adminPanel *:not(.btn):not(.button):not(input):not(select):not(textarea) {
color: var(--text-primary) !important;
}
#adminPanel h1,
#adminPanel h2,
#adminPanel h3,
#adminPanel h4,
#adminPanel h5,
#adminPanel h6 {
color: var(--primary) !important;
}
#adminPanel .card {
background: var(--bg-primary) !important;
border: 1px solid var(--border) !important;
}
#adminPanel .adminTab {
background: var(--bg-secondary) !important;
border: 1px solid var(--border) !important;
color: var(--text-primary) !important;
}
/* Admin Tabs */
#adminTabs button {
background: var(--bg-secondary) !important;
color: var(--text-primary) !important;
border: 1px solid var(--border) !important;
}
#adminTabs button.active,
#adminTabs button:hover {
background: var(--primary) !important;
color: white !important;
}
/* Game Section Theme */
#gameSection,
#gameSection * {
color: var(--text-primary) !important;
}
#gameSection h3 {
color: var(--primary) !important;
}
#gameSection .card {
background: var(--bg-primary) !important;
border: 1px solid var(--border) !important;
}
/* Unified Write Mode */
.unified-write-container,
.unified-write-container * {
color: var(--text-primary) !important;
}
.unified-write-canvas {
border-color: var(--border) !important;
}
.unified-write-canvas:focus {
border-color: var(--primary) !important;
}
/* Additional navigation text styling for readability */
.nav-section p, .nav-section div, .nav-section span {
color: var(--text-primary) !important;
font-weight: 500;
}
.nav-section a {
color: var(--primary) !important;
text-decoration: none;
font-weight: 500;
}
.nav-section a:hover {
color: var(--primary-dark) !important;
text-decoration: underline;
}
/* Global Theme Enforcement - Override any hardcoded colors */
body, html {
background: var(--bg-primary) !important;
color: var(--text-primary) !important;
}
/* Force all text elements to use theme colors */
h1, h2, h3, h4, h5, h6, p, div, span, label, li {
color: var(--text-primary) !important;
}
/* Force all headings to use primary color */
h1, h2, h3, h4, h5, h6 {
color: var(--primary) !important;
}
/* Force all cards and panels to use theme backgrounds */
.card, .adminTab, .panel, .section {
background: var(--bg-primary) !important;
border-color: var(--border) !important;
color: var(--text-primary) !important;
}
/* Force all buttons to be properly themed */
button, .btn, .button {
background: var(--primary) !important;
color: white !important;
border: 1px solid var(--primary) !important;
}
button:hover, .btn:hover, .button:hover {
background: var(--primary-dark) !important;
}
/* Secondary buttons */
.btn-secondary, .button-secondary {
background: var(--bg-secondary) !important;
color: var(--text-primary) !important;
border: 1px solid var(--border) !important;
}
/* Input elements */
input, select, textarea {
background: var(--bg-primary) !important;
color: var(--text-primary) !important;
border: 1px solid var(--border) !important;
}
input:focus, select:focus, textarea:focus {
border-color: var(--primary) !important;
}
/* Override any remaining hardcoded green colors */
[style*="green"],
[style*="#00ff00"],
[style*="#00cc00"],
[style*="#10b981"],
[style*="rgb(16, 185, 129)"] {
color: var(--primary) !important;
}
/* Responsive adjustments for different screen sizes */
@media screen and (max-width: 768px) {
.dashboard-section {
grid-template-columns: 1fr;
}
.quick-actions-grid {
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.menu-toggle {
width: 48px;
height: 48px;
font-size: 1.3rem;
}
.menu-popup {
width: 95vw;
max-height: 85vh;
}
.popup-header {
padding: 0.75rem 1rem;
}
.popup-content {
padding: 1rem;
}
.help-bubble {
width: 40px;
height: 40px;
font-size: 1rem;
}
.help-popup {
width: 95vw;
max-height: 85vh;
}
.help-popup-header {
padding: 0.75rem 1rem;
}
.help-popup-content {
padding: 1rem;
}
}
/* Desktop optimizations */
@media screen and (min-width: 1024px) {
.menu-toggle {
width: 60px;
height: 60px;
font-size: 1.6rem;
}
#nav {
padding: 2rem;
gap: 2rem;
}
.nav-section {
padding: 2rem;
}
}