* { box-sizing: border-box; }

body { font-family: 'Segoe UI', Tahoma, sans-serif; background: #f0f4f9; margin: 0; padding: 0; display: flex; flex-direction: column; height: 100vh; overflow: hidden; position: relative; }
.header { background: white; padding: 10px; display: flex; flex-direction: column; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.05); z-index: 10; flex-shrink: 0; position: relative; }

.btn-cabinet {
    position: absolute;
    top: 10px;
    right: 12px;
    background: #f0f4f9;
    border: 1px solid #dce4ec;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5f6368;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-cabinet:hover { background: #e2e7ef; color: #1f1f1f; }
.btn-cabinet svg { width: 20px; height: 20px; fill: currentColor; }

.avatar-container { position: relative; width: 154px; height: 154px; display: flex; align-items: center; justify-content: center; margin: 0 auto; }
.avatar-container::before { content: ''; position: absolute; width: 100%; height: 100%; border-radius: 50%; background: linear-gradient(45deg, #ff9a9e, #fad0c4, #a1c4fd, #c2e9fb); z-index: 1; animation: glowRotate 6s linear infinite; filter: blur(8px); opacity: 0.8; }
@keyframes glowRotate { 0% { transform: rotate(0deg) scale(1); } 50% { transform: rotate(180deg) scale(1.05); } 100% { transform: rotate(360deg) scale(1); } }
.header .avatar { width: 146px; height: 146px; border-radius: 50%; object-fit: cover; position: relative; z-index: 2; border: 3px solid #ffffff; background-color: #fff; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }

.sparkle { position: absolute; width: 6px; height: 6px; background: #ffdf00; border-radius: 50%; z-index: 3; box-shadow: 0 0 8px #ffcc00; animation: sparkleFloat 3s ease-in-out infinite; pointer-events: none; }
.sparkle:nth-child(1) { top: 10px; left: 10%; animation-delay: 0s; }
.sparkle:nth-child(2) { bottom: 15px; right: 15%; animation-delay: 1.5s; width: 8px; height: 8px; background: #ff85a2; box-shadow: 0 0 10px #ff5d8f; }
.sparkle:nth-child(3) { top: 25px; right: 10%; animation-delay: 0.8s; width: 5px; height: 5px; background: #a29bfe; box-shadow: 0 0 8px #6c5ce7; }
@keyframes sparkleFloat { 0%, 100% { transform: translateY(0) scale(0.8); opacity: 0.4; } 50% { transform: translateY(-8px) scale(1.2); opacity: 1; } }

.promo-block { display: flex; flex-direction: column; align-items: center; margin-top: 10px; padding: 10px; background: #eef2f6; border-radius: 12px; border: 1px solid #dce4ec; }
.promo-block p { margin: 0 0 8px 0; font-size: 13px; color: #444746; font-weight: 500; text-align: center; }
.promo-qr { width: 100px; height: 100px; border-radius: 8px; margin-bottom: 8px; object-fit: cover; border: 1px solid #c7d0d9; }
.promo-link { display: inline-block; background: #0077ff; color: white; text-decoration: none; padding: 8px 16px; border-radius: 20px; font-size: 14px; font-weight: bold; transition: background 0.2s; }
.promo-link:hover { background: #005ce6; }

.chat-container { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 15px; padding-bottom: 90px; scroll-behavior: smooth; }
.welcome-text { font-size: 15px; color: #5f6368; text-align: center; margin-top: 5px; margin-bottom: 15px; line-height: 1.4; font-weight: 500; }

.message { max-width: 85%; padding: 12px 16px; border-radius: 20px; font-size: 15px; line-height: 1.4; word-wrap: break-word; }
.message.bot { background: white; color: #1f1f1f; align-self: flex-start; border-bottom-left-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.message.user { background: #d3e3fd; color: #041e49; align-self: flex-end; border-bottom-right-radius: 4px; }

.btn-play-msg { background: transparent; border: none; color: #0b57d0; cursor: pointer; padding: 4px; margin-left: 8px; border-radius: 50%; display: inline-flex; vertical-align: middle; transition: background 0.2s; opacity: 0.7; }
.btn-play-msg:hover { background: #e8f0fe; opacity: 1; }

.input-area { position: fixed; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, #f0f4f9 85%, rgba(240,244,249,0)); padding: 10px 15px 20px 15px; z-index: 20; }
.capsule { display: flex; align-items: center; background: #ffffff; border-radius: 30px; padding: 6px 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.08); gap: 4px; border: 1px solid #e2e3e5; }
.btn-icon { background: transparent; border: none; padding: 8px; cursor: pointer; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #444746; transition: background 0.2s; flex-shrink: 0; }
.btn-icon:hover { background: #f0f4f9; }
.btn-icon svg { width: 24px; height: 24px; fill: currentColor; }
.capsule input { flex: 1; border: none; outline: none; font-size: 16px; padding: 10px 8px; background: transparent; min-width: 0; }
.capsule input::placeholder { color: #5f6368; }
.btn-mic.recording { color: #d93025; animation: pulse 1.5s infinite; background: #fce8e6; }
.btn-send { color: #0b57d0; }
.btn-send:hover { background: #e8f0fe; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }

#lockOverlay { display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.95); z-index: 100; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; }
#lockOverlay h2 { color: #d93025; margin-bottom: 10px; }
#lockOverlay p { color: #5f6368; font-size: 16px; line-height: 1.5; }