bunch of fixes

This commit is contained in:
nate@necloud.us committed 2025-07-15 10:16:59 -04:00
1 parent 462c7908a1
commit 266a064330
14 files changed
+1211 -868

No files matched your search

+340 -262
View File
@@ -1,319 +1,397 @@
/* 📋 Global Defaults */
body {
font-family: sans-serif;
text-align: center;
padding: 2rem;
/* Modern Spelling App Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
/* Reset and base styles */
* {
margin: 0;
}
ul {
list-style: none;
padding: 0;
}
li {
margin: 0.25rem 0;
box-sizing: border-box;
}
:root {
/* Modern color palette */
--primary: #3b82f6;
--primary-dark: #2563eb;
--secondary: #f1f5f9;
--accent: #06b6d4;
--success: #10b981;
--warning: #f59e0b;
--error: #ef4444;
--text-primary: #1e293b;
--text-secondary: #64748b;
--border: #e2e8f0;
--bg-primary: #ffffff;
--bg-secondary: #f8fafc;
--shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
--radius: 0.75rem;
--transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
background: linear-gradient(135deg, var(--bg-secondary) 0%, #ffffff 100%);
color: var(--text-primary);
line-height: 1.6;
min-height: 100vh;
padding: 2rem 1rem;
}
/* Container and layout */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 1rem;
}
/* Typography */
h1 {
font-size: 3rem;
font-weight: 700;
text-align: center;
margin-bottom: 2rem;
background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
h2 {
font-size: 1.875rem;
font-weight: 600;
margin-bottom: 1.5rem;
color: var(--text-primary);
}
h3 {
font-size: 1.25rem;
font-weight: 600;
margin-bottom: 1rem;
color: var(--text-primary);
}
/* Form elements */
input, textarea, select {
font-size: 1rem;
padding: 0.5rem;
width: 100%;
max-width: 320px;
padding: 0.75rem 1rem;
margin: 0.5rem;
border: 2px solid #ccc;
border-radius: 5px;
border: 2px solid var(--border);
border-radius: var(--radius);
font-size: 1rem;
font-family: inherit;
background: var(--bg-primary);
color: var(--text-primary);
transition: var(--transition);
}
/* 🎨 Theme Styles */
body.playground {
background: #fef9e7;
color: #333;
font-family: 'Comic Sans MS', cursive, sans-serif;
}
body.chalkboard {
background: #222;
color: #f0f0f0;
font-family: 'Courier New', monospace;
}
body.galaxy {
background: radial-gradient(circle at center, #0d0d2b, #1a1a3f);
color: #b3e5fc;
font-family: 'Orbitron', sans-serif;
}
body.nature {
background: #e8f5e9;
color: #2e7d32;
font-family: 'Georgia', serif;
input:focus, textarea:focus, select:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}
/* 🔘 Buttons */
textarea {
min-height: 120px;
resize: vertical;
max-width: 500px;
}
/* Buttons */
button {
background-color: #4caf50;
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1.5rem;
margin: 0.25rem;
background: var(--primary);
color: white;
border: none;
border-radius: 8px;
padding: 0.6rem 1rem;
border-radius: var(--radius);
font-size: 1rem;
margin: 0.4rem;
font-weight: 500;
font-family: inherit;
cursor: pointer;
transition: transform 0.2s;
display: inline-block;
transition: var(--transition);
box-shadow: var(--shadow);
}
button:hover {
transform: scale(1.05);
background: var(--primary-dark);
transform: translateY(-1px);
box-shadow: var(--shadow-lg);
}
/* 🌈 Theme-specific Button Colors */
body.chalkboard button {
background-color: #555;
}
body.galaxy button {
background-color: #6200ea;
}
body.nature button {
background-color: #81c784;
button:active {
transform: translateY(0);
}
/* 🔳 Panels and Banners */
button:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}
/* Button variants */
.btn-secondary {
background: var(--secondary);
color: var(--text-primary);
}
.btn-secondary:hover {
background: var(--border);
}
.btn-success {
background: var(--success);
}
.btn-success:hover {
background: #059669;
}
.btn-warning {
background: var(--warning);
}
.btn-warning:hover {
background: #d97706;
}
.btn-error {
background: var(--error);
}
.btn-error:hover {
background: #dc2626;
}
/* Cards and panels */
.card {
background: var(--bg-primary);
border-radius: var(--radius);
padding: 2rem;
margin: 1rem 0;
box-shadow: var(--shadow);
border: 1px solid var(--border);
}
.card-header {
padding-bottom: 1rem;
margin-bottom: 1rem;
border-bottom: 1px solid var(--border);
}
/* Layout utilities */
.hidden {
display: none;
display: none !important;
}
#wordBox {
font-size: 2em;
margin: 20px;
min-height: 60px;
padding: 20px;
background-color: #f5f5f5;
border-radius: 8px;
transition: opacity 0.3s ease;
.flex {
display: flex;
}
.word-box {
font-size: 3rem;
font-weight: bold;
margin-bottom: 2rem;
color: #2196f3;
text-shadow: 1px 1px #ccc;
.flex-col {
flex-direction: column;
}
.banner {
padding: 0.5em;
.items-center {
align-items: center;
}
.justify-center {
justify-content: center;
}
.gap-4 {
gap: 1rem;
}
.text-center {
text-align: center;
font-weight: bold;
color: white;
}
.banner.admin {
background-color: #b22222;
}
.banner.student {
background-color: #1e90ff;
}
/* 🔔 Toast Messages */
.toast {
position: fixed;
bottom: 20px;
right: 20px;
background: #333;
color: #fff;
padding: 0.75em 1.25em;
border-radius: 5px;
opacity: 0;
pointer-events: none;
transition: opacity 0.4s ease;
z-index: 999;
}
.toast.show {
opacity: 1;
pointer-events: auto;
/* Specific component styles */
#loginPanel {
max-width: 400px;
margin: 0 auto;
background: var(--bg-primary);
padding: 2rem;
border-radius: var(--radius);
box-shadow: var(--shadow-lg);
}
/* 🧭 Admin Tabs */
#adminTabs {
margin: 1em 0;
#loginPanel form {
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
}
#adminTabs button {
margin-right: 8px;
padding: 10px 16px;
background-color: #f0f0f0;
border: 1px solid #ccc;
border-bottom: none;
border-radius: 6px 6px 0 0;
/* Banner */
.banner {
padding: 1rem;
text-align: center;
font-weight: 600;
color: #333;
color: white;
border-radius: var(--radius);
margin-bottom: 2rem;
box-shadow: var(--shadow);
}
.banner.admin {
background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}
.banner.student {
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
/* Navigation */
#nav {
text-align: center;
margin-bottom: 2rem;
padding: 1rem;
background: var(--bg-primary);
border-radius: var(--radius);
box-shadow: var(--shadow);
}
/* Admin tabs */
#adminTabs {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-bottom: 2rem;
padding: 0.5rem;
background: var(--bg-secondary);
border-radius: var(--radius);
}
#adminTabs button {
flex: 1;
min-width: fit-content;
background: transparent;
color: var(--text-secondary);
border: none;
border-radius: calc(var(--radius) - 0.25rem);
padding: 0.75rem 1rem;
font-weight: 500;
transition: var(--transition);
box-shadow: none;
cursor: pointer;
transition: background-color 0.2s, color 0.2s;
}
#adminTabs button:hover {
background-color: #e0f2ff;
color: #000;
background: var(--bg-primary);
color: var(--text-primary);
transform: none;
}
#adminTabs button.active {
background-color: #ffffff;
color: #000;
border-bottom: 2px solid #fff;
box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
background: var(--primary) !important;
color: white !important;
box-shadow: var(--shadow);
}
.adminTab {
display: none;
}
.adminTab:not(.hidden) {
display: block;
background: var(--bg-primary);
border-radius: var(--radius);
padding: 2rem;
box-shadow: var(--shadow);
border: 1px solid var(--border);
}
.typing-sentence {
font-size: 1.5em;
margin: 20px 0;
padding: 15px;
background-color: #f5f5f5;
border-radius: 8px;
border: 1px solid #ddd;
min-height: 50px;
display: block !important;
visibility: visible !important;
.adminTab.hidden {
display: none !important;
}
/* Remove these style classes if they exist */
.typing-section
.typing-container
.typing-prompt
.input-container
#typingInput
#typingFeedback
/* Fix for start buttons visibility */
#startGameBtn, #startTypingBtn {
display: inline-block;
margin: 10px;
padding: 12px 24px;
font-size: 1.1em;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
#startGameBtn:hover, #startTypingBtn:hover {
transform: scale(1.05);
background-color: #45a049;
}
/* Override any hidden class for these buttons */
#startGameBtn.hidden, #startTypingBtn.hidden {
display: none !important;
}
/* Button container for better spacing */
.button-container {
margin: 20px 0;
padding: 10px;
text-align: center;
/* Game elements */
#wordBox, .word-box, #typingPrompt {
font-size: 3rem;
font-weight: 700;
text-align: center;
padding: 3rem 2rem;
margin: 2rem 0;
background: linear-gradient(135deg, var(--bg-primary) 0%, var(--secondary) 100%);
border: 2px solid var(--border);
border-radius: var(--radius);
color: var(--primary);
box-shadow: var(--shadow-lg);
min-height: 120px;
display: flex;
align-items: center;
justify-content: center;
}
.student-controls {
display: block !important;
margin: 20px auto;
padding: 15px;
text-align: center;
visibility: visible !important;
text-align: center;
margin: 2rem 0;
padding: 2rem;
background: var(--bg-primary);
border-radius: var(--radius);
box-shadow: var(--shadow);
}
.student-btn {
display: inline-block !important;
visibility: visible !important;
background-color: #4CAF50;
color: white;
padding: 12px 24px;
margin: 10px;
border: none;
border-radius: 5px;
font-size: 16px;
cursor: pointer;
opacity: 1 !important;
/* Lists */
ul {
list-style: none;
}
/* Override any hiding classes for these specific buttons */
#startGameBtn:not(.hidden),
#startTypingBtn:not(.hidden) {
display: inline-block !important;
visibility: visible !important;
opacity: 1 !important;
li {
padding: 0.75rem 1rem;
margin: 0.5rem 0;
background: var(--bg-secondary);
border-radius: calc(var(--radius) - 0.25rem);
border: 1px solid var(--border);
}
/* Remove this if it exists as it might conflict */
.hidden {
display: none !important;
/* Toast notifications */
.toast {
position: fixed;
bottom: 2rem;
right: 2rem;
background: var(--text-primary);
color: white;
padding: 1rem 1.5rem;
border-radius: var(--radius);
opacity: 0;
transform: translateY(100%);
transition: var(--transition);
z-index: 1000;
box-shadow: var(--shadow-lg);
font-weight: 500;
}
/* Add this to ensure student panel shows properly */
#studentPanel:not(.hidden) {
display: block !important;
.toast.show {
opacity: 1;
transform: translateY(0);
}
/* 📝 Typing Practice Styles */
.typing-section {
max-width: 800px;
margin: 20px auto;
padding: 20px;
}
#typingPrompt {
font-size: 2em;
font-weight: bold;
text-align: center;
margin: 20px 0;
padding: 20px;
background: #f5f5f5;
border-radius: 8px;
min-height: 60px;
display: block !important;
visibility: visible !important;
}
#typingInput {
width: 300px;
padding: 10px;
font-size: 18px;
margin-right: 10px;
}
.typing-word {
font-size: 32px;
font-weight: bold;
text-align: center;
padding: 20px;
margin: 20px 0;
background: #f5f5f5;
border-radius: 8px;
min-height: 50px;
display: block !important;
visibility: visible !important;
}
.typing-input-container {
text-align: center;
margin: 20px 0;
}
/* Fix student panel buttons */
#startGameBtn, #startTypingBtn {
display: inline-block;
margin: 10px;
padding: 12px 24px;
font-size: 1.1em;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
visibility: visible !important;
}
/* Ensure student panel visibility */
#studentPanel:not(.hidden) {
display: block !important;
}
/* Remove any conflicting hidden styles */
#startGameBtn:not(.hidden),
#startTypingBtn:not(.hidden) {
display: inline-block !important;
visibility: visible !important;
/* Responsive design */
@media (max-width: 768px) {
body {
padding: 1rem 0.5rem;
}
h1 {
font-size: 2rem;
}
#adminTabs {
flex-direction: column;
}
#adminTabs button {
flex: none;
}
.card, .adminTab, #loginPanel {
padding: 1rem;
}
#wordBox, .word-box, #typingPrompt {
font-size: 2rem;
padding: 2rem 1rem;
}
}