/* ============================================
   ORCA YAZILIM - 3D AI AVATAR SYSTEM
   Premium Dark Theme + Glassmorphism
   ============================================ */

/* === HERO SECTION === */
#avatar-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0f1a 0%, #0d1b2a 30%, #1b2838 60%, #0a1628 100%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

#avatar-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(49, 222, 121, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(42, 82, 152, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 60% 80%, rgba(49, 222, 121, 0.04) 0%, transparent 40%);
    animation: heroGlow 15s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-2%, 1%) rotate(1deg); }
    100% { transform: translate(1%, -1%) rotate(-1deg); }
}

/* Animated Grid Background */
#avatar-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(49, 222, 121, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(49, 222, 121, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(80px, 80px); }
}

/* === MAIN LAYOUT === */
.avatar-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1400px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 30px 110px;
    gap: 40px;
}

/* === 3D SCENE AREA === */
.avatar-scene-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

#avatar-canvas-container {
    width: 100%;
    max-width: 520px;
    aspect-ratio: 3 / 4;
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 40%, rgba(26, 40, 70, 0.4) 0%, rgba(10, 16, 30, 0.8) 100%);
    border: 1px solid rgba(49, 222, 121, 0.15);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(49, 222, 121, 0.08),
        inset 0 0 30px rgba(49, 222, 121, 0.03);
}

#avatar-canvas-container::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px dashed rgba(49, 222, 121, 0.15);
    border-radius: 22px;
    pointer-events: none;
    z-index: 4;
}

#avatar-canvas-container::after {
    content: '';
    position: absolute;
    top: 14px;
    left: 14px;
    width: 20px;
    height: 20px;
    border-top: 2px solid #31de79;
    border-left: 2px solid #31de79;
    border-top-left-radius: 8px;
    pointer-events: none;
    z-index: 4;
    filter: drop-shadow(0 0 6px rgba(49, 222, 121, 0.8));
}

#avatar-canvas-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    border-radius: 30px;
}

/* === HOLOGRAPHIC HUD OVERLAY === */
.avatar-hud-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    border-radius: 30px;
    overflow: hidden;
}

.hud-scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #31de79, transparent);
    box-shadow: 0 0 15px #31de79;
    opacity: 0.4;
    animation: hudScan 6s ease-in-out infinite;
}

@keyframes hudScan {
    0%, 100% { top: 5%; opacity: 0; }
    10% { opacity: 0.6; }
    50% { top: 95%; opacity: 0.6; }
    90% { opacity: 0.6; }
}

.hud-corner {
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: #31de79;
    filter: drop-shadow(0 0 5px rgba(49, 222, 121, 0.8));
}

.hud-corner.top-left {
    top: 14px;
    left: 14px;
    border-top: 2px solid #31de79;
    border-left: 2px solid #31de79;
    border-top-left-radius: 8px;
}

.hud-corner.top-right {
    top: 14px;
    right: 14px;
    border-top: 2px solid #31de79;
    border-right: 2px solid #31de79;
    border-top-right-radius: 8px;
}

.hud-corner.bottom-left {
    bottom: 14px;
    left: 14px;
    border-bottom: 2px solid #31de79;
    border-left: 2px solid #31de79;
    border-bottom-left-radius: 8px;
}

.hud-corner.bottom-right {
    bottom: 14px;
    right: 14px;
    border-bottom: 2px solid #31de79;
    border-right: 2px solid #31de79;
    border-bottom-right-radius: 8px;
}

