#lc-widget {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 99999;
    font-family: 'Inter', sans-serif;
}

#lc-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #FCD300;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    box-shadow: 0 4px 20px rgba(252, 211, 0, .35), 0 2px 8px rgba(0,0,0,.2);
    transition: transform .2s, box-shadow .2s;
    position: relative;
}

#lc-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(252, 211, 0, .45), 0 4px 12px rgba(0,0,0,.25);
}

#lc-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: .65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0a0a0a;
}

#lc-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 370px;
    max-height: 520px;
    background: #111111;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(.96);
    transition: opacity .25s, transform .25s, visibility .25s;
}

#lc-window.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

#lc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #111 100%);
    border-bottom: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
}

#lc-header-title {
    font-weight: 700;
    font-size: .9rem;
    color: #fff;
}

#lc-header-sub {
    font-size: .68rem;
    color: rgba(255,255,255,.45);
    margin-top: .15rem;
}

#lc-close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,.4);
    cursor: pointer;
    padding: .3rem;
    border-radius: 6px;
    transition: color .2s, background .2s;
}

#lc-close-btn:hover {
    color: #fff;
    background: rgba(255,255,255,.06);
}

#lc-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#lc-start-form {
    padding: 1.5rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: .8rem;
}

#lc-welcome {
    text-align: center;
    margin-bottom: .5rem;
}

#lc-welcome-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(252, 211, 0, .08);
    border: 1px solid rgba(252, 211, 0, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto .8rem;
    color: #FCD300;
}

#lc-welcome h3 {
    font-size: .95rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 .3rem;
}

#lc-welcome p {
    font-size: .76rem;
    color: rgba(255,255,255,.45);
    margin: 0;
}

#lc-start-form input {
    width: 100%;
    padding: .75rem 1rem;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    color: #fff;
    font-size: .84rem;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
}

#lc-start-form input:focus {
    border-color: #FCD300;
}

#lc-start-form input::placeholder {
    color: rgba(255,255,255,.3);
}

#lc-start-btn {
    width: 100%;
    padding: .8rem;
    background: #FCD300;
    color: #000;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: .84rem;
    cursor: pointer;
    transition: background .2s, transform .1s;
    margin-top: .2rem;
}

#lc-start-btn:hover {
    background: #e5c000;
}

#lc-start-btn:active {
    transform: scale(.98);
}

#lc-start-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

#lc-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    min-height: 280px;
    max-height: 340px;
}

#lc-msg-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.lc-msg {
    max-width: 82%;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    animation: lcMsgIn .2s ease;
}

.lc-msg-visitor {
    align-self: flex-end;
    align-items: flex-end;
}

.lc-msg-admin {
    align-self: flex-start;
    align-items: flex-start;
}

.lc-msg-bubble {
    padding: .6rem .9rem;
    border-radius: 12px;
    font-size: .82rem;
    line-height: 1.55;
    word-break: break-word;
}

.lc-msg-visitor .lc-msg-bubble {
    background: #FCD300;
    color: #000;
    border-bottom-right-radius: 3px;
}

.lc-msg-admin .lc-msg-bubble {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    color: #fff;
    border-bottom-left-radius: 3px;
}

.lc-msg-time {
    font-size: .58rem;
    color: rgba(255,255,255,.3);
    padding: 0 .2rem;
}

#lc-typing {
    font-size: .68rem;
    color: #FCD300;
    padding: .2rem .2rem;
    opacity: 0;
    transition: opacity .3s;
    min-height: 1rem;
}

#lc-typing.show {
    opacity: 1;
}

#lc-input {
    display: flex;
    align-items: flex-end;
    gap: .4rem;
    padding: .7rem .8rem;
    border-top: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
    background: rgba(255,255,255,.02);
}

#lc-textarea {
    flex: 1;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    padding: .65rem .9rem;
    color: #fff;
    font-size: .82rem;
    font-family: inherit;
    resize: none;
    min-height: 38px;
    max-height: 100px;
    line-height: 1.4;
    outline: none;
    transition: border-color .2s;
}

#lc-textarea:focus {
    border-color: #FCD300;
}

#lc-textarea::placeholder {
    color: rgba(255,255,255,.3);
}

#lc-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #FCD300;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    flex-shrink: 0;
    transition: background .2s, transform .1s;
}

#lc-send-btn:hover {
    background: #e5c000;
}

#lc-send-btn:active {
    transform: scale(.92);
}

#lc-send-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

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

@media (max-width: 480px) {
    #lc-window {
        width: calc(100vw - 2rem);
        right: -0.5rem;
        max-height: 70vh;
    }
}
