304 lines
7.2 KiB
CSS
304 lines
7.2 KiB
CSS
/* Global resets and utility styles */
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
-webkit-touch-callout: none;
|
|
-webkit-user-select: none;
|
|
-khtml-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
/* Design system tokens */
|
|
:root {
|
|
/* Colors */
|
|
--color-primary: #ff9800;
|
|
--color-primary-hover: #ffa726;
|
|
--color-primary-light: rgba(255, 152, 0, 0.1);
|
|
--color-secondary: #333;
|
|
--color-secondary-hover: #444;
|
|
--color-background: #1a1a1a;
|
|
--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;
|
|
}
|
|
|
|
/* Tablet-specific design tokens */
|
|
@media (min-width: 768px) and (max-width: 1024px) {
|
|
:root {
|
|
--touch-target-min: 48px;
|
|
--touch-target-comfortable: 56px;
|
|
--space-md: 1.25rem; /* 20px */
|
|
--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 */
|
|
}
|
|
}
|
|
|
|
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--secondary {
|
|
background: #333;
|
|
color: #fff;
|
|
border: 2px solid #555;
|
|
}
|
|
|
|
.btn--secondary:hover {
|
|
background: #444;
|
|
border-color: #666;
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: var(--color-primary-hover);
|
|
}
|
|
|
|
/* Utility button for new game with better spacing */
|
|
.new-game-button {
|
|
width: 100%;
|
|
background: var(--color-primary);
|
|
color: white;
|
|
border: none;
|
|
border-radius: var(--radius-lg);
|
|
font-size: var(--font-size-xxl);
|
|
font-weight: 700;
|
|
padding: var(--space-xl) var(--space-lg);
|
|
margin-bottom: var(--space-lg);
|
|
cursor: pointer;
|
|
transition: all var(--transition-base);
|
|
text-align: center;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-shadow: var(--shadow-lg);
|
|
letter-spacing: 0.5px;
|
|
gap: var(--space-md);
|
|
min-height: var(--touch-target-comfortable);
|
|
}
|
|
|
|
.new-game-button::before {
|
|
content: '+';
|
|
font-size: 2.2rem;
|
|
font-weight: 900;
|
|
display: inline-block;
|
|
line-height: 1;
|
|
}
|
|
|
|
.new-game-button:hover {
|
|
background: var(--color-primary-hover);
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 8px 40px rgba(255, 152, 0, 0.4);
|
|
}
|
|
|
|
.new-game-button:active {
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
/* Navigation buttons with improved spacing */
|
|
.nav-buttons {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-md);
|
|
margin: var(--space-lg) 0 0 0;
|
|
}
|
|
|
|
/* 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 {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
background-color: rgba(0, 0, 0, 0.8);
|
|
backdrop-filter: blur(4px);
|
|
z-index: 9999;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
padding: var(--space-lg);
|
|
}
|
|
|
|
.modal.show {
|
|
display: flex;
|
|
}
|
|
|
|
/* Screen reader only content */
|
|
.sr-only {
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
padding: 0;
|
|
margin: -1px;
|
|
overflow: hidden;
|
|
clip: rect(0, 0, 0, 0);
|
|
white-space: nowrap;
|
|
border: 0;
|
|
}
|
|
|
|
|
|
/* Skip link for keyboard navigation */
|
|
.skip-link {
|
|
position: absolute;
|
|
top: -40px;
|
|
left: 6px;
|
|
background: var(--color-primary);
|
|
color: white;
|
|
padding: 8px;
|
|
text-decoration: none;
|
|
border-radius: 4px;
|
|
z-index: 10000;
|
|
}
|
|
|
|
.skip-link:focus {
|
|
top: 6px;
|
|
}
|
|
|
|
/* 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;
|
|
}
|
|
} |