:root {
    --font-scale: 1;
    --font-base: 16px;
}

html {
    font-size: calc(var(--font-base) * var(--font-scale));
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 1.5rem;
    box-sizing: border-box;
    align-items: center;
    overflow-x: hidden;
}

header {
    text-align: center;
    margin-bottom: 15px;
}

h1 {
    font-size: 2rem;
    margin: 0;
    color: var(--accent-color);
    text-shadow: 1px 1px 4px var(--shadow-color);
}

.nav-links {
    margin-top: 8px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.8rem;
    padding: 4px 10px;
    border: 1px solid var(--accent-color);
    border-radius: 20px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: var(--accent-color);
    color: #fff;
}

.cycle-btn {
    background: transparent;
    cursor: pointer;
    flex: 0 0 auto;
    width: auto;
}

.container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Control Panel */
.panel {
    padding: 15px;
    border-radius: 15px;
}

.panel-compact {
    padding: 12px;
}

.row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.input-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 120px;
}

label {
    font-size: 0.8rem;
    margin-bottom: 4px;
    opacity: 0.8;
}

input,
select {
    background: #ffffff;
    border: 1px solid var(--accent-color);
    color: #000000;
    padding: 8px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    box-shadow: inset 0 1px 3px var(--shadow-color);
}

select option {
    background-color: #ffffff;
    color: #000000;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.btn-small-clear {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 3px 6px;
    font-size: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    width: auto;
    flex: 0;
    line-height: 1;
}

.btn-small-clear:hover {
    background: rgba(255, 68, 68, 0.3);
    border-color: #ff4444;
}

/* Verse Stack Actions */
.verse-stack-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.btn-wipe-server {
    background: rgba(255, 68, 68, 0.15);
    color: #ff6666;
    border: 1px solid rgba(255, 68, 68, 0.4);
    padding: 3px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    width: auto;
    flex: 0;
    line-height: 1;
    white-space: nowrap;
}

.btn-wipe-server:hover {
    background: rgba(255, 68, 68, 0.35);
    border-color: #ff4444;
    color: #ff4444;
}

input::placeholder {
    color: var(--text-color);
    opacity: 0.5;
}

input:focus,
select:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 1px;
}

/* Status Indicator */
.status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 0.85rem;
    margin-top: 8px;
}

.dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: #555;
    transition: all 0.3s ease;
}

