/* =========================================================
   PRO TAMIL BIBLE — SERMON & STREAM STUDIO
   Global Application Theme
   ========================================================= */

/* =========================================================
   1. ROOT VARIABLES
   ========================================================= */

:root {

    /* Brand */
    --primary: #4f8cff;
    --primary-dark: #2563eb;
    --primary-light: #79a8ff;

    /* Accent */
    --accent: #f5c451;
    --accent-soft: rgba(245, 196, 81, 0.14);

    /* Live */
    --live: #ef4444;
    --live-soft: rgba(239, 68, 68, 0.14);

    /* Success */
    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, 0.14);

    /* Warning */
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.14);

    /* Background */
    --bg-main: #080d18;
    --bg-secondary: #0c1322;
    --bg-tertiary: #111a2c;

    /* Panels */
    --panel: #101827;
    --panel-light: #151f31;
    --panel-hover: #19253a;

    /* Borders */
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.13);
    --border-primary: rgba(79, 140, 255, 0.35);

    /* Text */
    --text-primary: #f8fafc;
    --text-secondary: #a9b5c7;
    --text-muted: #718096;
    --text-dark: #0b1120;

    /* Shadows */
    --shadow-sm:
        0 2px 8px rgba(0, 0, 0, 0.20);

    --shadow-md:
        0 8px 25px rgba(0, 0, 0, 0.28);

    --shadow-lg:
        0 20px 60px rgba(0, 0, 0, 0.40);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;

    /* Layout */
    --sidebar-width: 250px;
    --right-panel-width: 320px;
    --topbar-height: 72px;
    --statusbar-height: 34px;

    /* Transition */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
}


/* =========================================================
   2. RESET
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    width: 100%;
    height: 100%;
    font-size: 16px;
}


body {
    width: 100%;
    min-height: 100%;
    background: var(--bg-main);
    color: var(--text-primary);

    font-family:
        "Segoe UI",
        "Noto Sans Tamil",
        Arial,
        sans-serif;

    line-height: 1.5;

    overflow-x: hidden;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


button,
input {
    font: inherit;
}


button {
    cursor: pointer;
}


button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}


input {
    outline: none;
}


::selection {
    background: rgba(79, 140, 255, 0.35);
    color: #ffffff;
}


/* =========================================================
   3. SCROLLBAR
   ========================================================= */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}


::-webkit-scrollbar-track {
    background: transparent;
}


::-webkit-scrollbar-thumb {
    background: #273449;
    border-radius: 20px;
}


::-webkit-scrollbar-thumb:hover {
    background: #3a4b64;
}


/* =========================================================
   4. APPLICATION
   ========================================================= */

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;

    background:
        radial-gradient(
            circle at 20% 0%,
            rgba(79, 140, 255, 0.07),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 15%,
            rgba(245, 196, 81, 0.035),
            transparent 25%
        ),
        var(--bg-main);
}


/* =========================================================
   5. TOP BAR
   ========================================================= */

.topbar {
    height: var(--topbar-height);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 22px;

    background:
        linear-gradient(
            180deg,
            #101827 0%,
            #0d1524 100%
        );

    border-bottom: 1px solid var(--border);

    box-shadow: var(--shadow-sm);

    position: sticky;
    top: 0;
    z-index: 100;
}


/* Brand */

.brand {
    display: flex;
    align-items: center;
    gap: 12px;

    min-width: 240px;
}


.brand-icon {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-dark)
        );

    color: #ffffff;

    font-size: 21px;
    font-weight: 700;

    box-shadow:
        0 6px 18px rgba(37, 99, 235, 0.28);
}


.brand-text h1 {
    font-size: 17px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.2px;
}


.brand-text span {
    display: block;

    margin-top: 2px;

    color: var(--text-muted);

    font-size: 10px;
    font-weight: 600;

    letter-spacing: 1.3px;
    text-transform: uppercase;
}


/* Center */

.topbar-center {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 1;
}


