/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    text-align: center;
    padding: 40px 0;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo i {
    font-size: 3rem;
    color: #ffd700;
}

.logo h1 {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.engine-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 10px;
    border-radius: 999px;
    vertical-align: middle;
}

.settings-engine-panel {
    margin-bottom: 1.5rem;
}

.settings-engine-line {
    margin: 0.5rem 0 0.75rem;
}

.settings-engine-badge.engine-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.app-nav {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 16px 0 4px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.app-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.app-nav-link:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.app-nav-link.is-active {
    background: #fff;
    color: #5a67d8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.app-nav-link.app-nav-button {
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
}

.app-nav-link.app-nav-button:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.app-nav-link.app-nav-button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.65);
    outline-offset: 2px;
}

.app-nav-admin[hidden],
.app-nav-auth[hidden] {
    display: none !important;
}

.auth-nav-line {
    margin: 6px 0 0;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.88);
    text-align: center;
}

.auth-nav-link-inline {
    color: #fff;
    font-weight: 600;
}

.auth-nav-signout {
    background: none;
    border: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.92);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.auth-nav-signout:hover {
    color: #fff;
}

.login-main {
    padding: 32px 24px 48px;
}

.login-container {
    max-width: 440px;
    margin: 0 auto;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
}

.login-card h2 {
    margin: 0 0 12px;
    font-size: 1.35rem;
    color: #333;
}

.login-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding: 4px;
    background: #f0f2ff;
    border-radius: 999px;
}

.login-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #555;
    cursor: pointer;
}

.login-tab.is-active {
    background: #fff;
    color: #5a67d8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.login-label {
    display: block;
    margin: 14px 0 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
}

.login-optional {
    font-weight: 400;
    color: #888;
}

.login-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
}

.login-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.login-submit {
    width: 100%;
    margin-top: 22px;
}

.login-message {
    padding: 10px 14px;
    border-radius: 8px;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.9rem;
}

.login-message.is-error {
    background: #ffebee;
    color: #c62828;
}

.login-signed-in-as {
    color: #555;
    margin-bottom: 20px;
}

.login-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.account-card {
    padding: 12px 0;
}

.account-card h4 {
    margin: 0 0 10px;
    font-size: 1rem;
}

.account-card .server-url-input {
    margin-bottom: 8px;
    width: 100%;
    max-width: 100%;
}

.settings-main {
    padding-top: 24px;
    padding-bottom: 48px;
}

.settings-panel {
    margin-top: 0;
    border-radius: 16px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.settings-panel h2 {
    color: white;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.settings-panel h3 {
    color: white;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.settings-alert {
    max-width: 900px;
    margin: 0 auto 16px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #d4edda;
    color: #155724;
    font-size: 0.95rem;
}

.settings-alert.is-error {
    background: #f8d7da;
    color: #721c24;
}

.cache-empty {
    text-align: center;
    color: #666;
    font-style: italic;
}

.library-save-block {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.25);
}

.library-save-block h4 {
    margin: 0 0 0.35rem;
    color: #333;
    font-size: 1.05rem;
}

.library-save-hint {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: #666;
}

.library-save-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.library-title-input {
    flex: 1 1 200px;
    min-width: 180px;
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
}

.library-save-status {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    color: #155724;
}

.library-save-status.is-error {
    color: #721c24;
}

.library-main {
    padding: 24px 0 48px;
}

.library-panel {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.library-panel h2 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    color: #333;
}

.library-panel-hint {
    margin: 0 0 16px;
    color: #666;
    font-size: 0.9rem;
}

.catalog-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 14px;
}

.catalog-filter-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
}

.catalog-filter-select {
    min-width: 12rem;
    max-width: 100%;
    padding: 8px 12px;
    font-size: 0.9rem;
    border: 1px solid #d0d5e0;
    border-radius: 8px;
    background: #fff;
    color: #333;
}

.catalog-filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

.library-table-wrap {
    overflow-x: auto;
}

.library-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.library-table th,
.library-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.library-table th {
    background: #f8f9ff;
    font-weight: 600;
    color: #444;
}

.library-table code {
    font-size: 0.8rem;
    word-break: break-all;
}

.library-empty {
    text-align: center;
    color: #888;
    font-style: italic;
}

.catalog-actions-col {
    width: auto;
    min-width: 10.5rem;
    white-space: nowrap;
}

.catalog-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.catalog-actions .catalog-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    min-width: 2.15rem;
    padding: 0;
    margin: 0;
    border-radius: 8px;
    flex: 0 0 auto;
    line-height: 1;
    gap: 0;
    box-shadow: none;
    transform: none;
    vertical-align: middle;
}