.status-active .dot {
    background: #44ff44;
    box-shadow: 0 0 10px #44ff44;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Recording Pulse - for text elements while listening */
.recording-pulse {
    animation: recording-text-pulse 1.5s ease-in-out infinite;
}

@keyframes recording-text-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* Main UI Buttons */
.buttons {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-start {
    background: #2e7d32;
    color: white;
}

.btn-start:hover {
    background: #388e3c;
}

.btn-stop {
    background: #c62828;
    color: white;
}

.btn-stop:hover {
    background: #d32f2f;
}

button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Transcription Box - smaller, unbolded for more content */
.transcript-box {
    min-height: 100px;
    height: 180px;
    overflow-y: auto;
    padding: 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.85rem;
    line-height: 1.35;
    border-left: 4px solid var(--accent-color);
    resize: vertical;
    transition: background-color 0.3s, border-color 0.5s;
    font-weight: 400;
}

/* Tighter line height for more text visible */
.transcript-tight {
    line-height: 1.2;
    font-size: 0.82rem;
}

.flash-clear {
    background-color: rgba(255, 68, 68, 0.3) !important;
}

/* Verse Stack */
.verse-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.verse-entry {
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease-out;
    border-left: 3px solid var(--accent-color);
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.verse-ref {
    font-weight: bold;
    font-size: 1rem;
}

.verse-time {
    font-size: 0.75rem;
    opacity: 0.6;
}

/* Compact verse stack — tighter entries */
.verse-stack-compact .verse-entry {
    padding: 5px 10px;
}

.verse-stack-compact .verse-ref {
    font-size: 0.9rem;
}

.btn-delete {
    background: transparent;
    border: none;
    color: #ff4444;
    cursor: pointer;
    padding: 5px;
    font-size: 1.2rem;
    flex: 0;
}

.wake-lock-status {
    margin-left: auto;
    font-size: 0.75rem;
    opacity: 0.7;
}

.manual-verse-input {
    flex: 2;
}

.btn-send-manual {
    flex: 0 0 auto;
    width: auto;
    padding: 8px 14px;
    font-size: 0.8rem;
    /* Match the Start button color scheme */
    background: #2e7d32;
    color: white;
    border: 1px solid #4caf50;
    border-radius: 8px;
}

/* Controls & Toggles */
.control-row {
    display: flex;
    justify-content: center;
    margin: 12px 0;
}

/* Inline control row: label + pill on same line */
.control-row-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 6px 0;
    padding: 0;
}

.control-label-inline {
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--sub-text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toggle-pill {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 8px 20px;
    color: #bbb;
    font-weight: 800;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
    position: relative;
    -webkit-user-select: none;
    user-select: none;
}

.toggle-pill-sm {
    padding: 5px 14px;
    font-size: 0.7rem;
    gap: 8px;
}

.toggle-pill .pill-dot {
    width: 0.875rem;
    height: 0.875rem;
    border-radius: 50%;
    background: #444;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 0.3rem rgba(0, 0, 0, 0.5);
}

.toggle-pill.active {
    background: rgba(68, 255, 68, 0.05);
    border-color: #44ff44;
    color: #44ff44;
    box-shadow: 0 0 15px rgba(68, 255, 68, 0.2), inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.toggle-pill.active .pill-dot {
    background: #44ff44;
    box-shadow: 0 0 20px rgba(68, 255, 68, 1);
    transform: scale(1.2);
}

.toggle-pill:not(.active) .pill-dot {
    background: #ff4444;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.6);
}

.toggle-pill:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ═══════ AUTH GATE MODAL ═══════ */
.auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.auth-modal.hidden {
    display: none !important;
}

.auth-modal-card {
    width: 90%;
    max-width: 380px;
    padding: 30px 25px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: authFadeIn 0.4s ease-out;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.auth-title {
    font-size: 1.5rem;
    margin: 0 0 4px;
    color: var(--accent-color);
}

.auth-subtitle {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 18px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-form .input-group {
    text-align: left;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
}

.btn-auth-login {
    background: #2e7d32;
    color: white;
    padding: 14px;
    font-size: 1.1rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    width: 100%;
}

.btn-auth-login:hover {
    background: #388e3c;
    transform: scale(1.02);
}

.btn-auth-login:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-error {
    background: rgba(255, 68, 68, 0.2);
    color: #ff6666;
    border: 1px solid rgba(255, 68, 68, 0.4);
    border-radius: 8px;
    padding: 10px;
    font-size: 0.85rem;
    font-weight: bold;
}

.auth-error.hidden {
    display: none;
}

.auth-shake {
    animation: authShake 0.4s ease;
}

@keyframes authShake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-10px);
    }

    40% {
        transform: translateX(10px);
    }

    60% {
        transform: translateX(-6px);
    }

    80% {
        transform: translateX(6px);
    }
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    transition: opacity 0.3s;
}

.modal.hidden,
.panel.hidden,
.hidden {
    display: none !important;
    opacity: 0;
}

.modal-content {
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 20px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--accent-color);
}

.modal-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    /* Override generic button styles that cause the X to be too wide */
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    text-transform: none;
    letter-spacing: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
    line-height: 1.6;
    font-size: 0.95rem;
    color: #e0e0e0;
    white-space: pre-wrap;
}

.modal-footer {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
}

/* Visual Detection Cue — slides down from top center */
.detection-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1rem;
    z-index: 5000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateX(-50%) translateY(-150%);
    opacity: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    max-width: 95vw;
}

.detection-toast.success {
    background: #2e7d32;
    border-color: #4caf50;
    box-shadow: 0 10px 40px rgba(46, 125, 50, 0.4);
}

.detection-toast.error {
    background: #c62828 !important;
    border-color: #ff5252;
    box-shadow: 0 10px 40px rgba(198, 40, 40, 0.4);
    border-left: 5px solid #ff4444;
    color: #ffcccc;
}

.detection-toast.warning {
    background: #ff8f00 !important;
    border-color: #ffb300;
    box-shadow: 0 10px 40px rgba(255, 143, 0, 0.4);
    border-left: 5px solid #ffaa00;
    color: #fff8e1;
}

/* Info toast — for non-verse notifications (wipe, clear, etc.) */
.detection-toast.info {
    background: #1565c0;
    border-color: #42a5f5;
    box-shadow: 0 10px 40px rgba(21, 101, 192, 0.4);
    color: #e3f2fd;
}