.system-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 7px 13px;

    border-radius: 999px;

    border: 1px solid var(--border);

    background: rgba(255, 255, 255, 0.025);

    color: var(--text-secondary);

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.6px;
    text-transform: uppercase;
}


.status-dot,
.live-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--text-muted);

    flex-shrink: 0;
}


.status-online .status-dot {
    background: var(--success);

    box-shadow:
        0 0 0 4px rgba(34, 197, 94, 0.10),
        0 0 12px rgba(34, 197, 94, 0.50);
}


.status-offline .status-dot {
    background: var(--text-muted);
}


.status-error .status-dot {
    background: var(--live);

    box-shadow:
        0 0 0 4px rgba(239, 68, 68, 0.10);
}


/* Topbar actions */

.topbar-actions {
    min-width: 240px;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 7px;
}


.icon-button {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border);

    border-radius: 9px;

    background: rgba(255, 255, 255, 0.025);

    color: var(--text-secondary);

    transition:
        background var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast);
}


.icon-button:hover {
    background: var(--panel-hover);
    color: var(--text-primary);
    border-color: var(--border-light);
}


.icon-button:active {
    transform: scale(0.95);
}


/* =========================================================
   6. MAIN WORKSPACE
   ========================================================= */

.workspace {
    flex: 1;

    display: grid;

    grid-template-columns:
        var(--sidebar-width)
        minmax(0, 1fr)
        var(--right-panel-width);

    min-height: calc(
        100vh -
        var(--topbar-height) -
        var(--statusbar-height)
    );
}


/* =========================================================
   7. SIDEBAR
   ========================================================= */

.sidebar {
    min-width: 0;

    display: flex;
    flex-direction: column;

    padding: 18px 14px;

    background:
        linear-gradient(
            180deg,
            #0d1524 0%,
            #0a111e 100%
        );

    border-right: 1px solid var(--border);

    overflow-y: auto;
}


.sidebar-section {
    padding-bottom: 18px;
    margin-bottom: 18px;

    border-bottom: 1px solid var(--border);
}


.section-title {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 11px;

    color: var(--text-secondary);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.1px;
    text-transform: uppercase;
}


/* =========================================================
   8. FILE UPLOAD
   ========================================================= */

.file-upload-card {
    display: flex;
    flex-direction: column;
    gap: 9px;
}


.upload-button {
    min-height: 58px;

    display: flex;
    align-items: center;
    gap: 11px;

    padding: 10px 12px;

    border: 1px dashed rgba(79, 140, 255, 0.35);

    border-radius: var(--radius-md);

    background:
        rgba(79, 140, 255, 0.045);

    color: var(--text-primary);

    cursor: pointer;

    transition:
        background var(--transition-fast),
        border-color var(--transition-fast);
}


.upload-button:hover {
    background: rgba(79, 140, 255, 0.09);
    border-color: var(--primary);
}


.upload-icon {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    background: rgba(79, 140, 255, 0.12);

    color: var(--primary-light);

    font-size: 18px;
    font-weight: 700;
}


.upload-button strong {
    display: block;

    font-size: 12px;
    font-weight: 700;
}


.upload-button small {
    display: block;

    margin-top: 2px;

    color: var(--text-muted);

    font-size: 9px;
}


.status-badge {
    min-height: 29px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 5px 9px;

    border-radius: 7px;

    border: 1px solid var(--border);

    font-size: 10px;
    font-weight: 700;

    text-align: center;
}


.status-off {
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-muted);
}


.status-on {
    background: var(--success-soft);
    border-color: rgba(34, 197, 94, 0.22);
    color: #6ee7a0;
}


.status-err {
    background: var(--live-soft);
    border-color: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}


/* =========================================================
   9. MICROPHONE
   ========================================================= */

.mic-button {
    width: 100%;

    min-height: 62px;

    display: grid;

    grid-template-columns: 38px minmax(0, 1fr) auto;

    align-items: center;

    gap: 9px;

    padding: 10px;

    border: 1px solid var(--border);

    border-radius: var(--radius-md);

    background:
        linear-gradient(
            135deg,
            rgba(79, 140, 255, 0.08),
            rgba(255, 255, 255, 0.02)
        );

    color: var(--text-primary);

    text-align: left;

    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast);
}


