Refactor UI with design system, tablet optimization, and enhanced styling
This commit is contained in:
124
UI_IMPROVEMENTS.md
Normal file
124
UI_IMPROVEMENTS.md
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
# BSC Score App - UI Improvements for Tablet Optimization
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
This document outlines the comprehensive UI improvements made to enhance the aesthetic appeal and tablet usage experience of the BSC Score application.
|
||||||
|
|
||||||
|
## Key Improvements Implemented
|
||||||
|
|
||||||
|
### 1. Design System Implementation
|
||||||
|
- **CSS Custom Properties**: Established a comprehensive design token system with consistent colors, spacing, typography, and transitions
|
||||||
|
- **Responsive Typography**: Tablet-specific font scaling for optimal readability
|
||||||
|
- **Touch Target Optimization**: Minimum 44px touch targets on mobile, 48-56px on tablets
|
||||||
|
- **Consistent Spacing**: 8px-based spacing system with semantic naming (--space-xs through --space-xxl)
|
||||||
|
|
||||||
|
### 2. Enhanced Color System
|
||||||
|
- **Primary Color**: Orange (#ff9800) with hover states
|
||||||
|
- **Semantic Colors**: Success, danger, warning with consistent usage
|
||||||
|
- **Surface Colors**: Improved contrast and visual hierarchy
|
||||||
|
- **Text Colors**: Primary, secondary, and muted text colors for better readability
|
||||||
|
|
||||||
|
### 3. Tablet-Specific Optimizations
|
||||||
|
|
||||||
|
#### Layout Improvements
|
||||||
|
- **Max-width adjustments**: 900px for tablets vs 1200px for desktop
|
||||||
|
- **Adaptive padding**: Increased spacing on larger screens
|
||||||
|
- **Grid layouts**: Improved symmetry in filter buttons and game type selection
|
||||||
|
|
||||||
|
#### Touch Experience
|
||||||
|
- **Larger touch targets**: 56px minimum on tablets
|
||||||
|
- **Hover effects**: Subtle animations and visual feedback
|
||||||
|
- **Improved button spacing**: Better gaps between interactive elements
|
||||||
|
|
||||||
|
### 4. Component-Specific Enhancements
|
||||||
|
|
||||||
|
#### Game List
|
||||||
|
- **Grid-based layout**: Improved symmetry with CSS Grid
|
||||||
|
- **Enhanced cards**: Better shadows, borders, and hover effects
|
||||||
|
- **Symmetric filter buttons**: Equal width distribution
|
||||||
|
- **Improved visual hierarchy**: Game type badges, centered player names, highlighted scores
|
||||||
|
- **Better delete buttons**: Larger touch targets with improved styling
|
||||||
|
|
||||||
|
#### New Game Wizard
|
||||||
|
- **Progress indicator**: Visual step indicator with active state animations
|
||||||
|
- **Consistent spacing**: Uniform gaps throughout the form
|
||||||
|
- **Enhanced input fields**: Better focus states and clear buttons
|
||||||
|
- **Improved navigation**: Larger arrow buttons with better visual feedback
|
||||||
|
- **Game type/Race-to selection**: Grid-based layout for better alignment
|
||||||
|
|
||||||
|
#### Button System
|
||||||
|
- **Unified styling**: Consistent button variants (primary, secondary, danger)
|
||||||
|
- **Micro-interactions**: Hover animations and press states
|
||||||
|
- **Size variants**: Small, medium, large with tablet adjustments
|
||||||
|
- **Focus indicators**: Improved accessibility with visible focus rings
|
||||||
|
|
||||||
|
### 5. Responsive Design Enhancements
|
||||||
|
|
||||||
|
#### Breakpoints
|
||||||
|
- **Mobile**: < 768px
|
||||||
|
- **Tablet**: 768px - 1024px
|
||||||
|
- **Desktop**: > 1024px
|
||||||
|
|
||||||
|
#### Tablet-Specific Features
|
||||||
|
- **Horizontal navigation**: Better layout for tablet landscape mode
|
||||||
|
- **Increased font sizes**: Improved readability on tablet screens
|
||||||
|
- **Enhanced spacing**: More generous padding and margins
|
||||||
|
- **Grid adjustments**: Optimized column layouts for tablet screens
|
||||||
|
|
||||||
|
### 6. Aesthetic Improvements
|
||||||
|
|
||||||
|
#### Visual Polish
|
||||||
|
- **Gradient backgrounds**: Subtle gradients on player input sections
|
||||||
|
- **Enhanced shadows**: Layered shadow system for depth
|
||||||
|
- **Smooth transitions**: 0.15s to 0.3s transition durations
|
||||||
|
- **Border radius consistency**: Unified corner rounding
|
||||||
|
- **Backdrop blur**: Modal overlays with blur effects
|
||||||
|
|
||||||
|
#### Typography
|
||||||
|
- **Font stack**: Inter font with system fallbacks
|
||||||
|
- **Improved line height**: 1.5 for better readability
|
||||||
|
- **Font smoothing**: Antialiased text rendering
|
||||||
|
- **Weight hierarchy**: Consistent font weight usage
|
||||||
|
|
||||||
|
#### Interactive Elements
|
||||||
|
- **Shimmer effects**: Subtle shine animation on buttons
|
||||||
|
- **Transform effects**: Slight lift on hover states
|
||||||
|
- **Color transitions**: Smooth color changes on state updates
|
||||||
|
- **Scale animations**: Micro-interactions for button presses
|
||||||
|
|
||||||
|
### 7. Accessibility Improvements
|
||||||
|
- **Focus management**: Visible focus indicators
|
||||||
|
- **Touch target sizes**: WCAG compliant minimum sizes
|
||||||
|
- **Color contrast**: Improved contrast ratios
|
||||||
|
- **Keyboard navigation**: Enhanced tab order and interactions
|
||||||
|
|
||||||
|
## Testing Recommendations
|
||||||
|
|
||||||
|
### Tablet Testing
|
||||||
|
1. **iPad (10.9")**: Test in both portrait and landscape orientations
|
||||||
|
2. **Android tablets**: Various screen sizes and densities
|
||||||
|
3. **Touch interactions**: Verify all buttons and inputs are easily tappable
|
||||||
|
4. **Scrolling performance**: Ensure smooth scrolling with -webkit-overflow-scrolling
|
||||||
|
|
||||||
|
### Cross-Device Testing
|
||||||
|
1. **Mobile phones**: Verify mobile breakpoint adjustments
|
||||||
|
2. **Desktop browsers**: Ensure desktop experience isn't degraded
|
||||||
|
3. **Different orientations**: Test rotation on tablets
|
||||||
|
|
||||||
|
## Performance Considerations
|
||||||
|
- **CSS Variables**: Minimal performance impact with better maintainability
|
||||||
|
- **Transform animations**: Hardware-accelerated for smooth performance
|
||||||
|
- **Optimized selectors**: Efficient CSS targeting without over-qualification
|
||||||
|
|
||||||
|
## Future Enhancements
|
||||||
|
1. **Dark/Light theme toggle**: Leveraging CSS custom properties
|
||||||
|
2. **Advanced animations**: Page transitions and micro-interactions
|
||||||
|
3. **Gesture support**: Swipe gestures for tablet navigation
|
||||||
|
4. **Enhanced accessibility**: Screen reader optimizations
|
||||||
|
|
||||||
|
## Browser Support
|
||||||
|
- **Modern browsers**: Chrome 88+, Firefox 85+, Safari 14+
|
||||||
|
- **CSS Grid**: Full support across target browsers
|
||||||
|
- **CSS Custom Properties**: Native support, no fallbacks needed
|
||||||
|
|
||||||
|
## Conclusion
|
||||||
|
These improvements create a more polished, professional, and tablet-optimized experience while maintaining consistency across all device sizes. The design system approach ensures easy maintenance and future scalability.
|
||||||
@@ -1,135 +1,277 @@
|
|||||||
/* GameList-specific styles only. Shared utility classes are now in global CSS. */
|
/* GameList-specific styles using design system tokens */
|
||||||
.screen.active {
|
.screen.active {
|
||||||
display: block;
|
display: block;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: translateX(0);
|
transform: translateX(0);
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.screen-content {
|
.screen-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
padding: 20px;
|
padding: var(--space-lg);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
|
|
||||||
.screen-title {
|
.screen-title {
|
||||||
font-size: 24px;
|
font-size: var(--font-size-xxl);
|
||||||
margin-bottom: 20px;
|
margin-bottom: var(--space-lg);
|
||||||
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
.game-list {
|
.game-list {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Filter buttons with improved symmetry */
|
||||||
.filter-buttons {
|
.filter-buttons {
|
||||||
display: flex;
|
display: grid;
|
||||||
gap: 8px;
|
grid-template-columns: repeat(3, 1fr);
|
||||||
margin: 24px 0 16px 0;
|
gap: var(--space-sm);
|
||||||
|
margin: var(--space-lg) 0 var(--space-md) 0;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: var(--shadow-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.filter-button {
|
.filter-button {
|
||||||
flex: 1;
|
background: var(--color-secondary);
|
||||||
background: #333;
|
color: var(--color-text);
|
||||||
color: #fff;
|
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0;
|
font-size: var(--font-size-base);
|
||||||
font-size: 1.2rem;
|
padding: var(--space-md) 0;
|
||||||
padding: 18px 0;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
transition: background 0.2s, color 0.2s;
|
transition: all var(--transition-base);
|
||||||
|
min-height: var(--touch-target-comfortable);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.filter-button:hover {
|
||||||
|
background: var(--color-secondary-hover);
|
||||||
|
transform: translateY(-1px);
|
||||||
|
}
|
||||||
|
|
||||||
.filter-button.active {
|
.filter-button.active {
|
||||||
background: #4CAF50;
|
background: var(--color-primary);
|
||||||
color: #fff;
|
color: white;
|
||||||
|
box-shadow: var(--shadow-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Games container with improved spacing */
|
||||||
.games-container {
|
.games-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 16px;
|
gap: var(--space-md);
|
||||||
margin-top: 24px;
|
margin-top: var(--space-lg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Game item with better symmetry and spacing */
|
||||||
.game-item {
|
.game-item {
|
||||||
display: flex;
|
display: grid;
|
||||||
align-items: center;
|
grid-template-columns: auto 1fr auto;
|
||||||
justify-content: space-between;
|
align-items: center;
|
||||||
padding: 1.5rem;
|
gap: var(--space-md);
|
||||||
border-radius: 0.5rem;
|
padding: var(--space-lg);
|
||||||
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
border-radius: var(--radius-lg);
|
||||||
transition: transform 0.1s ease, background-color 0.2s ease;
|
box-shadow: var(--shadow-sm);
|
||||||
cursor: pointer;
|
transition: all var(--transition-base);
|
||||||
|
cursor: pointer;
|
||||||
|
background: var(--color-surface);
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.game-item:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: var(--shadow-md);
|
||||||
|
border-color: var(--color-primary);
|
||||||
|
}
|
||||||
|
|
||||||
.game-item.active {
|
.game-item.active {
|
||||||
background: #1e4620;
|
background: var(--color-success);
|
||||||
|
border-color: var(--color-success);
|
||||||
}
|
}
|
||||||
|
|
||||||
.game-item.completed {
|
.game-item.completed {
|
||||||
background: #333;
|
background: var(--color-surface);
|
||||||
opacity: 0.85;
|
opacity: 0.8;
|
||||||
|
border-color: var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Game info with improved layout */
|
||||||
.game-info {
|
.game-info {
|
||||||
flex: 1;
|
display: grid;
|
||||||
display: flex;
|
grid-template-columns: auto 1fr auto;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 2rem;
|
gap: var(--space-lg);
|
||||||
|
width: 100%;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.game-type {
|
.game-type {
|
||||||
font-weight: bold;
|
font-weight: 700;
|
||||||
font-size: 1.5rem;
|
font-size: var(--font-size-lg);
|
||||||
min-width: 8rem;
|
color: var(--color-text);
|
||||||
color: #fff;
|
white-space: nowrap;
|
||||||
|
min-width: 120px;
|
||||||
|
text-align: center;
|
||||||
|
background: var(--color-secondary);
|
||||||
|
padding: var(--space-sm) var(--space-md);
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.player-names {
|
.player-names {
|
||||||
color: #fff;
|
color: var(--color-text);
|
||||||
font-size: 1.5rem;
|
font-size: var(--font-size-lg);
|
||||||
min-width: 16rem;
|
font-weight: 500;
|
||||||
|
text-align: center;
|
||||||
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.game-scores {
|
.game-scores {
|
||||||
font-size: 2rem;
|
font-size: var(--font-size-xl);
|
||||||
font-weight: bold;
|
font-weight: 700;
|
||||||
min-width: 6rem;
|
text-align: center;
|
||||||
text-align: center;
|
color: var(--color-primary);
|
||||||
color: #fff;
|
min-width: 120px;
|
||||||
|
background: var(--color-background);
|
||||||
|
padding: var(--space-sm) var(--space-md);
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Delete button with improved touch target */
|
||||||
.delete-button {
|
.delete-button {
|
||||||
width: 3rem;
|
width: var(--touch-target-comfortable);
|
||||||
height: 3rem;
|
height: var(--touch-target-comfortable);
|
||||||
border: none;
|
border: none;
|
||||||
background: #ff4444;
|
background: var(--color-danger);
|
||||||
color: white;
|
color: white;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
font-size: 1.5rem;
|
font-size: var(--font-size-lg);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-left: 1rem;
|
transition: all var(--transition-base);
|
||||||
transition: background-color 0.2s;
|
cursor: pointer;
|
||||||
position: relative;
|
box-shadow: var(--shadow-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.delete-button::before {
|
.delete-button::before {
|
||||||
content: '\1F5D1'; /* 🗑️ */
|
content: '🗑️';
|
||||||
font-size: 1.5rem;
|
font-size: var(--font-size-lg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.delete-button:hover {
|
.delete-button:hover {
|
||||||
background: #cc0000;
|
background: #cc0000;
|
||||||
|
transform: scale(1.05);
|
||||||
|
box-shadow: var(--shadow-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.delete-button:active {
|
.delete-button:active {
|
||||||
transform: scale(0.95);
|
transform: scale(0.95);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Empty state styling */
|
||||||
.empty-state {
|
.empty-state {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 2rem;
|
padding: var(--space-xxl);
|
||||||
color: #666;
|
color: var(--color-text-muted);
|
||||||
font-size: 1.5rem;
|
font-size: var(--font-size-lg);
|
||||||
|
background: var(--color-surface);
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
border: 2px dashed var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Page header */
|
||||||
.page-header {
|
.page-header {
|
||||||
font-size: 2rem;
|
font-size: var(--font-size-xxxl);
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: #fff;
|
color: var(--color-text);
|
||||||
background: #181818;
|
background: var(--color-surface);
|
||||||
padding: 24px 0 16px 0;
|
padding: var(--space-lg) 0 var(--space-md) 0;
|
||||||
margin-bottom: 8px;
|
margin-bottom: var(--space-sm);
|
||||||
text-align: left;
|
text-align: left;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
letter-spacing: 0.5px;
|
letter-spacing: 0.5px;
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tablet-specific improvements */
|
||||||
|
@media (min-width: 768px) and (max-width: 1024px) {
|
||||||
|
.screen-content {
|
||||||
|
padding: var(--space-xl);
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-buttons {
|
||||||
|
gap: var(--space-md);
|
||||||
|
margin: var(--space-xl) 0 var(--space-lg) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-button {
|
||||||
|
font-size: var(--font-size-lg);
|
||||||
|
padding: var(--space-lg) 0;
|
||||||
|
min-height: var(--touch-target-comfortable);
|
||||||
|
}
|
||||||
|
|
||||||
|
.game-item {
|
||||||
|
padding: var(--space-xl);
|
||||||
|
gap: var(--space-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.game-info {
|
||||||
|
gap: var(--space-xl);
|
||||||
|
}
|
||||||
|
|
||||||
|
.game-type {
|
||||||
|
font-size: var(--font-size-xl);
|
||||||
|
min-width: 150px;
|
||||||
|
padding: var(--space-md) var(--space-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.player-names {
|
||||||
|
font-size: var(--font-size-xl);
|
||||||
|
}
|
||||||
|
|
||||||
|
.game-scores {
|
||||||
|
font-size: var(--font-size-xxl);
|
||||||
|
min-width: 150px;
|
||||||
|
padding: var(--space-md) var(--space-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete-button {
|
||||||
|
width: 64px;
|
||||||
|
height: 64px;
|
||||||
|
font-size: var(--font-size-xl);
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-state {
|
||||||
|
font-size: var(--font-size-xl);
|
||||||
|
padding: var(--space-xxl) var(--space-xl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Mobile adjustments */
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.screen-content {
|
||||||
|
padding: var(--space-md);
|
||||||
|
}
|
||||||
|
|
||||||
|
.game-info {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
gap: var(--space-md);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.game-type,
|
||||||
|
.game-scores {
|
||||||
|
min-width: auto;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -8,291 +8,324 @@
|
|||||||
display: none;
|
display: none;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateX(100%);
|
transform: translateX(100%);
|
||||||
transition: transform 0.3s ease, opacity 0.3s ease;
|
transition: transform var(--transition-slow), opacity var(--transition-slow);
|
||||||
}
|
}
|
||||||
.screen-content {
|
.screen-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
padding: 20px;
|
padding: var(--space-lg);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
.screen-title {
|
.screen-title {
|
||||||
font-size: 2rem;
|
font-size: var(--font-size-xxl);
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: #fff;
|
color: var(--color-text);
|
||||||
margin-bottom: 32px;
|
margin-bottom: var(--space-xl);
|
||||||
letter-spacing: 0.5px;
|
letter-spacing: 0.5px;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
.player-inputs {
|
.player-inputs {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 24px;
|
gap: var(--space-lg);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 32px;
|
margin-bottom: var(--space-xl);
|
||||||
}
|
}
|
||||||
.player-input {
|
.player-input {
|
||||||
background: #222;
|
background: var(--color-background);
|
||||||
border-radius: 8px;
|
border-radius: var(--radius-md);
|
||||||
padding: 20px 16px 16px 16px;
|
padding: var(--space-lg);
|
||||||
margin-bottom: 0;
|
border: 2px solid var(--color-border);
|
||||||
box-shadow: 0 1px 4px rgba(0,0,0,0.12);
|
transition: border-color var(--transition-base);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.player-input:focus-within {
|
||||||
|
border-color: var(--color-primary);
|
||||||
|
box-shadow: 0 0 0 3px var(--color-primary-light);
|
||||||
}
|
}
|
||||||
.player-input label {
|
.player-input label {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 12px;
|
margin-bottom: var(--space-md);
|
||||||
color: #ccc;
|
color: var(--color-text);
|
||||||
font-size: 1.2rem;
|
font-size: var(--font-size-lg);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
.name-input-container {
|
.name-input-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 12px;
|
gap: var(--space-md);
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
.name-input {
|
.name-input {
|
||||||
flex: 2;
|
flex: 1;
|
||||||
padding: 14px 12px;
|
padding: var(--space-md);
|
||||||
border: 2px solid #333;
|
border: 2px solid var(--color-border);
|
||||||
background: #2a2a2a;
|
background: var(--color-surface);
|
||||||
color: white;
|
color: var(--color-text);
|
||||||
font-size: 1.1rem;
|
font-size: var(--font-size-base);
|
||||||
min-height: 44px;
|
min-height: var(--touch-target-comfortable);
|
||||||
border-radius: 0 6px 6px 0;
|
border-radius: var(--radius-md);
|
||||||
|
transition: all var(--transition-base);
|
||||||
|
}
|
||||||
|
.name-input:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: var(--color-primary);
|
||||||
|
box-shadow: 0 0 0 3px var(--color-primary-light);
|
||||||
}
|
}
|
||||||
.game-settings {
|
.game-settings {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 32px;
|
margin-bottom: var(--space-xl);
|
||||||
}
|
}
|
||||||
.setting-group {
|
.setting-group {
|
||||||
margin-bottom: 20px;
|
margin-bottom: var(--space-lg);
|
||||||
}
|
}
|
||||||
.setting-group label {
|
.setting-group label {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 10px;
|
margin-bottom: var(--space-md);
|
||||||
color: #ccc;
|
color: var(--color-text);
|
||||||
font-size: 1.1rem;
|
font-size: var(--font-size-lg);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
.setting-group select, .setting-group input {
|
.setting-group select, .setting-group input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 14px 12px;
|
padding: var(--space-md);
|
||||||
border: 2px solid #333;
|
border: 2px solid var(--color-border);
|
||||||
background: #2a2a2a;
|
background: var(--color-surface);
|
||||||
color: white;
|
color: var(--color-text);
|
||||||
font-size: 1.1rem;
|
font-size: var(--font-size-base);
|
||||||
min-height: 44px;
|
min-height: var(--touch-target-comfortable);
|
||||||
border-radius: 6px;
|
border-radius: var(--radius-md);
|
||||||
|
transition: border-color var(--transition-base);
|
||||||
}
|
}
|
||||||
.setting-group input:focus, .setting-group select:focus {
|
.setting-group input:focus, .setting-group select:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: #666;
|
border-color: var(--color-primary);
|
||||||
|
box-shadow: 0 0 0 3px var(--color-primary-light);
|
||||||
}
|
}
|
||||||
.validation-error {
|
.validation-error {
|
||||||
color: #f44336;
|
color: var(--color-danger);
|
||||||
background: #2a2a2a;
|
background: var(--color-surface);
|
||||||
border-radius: 6px;
|
border: 1px solid var(--color-danger);
|
||||||
padding: 12px;
|
border-radius: var(--radius-md);
|
||||||
margin-bottom: 16px;
|
padding: var(--space-md);
|
||||||
font-size: 1.1rem;
|
margin-bottom: var(--space-md);
|
||||||
|
font-size: var(--font-size-base);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
.new-game-form {
|
.new-game-form {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 700px;
|
max-width: 600px;
|
||||||
margin: 32px auto 0 auto;
|
margin: var(--space-xl) auto 0 auto;
|
||||||
background: #181818;
|
background: var(--color-surface);
|
||||||
border-radius: 12px;
|
border-radius: var(--radius-xl);
|
||||||
box-shadow: 0 2px 16px rgba(0,0,0,0.4);
|
box-shadow: var(--shadow-lg);
|
||||||
padding: 32px 24px 24px 24px;
|
padding: var(--space-xl) var(--space-lg) var(--space-lg) var(--space-lg);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0;
|
gap: var(--space-lg);
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
.progress-indicator {
|
.progress-indicator {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: var(--space-md);
|
||||||
margin-bottom: 16px;
|
margin-bottom: var(--space-lg);
|
||||||
}
|
}
|
||||||
.progress-dot {
|
.progress-dot {
|
||||||
width: 14px;
|
width: 16px;
|
||||||
height: 14px;
|
height: 16px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: #444;
|
background: var(--color-border);
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
transition: background 0.2s, opacity 0.2s;
|
transition: all var(--transition-base);
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
.progress-dot.active {
|
.progress-dot.active {
|
||||||
background: #fff;
|
background: var(--color-primary);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
transform: scale(1.2);
|
||||||
|
box-shadow: 0 0 0 4px var(--color-primary-light);
|
||||||
}
|
}
|
||||||
.quick-pick-btn {
|
.quick-pick-btn {
|
||||||
min-width: 80px;
|
min-width: 80px;
|
||||||
min-height: 44px;
|
min-height: var(--touch-target-comfortable);
|
||||||
font-size: 1.1rem;
|
font-size: var(--font-size-base);
|
||||||
border-radius: 8px;
|
border-radius: var(--radius-md);
|
||||||
background: #333;
|
background: var(--color-secondary);
|
||||||
color: #fff;
|
color: var(--color-text);
|
||||||
border: none;
|
border: 1px solid var(--color-border);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-bottom: 8px;
|
padding: var(--space-sm) var(--space-md);
|
||||||
transition: background 0.2s;
|
transition: all var(--transition-base);
|
||||||
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
.quick-pick-btn:active, .quick-pick-btn:focus {
|
.quick-pick-btn:hover, .quick-pick-btn:focus {
|
||||||
background: #555;
|
background: var(--color-secondary-hover);
|
||||||
|
border-color: var(--color-primary);
|
||||||
|
transform: translateY(-1px);
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
.arrow-nav {
|
.arrow-nav {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 48px;
|
margin-top: var(--space-xxl);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
gap: var(--space-lg);
|
||||||
}
|
}
|
||||||
.arrow-btn {
|
.arrow-btn {
|
||||||
font-size: 48px;
|
font-size: 48px;
|
||||||
width: 80px;
|
width: 80px;
|
||||||
height: 80px;
|
height: 80px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: #222;
|
background: var(--color-secondary);
|
||||||
color: #fff;
|
color: var(--color-text);
|
||||||
border: none;
|
border: 2px solid var(--color-border);
|
||||||
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
|
box-shadow: var(--shadow-md);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
transition: background 0.2s, color 0.2s;
|
transition: all var(--transition-base);
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.arrow-btn:active, .arrow-btn:focus {
|
.arrow-btn:hover, .arrow-btn:focus {
|
||||||
background: #444;
|
background: var(--color-secondary-hover);
|
||||||
color: #fff;
|
border-color: var(--color-primary);
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: var(--shadow-lg);
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
.arrow-btn:active {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
.clear-input-btn {
|
.clear-input-btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 8px;
|
right: var(--space-sm);
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 24px;
|
font-size: var(--font-size-xl);
|
||||||
color: #aaa;
|
color: var(--color-text-muted);
|
||||||
padding: 0;
|
padding: var(--space-xs);
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
transition: color var(--transition-base);
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
min-height: var(--touch-target-min);
|
||||||
|
min-width: var(--touch-target-min);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.clear-input-btn:active, .clear-input-btn:focus {
|
.clear-input-btn:hover, .clear-input-btn:focus {
|
||||||
color: #fff;
|
color: var(--color-text);
|
||||||
|
background: var(--color-secondary);
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
.game-type-selection {
|
.game-type-selection {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
gap: 16px;
|
gap: var(--space-md);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 16px 0;
|
margin: var(--space-md) 0;
|
||||||
}
|
}
|
||||||
.game-type-btn {
|
.game-type-btn {
|
||||||
background: #2a2a2a;
|
background: var(--color-background);
|
||||||
border: 2px solid #333;
|
border: 2px solid var(--color-border);
|
||||||
color: #fff;
|
color: var(--color-text);
|
||||||
font-size: 1.4rem;
|
font-size: var(--font-size-lg);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
padding: 24px;
|
padding: var(--space-xl);
|
||||||
border-radius: 8px;
|
border-radius: var(--radius-md);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
transition: background 0.2s, border-color 0.2s;
|
transition: all var(--transition-base);
|
||||||
|
min-height: var(--touch-target-comfortable);
|
||||||
}
|
}
|
||||||
.game-type-btn:hover {
|
.game-type-btn:hover {
|
||||||
background: #333;
|
background: var(--color-surface);
|
||||||
border-color: #555;
|
border-color: var(--color-primary);
|
||||||
|
transform: translateY(-1px);
|
||||||
}
|
}
|
||||||
.game-type-btn.selected {
|
.game-type-btn.selected {
|
||||||
background: #4a4a4a;
|
background: var(--color-primary);
|
||||||
border-color: #777;
|
border-color: var(--color-primary);
|
||||||
|
color: white;
|
||||||
|
box-shadow: var(--shadow-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.race-to-selection {
|
.race-to-selection {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
|
||||||
gap: 12px;
|
gap: var(--space-md);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 16px 0;
|
margin: var(--space-md) 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.race-to-btn {
|
.race-to-btn {
|
||||||
background: #2a2a2a;
|
background: var(--color-background);
|
||||||
border: 2px solid #333;
|
border: 2px solid var(--color-border);
|
||||||
color: #fff;
|
color: var(--color-text);
|
||||||
font-size: 1.3rem;
|
font-size: var(--font-size-lg);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
padding: 16px 8px;
|
padding: var(--space-lg) var(--space-sm);
|
||||||
border-radius: 8px;
|
border-radius: var(--radius-md);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
transition: background 0.2s, border-color 0.2s;
|
transition: all var(--transition-base);
|
||||||
min-height: 70px;
|
min-height: 80px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.race-to-btn:hover {
|
.race-to-btn:hover {
|
||||||
background: #333;
|
background: var(--color-surface);
|
||||||
border-color: #555;
|
border-color: var(--color-primary);
|
||||||
|
transform: translateY(-1px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.race-to-btn.selected {
|
.race-to-btn.selected {
|
||||||
background: #4a4a4a;
|
background: var(--color-primary);
|
||||||
border-color: #777;
|
border-color: var(--color-primary);
|
||||||
|
color: white;
|
||||||
|
box-shadow: var(--shadow-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-race-to {
|
.custom-race-to {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 12px;
|
gap: var(--space-md);
|
||||||
margin-top: 24px;
|
margin-top: var(--space-lg);
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-race-to input {
|
.custom-race-to input {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-race-to .arrow-btn {
|
.custom-race-to .arrow-btn {
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.endlos-container {
|
.endlos-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.endlos-btn {
|
.endlos-btn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.player1-input.player-input {
|
.player1-input.player-input {
|
||||||
background: #43a047;
|
border-color: var(--color-success);
|
||||||
color: #fff;
|
background: linear-gradient(135deg, var(--color-success) 0%, rgba(76, 175, 80, 0.1) 100%);
|
||||||
border: 2px solid #388e3c;
|
|
||||||
box-shadow: 0 2px 12px rgba(67,160,71,0.12);
|
|
||||||
}
|
}
|
||||||
.player2-input.player-input {
|
.player2-input.player-input {
|
||||||
background: #1565c0;
|
border-color: #1565c0;
|
||||||
color: #fff;
|
background: linear-gradient(135deg, #1565c0 0%, rgba(21, 101, 192, 0.1) 100%);
|
||||||
border: 2px solid #0d47a1;
|
|
||||||
box-shadow: 0 2px 12px rgba(21,101,192,0.12);
|
|
||||||
}
|
}
|
||||||
.player3-input.player-input {
|
.player3-input.player-input {
|
||||||
background: #333;
|
border-color: var(--color-secondary);
|
||||||
color: #fff;
|
background: linear-gradient(135deg, var(--color-secondary) 0%, rgba(51, 51, 51, 0.1) 100%);
|
||||||
border: 2px solid #222;
|
|
||||||
box-shadow: 0 2px 12px rgba(51,51,51,0.12);
|
|
||||||
}
|
}
|
||||||
.player1-input.player-input input,
|
.player1-input.player-input input,
|
||||||
.player2-input.player-input input,
|
.player2-input.player-input input,
|
||||||
@@ -301,3 +334,54 @@
|
|||||||
color: #222;
|
color: #222;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
@media (min-width: 768px) and (max-width: 1024px) {
|
||||||
|
.screen-content {
|
||||||
|
padding: var(--space-xl);
|
||||||
|
}
|
||||||
|
.new-game-form {
|
||||||
|
max-width: 700px;
|
||||||
|
padding: var(--space-xxl) var(--space-xl) var(--space-xl) var(--space-xl);
|
||||||
|
}
|
||||||
|
.screen-title {
|
||||||
|
font-size: var(--font-size-xxxl);
|
||||||
|
}
|
||||||
|
.arrow-btn {
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
font-size: 56px;
|
||||||
|
}
|
||||||
|
.game-type-btn,
|
||||||
|
.race-to-btn {
|
||||||
|
padding: var(--space-xl);
|
||||||
|
font-size: var(--font-size-xl);
|
||||||
|
min-height: var(--touch-target-comfortable);
|
||||||
|
}
|
||||||
|
.quick-pick-btn {
|
||||||
|
min-height: var(--touch-target-comfortable);
|
||||||
|
font-size: var(--font-size-lg);
|
||||||
|
padding: var(--space-md) var(--space-lg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.screen-content {
|
||||||
|
padding: var(--space-md);
|
||||||
|
}
|
||||||
|
.new-game-form {
|
||||||
|
margin: var(--space-lg) auto 0 auto;
|
||||||
|
padding: var(--space-lg);
|
||||||
|
}
|
||||||
|
.game-type-selection {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
.race-to-selection {
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
}
|
||||||
|
.arrow-nav {
|
||||||
|
gap: var(--space-md);
|
||||||
|
}
|
||||||
|
.arrow-btn {
|
||||||
|
width: 70px;
|
||||||
|
height: 70px;
|
||||||
|
font-size: 40px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,29 +1,36 @@
|
|||||||
/* Design tokens */
|
/* Use CSS custom properties from global design system */
|
||||||
:root {
|
|
||||||
--color-primary: #ff9800;
|
|
||||||
--color-primary-hover: #ffa726;
|
|
||||||
--color-secondary: #333;
|
|
||||||
--color-secondary-hover: #444;
|
|
||||||
--color-danger: #f44336;
|
|
||||||
--color-danger-hover: #ef5350;
|
|
||||||
--color-white: #fff;
|
|
||||||
--border-radius: 6px;
|
|
||||||
--transition: all 0.2s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: var(--border-radius);
|
border-radius: var(--radius-md);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
transition: var(--transition);
|
transition: var(--transition-base);
|
||||||
touch-action: manipulation;
|
touch-action: manipulation;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 8px;
|
gap: var(--space-sm);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
font-family: inherit;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
|
||||||
|
transform: translateX(-100%);
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button:hover::before {
|
||||||
|
transform: translateX(100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.button:focus-visible {
|
.button:focus-visible {
|
||||||
@@ -31,52 +38,97 @@
|
|||||||
outline-offset: 2px;
|
outline-offset: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button:active {
|
||||||
|
transform: translateY(1px);
|
||||||
|
}
|
||||||
|
|
||||||
/* Variants */
|
/* Variants */
|
||||||
.primary {
|
.primary {
|
||||||
background: var(--color-primary);
|
background: var(--color-primary);
|
||||||
color: var(--color-white);
|
color: white;
|
||||||
|
box-shadow: var(--shadow-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.primary:hover:not(.disabled) {
|
.primary:hover:not(.disabled) {
|
||||||
background: var(--color-primary-hover);
|
background: var(--color-primary-hover);
|
||||||
|
box-shadow: var(--shadow-lg);
|
||||||
|
transform: translateY(-1px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.secondary {
|
.secondary {
|
||||||
background: var(--color-secondary);
|
background: var(--color-secondary);
|
||||||
color: var(--color-white);
|
color: var(--color-text);
|
||||||
|
box-shadow: var(--shadow-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.secondary:hover:not(.disabled) {
|
.secondary:hover:not(.disabled) {
|
||||||
background: var(--color-secondary-hover);
|
background: var(--color-secondary-hover);
|
||||||
|
box-shadow: var(--shadow-md);
|
||||||
|
transform: translateY(-1px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.danger {
|
.danger {
|
||||||
background: var(--color-danger);
|
background: var(--color-danger);
|
||||||
color: var(--color-white);
|
color: white;
|
||||||
|
box-shadow: var(--shadow-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.danger:hover:not(.disabled) {
|
.danger:hover:not(.disabled) {
|
||||||
background: var(--color-danger-hover);
|
background: #ef5350;
|
||||||
|
box-shadow: var(--shadow-lg);
|
||||||
|
transform: translateY(-1px);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sizes */
|
/* Sizes with improved touch targets for tablets */
|
||||||
.small {
|
.small {
|
||||||
padding: 8px 16px;
|
padding: var(--space-sm) var(--space-md);
|
||||||
font-size: 0.875rem;
|
font-size: var(--font-size-sm);
|
||||||
|
min-height: var(--touch-target-min);
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.medium {
|
.medium {
|
||||||
padding: 12px 24px;
|
padding: var(--space-md) var(--space-lg);
|
||||||
font-size: 1rem;
|
font-size: var(--font-size-base);
|
||||||
|
min-height: var(--touch-target-comfortable);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.large {
|
.large {
|
||||||
padding: 18px 32px;
|
padding: var(--space-lg) var(--space-xl);
|
||||||
font-size: 1.25rem;
|
font-size: var(--font-size-lg);
|
||||||
|
min-height: 56px;
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tablet-specific size adjustments */
|
||||||
|
@media (min-width: 768px) and (max-width: 1024px) {
|
||||||
|
.small {
|
||||||
|
min-height: var(--touch-target-comfortable);
|
||||||
|
padding: var(--space-md) var(--space-lg);
|
||||||
|
font-size: var(--font-size-base);
|
||||||
|
}
|
||||||
|
|
||||||
|
.medium {
|
||||||
|
min-height: var(--touch-target-comfortable);
|
||||||
|
padding: var(--space-lg) var(--space-xl);
|
||||||
|
font-size: var(--font-size-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.large {
|
||||||
|
min-height: 64px;
|
||||||
|
padding: var(--space-xl) var(--space-xxl);
|
||||||
|
font-size: var(--font-size-xl);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* States */
|
/* States */
|
||||||
.disabled {
|
.disabled {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
|
transform: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.disabled:hover::before {
|
||||||
|
transform: translateX(-100%);
|
||||||
}
|
}
|
||||||
@@ -1,13 +1,17 @@
|
|||||||
.layout {
|
.layout {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
background-color: #1a1a1a;
|
background-color: var(--color-background);
|
||||||
color: white;
|
color: var(--color-text);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
max-width: 800px;
|
flex: 1;
|
||||||
|
max-width: 1200px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 16px;
|
padding: var(--space-md);
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.screen {
|
.screen {
|
||||||
@@ -17,8 +21,24 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
/* Tablet optimizations */
|
||||||
|
@media (min-width: 768px) and (max-width: 1024px) {
|
||||||
.content {
|
.content {
|
||||||
padding: 12px;
|
padding: var(--space-lg) var(--space-xl);
|
||||||
|
max-width: 900px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Large tablet and small desktop */
|
||||||
|
@media (min-width: 1025px) {
|
||||||
|
.content {
|
||||||
|
padding: var(--space-xl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Mobile adjustments */
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.content {
|
||||||
|
padding: var(--space-sm) var(--space-md);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,91 +11,216 @@
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
-webkit-tap-highlight-color: transparent;
|
-webkit-tap-highlight-color: transparent;
|
||||||
}
|
}
|
||||||
body {
|
|
||||||
font-family: Arial, sans-serif;
|
/* Design system tokens */
|
||||||
background-color: #1a1a1a;
|
:root {
|
||||||
color: white;
|
/* Colors */
|
||||||
min-height: 100vh;
|
--color-primary: #ff9800;
|
||||||
overscroll-behavior: none;
|
--color-primary-hover: #ffa726;
|
||||||
}
|
--color-primary-light: rgba(255, 152, 0, 0.1);
|
||||||
input, select {
|
--color-secondary: #333;
|
||||||
min-height: 44px;
|
--color-secondary-hover: #444;
|
||||||
padding: 12px;
|
--color-background: #1a1a1a;
|
||||||
font-size: 1.2rem;
|
--color-surface: #222;
|
||||||
|
--color-surface-hover: #2a2a2a;
|
||||||
|
--color-text: #fff;
|
||||||
|
--color-text-secondary: #ccc;
|
||||||
|
--color-text-muted: #999;
|
||||||
|
--color-border: #333;
|
||||||
|
--color-success: #4caf50;
|
||||||
|
--color-danger: #f44336;
|
||||||
|
--color-warning: #ff9800;
|
||||||
|
|
||||||
|
/* Spacing system - 8px base */
|
||||||
|
--space-xs: 0.25rem; /* 4px */
|
||||||
|
--space-sm: 0.5rem; /* 8px */
|
||||||
|
--space-md: 1rem; /* 16px */
|
||||||
|
--space-lg: 1.5rem; /* 24px */
|
||||||
|
--space-xl: 2rem; /* 32px */
|
||||||
|
--space-xxl: 3rem; /* 48px */
|
||||||
|
|
||||||
|
/* Typography */
|
||||||
|
--font-size-xs: 0.75rem; /* 12px */
|
||||||
|
--font-size-sm: 0.875rem; /* 14px */
|
||||||
|
--font-size-base: 1rem; /* 16px */
|
||||||
|
--font-size-lg: 1.125rem; /* 18px */
|
||||||
|
--font-size-xl: 1.25rem; /* 20px */
|
||||||
|
--font-size-xxl: 1.5rem; /* 24px */
|
||||||
|
--font-size-xxxl: 2rem; /* 32px */
|
||||||
|
|
||||||
|
/* Touch targets */
|
||||||
|
--touch-target-min: 44px;
|
||||||
|
--touch-target-comfortable: 48px;
|
||||||
|
|
||||||
|
/* Border radius */
|
||||||
|
--radius-sm: 4px;
|
||||||
|
--radius-md: 8px;
|
||||||
|
--radius-lg: 12px;
|
||||||
|
--radius-xl: 16px;
|
||||||
|
|
||||||
|
/* Shadows */
|
||||||
|
--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
|
||||||
|
--shadow-md: 0 4px 6px rgba(0, 0, 0, 0.16);
|
||||||
|
--shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.24);
|
||||||
|
|
||||||
|
/* Transitions */
|
||||||
|
--transition-fast: 0.15s ease;
|
||||||
|
--transition-base: 0.2s ease;
|
||||||
|
--transition-slow: 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Responsive adjustments for fullscreen toggle button */
|
/* Tablet-specific design tokens */
|
||||||
@media screen and (max-width: 480px) {
|
@media (min-width: 768px) and (max-width: 1024px) {
|
||||||
.fullscreenToggle {
|
:root {
|
||||||
bottom: 15px;
|
--touch-target-min: 48px;
|
||||||
right: 15px;
|
--touch-target-comfortable: 56px;
|
||||||
width: 40px;
|
--space-md: 1.25rem; /* 20px */
|
||||||
height: 40px;
|
--space-lg: 2rem; /* 32px */
|
||||||
|
--space-xl: 2.5rem; /* 40px */
|
||||||
|
--font-size-base: 1.125rem; /* 18px */
|
||||||
|
--font-size-lg: 1.25rem; /* 20px */
|
||||||
|
--font-size-xl: 1.5rem; /* 24px */
|
||||||
|
--font-size-xxl: 1.75rem; /* 28px */
|
||||||
|
--font-size-xxxl: 2.25rem; /* 36px */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Utility button for new game (global, not component-specific) */
|
body {
|
||||||
|
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||||
|
background-color: var(--color-background);
|
||||||
|
color: var(--color-text);
|
||||||
|
min-height: 100vh;
|
||||||
|
overscroll-behavior: none;
|
||||||
|
line-height: 1.5;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Improved input styling for better tablet experience */
|
||||||
|
input, select {
|
||||||
|
min-height: var(--touch-target-comfortable);
|
||||||
|
padding: var(--space-md);
|
||||||
|
font-size: var(--font-size-base);
|
||||||
|
border: 2px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background: var(--color-surface);
|
||||||
|
color: var(--color-text);
|
||||||
|
transition: border-color var(--transition-base);
|
||||||
|
}
|
||||||
|
|
||||||
|
input:focus, select:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: var(--color-primary);
|
||||||
|
box-shadow: 0 0 0 3px var(--color-primary-light);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Enhanced button styling */
|
||||||
|
.btn {
|
||||||
|
min-height: var(--touch-target-comfortable);
|
||||||
|
padding: var(--space-md) var(--space-lg);
|
||||||
|
color: var(--color-text);
|
||||||
|
background: var(--color-secondary);
|
||||||
|
border: none;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
font-size: var(--font-size-base);
|
||||||
|
font-weight: 600;
|
||||||
|
cursor: pointer;
|
||||||
|
touch-action: manipulation;
|
||||||
|
transition: all var(--transition-base);
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: var(--space-sm);
|
||||||
|
text-decoration: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn:hover {
|
||||||
|
background: var(--color-secondary-hover);
|
||||||
|
transform: translateY(-1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn:active {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
background: var(--color-primary);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary:hover {
|
||||||
|
background: var(--color-primary-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Utility button for new game with better spacing */
|
||||||
.new-game-button {
|
.new-game-button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #ff9800;
|
background: var(--color-primary);
|
||||||
color: #fff;
|
color: white;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 12px;
|
border-radius: var(--radius-lg);
|
||||||
font-size: 2rem;
|
font-size: var(--font-size-xxl);
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
padding: 28px 0;
|
padding: var(--space-xl) var(--space-lg);
|
||||||
margin-bottom: 24px;
|
margin-bottom: var(--space-lg);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background 0.2s, color 0.2s, box-shadow 0.2s;
|
transition: all var(--transition-base);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
box-shadow: 0 4px 24px rgba(255, 152, 0, 0.25), 0 1.5px 6px rgba(0,0,0,0.12);
|
box-shadow: var(--shadow-lg);
|
||||||
letter-spacing: 0.5px;
|
letter-spacing: 0.5px;
|
||||||
gap: 16px;
|
gap: var(--space-md);
|
||||||
|
min-height: var(--touch-target-comfortable);
|
||||||
}
|
}
|
||||||
|
|
||||||
.new-game-button::before {
|
.new-game-button::before {
|
||||||
content: '+';
|
content: '+';
|
||||||
font-size: 2.2rem;
|
font-size: 2.2rem;
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
margin-right: 12px;
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.new-game-button:hover {
|
.new-game-button:hover {
|
||||||
background: #ffa726;
|
background: var(--color-primary-hover);
|
||||||
box-shadow: 0 6px 32px rgba(255, 152, 0, 0.35), 0 2px 8px rgba(0,0,0,0.16);
|
transform: translateY(-2px);
|
||||||
|
box-shadow: 0 8px 40px rgba(255, 152, 0, 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Shared utility classes for buttons and layout */
|
.new-game-button:active {
|
||||||
.btn {
|
transform: translateY(-1px);
|
||||||
flex: 1;
|
|
||||||
min-width: 100px;
|
|
||||||
padding: 18px;
|
|
||||||
color: white;
|
|
||||||
background: #333;
|
|
||||||
border: none;
|
|
||||||
border-radius: 6px;
|
|
||||||
font-size: 1.2rem;
|
|
||||||
font-weight: 600;
|
|
||||||
cursor: pointer;
|
|
||||||
touch-action: manipulation;
|
|
||||||
transition: background 0.2s, color 0.2s;
|
|
||||||
}
|
|
||||||
.btn:hover {
|
|
||||||
background: #444;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Navigation buttons with improved spacing */
|
||||||
.nav-buttons {
|
.nav-buttons {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 12px;
|
gap: var(--space-md);
|
||||||
margin: 16px 0 0 0;
|
margin: var(--space-lg) 0 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Modal overlay (global, not component-specific) */
|
/* Tablet-specific improvements */
|
||||||
|
@media (min-width: 768px) and (max-width: 1024px) {
|
||||||
|
.nav-buttons {
|
||||||
|
flex-direction: row;
|
||||||
|
gap: var(--space-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
flex: 1;
|
||||||
|
min-height: var(--touch-target-comfortable);
|
||||||
|
}
|
||||||
|
|
||||||
|
.new-game-button {
|
||||||
|
padding: var(--space-xxl) var(--space-xl);
|
||||||
|
font-size: var(--font-size-xxxl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Enhanced modal styling */
|
||||||
.modal {
|
.modal {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -103,12 +228,33 @@ input, select {
|
|||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background-color: rgba(0, 0, 0, 0.8);
|
background-color: rgba(0, 0, 0, 0.8);
|
||||||
|
backdrop-filter: blur(4px);
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
padding: var(--space-lg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal.show {
|
.modal.show {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Responsive fullscreen toggle */
|
||||||
|
@media screen and (max-width: 480px) {
|
||||||
|
.fullscreenToggle {
|
||||||
|
bottom: var(--space-md);
|
||||||
|
right: var(--space-md);
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 768px) and (max-width: 1024px) {
|
||||||
|
.fullscreenToggle {
|
||||||
|
bottom: var(--space-lg);
|
||||||
|
right: var(--space-lg);
|
||||||
|
width: 56px;
|
||||||
|
height: 56px;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user