.hud-voice-bars {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 20px;
    padding: 4px 8px;
    background: rgba(6, 10, 20, 0.6);
    border: 1px solid rgba(49, 222, 121, 0.2);
    border-radius: 8px;
    backdrop-filter: blur(8px);
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.hud-voice-bars.active {
    opacity: 1;
    border-color: rgba(49, 222, 121, 0.5);
    box-shadow: 0 0 15px rgba(49, 222, 121, 0.2);
}

.hud-voice-bars .bar {
    width: 3px;
    height: 4px;
    background: #31de79;
    border-radius: 2px;
    transition: height 0.1s ease;
}

.hud-voice-bars.active .bar:nth-child(1) { animation: voiceBarAnim 0.4s infinite alternate; }
.hud-voice-bars.active .bar:nth-child(2) { animation: voiceBarAnim 0.3s infinite alternate 0.1s; }
.hud-voice-bars.active .bar:nth-child(3) { animation: voiceBarAnim 0.5s infinite alternate 0.05s; }
.hud-voice-bars.active .bar:nth-child(4) { animation: voiceBarAnim 0.35s infinite alternate 0.15s; }
.hud-voice-bars.active .bar:nth-child(5) { animation: voiceBarAnim 0.45s infinite alternate 0.2s; }

@keyframes voiceBarAnim {
    0% { height: 4px; }
    100% { height: 16px; background: #5efa9e; }
}

.hud-status-badge {
    position: absolute;
    top: 18px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(6, 10, 20, 0.7);
    border: 1px solid rgba(49, 222, 121, 0.25);
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    color: #31de79;
    letter-spacing: 1px;
    backdrop-filter: blur(8px);
}

.hud-camera-reset {
    position: absolute;
    top: 18px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(6, 10, 20, 0.7);
    border: 1px solid rgba(49, 222, 121, 0.25);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #c8d6e5;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.hud-camera-reset:hover {
    background: rgba(49, 222, 121, 0.15);
    color: #31de79;
    border-color: #31de79;
    box-shadow: 0 0 12px rgba(49, 222, 121, 0.3);
}

.hud-live-dot {
    width: 6px;
    height: 6px;
    background: #31de79;
    border-radius: 50%;
    animation: liveDotPulse 1.5s infinite ease-in-out;
    box-shadow: 0 0 8px #31de79;
}

@keyframes liveDotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
}

/* Avatar Glow Ring */
.avatar-glow-ring {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 40px;
    background: radial-gradient(ellipse, rgba(49, 222, 121, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(10px);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.2); }
}

/* Avatar Status Badge */
.avatar-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 6px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-radius: 50px;
    color: #10b981;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.avatar-status .status-dot {
    width: 7px;
    height: 7px;
    background: #10b981;
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    50% { opacity: 0.7; box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
}

/* Avatar Name Badge */
.avatar-name-badge {
    text-align: center;
    margin-top: 12px;
}

.avatar-name-badge h3 {
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.5px;
}

.avatar-name-badge p {
    color: rgba(200, 214, 229, 0.6);
    font-size: 12px;
    margin: 3px 0 0;
    font-weight: 500;
}

/* === CHAT PANEL === */
.chat-panel {
    width: 440px;
    min-width: 380px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

/* Chat Header */
.chat-header {
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #31de79, #1a9f52);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(49, 222, 121, 0.3);
}

.chat-header-info h4 {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.chat-header-info p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    margin: 2px 0 0;
}

.chat-header-actions {
    display: flex;
    gap: 8px;
}

.chat-header-actions button {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.chat-header-actions button:hover {
    background: rgba(49, 222, 121, 0.15);
    color: #31de79;
    border-color: rgba(49, 222, 121, 0.3);
}

/* ==========================================================================
   WHATSAPP STYLE CHAT MESSAGES
   ========================================================================== */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 300px;
    max-height: 420px;
    scroll-behavior: smooth;
    background: radial-gradient(circle at 50% 30%, rgba(18, 30, 39, 0.75) 0%, rgba(11, 20, 26, 0.95) 100%);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

/* Chat Message Item */
.chat-message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
    animation: messageSlideIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}

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

/* --- ASİSTAN (BOT) MESAJI - SOLA YASLI WHATSAPP STİLİ --- */
.chat-message.bot {
    align-self: flex-start;
    justify-content: flex-start;
    flex-direction: row;
}

.chat-message.bot .message-content {
    max-width: 82%;
}

.chat-message.bot .message-bubble {
    background: #202c33;
    color: #e9edef;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid #31de79;
    border-radius: 14px 14px 14px 3px;
    padding: 8px 12px 6px 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    position: relative;
    word-break: break-word;
}

/* --- KULLANICI MESAJI - SAĞA YASLI WHATSAPP YEŞİLİ --- */
.chat-message.user {
    align-self: flex-end;
    justify-content: flex-end;
    flex-direction: row;
    margin-left: auto;
}

.chat-message.user .message-content {
    max-width: 82%;
    display: flex;
    justify-content: flex-end;
}

.chat-message.user .message-bubble {
    background: #005c4b;
    color: #ffffff;
    border: 1px solid rgba(49, 222, 121, 0.3);
    border-radius: 14px 14px 3px 14px;
    padding: 8px 12px 6px 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    position: relative;
    word-break: break-word;
    text-align: left;
}

/* --- AVATARLAR --- */
.message-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 2px;
}

.message-avatar.bot-avatar {
    overflow: hidden;
    padding: 0;
    border: 2px solid #31de79;
    box-shadow: 0 0 10px rgba(49, 222, 121, 0.35);
}

.message-avatar.bot-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.message-avatar.user-avatar {
    background: linear-gradient(135deg, #128C7E, #075E54);
    color: #ffffff;
    font-size: 13px;
    border: 1.5px solid rgba(49, 222, 121, 0.4);
    box-shadow: 0 2px 8px rgba(0, 92, 75, 0.35);
}

/* --- GÖNDEREN BAŞLIĞI / ETİKETİ --- */
.message-sender {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.2px;
}

.message-sender.bot-sender {
    color: #31de79;
}

.message-sender.user-sender {
    color: #a7f3d0;
    justify-content: flex-end;
}

/* --- METİN ALANI --- */
.message-text {
    font-size: 13.5px;
    line-height: 1.55;
    color: inherit;
}

.chat-message.bot .message-text {
    color: #e9edef;
}

.chat-message.user .message-text {
    color: #ffffff;
}

/* --- ZAMAN DAMGASI VE MAVİ TİK (WHATSAPP META) --- */
.message-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 3px;
    font-size: 10.5px;
    line-height: 1;
}

.chat-message.bot .message-meta {
    color: #8696a0;
}

.chat-message.user .message-meta {
    color: rgba(255, 255, 255, 0.7);
}

.message-time {
    font-size: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
}

.message-ticks {
    color: #53bdeb;
    font-size: 11px;
    display: inline-flex;
}

/* Voice Note Player in Chat Bubble */
.voice-note-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 2px;
    min-width: 200px;
}