.detection-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Screen Pulse Effect - duration matches toast (3s success, 4s error) */
.screen-pulse {
    animation: screen-pulse-heartbeat-green 3s ease-in-out;
}

@keyframes screen-pulse-heartbeat-green {
    0% {
        box-shadow: inset 0 0 0 0 rgba(68, 255, 68, 0);
    }

    10% {
        box-shadow: inset 0 0 100px 30px rgba(68, 255, 68, 0.4);
    }

    25% {
        box-shadow: inset 0 0 40px 10px rgba(68, 255, 68, 0.2);
    }

    40% {
        box-shadow: inset 0 0 100px 30px rgba(68, 255, 68, 0.3);
    }

    60% {
        box-shadow: inset 0 0 60px 20px rgba(68, 255, 68, 0.15);
    }

    100% {
        box-shadow: inset 0 0 0 0 rgba(68, 255, 68, 0);
    }
}

/* Error Pulse - 4s to match error toast */
.screen-pulse-error {
    animation: screen-pulse-heartbeat-red 4s ease-in-out;
}

@keyframes screen-pulse-heartbeat-red {
    0% {
        box-shadow: inset 0 0 0 0 rgba(255, 68, 68, 0);
    }

    10% {
        box-shadow: inset 0 0 100px 30px rgba(255, 68, 68, 0.4);
    }

    25% {
        box-shadow: inset 0 0 40px 10px rgba(255, 68, 68, 0.2);
    }

    40% {
        box-shadow: inset 0 0 100px 30px rgba(255, 68, 68, 0.3);
    }

    60% {
        box-shadow: inset 0 0 60px 20px rgba(255, 68, 68, 0.15);
    }

    100% {
        box-shadow: inset 0 0 0 0 rgba(255, 68, 68, 0);
    }
}

/* Info Pulse - 3s to match info toast */
.screen-pulse-info {
    animation: screen-pulse-heartbeat-blue 3s ease-in-out;
}

@keyframes screen-pulse-heartbeat-blue {
    0% {
        box-shadow: inset 0 0 0 0 rgba(68, 136, 255, 0);
    }

    10% {
        box-shadow: inset 0 0 100px 30px rgba(68, 136, 255, 0.3);
    }

    25% {
        box-shadow: inset 0 0 40px 10px rgba(68, 136, 255, 0.15);
    }

    40% {
        box-shadow: inset 0 0 100px 30px rgba(68, 136, 255, 0.2);
    }

    60% {
        box-shadow: inset 0 0 60px 20px rgba(68, 136, 255, 0.1);
    }

    100% {
        box-shadow: inset 0 0 0 0 rgba(68, 136, 255, 0);
    }
}

/* Warning Pulse - 3s to match warning toast */
.screen-pulse-warning {
    animation: screen-pulse-heartbeat-amber 3s ease-in-out;
}

@keyframes screen-pulse-heartbeat-amber {
    0% {
        box-shadow: inset 0 0 0 0 rgba(255, 170, 0, 0);
    }

    10% {
        box-shadow: inset 0 0 100px 30px rgba(255, 170, 0, 0.4);
    }

    25% {
        box-shadow: inset 0 0 40px 10px rgba(255, 170, 0, 0.2);
    }

    40% {
        box-shadow: inset 0 0 100px 30px rgba(255, 170, 0, 0.3);
    }

    60% {
        box-shadow: inset 0 0 60px 20px rgba(255, 170, 0, 0.15);
    }

    100% {
        box-shadow: inset 0 0 0 0 rgba(255, 170, 0, 0);
    }
}

/* Iframe Preview */
#preview-section {
    padding: 12px;
    margin-top: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.iframe-container {
    width: 100%;
    margin-top: 5px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
}