.mic-button:hover {
    border-color: var(--border-primary);
    background: rgba(79, 140, 255, 0.11);
}


.mic-button:active {
    transform: scale(0.985);
}


.mic-button-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: rgba(79, 140, 255, 0.13);

    font-size: 17px;
}


.mic-button-content strong {
    display: block;

    font-size: 11px;
    font-weight: 700;
}


.mic-button-content small {
    display: block;

    margin-top: 2px;

    color: var(--text-muted);

    font-size: 9px;
}


.mic-button-state {
    color: var(--text-muted);

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 0.7px;
}


.mic-active {
    border-color: rgba(239, 68, 68, 0.45);

    background:
        linear-gradient(
            135deg,
            rgba(239, 68, 68, 0.14),
            rgba(255, 255, 255, 0.02)
        );
}


.mic-active .mic-button-icon {
    background: var(--live-soft);
}


.mic-active .mic-button-state {
    color: #fca5a5;
}


/* =========================================================
   10. SIDEBAR ACTION BUTTONS
   ========================================================= */

.side-action-button {
    width: 100%;

    min-height: 40px;

    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 7px;

    padding: 9px 11px;

    border: 1px solid var(--border);

    border-radius: 8px;

    background: rgba(255, 255, 255, 0.025);

    color: var(--text-secondary);

    font-size: 11px;
    font-weight: 600;

    text-align: left;

    transition:
        background var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast);
}


.side-action-button:hover {
    background: var(--panel-hover);
    color: var(--text-primary);
    border-color: var(--border-light);
}


.side-action-button span:first-child {
    width: 23px;

    text-align: center;
}


/* =========================================================
   11. QUICK CONTROLS
   ========================================================= */

.quick-controls {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 6px;
}


.quick-button {
    height: 38px;

    border: 1px solid var(--border);

    border-radius: 8px;

    background: rgba(255, 255, 255, 0.025);

    color: var(--text-secondary);

    font-size: 13px;

    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast);
}


.quick-button:hover {
    background: var(--panel-hover);
    color: var(--text-primary);
}


.quick-button-main {
    border-color: rgba(79, 140, 255, 0.25);

    background: rgba(79, 140, 255, 0.10);

    color: var(--primary-light);
}


.quick-button-main:hover {
    background: rgba(79, 140, 255, 0.18);
    border-color: rgba(79, 140, 255, 0.45);
}


/* =========================================================
   12. SIDEBAR FOOTER
   ========================================================= */

.sidebar-footer {
    margin-top: auto;

    padding-top: 8px;

    color: var(--text-muted);

    text-align: center;
}


.app-version {
    font-size: 10px;
    font-weight: 700;
}


.app-version span {
    margin-left: 4px;

    color: var(--primary-light);
}


.app-mode {
    margin-top: 5px;

    font-size: 8px;
    font-weight: 700;

    letter-spacing: 1px;
}


/* =========================================================
   13. MAIN CONTENT
   ========================================================= */

.main-content {
    min-width: 0;

    padding: 22px;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.008),
            transparent
        );

    overflow-y: auto;
}


.content-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 18px;
}


.eyebrow {
    display: block;

    margin-bottom: 5px;

    color: var(--primary-light);

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 1.6px;
}


.content-header h2 {
    font-size: 23px;
    line-height: 1.25;

    letter-spacing: -0.6px;
}


.content-header p {
    margin-top: 5px;

    color: var(--text-muted);

    font-size: 11px;
}


.session-info {
    display: flex;
    align-items: center;

    padding: 9px 13px;

    border: 1px solid var(--border);

    border-radius: 10px;

    background: rgba(255, 255, 255, 0.02);
}


.session-item {
    display: flex;
    flex-direction: column;

    min-width: 70px;
}