.catalog-actions a.catalog-icon-btn {
    text-decoration: none;
    box-sizing: border-box;
}

.catalog-actions .catalog-icon-btn i {
    font-size: 0.85rem;
    pointer-events: none;
}

.catalog-actions .catalog-icon-btn:hover,
.catalog-actions .catalog-icon-btn:focus {
    transform: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.backing-track-player-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.backing-track-player-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.backing-track-player-title {
    flex: 1 1 180px;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.backing-track-player-bar audio {
    flex: 2 1 280px;
    min-width: 200px;
    max-width: 100%;
    height: 2.25rem;
}

.backing-track-player-close {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
}

.backing-track-player-close:hover,
.backing-track-player-close:focus {
    background: rgba(255, 255, 255, 0.35);
}

.catalog-actions .catalog-dl-btn {
    border: none;
}

.catalog-backing-wrap {
    flex: 0 0 auto;
    max-width: 2.35rem;
    overflow: visible;
}

.catalog-backing-select {
    width: 2.35rem;
    height: 2.15rem;
    padding: 0 0.15rem;
    font-size: 0;
    color: transparent;
    border: 1px solid #c5cae9;
    border-radius: 8px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath fill='%23667eea' d='M143 352.3L7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.4-24.6 9.4-34 0z'/%3E%3C/svg%3E") center / 0.65rem no-repeat;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.catalog-backing-select:disabled {
    opacity: 0.55;
    cursor: wait;
}

.catalog-backing-select option {
    font-size: 0.875rem;
    color: #333;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
    color: white;
}

/* Main Content */
.main-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 40px;
}

/* Upload Section */
.upload-section {
    padding: 60px 40px;
}

.upload-container {
    max-width: 600px;
    margin: 0 auto;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #764ba2;
    background: linear-gradient(135deg, #f0f2ff 0%, #e8ebff 100%);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #ffd700;
    background: linear-gradient(135deg, #fffbf0 0%, #fff8e1 100%);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 20px;
}

.upload-area h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #333;
}

.upload-area p {
    color: #666;
    margin-bottom: 10px;
}

.file-types {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 30px;
}

.upload-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

/* YouTube Section */
.youtube-section {
    margin-top: 30px;
}

.divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
}

.divider span {
    background: white;
    padding: 0 20px;
    color: #667eea;
    font-weight: 600;
    font-size: 1.1rem;
}

.youtube-input-container {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border: 2px solid #ff6b6b;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
}

.youtube-input-container:hover {
    border-color: #ff5252;
    background: linear-gradient(135deg, #ffe8e8 0%, #ffd8d8 100%);
    transform: translateY(-2px);
}

.youtube-icon {
    font-size: 3rem;
    color: #ff0000;
    margin-bottom: 20px;
}

.youtube-input-container h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: #333;
}

.youtube-input-container p {
    color: #666;
    margin-bottom: 25px;
}

.youtube-input-group {
    display: flex;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto 20px;
}

.youtube-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #ddd;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.youtube-input:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.youtube-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.youtube-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(255, 107, 107, 0.4);
}

.youtube-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.youtube-note {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
}

.youtube-auth-row {
    max-width: 520px;
    margin: 0 auto 18px;
    text-align: left;
}

.youtube-auth-label {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
}

.youtube-auth-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.youtube-browser-select {
    flex: 1 1 200px;
    min-width: 180px;
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 0.95rem;
    background: white;
    color: #333;
    cursor: pointer;
}

.youtube-browser-select:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.12);
}

.youtube-cookies-file-label {
    flex: 0 1 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 2px dashed #ffb3b3;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
    background: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.youtube-cookies-file-label:hover {
    border-color: #ff6b6b;
    background: white;
}

.youtube-cookies-file-label input[type="file"] {
    position: absolute;
    width: 0.01px;
    height: 0.01px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.youtube-auth-hint {
    margin: 12px 0 0;
    font-size: 0.8rem;
    color: #777;
    line-height: 1.45;
    font-style: normal;
}

.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;
}

/* Audio Player Section */
.audio-player-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.audio-player-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.audio-player-container audio {
    width: 100%;
    height: 50px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
}

.chord-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border-radius: 12px;
    border: 2px solid #e8ebff;
}

/* VTT and Next Chord Container */
.vtt-next-chord-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin: 20px 0 0;
}

.player-synced-lyrics {
    margin: 16px 0 0;
    width: 100%;
    box-sizing: border-box;
}

.player-synced-lyrics.lyrics-display-sync {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border: 2px solid #e8ebff;
}