.voice-note-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #31de79;
    color: #0b151b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(49, 222, 121, 0.4);
}

.voice-note-btn:hover {
    transform: scale(1.08);
    background: #5efa9e;
}

.voice-note-waves {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 24px;
    flex: 1;
}

.voice-note-waves span {
    width: 3px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    transition: background 0.2s ease;
}

.voice-note-player.playing .voice-note-waves span {
    background: #31de79;
    animation: voiceWavePlay 0.5s infinite alternate ease-in-out;
}

.voice-note-player.playing .voice-note-waves span:nth-child(2n) {
    animation-delay: 0.12s;
}

.voice-note-player.playing .voice-note-waves span:nth-child(3n) {
    animation-delay: 0.24s;
}

@keyframes voiceWavePlay {
    0% { transform: scaleY(0.4); opacity: 0.6; }
    100% { transform: scaleY(1.3); opacity: 1; }
}

.voice-note-time {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 24px 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    height: 0;
    overflow: hidden;
}

.typing-indicator.active {
    opacity: 1;
    height: auto;
    padding: 8px 24px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: rgba(49, 222, 121, 0.6);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

.typing-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
}

/* Chat Input */
.chat-input-area {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.15);
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 6px 8px 6px 18px;
    transition: all 0.3s ease;
}

