mirror of
https://github.com/9x/sheetmusictrainer.git
synced 2026-09-02 09:34:33 +02:00
583 lines
11 KiB
CSS
583 lines
11 KiB
CSS
/* App.css */
|
|
.app-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 100vh;
|
|
background-color: var(--color-bg);
|
|
}
|
|
|
|
.app-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: var(--spacing-md) var(--spacing-xl);
|
|
background-color: var(--color-surface);
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
|
|
.logo {
|
|
font-weight: 700;
|
|
font-size: var(--font-size-lg);
|
|
color: var(--color-primary);
|
|
}
|
|
|
|
.streak-badge {
|
|
background-color: var(--color-primary-dark);
|
|
color: white;
|
|
padding: var(--spacing-xs) var(--spacing-md);
|
|
border-radius: var(--radius-lg);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.main-stage {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: var(--spacing-md);
|
|
gap: var(--spacing-xl);
|
|
}
|
|
|
|
.card {
|
|
background-color: var(--color-surface);
|
|
border-radius: var(--radius-md);
|
|
box-shadow: var(--shadow-lg);
|
|
padding: var(--spacing-xl);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
width: 100%;
|
|
max-width: 850px;
|
|
transition: transform 0.2s ease;
|
|
}
|
|
|
|
.sheet-music-container {
|
|
display: flex;
|
|
justify-content: center;
|
|
width: 100%;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.feedback-area {
|
|
height: 40px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-top: var(--spacing-md);
|
|
}
|
|
|
|
.success-message {
|
|
color: var(--color-success);
|
|
font-size: var(--font-size-xl);
|
|
font-weight: 800;
|
|
}
|
|
|
|
.instruction-text {
|
|
color: var(--color-text-muted);
|
|
}
|
|
|
|
.error-message {
|
|
color: var(--color-error);
|
|
margin-top: var(--spacing-md);
|
|
}
|
|
|
|
.hint-card {
|
|
margin-top: var(--spacing-md);
|
|
padding: var(--spacing-md);
|
|
background-color: var(--color-bg);
|
|
border-radius: var(--radius-sm);
|
|
width: 100%;
|
|
text-align: center;
|
|
}
|
|
|
|
.hint-note {
|
|
font-size: var(--font-size-lg);
|
|
font-weight: bold;
|
|
margin-bottom: var(--spacing-xs);
|
|
}
|
|
|
|
.hint-positions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: var(--spacing-xs);
|
|
justify-content: center;
|
|
}
|
|
|
|
.hint-tag {
|
|
background-color: var(--color-surface);
|
|
border: 1px solid var(--color-text-muted);
|
|
padding: 2px 8px;
|
|
border-radius: 4px;
|
|
font-size: 0.8rem;
|
|
color: var(--color-text-main);
|
|
}
|
|
|
|
/* Force button colors to ensure dark mode visibility */
|
|
button {
|
|
color: var(--color-text-main);
|
|
}
|
|
|
|
/* Pitch Monitor Bar */
|
|
.pitch-monitor-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--spacing-xl);
|
|
}
|
|
|
|
.mic-button {
|
|
background-color: var(--color-surface);
|
|
border: 2px solid var(--color-text-muted);
|
|
color: var(--color-text-muted);
|
|
width: 64px;
|
|
height: 64px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.mic-button:hover {
|
|
background-color: var(--color-bg);
|
|
color: var(--color-text-main);
|
|
}
|
|
|
|
.mic-button.listening {
|
|
border-color: var(--color-primary);
|
|
color: var(--color-primary);
|
|
box-shadow: 0 0 15px rgba(var(--hue-primary), 0.3);
|
|
}
|
|
|
|
.pitch-readout {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-width: 100px;
|
|
}
|
|
|
|
.detected-note {
|
|
font-size: 3rem;
|
|
font-weight: 800;
|
|
line-height: 1;
|
|
color: var(--color-text-muted);
|
|
}
|
|
|
|
.detected-note.match {
|
|
color: var(--color-success);
|
|
}
|
|
|
|
.detected-hz {
|
|
font-size: 0.9rem;
|
|
color: var(--color-text-muted);
|
|
}
|
|
|
|
/* Controls Footer */
|
|
.settings-footer {
|
|
background-color: var(--color-surface);
|
|
padding: var(--spacing-md);
|
|
display: flex;
|
|
justify-content: center;
|
|
border-top: 1px solid rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.controls-container {
|
|
display: flex;
|
|
gap: var(--spacing-xl);
|
|
align-items: flex-end;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
}
|
|
|
|
.control-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--spacing-xs);
|
|
}
|
|
|
|
.control-label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--spacing-xs);
|
|
font-size: 0.8rem;
|
|
color: var(--color-text-muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
.control-select {
|
|
padding: var(--spacing-sm);
|
|
border-radius: var(--radius-sm);
|
|
border: 1px solid #ddd;
|
|
font-family: inherit;
|
|
font-size: 0.9rem;
|
|
background-color: var(--color-bg);
|
|
}
|
|
|
|
.control-button {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
color: var(--color-text-muted);
|
|
padding: var(--spacing-sm);
|
|
transition: color 0.2s;
|
|
}
|
|
|
|
.control-button.active {
|
|
color: var(--color-primary);
|
|
}
|
|
|
|
/* Animations */
|
|
@keyframes pop {
|
|
0% {
|
|
transform: scale(0.8);
|
|
opacity: 0;
|
|
}
|
|
|
|
50% {
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
100% {
|
|
transform: scale(1);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
.animate-pop {
|
|
animation: pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
|
|
}
|
|
|
|
/* Switch Button for Metronome */
|
|
.switch-button {
|
|
width: 44px;
|
|
height: 24px;
|
|
border-radius: 99px;
|
|
background-color: #ddd;
|
|
position: relative;
|
|
cursor: pointer;
|
|
transition: background-color 0.2s;
|
|
padding: 0;
|
|
border: none;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.switch-button.active {
|
|
background-color: var(--color-primary);
|
|
}
|
|
|
|
.switch-thumb {
|
|
width: 18px;
|
|
height: 18px;
|
|
background-color: white;
|
|
border-radius: 50%;
|
|
position: absolute;
|
|
left: 3px;
|
|
transition: transform 0.2s;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
.switch-button.active .switch-thumb {
|
|
transform: translateX(17px);
|
|
}
|
|
|
|
/* Hint Button styling - similar to skip button but distinct */
|
|
.hint-button {
|
|
background-color: transparent;
|
|
border: 2px solid var(--color-primary);
|
|
color: var(--color-primary);
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 30px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
transition: all 0.2s;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.hint-button:hover {
|
|
background-color: rgba(var(--hue-primary), 0.1);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.zen-button {
|
|
background-color: transparent;
|
|
border: 2px solid var(--color-text-muted);
|
|
color: var(--color-text-muted);
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 30px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
transition: all 0.2s;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.zen-button:hover {
|
|
border-color: var(--color-text-main);
|
|
color: var(--color-text-main);
|
|
background-color: rgba(128, 128, 128, 0.1);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.exit-zen-button {
|
|
position: fixed;
|
|
bottom: 20px;
|
|
right: 20px;
|
|
padding: 10px 20px;
|
|
background: var(--color-surface);
|
|
border: 1px solid var(--color-text-muted);
|
|
border-radius: 20px;
|
|
color: var(--color-text-muted);
|
|
cursor: pointer;
|
|
opacity: 0.5;
|
|
transition: all 0.2s;
|
|
z-index: 100;
|
|
font-weight: 600;
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
.exit-zen-button:hover {
|
|
opacity: 1;
|
|
color: var(--color-text-main);
|
|
border-color: var(--color-text-main);
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
/* Help Popup */
|
|
.help-popup-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 200;
|
|
backdrop-filter: blur(4px);
|
|
animation: fadeIn 0.2s ease-out;
|
|
}
|
|
|
|
.help-popup {
|
|
background-color: var(--color-surface);
|
|
padding: var(--spacing-lg);
|
|
border-radius: var(--radius-lg);
|
|
box-shadow: var(--shadow-lg);
|
|
max-width: 400px;
|
|
width: 90%;
|
|
position: relative;
|
|
border: 1px solid rgba(128, 128, 128, 0.1);
|
|
}
|
|
|
|
.help-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: var(--spacing-sm);
|
|
padding-bottom: var(--spacing-sm);
|
|
border-bottom: 1px solid rgba(128, 128, 128, 0.1);
|
|
}
|
|
|
|
.help-item:last-child {
|
|
border-bottom: none;
|
|
margin-bottom: 0;
|
|
padding-bottom: 0;
|
|
}
|
|
|
|
.shortcut-key {
|
|
background-color: var(--color-bg);
|
|
border: 1px solid rgba(128, 128, 128, 0.2);
|
|
padding: 2px 8px;
|
|
border-radius: 4px;
|
|
font-family: monospace;
|
|
font-weight: bold;
|
|
color: var(--color-text-main);
|
|
}
|
|
|
|
.help-close {
|
|
position: absolute;
|
|
top: 10px;
|
|
right: 10px;
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
color: var(--color-text-muted);
|
|
}
|
|
|
|
.help-close:hover {
|
|
color: var(--color-text-main);
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
/* Header Adjustments */
|
|
.app-header-left {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.app-subtitle {
|
|
font-size: 0.8rem;
|
|
font-weight: 500;
|
|
color: var(--color-text-muted);
|
|
margin-top: -4px;
|
|
}
|
|
|
|
.app-subtitle a {
|
|
color: var(--color-primary);
|
|
text-decoration: none;
|
|
transition: color 0.2s;
|
|
}
|
|
|
|
.app-subtitle a:hover {
|
|
color: var(--color-primary-dark);
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.header-controls {
|
|
display: flex;
|
|
gap: var(--spacing-sm);
|
|
align-items: center;
|
|
}
|
|
|
|
.icon-button {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
color: var(--color-text-muted);
|
|
padding: 8px;
|
|
border-radius: 50%;
|
|
transition: all 0.2s;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.icon-button:hover {
|
|
background-color: rgba(128, 128, 128, 0.1);
|
|
color: var(--color-text-main);
|
|
}
|
|
|
|
.game-mode-toggle {
|
|
display: flex;
|
|
background-color: var(--color-bg);
|
|
padding: 2px;
|
|
border-radius: 20px;
|
|
border: 1px solid rgba(128, 128, 128, 0.1);
|
|
}
|
|
|
|
.toggle-option {
|
|
padding: 4px 12px;
|
|
border-radius: 16px;
|
|
font-size: 0.85rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
background: transparent;
|
|
border: none;
|
|
color: var(--color-text-muted);
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.toggle-option.active {
|
|
background-color: var(--color-surface);
|
|
color: var(--color-primary);
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
|
|
/* Mobile Landscape Optimization */
|
|
@media (max-height: 500px) and (orientation: landscape) {
|
|
.app-header {
|
|
padding: 4px var(--spacing-md);
|
|
}
|
|
|
|
.main-stage {
|
|
padding: 4px;
|
|
flex-direction: row;
|
|
/* Side-by-side if screen is wide enough */
|
|
align-items: stretch;
|
|
gap: var(--spacing-md);
|
|
}
|
|
|
|
.card.sheet-music-card {
|
|
max-width: 95vw;
|
|
flex-direction: row;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
align-items: center;
|
|
padding: var(--spacing-sm);
|
|
}
|
|
|
|
/* Specific adjustment for sheet music container */
|
|
.sheet-music-container {
|
|
width: auto;
|
|
flex: 1;
|
|
min-width: 250px;
|
|
max-width: 50%;
|
|
display: flex;
|
|
justify-content: center;
|
|
}
|
|
|
|
/* Hint card should be on the side */
|
|
.hint-card {
|
|
margin-top: 0;
|
|
margin-left: var(--spacing-md);
|
|
flex: 1;
|
|
min-width: 250px;
|
|
max-width: 45%;
|
|
padding: var(--spacing-xs);
|
|
}
|
|
|
|
.hint-note {
|
|
font-size: 1.2rem;
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
/* Make sure hint isn't huge and scrolls if needed */
|
|
.fretboard-container {
|
|
max-height: 150px;
|
|
overflow-y: hidden;
|
|
display: flex;
|
|
justify-content: center;
|
|
}
|
|
|
|
.fretboard-container svg {
|
|
height: 100%;
|
|
width: auto;
|
|
max-width: 100%;
|
|
}
|
|
|
|
/* Move feedback and actions */
|
|
.feedback-area {
|
|
width: 100%;
|
|
height: 30px;
|
|
order: 3;
|
|
/* Force to bottom */
|
|
margin-top: 5px;
|
|
}
|
|
|
|
.action-row {
|
|
margin-top: 5px !important;
|
|
order: 4;
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
/* Ensure FretboardHint container handles flexible width generic */
|
|
.fretboard-container {
|
|
width: 100%;
|
|
} |