/* VTT Subtitle Display */
.vtt-subtitle-container {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 15px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vtt-subtitle-display {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.vtt-subtitle-display .chord-name {
    color: #ffd700;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 10px;
}

.vtt-subtitle-display .confidence {
    color: #87ceeb;
    font-size: 0.9rem;
    opacity: 0.8;
}

.current-chord, .next-chord {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.current-chord {
    border-left: 4px solid #667eea;
}

.next-chord {
    border-left: 4px solid #ff6b6b;
}

.chord-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.chord-name {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.chord-confidence {
    display: block;
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

.current-chord.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.05);
}

.current-chord.active .chord-name,
.current-chord.active .chord-label,
.current-chord.active .chord-confidence {
    color: white;
}

/* Chord Information Styles */
.chord-information {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.chord-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    background-color:#333;
    padding: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-label {
    font-size: 0.9rem;
    color: #a0a0a0;
    font-weight: 500;
}

.detail-value {
    font-size: 1rem;
    color: #ffffff;
    font-weight: 600;
}

.key-information h4 {
    color: #4ade80;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.key-information h5 {
    color: #a0a0a0;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.chord-categories {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chord-category {
    border-left: 3px solid rgba(74, 222, 128, 0.3);
    padding-left: 1rem;
}

.chord-category h5 {
    color: #4ade80;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.chord-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.chord-item {
    padding: 0.25rem 0.75rem;
    background: rgba(74, 222, 128, 0.2);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 20px;
    font-size: 0.9rem;
    color: #4ade80;
    font-weight: 500;
}

.chord-item.primary {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.chord-item.secondary {
    background: rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.3);
    color: #c084fc;
}

/* Loading Section */
.loading-section {
    padding: 80px 40px;
    text-align: center;
}

.loading-spinner {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 30px;
}

.loading-section h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #333;
}

.loading-section p {
    color: #666;
    margin-bottom: 40px;
}

.progress-bar {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Results Section */
.results-section {
    padding: 40px;
}

.results-container > div {
    margin-bottom: 40px;
}

.results-container h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-container h3 i {
    color: #667eea;
}

/* File Info */
.file-info {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    padding: 30px;
    border-radius: 15px;
    border-left: 5px solid #667eea;
}

.file-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.chord-progression-panel {
    margin-top: 20px;
    padding: 18px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.25);
}

.chord-progression-panel-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
}

.chord-progression-main {
    flex: 1 1 220px;
    min-width: 0;
}

.chord-progression-key-ref {
    flex: 1 1 200px;
    min-width: 0;
    border-left: 3px solid rgba(74, 222, 128, 0.45);
    padding-left: 16px;
}

.chord-progression-key-ref-title {
    margin: 0 0 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #16a34a;
}

.chord-progression-key-list .chord-item {
    font-size: 0.85rem;
}

.chord-progression-panel-title {
    margin: 0 0 10px;
    font-size: 1rem;
    color: #4c51bf;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chord-progression-roman {
    margin: 0;
    font-family: ui-serif, Georgia, 'Times New Roman', serif;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1.5;
    color: #2d3748;
    word-break: break-word;
}

.chord-progression-full-hint {
    font-size: 0.85rem;
    opacity: 0.85;
    margin: 10px 0 0;
    line-height: 1.4;
}

.file-details p {
    margin: 0;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Quick Action Button */
.quick-action {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #e8ebff;
    text-align: center;
}

.quick-action .btn {
    font-size: 1rem;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.quick-action .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

/* Suggestion songs (analyze page) */
.suggestion-songs-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.suggestion-songs-section h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    color: #333;
}

.suggestion-songs-hint {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 16px 0;
}

.suggestion-songs-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.suggestion-songs-badge {
    flex: 0 0 100%;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #4c51bf;
    margin-bottom: 2px;
}

.suggestion-songs-badge-soft {
    color: #718096;
    font-weight: 500;
}

.suggestion-songs-item--same-artist {
    border-color: rgba(76, 81, 191, 0.45);
    background: rgba(102, 126, 234, 0.06);
}

.suggestion-songs-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 16px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.suggestion-songs-item:hover {
    background: rgba(102, 126, 234, 0.06);
    border-color: rgba(102, 126, 234, 0.35);
}

.suggestion-songs-item-title {
    font-weight: 600;
    color: #333;
    flex: 1 1 200px;
}

.suggestion-songs-item-meta {
    font-size: 0.85rem;
    color: #666;
}

.suggestion-songs-empty {
    color: #888;
    font-size: 0.92rem;
    margin: 0;
    padding: 8px 0;
}

/* Chord Progression */
.chord-progression {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.chord-description {
    color: #666;
    font-style: italic;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.chord-timeline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.chord-timeline.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0;
    margin: 0;
}

.progression-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 0;
    border-bottom: 2px solid #f0f0f0;
    transition: all 0.3s ease;
}

.progression-header:hover {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    padding: 10px;
    margin: -10px;
}

.progression-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.toggle-icon {
    color: #667eea;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.toggle-icon.rotated {
    transform: rotate(180deg);
}

.chord-timeline .chord-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.chord-timeline .chord-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.chord-timeline .chord-item.chord-active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.5);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        transform: translateY(-3px) scale(1);
    }
    50% {
        transform: translateY(-3px) scale(1.05);
    }
    100% {
        transform: translateY(-3px) scale(1);
    }
}

