817 lines
13 KiB
CSS
817 lines
13 KiB
CSS
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
:root {
|
|
--bg: #1a1a2e;
|
|
--bg-light: #16213e;
|
|
--bg-card: #0f3460;
|
|
--accent: #e94560;
|
|
--accent-hover: #ff6b81;
|
|
--accent-secondary: #ff9a56;
|
|
--text: #eaeaea;
|
|
--text-dim: #a0a0b0;
|
|
--correct: #2ecc71;
|
|
--incorrect: #e74c3c;
|
|
--border: rgba(255,255,255,0.08);
|
|
--border-radius: 12px;
|
|
--safe-top: env(safe-area-inset-top);
|
|
--safe-bottom: env(safe-area-inset-bottom);
|
|
}
|
|
|
|
@media (prefers-color-scheme: light) {
|
|
:root {
|
|
--bg: #f5f5f5;
|
|
--bg-light: #ffffff;
|
|
--bg-card: #ffffff;
|
|
--accent: #e94560;
|
|
--accent-hover: #d63851;
|
|
--accent-secondary: #f09040;
|
|
--text: #1a1a2e;
|
|
--text-dim: #555566;
|
|
--correct: #27ae60;
|
|
--incorrect: #c0392b;
|
|
--border: #d0d0d0;
|
|
}
|
|
}
|
|
|
|
html[data-theme="dark"] {
|
|
--bg: #1a1a2e;
|
|
--bg-light: #16213e;
|
|
--bg-card: #0f3460;
|
|
--accent: #e94560;
|
|
--accent-hover: #ff6b81;
|
|
--accent-secondary: #ff9a56;
|
|
--text: #eaeaea;
|
|
--text-dim: #a0a0b0;
|
|
--correct: #2ecc71;
|
|
--incorrect: #e74c3c;
|
|
--border: rgba(255,255,255,0.08);
|
|
}
|
|
|
|
html[data-theme="light"] {
|
|
--bg: #f5f5f5;
|
|
--bg-light: #ffffff;
|
|
--bg-card: #ffffff;
|
|
--accent: #e94560;
|
|
--accent-hover: #d63851;
|
|
--accent-secondary: #f09040;
|
|
--text: #1a1a2e;
|
|
--text-dim: #555566;
|
|
--correct: #27ae60;
|
|
--incorrect: #c0392b;
|
|
--border: #d0d0d0;
|
|
}
|
|
|
|
@font-face {
|
|
font-family: 'Ponomar';
|
|
src: url('Ponomar-Regular.woff') format('woff');
|
|
font-weight: normal;
|
|
font-style: normal;
|
|
font-display: swap;
|
|
}
|
|
|
|
html, body {
|
|
height: 100%;
|
|
overflow: hidden;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
-webkit-tap-highlight-color: transparent;
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
}
|
|
|
|
#app {
|
|
height: 100%;
|
|
padding-top: var(--safe-top);
|
|
padding-bottom: var(--safe-bottom);
|
|
}
|
|
|
|
.screen {
|
|
display: none;
|
|
height: 100%;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.screen.active {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* MENU */
|
|
.menu-container {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 16px;
|
|
padding: 32px;
|
|
}
|
|
|
|
.logo {
|
|
font-size: 3.5rem;
|
|
font-weight: 800;
|
|
background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
background-clip: text;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.subtitle {
|
|
color: var(--text-dim);
|
|
font-size: 1.1rem;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.ticker-wrap {
|
|
overflow: hidden;
|
|
width: 100%;
|
|
margin-bottom: 32px;
|
|
}
|
|
|
|
#btn-start {
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.lang-select {
|
|
background: var(--bg-light);
|
|
color: var(--text);
|
|
border: 2px solid var(--border);
|
|
border-radius: 8px;
|
|
padding: 10px 16px;
|
|
font-size: 0.95rem;
|
|
cursor: pointer;
|
|
width: 100%;
|
|
max-width: 320px;
|
|
margin: 0 auto;
|
|
display: block;
|
|
}
|
|
|
|
.menu-controls {
|
|
display: flex;
|
|
gap: 8px;
|
|
width: 100%;
|
|
max-width: 320px;
|
|
}
|
|
|
|
.menu-controls .lang-select {
|
|
flex: 1;
|
|
width: auto;
|
|
max-width: none;
|
|
margin: 0;
|
|
}
|
|
|
|
.theme-toggle {
|
|
width: 44px;
|
|
height: 44px;
|
|
flex-shrink: 0;
|
|
background: var(--bg-light);
|
|
color: var(--text);
|
|
border: 2px solid var(--border);
|
|
border-radius: 8px;
|
|
font-size: 1.3rem;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.ticker {
|
|
display: inline-block;
|
|
white-space: nowrap;
|
|
color: var(--text-dim);
|
|
font-size: 1.3rem;
|
|
font-family: monospace;
|
|
animation: ticker-scroll 40s linear infinite;
|
|
}
|
|
|
|
@keyframes ticker-scroll {
|
|
0% { transform: translateX(0); }
|
|
100% { transform: translateX(-50%); }
|
|
}
|
|
|
|
/* BUTTONS */
|
|
.btn {
|
|
display: block;
|
|
width: 100%;
|
|
padding: 14px 24px;
|
|
border: none;
|
|
border-radius: var(--border-radius);
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: transform 0.1s, opacity 0.1s;
|
|
text-align: center;
|
|
}
|
|
|
|
.btn:active {
|
|
transform: scale(0.97);
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: var(--accent);
|
|
color: white;
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: var(--bg-card);
|
|
color: var(--text);
|
|
border: 1px solid var(--border);
|
|
}
|
|
|
|
.btn-large {
|
|
padding: 18px 32px;
|
|
font-size: 1.2rem;
|
|
max-width: 320px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
/* SETUP */
|
|
.setup-container {
|
|
padding: 24px;
|
|
max-width: 480px;
|
|
margin: 0 auto;
|
|
width: 100%;
|
|
padding-bottom: 100px;
|
|
}
|
|
|
|
.setup-container h2 {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.setup-section {
|
|
margin-bottom: 28px;
|
|
}
|
|
|
|
.setup-section h3 {
|
|
color: var(--text-dim);
|
|
font-size: 0.9rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.system-group {
|
|
margin-bottom: 28px;
|
|
}
|
|
|
|
.system-group h3 {
|
|
color: var(--text-dim);
|
|
font-size: 0.9rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.option-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 8px;
|
|
}
|
|
|
|
.option-btn {
|
|
padding: 14px 12px;
|
|
background: var(--bg-light);
|
|
border: 2px solid var(--border);
|
|
border-radius: 8px;
|
|
color: var(--text);
|
|
font-size: 0.95rem;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
text-align: center;
|
|
transition: border-color 0.15s, background 0.15s;
|
|
}
|
|
|
|
.option-btn.selected {
|
|
border-color: var(--accent);
|
|
background: rgba(233, 69, 96, 0.15);
|
|
}
|
|
|
|
.option-btn:active {
|
|
transform: scale(0.97);
|
|
}
|
|
|
|
#btn-play {
|
|
margin-top: 16px;
|
|
max-width: 320px;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
|
|
#btn-options-back {
|
|
margin-top: 12px;
|
|
}
|
|
|
|
#btn-setup-back, #btn-config-back {
|
|
margin-top: 12px;
|
|
max-width: 320px;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
|
|
/* GAME */
|
|
.game-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 16px 20px;
|
|
background: var(--bg-light);
|
|
border-bottom: 1px solid var(--border);
|
|
flex-shrink: 0;
|
|
position: relative;
|
|
}
|
|
|
|
.score-display {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
font-size: 1.2rem;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.score-correct {
|
|
color: var(--correct);
|
|
margin-left: 16px;
|
|
}
|
|
.score-incorrect { color: var(--incorrect); }
|
|
|
|
.system-range-label {
|
|
text-align: center;
|
|
font-size: 1rem;
|
|
color: var(--text-dim);
|
|
padding: 8px 20px 0;
|
|
}
|
|
|
|
.timer-area {
|
|
position: absolute;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
visibility: hidden;
|
|
}
|
|
|
|
.timer-area.visible {
|
|
visibility: visible;
|
|
}
|
|
|
|
.timer-label {
|
|
color: var(--text-dim);
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.timer-display {
|
|
font-size: 1.3rem;
|
|
font-weight: 700;
|
|
color: var(--accent);
|
|
min-width: 60px;
|
|
text-align: right;
|
|
}
|
|
|
|
.header-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.btn-stop {
|
|
width: 36px;
|
|
height: 36px;
|
|
border: none;
|
|
border-radius: 50%;
|
|
background: var(--bg-card);
|
|
color: var(--text-dim);
|
|
font-size: 1.4rem;
|
|
line-height: 1;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: background 0.15s;
|
|
}
|
|
|
|
.btn-stop:active {
|
|
background: var(--accent);
|
|
color: white;
|
|
}
|
|
|
|
.timer-display.urgent {
|
|
color: var(--incorrect);
|
|
animation: pulse 0.5s infinite;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0.5; }
|
|
}
|
|
|
|
.game-body {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 24px 20px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.number-display {
|
|
font-size: 2.8rem;
|
|
font-weight: 800;
|
|
text-align: center;
|
|
padding: 32px 20px;
|
|
margin: 16px 0;
|
|
background: var(--bg-card);
|
|
border-radius: var(--border-radius);
|
|
width: 100%;
|
|
max-width: 400px;
|
|
word-break: break-all;
|
|
line-height: 1.3;
|
|
min-height: 100px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.number-display.small-text {
|
|
font-size: 1.6rem;
|
|
}
|
|
|
|
.slavonic-font {
|
|
font-family: 'Ponomar', serif;
|
|
}
|
|
|
|
.number-display.slavonic-font {
|
|
font-size: 3.2rem;
|
|
}
|
|
|
|
.number-display.mono {
|
|
font-family: monospace;
|
|
}
|
|
|
|
.ticker .slavonic-font {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.result-system.slavonic-font {
|
|
font-size: 1.6rem;
|
|
}
|
|
|
|
.answer-feedback {
|
|
min-height: 40px;
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
text-align: center;
|
|
margin: 8px 0;
|
|
transition: opacity 0.2s;
|
|
}
|
|
|
|
.answer-feedback.correct {
|
|
color: var(--correct);
|
|
}
|
|
|
|
.answer-feedback.incorrect {
|
|
color: var(--incorrect);
|
|
}
|
|
|
|
/* CHOICES */
|
|
.choice-area {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
width: 100%;
|
|
max-width: 400px;
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.choice-btn {
|
|
padding: 18px 20px;
|
|
background: var(--bg-card);
|
|
border: 2px solid var(--border);
|
|
border-radius: var(--border-radius);
|
|
color: var(--text);
|
|
font-size: 1.3rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: border-color 0.15s, background 0.15s;
|
|
}
|
|
|
|
.choice-btn:active {
|
|
transform: scale(0.98);
|
|
}
|
|
|
|
.choice-btn.correct-choice {
|
|
border-color: var(--correct);
|
|
background: rgba(46, 204, 113, 0.15);
|
|
}
|
|
|
|
.choice-btn.incorrect-choice {
|
|
border-color: var(--incorrect);
|
|
background: rgba(231, 76, 60, 0.15);
|
|
}
|
|
|
|
.choice-btn:disabled {
|
|
opacity: 0.7;
|
|
cursor: default;
|
|
}
|
|
|
|
/* NUMPAD */
|
|
.numpad-area {
|
|
width: 100%;
|
|
max-width: 360px;
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.numpad-input {
|
|
font-size: 2rem;
|
|
font-weight: 700;
|
|
text-align: center;
|
|
padding: 16px;
|
|
background: var(--bg-card);
|
|
border-radius: 8px;
|
|
height: 60px;
|
|
margin-bottom: 16px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
letter-spacing: 2px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.numpad {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 8px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.numpad-key {
|
|
padding: 18px;
|
|
background: var(--bg-light);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
color: var(--text);
|
|
font-size: 1.4rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: background 0.1s;
|
|
}
|
|
|
|
.numpad-key:active {
|
|
background: var(--bg-card);
|
|
}
|
|
|
|
.numpad-action {
|
|
background: var(--bg-card);
|
|
color: var(--text-dim);
|
|
}
|
|
|
|
#btn-submit-answer {
|
|
max-width: 320px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.hidden {
|
|
display: none !important;
|
|
}
|
|
|
|
#btn-next {
|
|
margin-top: 16px;
|
|
max-width: 320px;
|
|
}
|
|
|
|
/* RESULTS */
|
|
.results-container {
|
|
padding: 24px;
|
|
max-width: 480px;
|
|
margin: 0 auto;
|
|
width: 100%;
|
|
padding-bottom: 100px;
|
|
position: relative;
|
|
}
|
|
|
|
.results-container h2 {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.results-summary {
|
|
font-size: 1.2rem;
|
|
margin-bottom: 24px;
|
|
padding: 20px;
|
|
background: var(--bg-card);
|
|
border-radius: var(--border-radius);
|
|
text-align: center;
|
|
}
|
|
|
|
.results-summary .big-number {
|
|
font-size: 2.5rem;
|
|
font-weight: 800;
|
|
color: var(--accent);
|
|
}
|
|
|
|
.results-congrats {
|
|
text-align: center;
|
|
font-size: 1.5rem;
|
|
font-weight: 700;
|
|
color: var(--correct);
|
|
}
|
|
|
|
.results-congrats:not(:empty) {
|
|
margin-bottom: 16px;
|
|
min-height: 48px;
|
|
}
|
|
|
|
.results-mistakes-label {
|
|
color: var(--text-dim);
|
|
font-size: 0.9rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.results-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.result-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 14px 16px;
|
|
background: var(--bg-light);
|
|
border-radius: 8px;
|
|
border: 1px solid var(--border);
|
|
border-left: 4px solid var(--incorrect);
|
|
}
|
|
|
|
.result-system {
|
|
font-size: 1.4rem;
|
|
font-weight: 700;
|
|
flex-shrink: 0;
|
|
min-width: 80px;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.result-arrow {
|
|
color: var(--text-dim);
|
|
flex-shrink: 0;
|
|
font-size: 1.4rem;
|
|
}
|
|
|
|
.result-decimal {
|
|
font-size: 1.2rem;
|
|
font-weight: 600;
|
|
color: var(--correct);
|
|
}
|
|
|
|
.result-wrong {
|
|
font-size: 1.2rem;
|
|
font-weight: 600;
|
|
color: var(--incorrect);
|
|
margin-left: auto;
|
|
}
|
|
|
|
.no-mistakes {
|
|
text-align: center;
|
|
color: var(--correct);
|
|
font-size: 1.2rem;
|
|
padding: 32px;
|
|
}
|
|
|
|
#btn-play-again {
|
|
max-width: 320px;
|
|
margin: 0 auto 12px;
|
|
}
|
|
|
|
#btn-results-menu {
|
|
max-width: 320px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.setup-message {
|
|
display: none;
|
|
background: var(--accent);
|
|
color: white;
|
|
padding: 14px 20px;
|
|
border-radius: var(--border-radius);
|
|
font-weight: 600;
|
|
text-align: center;
|
|
margin-bottom: 16px;
|
|
animation: fadeIn 0.2s;
|
|
}
|
|
|
|
.setup-message.visible {
|
|
display: block;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(-8px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
.confetti-burst {
|
|
position: absolute;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.answer-confetti-burst {
|
|
position: fixed;
|
|
pointer-events: none;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.confetti-particle {
|
|
position: absolute;
|
|
font-size: 1.4rem;
|
|
animation: confetti-fly 0.8s ease-out forwards;
|
|
}
|
|
|
|
@keyframes confetti-fly {
|
|
0% {
|
|
transform: translate(0, 0) rotate(0deg);
|
|
opacity: 1;
|
|
}
|
|
100% {
|
|
transform: translate(var(--dx), var(--dy)) rotate(var(--rot));
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
/* THEORY */
|
|
.theory-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
padding: 24px;
|
|
padding-top: calc(24px + var(--safe-top));
|
|
padding-bottom: calc(24px + var(--safe-bottom));
|
|
max-width: 600px;
|
|
margin: 0 auto;
|
|
width: 100%;
|
|
}
|
|
|
|
.theory-container h2 {
|
|
flex-shrink: 0;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.theory-scroll {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding-right: 8px;
|
|
}
|
|
|
|
.theory-scroll h3 {
|
|
color: var(--accent);
|
|
font-size: 1rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1px;
|
|
margin: 24px 0 8px;
|
|
}
|
|
|
|
.theory-scroll h3:first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.theory-scroll p {
|
|
line-height: 1.6;
|
|
margin-bottom: 12px;
|
|
color: var(--text);
|
|
}
|
|
|
|
.theory-scroll .theory-example {
|
|
background: var(--bg-card);
|
|
border-radius: 8px;
|
|
padding: 16px;
|
|
font-family: monospace;
|
|
font-size: 1.1rem;
|
|
margin: 12px 0;
|
|
text-align: center;
|
|
letter-spacing: 2px;
|
|
}
|
|
|
|
.theory-scroll .slavonic-font {
|
|
font-family: 'Ponomar', serif;
|
|
font-size: 1.4rem;
|
|
}
|
|
|
|
#btn-theory-content-back {
|
|
flex-shrink: 0;
|
|
margin-top: 16px;
|
|
max-width: 320px;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|