/* ═══════════════════════════════════════════════
   NOTA OKUYUCU — Sheet Music Reader Page
   ═══════════════════════════════════════════════ */

.nota-reader-page {
    max-width: 900px;
    margin: 0 auto;
}

.nota-section-title {
    font-size: var(--text-base);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-primary);
}

/* ─── API Key Banner ─── */
.nota-apikey-banner {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    border: 1px solid var(--accent);
    border-radius: var(--radius-lg);
    background: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.05);
}

.nota-apikey-banner__icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.nota-apikey-banner__content h3 {
    font-size: var(--text-sm);
    font-weight: 600;
    margin-bottom: var(--space-1);
    color: var(--text-primary);
}

.nota-apikey-banner__content p {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
    line-height: 1.5;
}

.nota-apikey-banner__content a {
    color: var(--accent);
    text-decoration: underline;
}

.nota-apikey-input-row {
    display: flex;
    gap: var(--space-2);
}

.nota-apikey-input {
    flex: 1;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-family: monospace;
}

.nota-apikey-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.15);
}

/* ─── Upload Section ─── */
.nota-upload-section {
    padding: var(--space-6);
    margin-bottom: var(--space-6);
}

.nota-upload-header {
    margin-bottom: var(--space-4);
}

/* ─── Drop Zone ─── */
.nota-dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: var(--space-4);
}

.nota-dropzone:hover,
.nota-dropzone--active {
    border-color: var(--accent);
    background: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.04);
}

.nota-dropzone__content {
    text-align: center;
    padding: var(--space-8);
}

.nota-dropzone__icon {
    opacity: 0.4;
    margin-bottom: var(--space-3);
}

.nota-dropzone__text {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-1);
}

.nota-dropzone__hint {
    color: var(--text-muted);
    font-size: var(--text-xs);
}

/* ─── Image Preview ─── */
.nota-preview {
    position: relative;
    margin-bottom: var(--space-4);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}

.nota-preview img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    display: block;
}

.nota-preview__remove {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.nota-preview__remove:hover {
    background: rgba(220, 50, 50, 0.8);
}

/* ─── Selectors ─── */
.nota-selectors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.nota-selector-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.nota-selector-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nota-select {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: var(--text-sm);
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.nota-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* ─── Process Button ─── */
.nota-process-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.nota-process-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─── Progress ─── */
.nota-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-4);
    margin-top: var(--space-3);
}

.nota-progress__spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.nota-progress__text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* ─── Results ─── */
.nota-results {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.nota-result-header {
    padding: var(--space-5);
}

.nota-result-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.nota-result-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
}

.nota-result-composer {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-top: var(--space-1);
}

.nota-result-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.nota-result-accuracy {
    font-size: var(--text-xs);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
}

/* ─── Staff Notation Results ─── */
.nota-result-staff {
    padding: var(--space-5);
}

.nota-result-staff__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
    gap: var(--space-3);
}

.nota-playback-controls {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.nota-tempo-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.nota-tempo-range {
    width: 80px;
    height: 4px;
    accent-color: var(--accent);
}

.nota-staff-container {
    overflow-x: auto;
    padding: var(--space-2) 0;
    -webkit-overflow-scrolling: touch;
}

.nota-staff-svg {
    min-height: 120px;
}

.nota-staff-note {
    transition: all 0.15s ease;
}

.nota-note--active ellipse,
.nota-staff-note.nota-note--active {
    fill: var(--accent) !important;
    filter: drop-shadow(0 0 6px var(--accent));
}

/* ─── Notes Grid ─── */
.nota-result-notes {
    padding: var(--space-5);
}

.nota-notes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.nota-note-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 48px;
    position: relative;
}

.nota-note-chip:hover {
    border-color: var(--accent);
    background: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.06);
}

.nota-note-chip--playing {
    border-color: var(--accent);
    background: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.12);
    transform: scale(1.05);
}

.nota-note-chip--rest {
    opacity: 0.5;
    cursor: default;
}

.nota-note-chip__duration {
    font-size: 16px;
    line-height: 1;
}

.nota-note-chip__name {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-weight: 500;
}

.nota-note-chip__original {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 10px;
    cursor: help;
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
    .nota-selectors {
        grid-template-columns: 1fr;
    }

    .nota-result-staff__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .nota-playback-controls {
        width: 100%;
        justify-content: space-between;
    }
}