.citation-translation.no-border {
    border-left: none;
    padding-left: 0;
}
.verse-number {
    font-size: 0.7em;
    vertical-align: super;
    color: #b3b3b3;
    margin-right: 3px;
}

.verse-segment {
    margin-right: 4px;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    overflow: hidden;
}

body {
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
    padding-top: calc(env(safe-area-inset-top, 0px) + var(--vv-offset-top, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #ffffff;
    color: #333333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
    padding-top: calc(env(safe-area-inset-top, 0px) + var(--vv-offset-top, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    width: 100%;
    display: flex;
    flex-direction: column;
    height: calc(var(--vv-height, 100vh) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    overflow: hidden;
}

.container > header,
.container > .chat-container,
.container > .chat-input-container {
    padding-left: 20px;
    padding-right: 20px;
}

header {
    text-align: center;
    padding: 40px 20px 30px;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 0;
    flex-shrink: 0;
}

.full-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    padding: 40px 20px 30px;
}

.full-header-content {
    flex: 1;
    text-align: center;
}

.full-header .hamburger-menu {
    position: relative;
}

.full-header .hamburger-dropdown {
    position: absolute;
    left: 20px;
    top: calc(40px + 30px + 2px);
    padding: 4px 0;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    color: #808080;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

/* Minimalist header */
.minimalist-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 0;
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 5;
    background-color: #ffffff;
    flex-shrink: 0;
}

.minimalist-title {
    font-size: 1.25rem;
    font-weight: 400;
    color: #808080;
    margin: 0;
    text-align: left;
    letter-spacing: -0.3px;
}

.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 1001;
    position: relative;
}

.hamburger-menu span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #333333;
    transition: all 0.3s ease;
}

.hamburger-menu:hover span {
    background-color: #1a1a1a;
}

.hamburger-dropdown {
    position: absolute;
    top: calc(100% - 2px);
    left: 0;
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    border-top: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    display: none;
    z-index: 1000;
    padding: 4px 0;
}

.hamburger-dropdown.open {
    display: block;
}

.hamburger-dropdown .menu-item {
    display: block;
    padding: 12px 20px;
    color: #333333;
    text-decoration: none;
    font-size: 0.95rem;
    text-align: left;
    transition: background-color 0.2s;
}

.hamburger-dropdown .menu-item:hover {
    background-color: #f5f5f5;
}

.hamburger-dropdown .menu-item:active {
    background-color: #e5e5e5;
}

.subtitle {
    color: #b3b3b3;
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 15px;
}

.bible-selector {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.bible-checkbox-list {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.bible-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #333333;
    cursor: pointer;
    --checkbox-color: #a0a0a0;
}

.bible-checkbox input[type="checkbox"] {
    appearance: none;
    position: absolute;
    opacity: 0;
}

.checkbox-box {
    width: 18px;
    height: 18px;
    border: 1px solid var(--checkbox-color);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f4f4f4;
    transition: border-color 0.2s, background-color 0.2s;
}

.bible-checkbox input[type="checkbox"]:checked + .checkbox-box {
    background-color: var(--checkbox-color);
    border-color: var(--checkbox-color);
}

.bible-checkbox input[type="checkbox"]:checked + .checkbox-box::after {
    content: '';
    width: 5px;
    height: 7px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(45deg);
    margin-top: -1px;
}

.checkbox-label {
    flex: 1;
    white-space: nowrap;
}
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #ffffff;
    min-height: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 0;
}

.message {
    display: flex;
    max-width: 80%;
    animation: fadeIn 0.3s ease-in;
}

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

.user-message {
    align-self: flex-end;
    justify-content: flex-end;
}

.bot-message {
    align-self: flex-start;
    justify-content: flex-start;
}

.message-content {
    padding: 14px 18px;
    border-radius: 18px;
    line-height: 1.5;
    word-wrap: break-word;
}

.user-message .message-content {
    background-color: #f5f5f5;
    color: #1a1a1a;
    border: 1px solid #e5e5e5;
}

.bot-message .message-content {
    background-color: #fafafa;
    color: #333333;
    border: 1px solid #e5e5e5;
}

.message-content p {
    margin: 0;
    font-size: 0.95rem;
}

.segment-block {
    margin-bottom: 16px;
}

.segment-block:last-child {
    margin-bottom: 0;
}

.segment-reference-label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #1a1a1a;
}

.citation-missing {
    font-size: 0.85rem;
    color: #a33b3b;
}

.citation {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e5e5;
}

.citation-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666666;
    margin-bottom: 6px;
}