.chat-input-wrapper:focus-within {
    border-color: rgba(49, 222, 121, 0.3);
    box-shadow: 0 0 0 3px rgba(49, 222, 121, 0.08);
    background: rgba(255, 255, 255, 0.07);
}

.chat-input-wrapper.recording {
    border-color: rgba(255, 59, 48, 0.65) !important;
    box-shadow: 0 0 16px rgba(255, 59, 48, 0.25) !important;
    background: rgba(255, 59, 48, 0.06) !important;
}

.chat-input-wrapper.recording.sound-detected {
    border-color: rgba(255, 179, 0, 0.75) !important;
    box-shadow: 0 0 18px rgba(255, 179, 0, 0.3) !important;
    background: rgba(255, 179, 0, 0.07) !important;
}

.chat-input-wrapper.recording.speaking {
    border-color: rgba(49, 222, 121, 0.85) !important;
    box-shadow: 0 0 22px rgba(49, 222, 121, 0.4) !important;
    background: rgba(49, 222, 121, 0.09) !important;
}

.chat-input-wrapper.recording input::placeholder {
    color: rgba(255, 130, 120, 0.95) !important;
    transition: color 0.2s ease;
}

.chat-input-wrapper.recording.sound-detected input::placeholder {
    color: #ffca28 !important;
}

.chat-input-wrapper.recording.speaking input::placeholder {
    color: #5efa9e !important;
}

.chat-input-wrapper input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 14px;
    padding: 8px 0;
    font-family: inherit;
}

.chat-input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* Mic Button */
.btn-mic {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    position: relative;
    flex-shrink: 0;
}

.btn-mic:hover {
    background: rgba(49, 222, 121, 0.15);
    color: #31de79;
}

.btn-mic.recording {
    background: rgba(255, 59, 48, 0.2);
    color: #ff3b30;
    animation: micPulse 1.5s ease-in-out infinite;
}

.btn-mic.recording.speaking {
    background: rgba(49, 222, 121, 0.25) !important;
    color: #31de79 !important;
    animation: micPulseGreen 1.2s ease-in-out infinite !important;
}

@keyframes micPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.3); }
    50% { box-shadow: 0 0 0 10px rgba(255, 59, 48, 0); }
}

@keyframes micPulseGreen {
    0%, 100% { box-shadow: 0 0 0 0 rgba(49, 222, 121, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(49, 222, 121, 0); }
}

.btn-mic .mic-waves {
    position: absolute;
    inset: -4px;
    border-radius: 14px;
    border: 2px solid rgba(255, 59, 48, 0.3);
    opacity: 0;
    animation: none;
    transition: border-color 0.2s ease;
}

.btn-mic.recording .mic-waves {
    animation: micWaveExpand 1.5s ease-out infinite;
}

.btn-mic.recording.speaking .mic-waves {
    border-color: rgba(49, 222, 121, 0.5) !important;
}

@keyframes micWaveExpand {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Send Button */
.btn-send {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #31de79, #1a9f52);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(49, 222, 121, 0.3);
}

.btn-send:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(49, 222, 121, 0.4);
}

.btn-send:active {
    transform: scale(0.95);
}

.btn-send:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Quick Actions */
.chat-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 20px 16px;
}

.quick-action-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: inherit;
}

.quick-action-btn:hover {
    background: rgba(49, 222, 121, 0.1);
    border-color: rgba(49, 222, 121, 0.25);
    color: #31de79;
    transform: translateY(-1px);
}

/* === FLOATING PARTICLES === */
.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(49, 222, 121, 0.3);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