.session-label {
    color: var(--text-muted);

    font-size: 8px;
    font-weight: 800;

    letter-spacing: 1px;
}


.session-item strong {
    margin-top: 2px;

    color: var(--text-secondary);

    font-size: 11px;
}


.session-divider {
    width: 1px;
    height: 28px;

    margin: 0 13px;

    background: var(--border);
}


/* =========================================================
   14. PANELS
   ========================================================= */

.panel {
    margin-bottom: 14px;

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.025),
            rgba(255, 255, 255, 0.008)
        );

    box-shadow: var(--shadow-sm);

    overflow: hidden;
}


.panel-header {
    min-height: 59px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 11px 14px;

    border-bottom: 1px solid var(--border);
}


.panel-header.compact {
    min-height: 53px;
}


.panel-title {
    display: flex;
    align-items: center;
    gap: 10px;

    min-width: 0;
}


.panel-icon {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 9px;

    background: rgba(79, 140, 255, 0.09);

    font-size: 15px;
}


.panel-title h3 {
    font-size: 12px;
    font-weight: 750;
}


.panel-title span {
    display: block;

    margin-top: 2px;

    color: var(--text-muted);

    font-size: 9px;
}


/* =========================================================
   15. LIVE INDICATOR
   ========================================================= */

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 5px 8px;

    border-radius: 6px;

    background: var(--live-soft);

    color: #fca5a5;

    font-size: 8px;
    font-weight: 800;

    letter-spacing: 0.8px;
}


.live-dot {
    width: 6px;
    height: 6px;

    background: var(--live);

    box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);

    animation: livePulse 1.6s infinite;
}


@keyframes livePulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.45;
        transform: scale(0.75);
    }
}


/* =========================================================
   16. SPEECH DISPLAY
   ========================================================= */

.speech-display {
    min-height: 145px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background:
        radial-gradient(
            circle at center,
            rgba(79, 140, 255, 0.055),
            transparent 55%
        );
}


.speech-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;
}


.placeholder-icon {
    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 9px;

    border-radius: 50%;

    background: rgba(79, 140, 255, 0.08);

    font-size: 18px;
}


.speech-placeholder strong {
    color: var(--text-secondary);

    font-size: 12px;
}


.speech-placeholder span {
    margin-top: 4px;

    color: var(--text-muted);

    font-size: 9px;
}


.speech-active {
    justify-content: flex-start;
    align-items: flex-start;

    color: var(--text-primary);

    font-size: 18px;
    line-height: 1.8;

    text-align: left;
}


/* =========================================================
   17. SEARCH
   ========================================================= */

.search-panel {
    display: grid;

    grid-template-columns: minmax(0, 1fr) 95px;

    gap: 8px;

    margin-bottom: 14px;
}


.search-wrapper {
    min-width: 0;

    position: relative;

    display: flex;
    align-items: center;
}


.search-icon {
    position: absolute;
    left: 13px;

    color: var(--text-muted);

    font-size: 13px;

    pointer-events: none;
}


.search-input {
    width: 100%;
    height: 43px;

    padding:
        0 38px
        0 38px;

    border: 1px solid var(--border);

    border-radius: 9px;

    background: #0d1626;

    color: var(--text-primary);

    font-size: 12px;

    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast);
}


.search-input::placeholder {
    color: #5d6a7e;
}


.search-input:focus {
    border-color: rgba(79, 140, 255, 0.55);

    background: #101a2b;

    box-shadow:
        0 0 0 3px rgba(79, 140, 255, 0.08);
}


.search-clear {
    position: absolute;
    right: 10px;

    width: 24px;
    height: 24px;

    border: none;

    border-radius: 6px;

    background: transparent;

    color: var(--text-muted);

    font-size: 17px;

    display: none;
}


.search-clear:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}


.search-button {
    height: 43px;

    border: 1px solid rgba(79, 140, 255, 0.45);

    border-radius: 9px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-dark)
        );

    color: #ffffff;

    font-size: 11px;
    font-weight: 750;

    box-shadow:
        0 5px 15px rgba(37, 99, 235, 0.18);

    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}