.chord-display .chord-active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    transform: scale(1.05);
    transition: all 0.3s ease;
}



/* Chord Statistics */
.chord-stats {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.stat-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #e8ebff;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* LRCLIB lyrics */
.lyrics-display {
    margin-top: 16px;
    text-align: left;
    max-height: 280px;
    overflow-y: auto;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.lyrics-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
}

.lyrics-line {
    font-size: 1.05rem;
    font-weight: 600;
    color: #667eea;
    min-height: 1.4em;
    margin-bottom: 10px;
}

.lyrics-display.lyrics-display-sync {
    text-align: center;
    padding: 20px 16px;
}

.lyrics-display.lyrics-display-sync .lyrics-line {
    font-size: 1.35rem;
    line-height: 1.45;
    margin-bottom: 0;
    color: #4c51bf;
}

.lyrics-plain {
    font-family: inherit;
    font-size: 0.92rem;
    line-height: 1.5;
    white-space: pre-wrap;
    margin: 0;
    color: #333;
}

.backing-track-hint.is-error {
    color: #b91c1c;
}

/* Backing track export */
.backing-track-actions {
    margin: 0 auto 28px;
    max-width: 720px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.25);
}

.backing-track-label {
    display: block;
    font-weight: 600;
    color: #444;
    margin-bottom: 12px;
}

.backing-track-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.backing-preset-select {
    flex: 1 1 220px;
    max-width: 360px;
    padding: 12px 16px;
    border-radius: 50px;
    border: 2px solid #667eea;
    font-size: 0.95rem;
    background: white;
    color: #333;
}