.citation-item {
    font-size: 0.9rem;
    color: #333333;
    margin: 4px 0;
    padding-left: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.citation-item strong {
    color: #1a1a1a;
    font-weight: 600;
}

.citation-reference {
    margin-bottom: 4px;
}

.citation-translation {
    font-size: 0.85rem;
    margin-bottom: 6px;
    padding-left: 10px;
    border-left: 3px solid #d0d0d0;
}

.citation-translation-name {
    font-weight: 600;
    margin-right: 6px;
    color: #222222;
}

.citation-content {
    flex: 1;
    min-width: 0;
}

.citation-item.single-translation .citation-translation {
    border-left-width: 3px;
    padding-left: 10px;
}

.citation-item.single-translation .citation-translation.no-border {
    border-left: 3px solid #d0d0d0;
    padding-left: 10px;
}

.expand-button {
    background: none;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: all 0.2s;
    color: #666666;
    font-size: 16px;
    line-height: 1;
}

.expand-button:hover:not(:disabled) {
    background-color: #f5f5f5;
    border-color: #999999;
    color: #333333;
}

.expand-button:active:not(:disabled) {
    transform: scale(0.95);
}

.expand-button:disabled {
    opacity: 0.5;
    cursor: wait;
}

.expand-icon {
    display: inline-block;
    font-weight: 300;
    user-select: none;
}

.citation-item.expanded {
    border-left-color: #999999;
}

.hidden {
    display: none;
}

.chat-input-container {
    padding: 20px;
    border-top: 1px solid #e5e5e5;
    background-color: #ffffff;
    flex-shrink: 0;
}

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

.message-input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid #e5e5e5;
    border-radius: 24px;
    font-size: 1rem;
    background-color: #ffffff;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.2s;
}

.message-input:focus {
    border-color: #b0b0b0;
}

.message-input::placeholder {
    color: #999999;
}

.send-button {
    width: 44px;
    height: 44px;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    background-color: #ffffff;
    color: #333333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.send-button:hover:not(:disabled) {
    background-color: #f5f5f5;
    border-color: #b0b0b0;
}

.send-button:active:not(:disabled) {
    transform: scale(0.95);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e5e5;
    border-top-color: #333333;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #fafafa;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* Bible Selector Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background-color: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 400;
    color: #808080;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #b3b3b3;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.modal-close:hover {
    background-color: #f5f5f5;
    color: #808080;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-body .bible-selector {
    margin-top: 0;
}

.modal-body .bible-checkbox-list {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    text-align: left;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: flex-end;
}

.modal-button {
    padding: 10px 24px;
    background-color: #808080;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.modal-button:hover {
    background-color: #666666;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0;
        padding-top: env(safe-area-inset-top, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    }

    .container > header,
    .container > .chat-container,
    .container > .chat-input-container {
        padding-left: 10px;
        padding-right: 10px;
    }

    header {
        padding: 20px 10px 15px;
    }

    .full-header {
        padding: 20px 10px 15px;
    }

    .full-header .hamburger-menu {
        left: 10px;
        top: 20px;
    }

    header h1 {
        font-size: 2rem;
    }

    .minimalist-header {
        padding: 10px 16px;
        padding-top: calc(10px + env(safe-area-inset-top, 0px));
    }

    .minimalist-title {
        font-size: 1.1rem;
    }

    .hamburger-menu {
        padding: 6px;
    }

    .hamburger-menu span {
        width: 20px;
    }

    .hamburger-dropdown {
        min-width: 180px;
    }

    .message {
        max-width: 90%;
    }

    .chat-messages {
        padding: 15px;
        min-height: auto;
        padding-bottom: 140px;
    }

    .debug-table th,
    .debug-table td {
        white-space: normal;
    }

    .chat-input-container {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 12px 16px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
        border-top: 1px solid #e5e5e5;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
        background-color: #ffffff;
        z-index: 1000;
    }

    .modal-overlay {
        padding: 10px;
    }

    .modal-content {
        max-height: 85vh;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        padding: 12px 20px;
    }
}

