:root {
    --bg-dark: #0f141c;
    --bg-card: #182232;
    --bg-bubble-user: #2d4564;
    --bg-bubble-bot: #1c2a3d;
    --gold: #d4af37;
    --gold-light: #f3e5ab;
    --text-primary: #f0f4f8;
    --text-muted: #94a3b8;
    --border-subtle: #2a3b50;
    --accent-red: #ef4444;
    --accent-green: #10b981;
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.app-container {
    width: 100%;
    max-width: 900px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-dark);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border-left: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
}

/* Header */
.header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, #182232 0%, #121924 100%);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bible-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
}

.app-title {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.5px;
}

.app-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.select-pill {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
}

.handsfree-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.handsfree-pill.active {
    border-color: var(--accent-green);
    color: #4ade80;
    background-color: rgba(16, 185, 129, 0.1);
}

.handsfree-pill.inactive {
    border-color: var(--border-subtle);
    color: var(--text-muted);
    background-color: var(--bg-card);
}

.handsfree-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #4ade80;
    box-shadow: 0 0 6px #4ade80;
    transition: all 0.2s;
}

.handsfree-pill.inactive .handsfree-dot {
    background-color: var(--text-muted);
    box-shadow: none;
}

.clear-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all 0.2s;
}

.clear-btn:hover {
    color: #fca5a5;
    border-color: var(--accent-red);
    background-color: rgba(239, 68, 68, 0.12);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    background-color: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 12px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

/* Chat Main */
.chat-main {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    scroll-behavior: smooth;
}

.welcome-card {
    text-align: center;
    padding: 36px 20px;
    background: radial-gradient(circle, #1a273a 0%, #121924 100%);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    margin-top: 10px;
}

.welcome-symbol {
    font-size: 36px;
    margin-bottom: 12px;
}

.welcome-card h2 {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    color: var(--gold);
    margin-bottom: 8px;
}

.welcome-card p {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 500px;
    margin: 0 auto 20px;
}

.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.chip {
    background: var(--bg-bubble-bot);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.chip:hover {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}

/* Message Rows */
.message-row {
    display: flex;
    width: 100%;
}

.user-row {
    justify-content: flex-end;
}

.assistant-row {
    justify-content: flex-start;
    gap: 10px;
}

.avatar-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.message-bubble {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 14.5px;
    line-height: 1.5;
}

.user-bubble {
    background-color: var(--bg-bubble-user);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.assistant-bubble {
    background-color: var(--bg-bubble-bot);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-bottom-left-radius: 4px;
}

.message-time {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 4px;
}

/* Audio Control */
.audio-control-bar {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.audio-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.audio-play-btn:hover {
    background: var(--gold);
    color: #000;
}

/* Scripture Cards */
.scripture-card {
    margin-top: 12px;
    padding: 12px 16px;
    background-color: #121924;
    border-left: 3px solid var(--gold);
    border-radius: 6px;
}

.scripture-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 6px;
}

.scripture-trans {
    color: var(--text-muted);
    font-size: 11px;
}

.scripture-topic {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
}

.scripture-body {
    font-size: 13.5px;
    font-style: italic;
    color: var(--gold-light);
    line-height: 1.45;
}

.cards-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 10px;
    margin-bottom: 4px;
}

/* Footer Input */
.footer-input {
    padding: 16px 24px;
    background-color: #121924;
    border-top: 1px solid var(--border-subtle);
}

/* Interrupt Bar */
.interrupt-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
    animation: fadeIn 0.2s ease-in-out;
}

.interrupt-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.3) 100%);
    border: 1px solid var(--accent-red);
    color: #fca5a5;
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.25);
}

.interrupt-button:hover {
    background: var(--accent-red);
    color: white;
    transform: scale(1.03);
}

.interrupt-icon {
    font-size: 14px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.input-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mic-button {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 1px solid var(--gold);
    color: var(--gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mic-button:hover {
    background-color: var(--gold);
    color: #000;
}

.mic-button.recording {
    background-color: var(--accent-red);
    border-color: var(--accent-red);
    color: white;
}

.mic-button.continuous-active {
    border-color: var(--accent-green);
    color: #4ade80;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.mic-button.continuous-active .mic-ping {
    border-color: var(--accent-green);
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.mic-ping {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--accent-red);
    opacity: 0;
}

.mic-button.recording .mic-ping {
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
    75%, 100% {
        transform: scale(1.6);
        opacity: 0;
    }
    0% {
        transform: scale(1);
        opacity: 1;
    }
}

.mic-icon {
    width: 20px;
    height: 20px;
}

.text-input {
    flex: 1;
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 12px 18px;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.text-input:focus {
    border-color: var(--gold);
}

.send-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--gold);
    border: none;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s;
}

.send-button:hover {
    transform: scale(1.05);
}

.send-button svg {
    width: 18px;
    height: 18px;
}

.listening-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--gold);
}

.voice-wave {
    display: inline-block;
    width: 4px;
    height: 14px;
    background-color: var(--gold);
    border-radius: 2px;
    animation: wave 1s infinite ease-in-out;
}

.voice-wave:nth-child(2) { animation-delay: 0.2s; }
.voice-wave:nth-child(3) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 100% { height: 6px; }
    50% { height: 18px; }
}

