* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Graphik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #fff;
    color: #000;
}

.placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 24px;
}

.placeholder h1 {
    font-size: 2.5rem;
    margin: 0 0 12px;
    color: #000;
    font-weight: 700;
}

.placeholder p {
    font-size: 1.15rem;
    color: #000;
    max-width: 520px;
    line-height: 1.5;
}

#chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
}

#chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: #000;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

#chat-toggle svg {
    width: 28px;
    height: 28px;
}

#chat-toggle:hover {
    transform: scale(1.05);
}

#chat-window {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 360px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#chat-window.hidden {
    display: none;
}

#chat-header {
    background: #000;
    color: #fff;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    flex-shrink: 0;
}

#chat-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

#chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    line-height: 1.5;
    font-size: 14px;
    word-wrap: break-word;
}

.message p {
    margin: 0 0 8px;
}

.message p:last-child {
    margin-bottom: 0;
}

.message strong {
    font-weight: 700;
}

.message em {
    font-style: italic;
}

.message.user {
    align-self: flex-end;
    background: #000;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.message.assistant {
    align-self: flex-start;
    background: #f5f5f5;
    color: #000;
    border-bottom-left-radius: 4px;
}

#chat-typing {
    padding: 0 16px 8px;
    font-size: 13px;
    color: #000;
    flex-shrink: 0;
}

#chat-typing.hidden {
    display: none;
}

.dots::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

#chat-input-area {
    display: flex;
    padding: 12px;
    border-top: 1px solid #eee;
    gap: 8px;
    flex-shrink: 0;
}

#chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
}

#chat-input:focus {
    border-color: #000;
}

#chat-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #000;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#chat-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    #chat-window {
        width: calc(100vw - 48px);
        height: 70vh;
        right: 0;
    }
}