.search-button:hover {
    box-shadow:
        0 7px 20px rgba(37, 99, 235, 0.28);
}


.search-button:active {
    transform: translateY(1px);
}


/* =========================================================
   18. RESULTS
   ========================================================= */

.results-container {
    max-height: 430px;

    overflow-y: auto;

    padding: 12px;
}


.result-card {
    position: relative;

    padding: 13px;

    margin-bottom: 8px;

    border: 1px solid var(--border);

    border-radius: 10px;

    background: rgba(255, 255, 255, 0.018);

    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast);
}


.result-card:hover {
    background: rgba(79, 140, 255, 0.045);

    border-color: rgba(79, 140, 255, 0.22);

    transform: translateY(-1px);
}


.result-ref {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-bottom: 7px;
}


.result-ref strong {
    color: var(--primary-light);

    font-size: 11px;
}


.result-text {
    color: var(--text-secondary);

    font-size: 12px;
    line-height: 1.75;
}


.result-actions {
    display: flex;
    gap: 6px;
}


.result-action {
    height: 27px;

    padding: 0 8px;

    border: 1px solid var(--border);

    border-radius: 6px;

    background: rgba(255, 255, 255, 0.035);

    color: var(--text-secondary);

    font-size: 9px;
    font-weight: 700;
}


.result-action:hover {
    background: var(--panel-hover);
    color: var(--text-primary);
}


.result-action-primary {
    border-color: rgba(79, 140, 255, 0.28);

    background: rgba(79, 140, 255, 0.09);

    color: var(--primary-light);
}


mark {
    padding: 1px 3px;

    border-radius: 3px;

    background: rgba(245, 196, 81, 0.25);

    color: #f8d87c;
}


/* =========================================================
   19. EMPTY STATE
   ========================================================= */

.empty-state {
    min-height: 180px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 30px;

    text-align: center;
}


.empty-state-icon {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 10px;

    border-radius: 12px;

    background: rgba(255, 255, 255, 0.035);

    font-size: 20px;
}


.empty-state h4 {
    color: var(--text-secondary);

    font-size: 12px;
}


.empty-state p {
    max-width: 360px;

    margin-top: 4px;

    color: var(--text-muted);

    font-size: 9px;
}


/* =========================================================
   20. RIGHT PANEL
   ========================================================= */

.right-panel {
    min-width: 0;

    padding: 18px 14px;

    background:
        linear-gradient(
            180deg,
            #0c1422,
            #09111d
        );

    border-left: 1px solid var(--border);

    overflow-y: auto;
}


/* =========================================================
   21. CURRENT VERSE
   ========================================================= */

.on-air-badge {
    padding: 4px 7px;

    border-radius: 5px;

    background: rgba(255, 255, 255, 0.035);

    color: var(--text-muted);

    font-size: 8px;
    font-weight: 800;

    letter-spacing: 0.6px;
}


.on-air-active {
    background: var(--live-soft);
    color: #fca5a5;
}


.verse-preview {
    min-height: 210px;

    padding: 20px 16px;

    display: flex;
    flex-direction: column;

    justify-content: center;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(245, 196, 81, 0.055),
            transparent 65%
        );
}


.verse-reference {
    margin-bottom: 12px;

    color: var(--accent);

    font-size: 13px;
    font-weight: 800;

    text-align: center;
}


.verse-text {
    color: var(--text-primary);

    font-family:
        "Noto Sans Tamil",
        "Segoe UI",
        sans-serif;

    font-size: 17px;
    line-height: 1.8;

    text-align: center;
}


.project-button {
    width: calc(100% - 24px);

    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    margin: 0 12px 12px;

    border: 1px solid rgba(245, 196, 81, 0.35);

    border-radius: 8px;

    background:
        linear-gradient(
            135deg,
            rgba(245, 196, 81, 0.15),
            rgba(245, 196, 81, 0.07)
        );

    color: #f7d978;

    font-size: 10px;
    font-weight: 800;

    transition:
        background var(--transition-fast),
        border-color var(--transition-fast);
}