#display-preview {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Responsive - tighter for mobile */
@media (max-width: 480px) {
    body {
        padding: 0.75rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .row {
        flex-direction: column;
    }

    .buttons {
        flex-direction: column;
        gap: 6px;
    }

    .panel {
        padding: 10px;
    }

    .container {
        gap: 8px;
    }

    header {
        margin-bottom: 8px;
    }

    .nav-links {
        gap: 6px;
    }

    .transcript-box {
        min-height: 80px;
        height: 120px;
    }

    /* Keep manual entry row horizontal on mobile */
    .manual-row {
        flex-direction: row !important;
    }

    .auth-modal-card {
        padding: 20px 18px;
    }

    .control-row {
        margin: 8px 0;
    }
}

.footer-info {
    text-align: center;
    font-size: 0.7rem;
    opacity: 0.4;
    margin-top: 20px;
    padding-bottom: 15px;
    font-style: italic;
    color: var(--sub-text-color);
}

/* ═══════ Recording Timer ═══════ */
.recording-timer {
    font-size: 0.75rem;
    font-weight: bold;
    color: #44ff44;
    margin-left: 8px;
    animation: timer-pulse 1.5s ease-in-out infinite;
    font-variant-numeric: tabular-nums;
}

@keyframes timer-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ═══════ Pulsating Live Transcription Container ═══════ */
/* Different from toast pulsating: uses border-color glow */
.recording-container-pulse {
    animation: container-border-pulse 2s ease-in-out infinite;
    border-color: rgba(68, 255, 68, 0.4) !important;
}

@keyframes container-border-pulse {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(68, 255, 68, 0.1);
        border-color: rgba(68, 255, 68, 0.2);
    }

    50% {
        box-shadow: 0 0 15px rgba(68, 255, 68, 0.35);
        border-color: rgba(68, 255, 68, 0.5);
    }
}

/* ═══════ Transcript Actions Row ═══════ */
.transcript-actions-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.transcript-action-link {
    font-size: 0.75rem !important;
    padding: 4px 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    opacity: 0.85;
    display: inline-block;
    white-space: nowrap;
}

.btn-speaking-cmds {
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

/* ═══════ Image Toast Overlay (Unicode Cards) ═══════ */
.image-toast-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 6000;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.image-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 6001;
    animation: imageToastIn 0.3s ease-out;
}

.image-toast-card {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid rgba(255, 68, 68, 0.5);
    border-radius: 24px;
    padding: 30px 40px;
    text-align: center;
    min-width: 280px;
    max-width: 85vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 68, 68, 0.15);
}

.image-toast-icon {
    font-size: 4rem;
    margin-bottom: 12px;
    line-height: 1;
}

.image-toast-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
}

.image-toast-subtitle {
    font-size: 0.95rem;
    color: #aaaaaa;
    line-height: 1.4;
}

@keyframes imageToastIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Photo-based Image Toast (Verse Not Found) */
.image-toast-card-photo {
    padding: 0;
    overflow: hidden;
    min-width: 300px;
    max-width: 90vw;
}

.image-toast-photo {
    display: block;
    width: 100%;
    max-width: 420px;
    height: auto;
    border-radius: 22px 22px 0 0;
}

.image-toast-card-photo .image-toast-subtitle {
    padding: 16px 24px 20px;
    font-size: 1rem;
    color: #cccccc;
    text-align: center;
    line-height: 1.5;
}

/* ═══════ BibleHub Link Button (verse stack + manual entry) ═══════ */
.btn-biblehub {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    cursor: pointer;
    padding: 2px 6px;
    font-size: 0.7rem;
    border-radius: 4px;
    text-decoration: none;
    flex: 0 0 auto;
    width: auto;
    transition: all 0.2s;
    line-height: 1;
    text-transform: none;
    letter-spacing: 0;
    display: inline-flex;
    align-items: center;
}

.btn-biblehub:hover {
    background: var(--accent-color);
    color: #fff;
}

/* BibleHub button in manual entry row — compact icon style */
.btn-biblehub-manual {
    flex: 0 0 auto;
    width: 38px;
    min-width: 38px;
    padding: 0;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    color: var(--accent-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    text-transform: none;
    letter-spacing: 0;
}

.btn-biblehub-manual:hover {
    background: var(--accent-color);
    color: #fff;
}

.btn-biblehub-manual:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ═══════ Grammar Link in Transcript Modal ═══════ */
.grammar-link-section {
    margin-top: 12px;
    padding: 10px;
    background: rgba(68, 136, 204, 0.1);
    border: 1px solid rgba(68, 136, 204, 0.3);
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.grammar-link-section a {
    color: var(--accent-color);
    font-weight: bold;
}

/* ═══════ Transcript Modal Split Footer ═══════ */
.modal-footer-split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.btn-clear-logs {
    background: rgba(255, 68, 68, 0.15);
    color: #ff6666;
    border: 1px solid rgba(255, 68, 68, 0.4);
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    flex: 0 0 auto;
    width: auto;
    text-transform: none;
    letter-spacing: 0;
}

.btn-clear-logs:hover {
    background: rgba(255, 68, 68, 0.3);
    border-color: #ff4444;
}