* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(145deg, #1a3a2e 0%, #0d2818 40%, #142b21 100%);
    color: #e8f5e9;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
}

body.lyrics-overlay-open {
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 100%;
    text-align: center;
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

main {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    min-height: 0;
}

/* Log Container - full history below playlist */
.log-container {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

.log-header {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.log-toggle-btn {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
}

.log-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.log-label {
    font-weight: 600;
    font-size: 0.85rem;
    opacity: 0.7;
    flex: 1;
    text-align: left;
}

.select-all-btn {
    padding: 5px 12px;
    background: rgba(74, 222, 128, 0.2);
    color: #86efac;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
}

.select-all-btn:hover {
    background: rgba(74, 222, 128, 0.3);
}

.copy-all-btn {
    padding: 5px 12px;
    background: rgba(74, 222, 128, 0.2);
    color: #86efac;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
}

.copy-all-btn:hover {
    background: rgba(74, 222, 128, 0.3);
}

.clear-log-btn {
    padding: 5px 12px;
    background: rgba(239, 68, 68, 0.6);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
}

.clear-log-btn:hover {
    background: rgba(239, 68, 68, 0.8);
}

.log-content {
    padding: 10px;
    text-align: left;
    font-size: 0.8rem;
    line-height: 1.4;
    font-family: 'SF Mono', 'Consolas', monospace;
    max-height: 300px;
    overflow-y: auto;
}

.log-line {
    padding: 2px 0;
    word-wrap: break-word;
}

.log-user {
    color: #86efac;
}

.log-claude {
    color: rgba(232, 245, 233, 0.85);
}

.log-error {
    color: #fca5a5;
}

.message-item {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.message-user {
    background: rgba(74, 222, 128, 0.15);
    border-left: 3px solid rgba(74, 222, 128, 0.6);
    margin-left: 0;
}

.message-claude {
    background: rgba(20, 184, 166, 0.15);
    border-left: 3px solid rgba(20, 184, 166, 0.5);
    margin-left: 0;
}

.message-error {
    background: rgba(239, 68, 68, 0.15);
    border-left: 3px solid rgba(239, 68, 68, 0.6);
    margin-left: 0;
    color: #fca5a5;
}

.message-label {
    font-weight: 600;
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 4px;
}

.message-text {
    font-size: 0.85rem;
    opacity: 0.95;
}

header {
    margin-bottom: 8px;
    padding: 12px 12px 0;
}

.site-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.header-title-group {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}

.site-name {
    color: rgba(167, 243, 208, 0.78);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.site-name:hover {
    color: #d1fae5;
}

.header-title-group h1 {
    margin: 0;
}

.version-label {
    font-size: 0.8rem;
    color: rgba(232, 245, 233, 0.9);
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Page Navigation Tabs - shared across all pages */
.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-tab {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.nav-tab.active {
    background: rgba(74, 222, 128, 0.24);
    border-color: rgba(74, 222, 128, 0.5);
    color: #a7f3d0;
}

.nav-tab.active:hover {
    background: rgba(74, 222, 128, 0.3);
}

/* Legacy nav-link (kept for compatibility) */
.nav-link {
    color: #86efac;
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.nav-link:hover {
    background: rgba(74, 222, 128, 0.25);
    border-color: rgba(74, 222, 128, 0.5);
    color: #a7f3d0;
}

.settings-btn {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #86efac;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-btn:hover {
    background: rgba(74, 222, 128, 0.25);
    border-color: rgba(74, 222, 128, 0.5);
}

.settings-panel {
    margin: 15px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 222, 128, 0.25);
    text-align: left;
}

.settings-panel h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.setting-item {
    margin-bottom: 20px;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1rem;
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.setting-item label:not([for]) {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.setting-item label[for] {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.model-selector {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border-radius: 8px;
    border: 2px solid rgba(74, 222, 128, 0.3);
    background: rgba(0, 0, 0, 0.3);
    color: #e8f5e9;
    cursor: pointer;
}

.model-selector option {
    background: #1a3a2e;
    color: #e8f5e9;
}

.model-selector:focus {
    outline: none;
    border-color: rgba(74, 222, 128, 0.6);
    background: rgba(0, 0, 0, 0.4);
}

.setting-description {
    margin-top: 5px;
    margin-left: 30px;
    font-size: 0.85rem;
    opacity: 0.8;
    font-style: italic;
}

.close-settings-btn {
    padding: 10px 20px;
    background: rgba(239, 68, 68, 0.7);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 10px;
}

.close-settings-btn:hover {
    background: rgba(239, 68, 68, 0.9);
}

h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

.status {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.3;
    color: #a7f3d0;
}

.voice-controls-row {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 10px;
    min-height: 120px;

    /* Keep primary controls reachable while scrolling */
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.22);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
}

.voice-controls-row .listen-button {
    flex: 1;
    height: 120px;
}

.voice-controls-row .stop-button,
.voice-controls-row .play-button {
    height: 120px;
}

.submit-button-large {
    flex: 1;
    height: 120px;
    border-radius: 12px;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
    border: none;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(20, 184, 166, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.submit-button-large:hover {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
}

.submit-button-large:active {
    transform: scale(0.98);
}

.listen-button {
    flex: 1;
    max-width: 100%;
    height: 100px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: #0d2818;
    border: none;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(74, 222, 128, 0.3);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.listen-button:hover {
    box-shadow: 0 15px 40px rgba(74, 222, 128, 0.4);
}

.listen-button:active {
    transform: scale(0.95);
}

.listen-button.listening {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #1a1a1a;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 10px 30px rgba(245, 158, 11, 0.5);
    }

    50% {
        box-shadow: 0 10px 50px rgba(245, 158, 11, 0.8);
    }
}

.button-text {
    font-size: 1.8rem;
}

.button-icon {
    font-size: 3rem;
}

.transcript-container {
    margin: 12px 0;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.transcript-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 8px;
    font-weight: 600;
}

.transcript {
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.5;
}

.transcript .segment {
    display: inline;
}

.transcript .segment-divider {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

.transcript .segment.interim,
.transcript .interim {
    opacity: 0.6;
    font-style: italic;
}

.transcript.live-interim {
    opacity: 0.7;
    font-style: italic;
    color: #86efac;
    animation: pulse-live 1.5s ease-in-out infinite;
}

.typed-command-panel {
    margin: 12px 0;
    padding: 14px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    text-align: left;
}

.typed-command-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(232, 245, 233, 0.9);
}

.typed-command-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.typed-command-input {
    flex: 1;
    min-height: 64px;
    resize: vertical;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(74, 222, 128, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #e8f5e9;
    font: inherit;
    line-height: 1.4;
}

.typed-command-input:focus {
    outline: none;
    border-color: rgba(74, 222, 128, 0.55);
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.12);
}

.typed-command-input::placeholder {
    color: rgba(232, 245, 233, 0.62);
}

.typed-command-submit-btn {
    width: 110px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0 18px;
}

.typed-command-submit-btn:hover {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
}

.typed-command-submit-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

@keyframes pulse-live {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

.playlist-container {
    margin-top: 10px;
    padding: 0;
    width: 100%;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding: 0 4px;
}

.playlist-label {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.7;
    margin: 0;
}

.clear-playlist-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.7);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.clear-playlist-btn:hover {
    background: rgba(239, 68, 68, 0.9);
}

.clear-playlist-btn:active {
    transform: scale(0.95);
}

/* Load Favorites Button */
.load-favorites-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(250, 204, 21, 0.2);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.4);
    border-radius: 6px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.load-favorites-btn:hover {
    background: rgba(250, 204, 21, 0.3);
    border-color: rgba(250, 204, 21, 0.6);
}

.load-favorites-btn:active {
    transform: scale(0.95);
}

/* Quick Actions Section */
.quick-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 12px 0;
}

.quick-action-btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    background: rgba(250, 204, 21, 0.15);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.3);
    border-radius: 8px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.quick-action-btn:hover {
    background: rgba(250, 204, 21, 0.25);
    border-color: rgba(250, 204, 21, 0.5);
    box-shadow: 0 4px 12px rgba(250, 204, 21, 0.2);
}

.quick-action-btn:active {
    transform: translateY(0);
}

.playlist-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    overflow: hidden;
}

.playlist-table thead {
    background: rgba(0, 0, 0, 0.4);
}

.playlist-table th {
    padding: 10px 12px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(74, 222, 128, 0.8);
    border-bottom: 1px solid rgba(74, 222, 128, 0.2);
}

.playlist-table th.fav-col {
    width: 40px;
    text-align: center;
    padding: 10px 4px;
}

.playlist-table tbody tr {
    background: rgba(74, 222, 128, 0.04);
    cursor: pointer;
}

.playlist-table tbody tr:nth-child(even) {
    background: rgba(74, 222, 128, 0.08);
}

.playlist-table tbody tr:hover {
    background: rgba(74, 222, 128, 0.15);
}

.playlist-table tbody tr:active {
    background: rgba(74, 222, 128, 0.25);
}

.playlist-table tbody tr.playing {
    background: rgba(74, 222, 128, 0.2);
}

.playlist-table tbody tr.playing td:first-child {
    border-left: 3px solid #4ade80;
}

.playlist-table td {
    padding: 12px;
    font-size: 0.9rem;
    color: #e8f5e9;
    white-space: normal;
    word-wrap: break-word;
    vertical-align: middle;
    text-align: center;
}

.playlist-table td:nth-child(1) {
    padding: 8px 4px;
}

.playlist-table td:nth-child(2) {
    font-weight: 500;
    color: rgba(232, 245, 233, 0.9);
}

.playlist-table td:nth-child(3) {
    font-weight: 600;
    color: #a7f3d0;
}

.playlist-table td:nth-child(4) {
    font-size: 0.8rem;
    color: rgba(232, 245, 233, 0.6);
}

.playlist-table td:nth-child(5) {
    font-size: 0.85rem;
    color: rgba(232, 245, 233, 0.7);
}

.playlist-table td:nth-child(6) {
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
    color: rgba(232, 245, 233, 0.6);
    white-space: nowrap;
}

/* Favorite Button - Star */
.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    padding: 4px;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1;
}

.favorite-btn:hover {
    color: rgba(250, 204, 21, 0.7);
}

.favorite-btn.favorited {
    color: #facc15;
    text-shadow: 0 0 8px rgba(250, 204, 21, 0.5);
}

.playlist-actions-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.lyrics-row-btn {
    min-width: 38px;
    padding: 4px 6px;
    border: 1px solid rgba(74, 222, 128, 0.22);
    border-radius: 6px;
    background: rgba(74, 222, 128, 0.08);
    color: #a7f3d0;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}

.lyrics-row-btn:hover {
    background: rgba(74, 222, 128, 0.18);
}

.lyrics-row-btn.ready {
    background: rgba(20, 184, 166, 0.18);
    border-color: rgba(20, 184, 166, 0.35);
    color: #99f6e4;
}

.lyrics-row-btn.not-found {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.3);
    cursor: default;
}

.youtube-player {
    width: 100%;
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
    display: none;
}

.stop-button {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    background: rgba(255, 71, 87, 0.9);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 20px;
    touch-action: manipulation;
}

.stop-button:hover {
    background: #ff4757;
}

.stop-button:active {
    transform: scale(0.95);
}

.central-player {
    margin: 8px 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(74, 222, 128, 0.15);
}

.player-info {
    margin-bottom: 10px;
    text-align: center;
}

.player-song-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-song-artist {
    font-size: 0.85rem;
    opacity: 0.8;
    color: rgba(255, 255, 255, 0.9);
}

.player-controls {
    display: flex;
    justify-content: stretch;
    align-items: center;
    gap: 0;
    margin-bottom: 8px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.control-btn {
    flex: 1;
    height: 70px;
    border-radius: 0;
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: none;
    border-right: 1px solid rgba(74, 222, 128, 0.2);
    font-size: 1.8rem;
    cursor: pointer;
    transition: background 0.15s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:last-child {
    border-right: none;
}

.control-btn:hover {
    background: rgba(74, 222, 128, 0.25);
}

.control-btn:active {
    background: rgba(74, 222, 128, 0.4);
}

.control-btn-large {
    flex: 1.5;
    height: 70px;
    font-size: 2rem;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #0d2818;
}

.control-btn-large:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.control-btn-large:active {
    background: #15803d;
}

.player-controls-secondary {
    display: flex;
    justify-content: stretch;
    align-items: center;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
}

/* Sticky transport bar - visible while browsing playlist */
.playlist-transport-bar {
    position: sticky;
    bottom: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    background: rgba(10, 22, 16, 0.94);
    border-top: 1px solid rgba(74, 222, 128, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.transport-bar-btn {
    flex-shrink: 0;
    height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 8px;
    background: rgba(74, 222, 128, 0.1);
    color: #86efac;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.transport-bar-btn:hover {
    background: rgba(74, 222, 128, 0.22);
}

.transport-bar-btn:active {
    background: rgba(74, 222, 128, 0.35);
}

.transport-bar-playpause {
    min-width: 42px;
    font-size: 1.2rem;
}

.transport-bar-info {
    flex: 1;
    min-width: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    padding: 0 4px;
}

.big-lyrics-btn {
    position: relative;
    font-size: 0.85rem;
    padding: 0 14px;
}

.big-lyrics-btn.lyrics-available {
    background: rgba(20, 184, 166, 0.22);
    border-color: rgba(20, 184, 166, 0.45);
    color: #99f6e4;
}

.big-lyrics-btn.lyrics-unavailable {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.35);
}

.big-lyrics-btn.lyrics-loading {
    color: rgba(250, 204, 21, 0.8);
    border-color: rgba(250, 204, 21, 0.3);
}

.lyrics-control-btn {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    padding: 10px 0;
    margin-bottom: 8px;
}

.progress-bar-track {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: visible;
    touch-action: none;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80 0%, #22c55e 100%);
    border-radius: 6px 0 0 6px;
    width: 0%;
    transition: width 0.1s linear;
    pointer-events: none;
}

.progress-bar-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    left: 0%;
    transition: left 0.1s linear;
}

.progress-bar-track:hover .progress-bar-handle,
.progress-bar-track.dragging .progress-bar-handle {
    transform: translate(-50%, -50%);
}

.progress-bar-track.dragging .progress-bar-fill,
.progress-bar-track.dragging .progress-bar-handle {
    transition: none;
}

.progress-time {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 6px;
    font-family: 'SF Mono', 'Consolas', monospace;
}

.control-btn-small {
    flex: 1;
    height: 50px;
    border-radius: 0;
    background: rgba(74, 222, 128, 0.1);
    color: #86efac;
    border: none;
    border-right: 1px solid rgba(74, 222, 128, 0.15);
    font-size: 1.3rem;
    cursor: pointer;
    transition: background 0.15s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn-small:last-child {
    border-right: none;
}

.control-btn-small:hover {
    background: rgba(74, 222, 128, 0.2);
}

.control-btn-small:active {
    background: rgba(74, 222, 128, 0.3);
}

.lyrics-panel {
    margin: 10px 0 14px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.34);
    border: 1px solid rgba(74, 222, 128, 0.18);
    border-radius: 12px;
    text-align: left;
}

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

.lyrics-panel-title-group {
    min-width: 0;
}

.lyrics-panel-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(74, 222, 128, 0.9);
    margin-bottom: 2px;
}

.lyrics-panel-song {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lyrics-panel-hide-btn {
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #e8f5e9;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.lyrics-panel-hide-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.lyrics-status,
.lyrics-overlay-status {
    min-height: 24px;
    margin-bottom: 10px;
    font-size: 0.92rem;
    color: rgba(167, 243, 208, 0.95);
}

.lyrics-status.is-error,
.lyrics-overlay-status.is-error {
    color: #fca5a5;
}

.lyrics-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 42vh;
    overflow-y: auto;
    padding-right: 4px;
}

.lyrics-line {
    padding: 4px 6px;
    border-radius: 8px;
    font-size: 1.02rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.92);
    white-space: pre-wrap;
}

.lyrics-line.is-blank {
    min-height: 10px;
    padding: 0;
}

.lyrics-line.is-active {
    background: rgba(74, 222, 128, 0.16);
    color: #ffffff;
}

.lyrics-overlay {
    --lyrics-overlay-font-size: clamp(1.8rem, 6vw, 3.8rem);
    --lyrics-overlay-line-height: 1.15;
    --lyrics-overlay-max-width: min(96vw, 1100px);
    --lyrics-overlay-text-align: center;
    --lyrics-overlay-bg: rgba(3, 8, 6, 0.96);
    position: fixed;
    inset: 0;
    z-index: 300;
    background: var(--lyrics-overlay-bg);
}

.lyrics-overlay-song-info {
    display: none;
}

.lyrics-overlay-top-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    display: flex;
    gap: 6px;
}

.lyrics-overlay-action-btn {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.4rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}

.lyrics-overlay-action-btn:hover,
.lyrics-overlay-action-btn:active {
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
}

.lyrics-overlay-config {
    position: absolute;
    inset: 0;
    z-index: 20;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 16px 16px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.lyrics-overlay-config-card {
    background: rgba(10, 22, 16, 0.96);
    border: 1px solid rgba(74, 222, 128, 0.22);
    border-radius: 16px;
    padding: 20px;
    max-width: 340px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lyrics-overlay-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.lyrics-overlay-control-btn {
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}

.lyrics-overlay-control-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.lyrics-overlay-content {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 10px 52px;
}

.lyrics-overlay-transport {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--lyrics-overlay-bg);
}

.lyrics-overlay-transport-btn {
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.15s, color 0.15s;
}

.lyrics-overlay-transport-btn:hover,
.lyrics-overlay-transport-btn:active {
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
}

.lyrics-overlay .lyrics-line {
    width: 100%;
    max-width: var(--lyrics-overlay-max-width);
    padding: 2px 10px;
    font-size: var(--lyrics-overlay-font-size);
    line-height: var(--lyrics-overlay-line-height);
    text-align: var(--lyrics-overlay-text-align);
    font-weight: 700;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
    transform: scale(1);
    transform-origin: var(--lyrics-overlay-text-align, center) center;
}

.lyrics-overlay .lyrics-line.is-active {
    background: rgba(74, 222, 128, 0.22);
    box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.14) inset;
}

.lyrics-overlay.has-synced-lyrics .lyrics-line {
    opacity: 0.35;
    transition: opacity 0.45s ease, background 0.4s ease, color 0.4s ease,
                transform 0.45s ease, box-shadow 0.4s ease, text-shadow 0.4s ease;
}

.lyrics-overlay.has-synced-lyrics .lyrics-line.is-blank {
    opacity: 0;
}

.lyrics-overlay.has-synced-lyrics .lyrics-line.is-next {
    opacity: 0.55;
}

.lyrics-overlay.has-synced-lyrics .lyrics-line.is-active {
    opacity: 1;
    transform: scale(1.02);
    text-shadow: 0 2px 20px rgba(74, 222, 128, 0.2), 0 2px 14px rgba(0, 0, 0, 0.5);
}

/* Desktop: compact voice controls - the big button is designed for driving (mobile) */
@media (min-width: 769px) {
    .voice-controls-row {
        min-height: 48px;
    }

    .voice-controls-row .listen-button {
        height: 48px;
    }

    .listen-button {
        height: 48px;
        font-size: 1rem;
        border-radius: 10px;
        gap: 10px;
    }

    .button-text {
        font-size: 1.1rem;
    }

    .button-icon {
        font-size: 1.4rem;
    }

    .submit-button-large {
        height: 48px;
        font-size: 1.1rem;
        border-radius: 10px;
    }

    .voice-controls-row .stop-button,
    .voice-controls-row .play-button {
        height: 48px;
    }
}

/* Tablet: moderate sizing */
@media (min-width: 481px) and (max-width: 768px) {
    .voice-controls-row {
        min-height: 80px;
    }

    .voice-controls-row .listen-button {
        height: 80px;
    }

    .listen-button {
        height: 80px;
    }

    .button-text {
        font-size: 1.4rem;
    }

    .button-icon {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 10px 10px 0;
    }

    .header-top {
        align-items: flex-start;
    }

    .header-title-group {
        gap: 8px;
    }

    .site-name {
        width: 100%;
    }

    .nav-tabs {
        gap: 6px;
    }

    .nav-tab {
        padding: 7px 12px;
        font-size: 0.8rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .listen-button {
        height: 90px;
    }

    .button-text {
        font-size: 1.4rem;
    }

    .button-icon {
        font-size: 2.2rem;
    }

    .control-btn {
        height: 60px;
        font-size: 1.5rem;
    }

    .control-btn-large {
        height: 60px;
        font-size: 1.7rem;
    }

    .status {
        font-size: 1rem;
        padding: 10px 12px;
    }

    .transcript {
        font-size: 1.1rem;
    }

    .typed-command-row {
        flex-direction: column;
    }

    .typed-command-submit-btn {
        width: 100%;
        min-height: 48px;
    }

    .lyrics-panel {
        padding: 12px;
    }

    .lyrics-panel-header {
        flex-direction: column;
        align-items: stretch;
    }

    .lyrics-panel-hide-btn {
        width: 100%;
    }

    .lyrics-content {
        max-height: 36vh;
    }

    .lyrics-overlay-content {
        padding: 54px 8px 46px;
    }

    .lyrics-overlay-song-info {
        padding: 6px 10px 18px;
        right: 110px;
    }

    .lyrics-overlay-top-actions {
        top: 6px;
        right: 6px;
    }

    .lyrics-overlay-config {
        padding: 44px 10px 10px;
    }

    .lyrics-overlay-transport {
        padding: 4px 4px;
        gap: 1px;
    }

    .lyrics-overlay-transport-btn {
        padding: 5px 7px;
        font-size: 0.72rem;
    }

    .lyrics-overlay .lyrics-line {
        font-size: var(--lyrics-overlay-font-size);
    }
}

/* API Key Management */
.api-key-section {
    border-bottom: 1px solid rgba(74, 222, 128, 0.2);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.api-key-section label[for] {
    margin-bottom: 12px;
}

.api-key-status {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'SF Mono', 'Consolas', monospace;
    margin-bottom: 12px;
}

.api-key-status.configured {
    background: rgba(74, 222, 128, 0.15);
    color: #86efac;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.api-key-status.not-configured {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.api-key-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.api-key-input {
    flex: 1;
    padding: 12px 14px;
    font-size: 1rem;
    font-family: 'SF Mono', 'Consolas', monospace;
    border-radius: 8px;
    border: 2px solid rgba(74, 222, 128, 0.3);
    background: rgba(0, 0, 0, 0.3);
    color: #e8f5e9;
}

.api-key-input:focus {
    outline: none;
    border-color: rgba(74, 222, 128, 0.6);
    background: rgba(0, 0, 0, 0.4);
}

.api-key-input::placeholder {
    color: rgba(232, 245, 233, 0.4);
}

.save-api-key-btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #0d2818;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}

.save-api-key-btn:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

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

.api-key-action-btn {
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(74, 222, 128, 0.15);
    color: #86efac;
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 6px;
    cursor: pointer;
}

.api-key-action-btn:hover {
    background: rgba(74, 222, 128, 0.25);
    border-color: rgba(74, 222, 128, 0.5);
}

.api-key-action-btn.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

.api-key-action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
}

/* API Key Overlay (first-time setup) */
.api-key-overlay {
    position: fixed;
    top: var(--site-header-height, 0px);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.api-key-overlay-content {
    background: linear-gradient(145deg, #1a3a2e 0%, #0d2818 100%);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.api-key-overlay-content h2 {
    margin-bottom: 16px;
    font-size: 1.5rem;
    color: #a7f3d0;
}

.api-key-overlay-content p {
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(232, 245, 233, 0.9);
}

.api-key-overlay-content a {
    color: #4ade80;
    text-decoration: underline;
}

.api-key-overlay-content a:hover {
    color: #86efac;
}

.api-key-overlay-content .api-key-input-row {
    justify-content: center;
}

.api-key-privacy-note {
    font-size: 0.85rem;
    color: rgba(232, 245, 233, 0.6);
    font-style: italic;
    margin-top: 16px;
    margin-bottom: 0;
}

/* Overlay Provider Tabs */
.overlay-provider-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.provider-tab {
    flex: 1;
    padding: 12px 20px;
    background: rgba(74, 222, 128, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(74, 222, 128, 0.2);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.provider-tab:first-child {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.provider-tab:last-child {
    border-radius: 0 8px 8px 0;
}

.provider-tab:hover {
    background: rgba(74, 222, 128, 0.2);
}

.provider-tab.active {
    background: rgba(74, 222, 128, 0.3);
    color: #a7f3d0;
    border-color: rgba(74, 222, 128, 0.5);
}

.overlay-provider-section {
    margin-bottom: 16px;
}

.provider-hint {
    font-size: 0.9rem;
    color: rgba(232, 245, 233, 0.8);
    margin-bottom: 12px;
}

.provider-hint a {
    color: #4ade80;
}

/* Page Footer */
.page-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-btn {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.75rem;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

.footer-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.footer-link {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

.footer-link:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
}