.project-button:hover {
    background: rgba(245, 196, 81, 0.20);
    border-color: rgba(245, 196, 81, 0.55);
}


/* =========================================================
   22. HISTORY
   ========================================================= */

.text-button {
    border: none;

    background: transparent;

    color: var(--primary-light);

    font-size: 9px;
    font-weight: 700;
}


.text-button:hover {
    color: #ffffff;
}


.history-container {
    max-height: 270px;

    overflow-y: auto;

    padding: 9px;
}


.history-item {
    padding: 9px;

    margin-bottom: 6px;

    border: 1px solid var(--border);

    border-radius: 7px;

    background: rgba(255, 255, 255, 0.018);

    cursor: pointer;

    transition:
        background var(--transition-fast),
        border-color var(--transition-fast);
}


.history-item:hover {
    background: rgba(79, 140, 255, 0.055);
    border-color: rgba(79, 140, 255, 0.20);
}


.history-item strong {
    display: block;

    color: var(--primary-light);

    font-size: 10px;
}


.history-item span {
    display: block;

    margin-top: 3px;

    color: var(--text-muted);

    font-size: 9px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.history-empty {
    min-height: 130px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    color: var(--text-muted);

    text-align: center;
}


.history-empty span {
    font-size: 20px;
    opacity: 0.55;
}


.history-empty p {
    margin-top: 6px;

    font-size: 9px;
}


/* =========================================================
   23. SHORTCUTS
   ========================================================= */

.shortcut-list {
    padding: 8px 12px 12px;
}


.shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 31px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.035);

    color: var(--text-muted);

    font-size: 9px;
}


.shortcut-item:last-child {
    border-bottom: none;
}


kbd {
    min-width: 27px;

    padding: 3px 6px;

    border: 1px solid var(--border-light);

    border-bottom-width: 2px;

    border-radius: 5px;

    background: #0b1220;

    color: var(--text-secondary);

    font-family: inherit;

    font-size: 8px;

    text-align: center;
}


/* =========================================================
   24. LOADING
   ========================================================= */

.loading-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    color: var(--primary-light);

    font-size: 9px;
    font-weight: 700;
}


.loading-indicator::before {
    content: "";

    width: 10px;
    height: 10px;

    border: 2px solid rgba(79, 140, 255, 0.20);

    border-top-color: var(--primary);

    border-radius: 50%;

    animation: spin 0.8s linear infinite;
}


@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   25. STATUS BAR
   ========================================================= */

.statusbar {
    height: var(--statusbar-height);

    display: grid;

    grid-template-columns: 1fr auto 1fr;

    align-items: center;

    padding: 0 14px;

    background: #070c15;

    border-top: 1px solid var(--border);

    color: var(--text-muted);

    font-size: 8px;
}


.statusbar-left,
.statusbar-right {
    display: flex;
    align-items: center;
    gap: 9px;
}


.statusbar-right {
    justify-content: flex-end;
}


.statusbar-center {
    color: #536176;

    font-size: 8px;

    text-align: center;
}


.footer-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}


.footer-status .status-dot {
    width: 5px;
    height: 5px;

    background: var(--success);
}


.footer-divider {
    width: 1px;
    height: 11px;

    background: var(--border);
}


/* =========================================================
   26. PRESENTATION MODAL
   ========================================================= */

.presenter-modal {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: none;
    flex-direction: column;

    background:
        radial-gradient(
            circle at 50% 35%,
            rgba(79, 140, 255, 0.07),
            transparent 40%
        ),
        #000000;

    color: #ffffff;
}


.presenter-modal.active {
    display: flex;
}


.presenter-toolbar {
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 20px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

    background: rgba(0, 0, 0, 0.55);
}


.presenter-brand {
    color: #dce6f5;

    font-size: 11px;
    font-weight: 700;
}