/* === HERO CTA ACTION DOCK === */
.hero-cta-section {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.hero-cta-dock {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    background: rgba(8, 17, 27, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 20px rgba(16, 185, 129, 0.12);
}

.hero-cta-btn {
    padding: 11px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 13.5px;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    border: none;
    white-space: nowrap;
}

.hero-cta-btn.primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.hero-cta-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(16, 185, 129, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    color: #ffffff !important;
}

.hero-cta-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #f1f5f9 !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-cta-btn.secondary:hover {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
    color: #38bdf8 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

/* === AUDIO VISUALIZER === */
.audio-visualizer {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.audio-visualizer.active {
    opacity: 1;
}

.audio-visualizer .bar {
    width: 3px;
    height: 4px;
    background: #31de79;
    border-radius: 2px;
    transition: height 0.1s ease;
}

/* === WELCOME OVERLAY === */
.avatar-welcome-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    animation: welcomeFadeIn 1.5s ease-out 0.5s forwards;
}

@keyframes welcomeFadeIn {
    from { opacity: 0; transform: translate(-50%, -40%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.avatar-welcome-text h1 {
    color: #fff;
    font-size: 3rem;
    font-weight: 900;
    margin: 0;
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.avatar-welcome-text h1 span {
    color: #31de79;
    display: block;
}

.avatar-welcome-text p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    margin-top: 12px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* === SPEAKING STATE === */
.avatar-scene-wrapper.speaking .avatar-glow-ring {
    background: radial-gradient(ellipse, rgba(49, 222, 121, 0.5) 0%, transparent 70%);
    animation: glowPulse 0.8s ease-in-out infinite;
}

/* === SCROLL INDICATOR === */
.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 5;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.scroll-indicator:hover {
    opacity: 0.8;
}

.scroll-indicator span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-indicator .scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    transform: rotate(45deg);
    animation: scrollArrowBounce 2s ease-in-out infinite;
}

@keyframes scrollArrowBounce {
    0%, 100% { transform: rotate(45deg) translate(0, 0); }
    50% { transform: rotate(45deg) translate(4px, 4px); }
}

/* === VOLUME INDICATOR === */
.volume-indicator {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.volume-indicator.active {
    opacity: 1;
}

.volume-indicator .v-bar {
    width: 3px;
    background: #31de79;
    border-radius: 1.5px;
    animation: volumeBar 0.8s ease-in-out infinite alternate;
}

.volume-indicator .v-bar:nth-child(1) { height: 6px; animation-delay: 0s; }
.volume-indicator .v-bar:nth-child(2) { height: 12px; animation-delay: 0.1s; }
.volume-indicator .v-bar:nth-child(3) { height: 18px; animation-delay: 0.2s; }
.volume-indicator .v-bar:nth-child(4) { height: 10px; animation-delay: 0.3s; }
.volume-indicator .v-bar:nth-child(5) { height: 14px; animation-delay: 0.15s; }

@keyframes volumeBar {
    0% { height: 4px; }
    100% { height: 20px; }
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
    #avatar-hero {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        height: auto !important;
        min-height: auto !important;
        overflow-x: hidden !important;
        padding-bottom: 50px !important;
    }

    .avatar-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: auto !important;
        padding: 80px 14px 20px !important;
        gap: 14px !important;
        box-sizing: border-box !important;
    }

    .avatar-scene-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    #avatar-canvas-container {
        width: 100% !important;
        max-width: 215px !important;
        aspect-ratio: 1 / 1 !important;
        margin: 0 auto !important;
        border-radius: 22px !important;
    }

    .avatar-name-badge {
        margin-top: 10px !important;
    }

    .avatar-name-badge h3 {
        font-size: 18px !important;
    }

    .avatar-name-badge p {
        font-size: 11.5px !important;
    }

    .avatar-status {
        font-size: 11.5px !important;
        padding: 5px 14px !important;
        margin-top: 6px !important;
    }

    .chat-panel {
        width: 100% !important;
        max-width: 540px !important;
        min-width: 0 !important;
        max-height: none !important;
        border-radius: 20px !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }

    .chat-header {
        padding: 14px 16px !important;
    }

    .chat-header-avatar {
        width: 36px !important;
        height: 36px !important;
    }

    .chat-header-info h4 {
        font-size: 14px !important;
    }

    .chat-header-info p {
        font-size: 10.5px !important;
    }

    .chat-messages {
        min-height: 220px !important;
        max-height: 300px !important;
        padding: 12px 14px !important;
    }

    .chat-quick-actions {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 8px !important;
        padding: 8px 14px 10px !important;
        scrollbar-width: none !important;
    }

    .chat-quick-actions::-webkit-scrollbar {
        display: none !important;
    }

    .quick-action-btn {
        flex: 0 0 auto !important;
        font-size: 11.5px !important;
        padding: 6px 12px !important;
        white-space: nowrap !important;
    }

    .chat-input-area {
        padding: 10px 14px 12px !important;
    }

    .chat-input-wrapper {
        padding: 4px 6px 4px 12px !important;
    }

    #chat-input {
        font-size: 13px !important;
    }

    .hero-cta-section {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: 540px !important;
        margin: 15px auto 35px !important;
        padding: 0 14px !important;
        display: flex !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        z-index: 5 !important;
    }

    .hero-cta-dock {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 10px !important;
        padding: 6px 8px !important;
        border-radius: 50px !important;
        box-sizing: border-box !important;
    }

    .hero-cta-btn {
        flex: 1 1 0 !important;
        width: auto !important;
        padding: 11px 12px !important;
        font-size: 13px !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: nowrap !important;
        border-radius: 50px !important;
    }
}

@media (max-width: 576px) {
    .chat-input-wrapper {
        padding: 4px 6px 4px 12px;
    }

    .message-bubble {
        font-size: 13px;
        padding: 9px 12px;
    }
}

@media (max-width: 480px) {
    #avatar-canvas-container {
        max-width: 220px !important;
    }

    .hero-cta-btn {
        font-size: 12px !important;
        padding: 10px 8px !important;
        letter-spacing: 0 !important;
    }

    .hero-cta-btn i {
        margin-right: 4px !important;
    }

    .message-bubble {
        font-size: 12.5px !important;
        padding: 8px 11px !important;
    }
}

@media (max-width: 360px) {
    .hero-cta-dock {
        flex-direction: column !important;
        border-radius: 20px !important;
        padding: 8px !important;
    }

    .hero-cta-btn {
        width: 100% !important;
    }
}

/* === TRANSITION WAVE === */
.avatar-wave-transition {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    z-index: 3;
    line-height: 0;
    pointer-events: none;
}

.avatar-wave-transition svg {
    display: block;
    width: 100%;
    height: auto;
}

/* === LOADING STATE === */
.avatar-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 10;
}

.avatar-loading .loader-ring {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(49, 222, 121, 0.1);
    border-top-color: #31de79;
    border-radius: 50%;
    animation: loaderSpin 1s linear infinite;
}

@keyframes loaderSpin {
    to { transform: rotate(360deg); }
}

.avatar-loading p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    letter-spacing: 1px;
}

/* === MESSAGE LINKS AND FORMATTING === */
.message-bubble a {
    color: #31de79;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.message-bubble a:hover {
    color: #5efa9e;
}

.message-bubble strong {
    color: #fff;
    font-weight: 700;
}

.message-bubble ul, .message-bubble ol {
    margin: 8px 0;
    padding-left: 20px;
}

.message-bubble li {
    margin-bottom: 4px;
}

/* === SOUND TOGGLE === */
.sound-toggle {
    position: relative;
}

.sound-toggle.muted i {
    opacity: 0.3;
}

.sound-toggle.muted::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background: #ff3b30;
    transform: translate(-50%, -50%) rotate(-45deg);
    border-radius: 1px;
}
