Files
homeschool/public/styles.css
T
2025-07-15 10:16:59 -04:00

398 lines
7.1 KiB
CSS

/* 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;
padding: 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 {
width: 100%;
max-width: 320px;
padding: 0.75rem 1rem;
margin: 0.5rem;
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);
}
input:focus, textarea:focus, select:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}
textarea {
min-height: 120px;
resize: vertical;
max-width: 500px;
}
/* Buttons */
button {
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: var(--radius);
font-size: 1rem;
font-weight: 500;
font-family: inherit;
cursor: pointer;
transition: var(--transition);
box-shadow: var(--shadow);
}
button:hover {
background: var(--primary-dark);
transform: translateY(-1px);
box-shadow: var(--shadow-lg);
}
button:active {
transform: translateY(0);
}
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 !important;
}
.flex {
display: flex;
}
.flex-col {
flex-direction: column;
}
.items-center {
align-items: center;
}
.justify-center {
justify-content: center;
}
.gap-4 {
gap: 1rem;
}
.text-center {
text-align: center;
}
/* 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);
}
#loginPanel form {
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
}
/* Banner */
.banner {
padding: 1rem;
text-align: center;
font-weight: 600;
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;
}
#adminTabs button:hover {
background: var(--bg-primary);
color: var(--text-primary);
transform: none;
}
#adminTabs button.active {
background: var(--primary) !important;
color: white !important;
box-shadow: var(--shadow);
}
.adminTab {
background: var(--bg-primary);
border-radius: var(--radius);
padding: 2rem;
box-shadow: var(--shadow);
border: 1px solid var(--border);
}
.adminTab.hidden {
display: none !important;
}
/* 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 {
text-align: center;
margin: 2rem 0;
padding: 2rem;
background: var(--bg-primary);
border-radius: var(--radius);
box-shadow: var(--shadow);
}
/* Lists */
ul {
list-style: none;
}
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);
}
/* 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;
}
.toast.show {
opacity: 1;
transform: translateY(0);
}
/* 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;
}
}