.presenter-mode {
    color: var(--accent);

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 1.3px;
}


.presenter-close {
    padding: 7px 11px;

    border: 1px solid rgba(255, 255, 255, 0.12);

    border-radius: 6px;

    background: rgba(255, 255, 255, 0.05);

    color: #ffffff;

    font-size: 9px;
    font-weight: 700;
}


.presenter-close:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.35);
}


.presenter-content {
    flex: 1;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 22px;

    padding: 50px 8%;

    text-align: center;
}


.presenter-reference {
    color: var(--accent);

    font-size: clamp(20px, 3vw, 42px);

    font-weight: 800;

    letter-spacing: 0.3px;
}


.presenter-text {
    max-width: 1400px;

    color: #ffffff;

    font-family:
        "Noto Sans Tamil",
        "Segoe UI",
        sans-serif;

    font-size: clamp(28px, 4vw, 64px);

    line-height: 1.7;

    font-weight: 500;
}


.presenter-footer {
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #4b5563;

    font-size: 8px;

    letter-spacing: 0.7px;
}


/* =========================================================
   27. LOWER THIRD MODE
   ========================================================= */

.lower-third-active {
    background: transparent;

    justify-content: flex-end;
}


.lower-third-active .presenter-content {
    flex: initial;

    align-items: flex-start;

    margin: 0 0 55px;

    padding: 20px 5%;

    border-left: 7px solid var(--primary);

    border-radius: 0 10px 10px 0;

    background: rgba(0, 0, 0, 0.88);

    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.45);

    text-align: left;
}


.lower-third-active .presenter-reference {
    font-size: clamp(16px, 2vw, 27px);
}


.lower-third-active .presenter-text {
    max-width: 90%;

    font-size: clamp(17px, 2vw, 30px);

    line-height: 1.55;
}


/* =========================================================
   28. TOAST
   ========================================================= */

.toast-container {
    position: fixed;

    right: 18px;
    bottom: 48px;

    z-index: 10000;

    display: flex;
    flex-direction: column;

    gap: 8px;

    pointer-events: none;
}


.toast {
    min-width: 230px;
    max-width: 340px;

    padding: 11px 13px;

    border: 1px solid var(--border-light);

    border-radius: 9px;

    background:
        rgba(15, 23, 36, 0.96);

    color: var(--text-primary);

    box-shadow: var(--shadow-md);

    font-size: 10px;

    animation:
        toastIn 0.22s ease forwards;
}


@keyframes toastIn {

    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================================================
   29. UTILITY STATES
   ========================================================= */

.hidden {
    display: none !important;
}


.disabled {
    opacity: 0.45;
    pointer-events: none;
}


.is-loading {
    pointer-events: none;
}


.focus-ring:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}


/* =========================================================
   30. ACCESSIBILITY
   ========================================================= */

button:focus-visible,
input:focus-visible,
label:focus-visible {
    outline: 2px solid rgba(79, 140, 255, 0.75);
    outline-offset: 2px;
}


/* =========================================================
   31. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

}

/* =========================================================
   LIGHT THEME — PROFESSIONAL WORKSPACE
   ========================================================= */

body.light-theme {
    --bg-main: #f3f6fa;
    --bg-secondary: #eaf0f6;
    --bg-tertiary: #e2e9f2;

    --panel: #ffffff;
    --panel-light: #f8fafc;
    --panel-hover: #eef4ff;

    --border: rgba(15, 23, 42, 0.10);
    --border-light: rgba(15, 23, 42, 0.16);
    --border-primary: rgba(37, 99, 235, 0.30);

    --text-primary: #172033;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-dark: #0f172a;

    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 8px 25px rgba(15, 23, 42, 0.11);
    --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.14);
}

body.light-theme {
    background: var(--bg-main);
    color: var(--text-primary);
}

body.light-theme #app {
    background:
        radial-gradient(circle at 20% 0%, rgba(79, 140, 255, 0.08), transparent 30%),
        radial-gradient(circle at 85% 15%, rgba(245, 196, 81, 0.07), transparent 25%),
        var(--bg-main);
}

