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

body {
    font-family: -apple-system, sans-serif;
    background: #f5f5f5;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

#header {
    background: #1a1a2e;
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#header h1 { font-size: 18px; }

#btn-close {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: none;
}

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

.message {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    font-size: 15px;
}

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

.message.coach {
    background: white;
    color: #1a1a2e;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.message.system {
    background: #fff3cd;
    color: #856404;
    align-self: center;
    font-size: 13px;
    max-width: 90%;
    text-align: center;
}

#input-area {
    padding: 16px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

#input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    resize: none;
    font-family: inherit;
}

#btn-send {
    background: #1a1a2e;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
}

#btn-send:disabled { opacity: 0.5; cursor: not-allowed; }

#btn-start {
    margin: auto;
    background: #1a1a2e;
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
}
