.chat-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 1rem;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: #111827;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 0.5rem 0 1.5rem 0;
}

.chat-back {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.chat-back:hover {
    color: #111827;
}

.chat-main {
    flex: 1;
}

.chat-title {
    margin: 0 0 0.35rem 0;
    font-size: 1.6rem;
    font-weight: 800;
    color: #111827;
}

.chat-subtitle {
    margin: 0 0 1.5rem 0;
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.4;
}

.chat-search {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.chat-input {
    flex: 1;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    font-size: 0.95rem;
    color: #111827;
    outline: none;
    font-family: inherit;
}

.chat-input:focus {
    border-color: rgba(37, 99, 235, 0.6);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.chat-btn {
    padding: 0.7rem 1.2rem;
    border-radius: 10px;
    border: 1px solid transparent;
    background: #2563eb;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.chat-btn:hover {
    background: #1d4ed8;
}

.chat-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.chat-loading {
    padding: 1rem 0;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 600;
}

.chat-results {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-result {
    display: block;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: inherit;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.chat-result:hover {
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.chat-result-title {
    font-weight: 700;
    font-size: 1rem;
    color: #111827;
    margin-bottom: 0.3rem;
}

.chat-result-reason {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.35;
    margin-bottom: 0.3rem;
}

.chat-result-url {
    font-size: 0.8rem;
    color: #9ca3af;
    font-family: monospace;
}

.chat-empty {
    padding: 1rem 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.chat-error {
    padding: 1rem 0;
    color: #dc2626;
    font-size: 0.9rem;
    font-weight: 600;
}

.chat-suggestions {
    margin-top: 1.5rem;
}

.chat-suggestions-title {
    margin: 0 0 0.6rem 0;
    font-size: 0.85rem;
    color: #9ca3af;
    font-weight: 600;
}

.chat-suggestion {
    display: inline-block;
    margin: 0 0.4rem 0.4rem 0;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #374151;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
}

.chat-suggestion:hover {
    border-color: #d1d5db;
    background: #f3f4f6;
}

.chat-footer {
    padding: 2rem 0 1rem 0;
    text-align: center;
}

.chat-footer a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.85rem;
}

.chat-footer a:hover {
    color: #6b7280;
}

/* Feedback */
.chat-feedback {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-feedback-label {
    font-size: 0.9rem;
    color: #6b7280;
}

.chat-feedback-btn {
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.3rem 0.6rem;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
}

.chat-feedback-btn:hover {
    background: #f3f4f6;
}

.chat-feedback-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.chat-feedback-thanks {
    font-size: 0.85rem;
    color: #059669;
    font-weight: 600;
}

/* Request feature */
.chat-request-prompt {
    margin-top: 0.75rem;
}

.chat-request-btn {
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    border: 1px solid #2563eb;
    background: transparent;
    color: #2563eb;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.chat-request-btn:hover {
    background: #eff6ff;
}

.chat-request-form {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-width: 400px;
}

.chat-request-text {
    padding: 0.5rem 0.7rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
}

.chat-request-email {
    padding: 0.5rem 0.7rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
}

.chat-request-send {
    align-self: flex-start;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    border: 1px solid transparent;
    background: #2563eb;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
}

.chat-request-send:hover {
    background: #1d4ed8;
}

.chat-request-send:disabled {
    opacity: 0.5;
    cursor: default;
}

.chat-request-thanks {
    font-size: 0.85rem;
    color: #059669;
    font-weight: 600;
}

@media (max-width: 480px) {
    .chat-search {
        flex-direction: column;
    }

    .chat-btn {
        width: 100%;
    }

    .chat-title {
        font-size: 1.3rem;
    }
}