body.light-theme .topbar {
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
    border-bottom-color: var(--border);
}

body.light-theme .sidebar {
    background: linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
    border-right-color: var(--border);
}

body.light-theme .main-content {
    background: linear-gradient(180deg, rgba(255,255,255,.72), transparent);
}

body.light-theme .right-panel {
    background: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
    border-left-color: var(--border);
}

body.light-theme .statusbar {
    background: #e8edf3;
    border-top-color: var(--border);
    color: var(--text-muted);
}

body.light-theme .statusbar-center {
    color: #64748b;
}

body.light-theme .system-status,
body.light-theme .icon-button,
body.light-theme .quick-button,
body.light-theme .session-info {
    background: rgba(255,255,255,.78);
    border-color: var(--border);
    color: var(--text-secondary);
}

body.light-theme .icon-button:hover,
body.light-theme .quick-button:hover {
    background: var(--panel-hover);
    color: var(--text-primary);
    border-color: var(--border-light);
}

body.light-theme .upload-button {
    background: rgba(79,140,255,.065);
    border-color: rgba(37,99,235,.28);
    color: var(--text-primary);
}

body.light-theme .upload-button:hover {
    background: rgba(79,140,255,.11);
}

body.light-theme .mic-button {
    background: rgba(255,255,255,.80);
    border-color: var(--border);
    color: var(--text-primary);
}

body.light-theme .mic-button:hover {
    background: rgba(79,140,255,.08);
}

body.light-theme .quick-button-main {
    background: rgba(79,140,255,.09);
    border-color: rgba(79,140,255,.22);
}

body.light-theme .panel {
    background: #ffffff;
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

body.light-theme .panel-icon {
    background: rgba(79,140,255,.09);
}

body.light-theme .speech-display {
    background: radial-gradient(circle at center, rgba(79,140,255,.065), transparent 55%);
}

body.light-theme .search-input {
    background: #ffffff;
    color: var(--text-primary);
    border-color: var(--border);
}

body.light-theme .search-input::placeholder {
    color: #94a3b8;
}

body.light-theme .search-input:focus {
    background: #ffffff;
    border-color: rgba(37,99,235,.50);
}

body.light-theme .result-card,
body.light-theme .history-item {
    background: #f8fafc;
    border-color: var(--border);
}

body.light-theme .result-card:hover,
body.light-theme .history-item:hover {
    background: #eef4ff;
}

body.light-theme .empty-state-icon,
body.light-theme .placeholder-icon {
    background: rgba(15,23,42,.045);
}

body.light-theme .verse-preview {
    background: radial-gradient(circle at 50% 0%, rgba(245,196,81,.10), transparent 65%);
}

body.light-theme kbd {
    background: #ffffff;
    border-color: var(--border-light);
    color: var(--text-secondary);
}

body.light-theme .shortcut-item {
    border-bottom-color: rgba(15,23,42,.07);
}

body.light-theme .toast {
    background: rgba(255,255,255,.98);
    color: var(--text-primary);
    border-color: var(--border-light);
}

body.light-theme ::-webkit-scrollbar-track {
    background: rgba(15,23,42,.035);
}

body.light-theme ::-webkit-scrollbar-thumb {
    background: #c7d1dd;
}

body.light-theme ::-webkit-scrollbar-thumb:hover {
    background: #aebdcd;
}

body.light-theme .settings-dialog {
    background: #ffffff !important;
    color: var(--text-primary) !important;
    border-color: var(--border-light) !important;
    box-shadow: var(--shadow-lg) !important;
}

body.light-theme .settings-head,
body.light-theme .settings-foot {
    border-color: var(--border) !important;
}

body.light-theme .settings-select {
    background: #f8fafc !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}

body.light-theme .settings-btn {
    background: #f8fafc;
    color: var(--text-primary);
    border-color: var(--border);
}

body.light-theme .settings-btn:hover {
    background: #eef4ff;
}