.backing-track-hint {
    margin-top: 12px;
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

.guitar-tab-output {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    max-height: 280px;
    overflow: auto;
    font-size: 0.72rem;
    line-height: 1.35;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    white-space: pre;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.guitar-tab-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.guitar-tab-modal[hidden] {
    display: none;
}

.guitar-tab-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.guitar-tab-modal-panel {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: min(85vh, 640px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.guitar-tab-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.guitar-tab-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.guitar-tab-modal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 20px 0;
}

.guitar-tab-modal-body {
    margin: 12px 20px 20px;
    flex: 1;
    min-height: 120px;
    max-height: none;
}

.tablature-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    background: #eee;
    color: #555;
}

.tablature-badge-ready {
    background: #e8f5e9;
    color: #2e7d32;
}

.backing-track-hint a {
    color: #667eea;
    font-weight: 600;
}

.backing-track-unavailable .backing-preset-select {
    opacity: 0.6;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
}

/* Error Section */
.error-section {
    padding: 80px 40px;
    text-align: center;
}

.error-container {
    max-width: 500px;
    margin: 0 auto;
}

.error-icon {
    font-size: 4rem;
    color: #ff6b6b;
    margin-bottom: 30px;
}

.error-section h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #333;
}

.error-section p {
    color: #666;
    margin-bottom: 30px;
}

.author-credit {
    margin-top: 10px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
}

.author-credit .author-link,
.author-credit .author-email a,
.footer-link {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.author-credit .author-link:hover,
.author-credit .author-email a:hover,
.footer-link:hover {
    opacity: 0.85;
}

.author-email {
    font-weight: 400;
    opacity: 0.9;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0 40px;
    color: white;
    opacity: 0.9;
    margin-top: auto;
}

.footer-author {
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.footer-copy {
    font-size: 0.85rem;
    opacity: 0.75;
}

/* Cache Management Section */
.cache-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 0;
    margin-top: 40px;
}

.cache-section h3 {
    color: white;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.server-settings {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    text-align: left;
}

.server-settings h4 {
    color: white;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.server-settings-hint {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.server-settings-hint code {
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.server-settings-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.server-url-input {
    flex: 1 1 220px;
    min-width: 200px;
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    font-size: 0.95rem;
}

.server-url-status {
    margin-top: 10px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

.ngrok-help {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 24px;
    text-align: left;
    color: rgba(255, 255, 255, 0.95);
}

.ngrok-help summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ngrok-help summary::-webkit-details-marker {
    display: none;
}

.ngrok-help-steps {
    margin: 12px 0 8px;
    padding-left: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.55;
}

.ngrok-help-steps a {
    color: #ffd700;
}

.ngrok-help-steps code {
    background: rgba(0, 0, 0, 0.25);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.cache-section p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.cache-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.cache-info {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.cache-info h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.cache-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-item {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 15px;
    border-radius: 10px;
    color: white;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 5px;
    opacity: 0.9;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
}

.cached-files {
    max-height: 400px;
    overflow-y: auto;
}

.cached-file-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.cached-file-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.cached-file-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.cached-file-url {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
    word-break: break-all;
}

.cached-file-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #888;
}

.cached-file-size {
    background: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
}

.cached-file-date {
    color: #666;
}

.cached-file-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 30px 0;
    }
    
    .logo {
        font-size: 2.5rem;
    }
    
    .upload-section {
        padding: 40px 20px;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .results-section {
        padding: 20px;
    }
    
    .visualizations {
        grid-template-columns: 1fr;
    }
    
    .file-details {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .youtube-input-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .youtube-btn {
        width: 100%;
        justify-content: center;
    }

    .youtube-auth-fields {
        flex-direction: column;
        align-items: stretch;
    }

    .youtube-browser-select,
    .youtube-cookies-file-label {
        width: 100%;
        justify-content: center;
    }

    .chord-display {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .cache-controls {
        flex-direction: column;
    }
    
    .cache-stats {
        grid-template-columns: 1fr;
    }
    
    .cached-file-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .chord-timeline {
        justify-content: center;
    }
}

/* Guitar / chromatic tuner */
.tuner-panel.tuner-in-tune {
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.55);
}

.tuner-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 28px;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.tuner-mode-fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.tuner-legend {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #666;
    margin-bottom: 6px;
}

.tuner-mode-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 16px;
    font-size: 0.9rem;
    cursor: pointer;
}

.tuner-a4-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #555;
}

.tuner-a4-input {
    width: 4.5rem;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.9rem;
}

.tuner-strings {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0.35rem;
}

.tuner-string-btn {
    min-width: 2.75rem;
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: #fafafa;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.tuner-string-btn:hover {
    border-color: #667eea;
}

.tuner-string-btn.is-active,
.tuner-string-btn.is-auto {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.tuner-strings-hint {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 1.25rem;
}

.tuner-readout {
    text-align: center;
    margin-bottom: 1rem;
}

.tuner-note {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    color: #333;
    margin: 0;
}

.tuner-in-tune .tuner-note {
    color: #2e7d32;
}

.tuner-hz {
    font-size: 1.1rem;
    color: #666;
    margin: 0.25rem 0 0;
}

.tuner-target {
    font-size: 0.85rem;
    color: #888;
    margin: 0.35rem 0 0;
    min-height: 1.2em;
}

.tuner-meter {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 420px;
    margin: 0 auto 0.5rem;
}

.tuner-meter-label {
    font-size: 1.25rem;
    color: #888;
    width: 1.25rem;
    text-align: center;
}

.tuner-meter-track {
    position: relative;
    flex: 1;
    height: 12px;
    background: linear-gradient(90deg, #ffcdd2 0%, #e8f5e9 45%, #e8f5e9 55%, #ffcdd2 100%);
    border-radius: 999px;
    overflow: visible;
}

.tuner-meter-center {
    position: absolute;
    left: 50%;
    top: -4px;
    bottom: -4px;
    width: 3px;
    margin-left: -1.5px;
    background: #333;
    border-radius: 2px;
    z-index: 1;
}

.tuner-meter-needle {
    position: absolute;
    top: -8px;
    width: 4px;
    height: 28px;
    margin-left: -2px;
    background: #667eea;
    border-radius: 2px;
    left: 50%;
    transform: translateX(-50%);
    transition: left 0.05s linear;
    z-index: 2;
}

.tuner-in-tune .tuner-meter-needle {
    background: #43a047;
}

.tuner-cents {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
    min-height: 1.4em;
    margin-bottom: 1rem;
}

.tuner-status {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.tuner-status-error {
    color: #c62828;
}

.tuner-start-btn {
    display: block;
    margin: 0 auto;
}

.tuner-start-btn.btn-danger {
    background: #c62828;
    border-color: #b71c1c;
}
