body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #000;
    color: #fff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    text-align: center;
}

.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.control-button {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.control-button:hover {
    background-color: #444;
    transform: translateY(-2px);
}

.control-button:active {
    transform: translateY(0);
}

#videoElement {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 20px;
}

/* Стили для отладочной панели */
.debug-panel {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    text-align: left;
    font-family: monospace;
    max-height: 400px;
    overflow-y: auto;
}

.debug-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #333;
}

.debug-row:last-child {
    border-bottom: none;
}

.note-thresholds {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #444;
}

.note-thresholds h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #888;
}

#threshold-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 5px;
    font-size: 12px;
}

.threshold-item {
    padding: 5px;
    background-color: #222;
    border-radius: 4px;
    margin: 2px 0;
}

.threshold-item.triggered {
    background-color: #2a4;
    transition: background-color 0.3s;
}

#current-acceleration, #current-note {
    font-weight: bold;
    color: #4af;
}

input[type="checkbox"] {
    margin-right: 8px;
}

.trigger-count {
    background-color: #333;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    font-size: 10px;
    color: #4af;
}

.calibration-panel {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
}

.calibration-panel h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 20px;
    color: #fff;
    text-align: center;
}

.calibration-instruction {
    margin-bottom: 20px;
    line-height: 1.5;
    color: #ddd;
}

.calibration-status {
    background-color: #222;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-family: monospace;
}

.calibration-status div {
    margin-bottom: 8px;
}

.calibration-status div:last-child {
    margin-bottom: 0;
}

#max-acceleration {
    color: #4af;
    font-weight: bold;
}

#calibration-countdown {
    color: #fa4;
    font-weight: bold;
}

#start-playing-button {
    background-color: #2a4;
    margin-top: 10px;
}

#start-playing-button:hover {
    background-color: #3b5;
}

#tap-count {
    color: #fa4;
    font-weight: bold;
}

#avg-acceleration {
    color: #4af;
    font-weight: bold;
}

#tap-values {
    background-color: #111;
    border-radius: 4px;
    padding: 8px;
    margin-top: 10px;
    font-size: 12px;
}

#tap-values div {
    margin-bottom: 4px;
    padding: 3px;
    background-color: #222;
    border-radius: 3px;
}

.calibration-note {
    margin-bottom: 15px;
    color: #fa4;
    font-size: 14px;
    background-color: rgba(255, 170, 68, 0.1);
    padding: 8px;
    border-radius: 4px;
    border-left: 3px solid #fa4;
}

.note-table {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
    font-family: monospace;
}

.note-table-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    background-color: #333;
    padding: 10px;
    font-weight: bold;
}

.note-table-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    background-color: #222;
    padding: 8px 10px;
    border-bottom: 1px solid #333;
}

.note-table-row:nth-child(even) {
    background-color: #1a1a1a;
}

.status-complete {
    color: #4af;
}

.status-current {
    color: #fa4;
    font-weight: bold;
}

.status-pending {
    color: #666;
}

#current-note-status {
    font-weight: bold;
    color: #fa4;
}

/* Стили для лог-контейнера */
.log-container {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    text-align: left;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.log-header h3 {
    margin: 0;
    color: #ddd;
}

.log-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.small-button {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.small-button:hover {
    background-color: #444;
}

.log-textarea {
    width: 100%;
    height: 200px;
    background-color: #111;
    color: #4af;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 10px;
    font-family: monospace;
    font-size: 12px;
    resize: vertical;
}
