#typing-ai{
  position:fixed;
  right:20px;
  bottom:20px;
  z-index:9999;
}

#ai-character{
  width:120px;
  cursor:pointer;
}

#ai-balloon{
  position:absolute;
  right:110px;
  bottom:50px;
  background:#fff;
  border:2px solid #333;
  border-radius:15px;
  padding:10px 15px;
  width:220px;
  box-shadow:0 3px 10px rgba(0,0,0,.2);
}

#ai-balloon::after{
  content:"";
  position:absolute;
  right:-12px;
  bottom:20px;
  border-left:12px solid #333;
  border-top:10px solid transparent;
  border-bottom:10px solid transparent;
}
	
#typing-ai{
    position:fixed;
    right:30px;
    bottom:30px;
    width:220px;
    text-align:center;
    z-index:9999;
}

#ai-message{
    background:#fff;
    border-radius:15px;
    padding:10px;
    margin-bottom:10px;
    box-shadow:0 2px 8px rgba(0,0,0,.15);
    min-height:50px;
}

#ai-character{
    width:120px;
    display:block;
    margin:0 auto 10px;
}

#ai-input-area{
    display:flex;
    gap:8px;
    margin-top:10px;
}

#ai-input{
    flex:1;
    padding:10px;
    border-radius:20px;
    border:1px solid #ccc;
}

#ai-send{
    padding:10px 16px;
    border:none;
    border-radius:20px;
    cursor:pointer;
    background:#4CAF50;
    color:#fff;
    font-weight:bold;
}
	
#ai-message b{
    color:#1a73e8;
    font-size:16px;
    font-weight:700;
}

#ai-message small{
    display:block;
    font-size:12px;
    color:#666;
    margin-top:4px;
}

#ai-message a{
    display:inline-block;
    margin-top:8px;
    padding:8px 14px;
    background:#1a73e8;
    color:#fff;
    text-decoration:none;
    border-radius:20px;
    font-size:13px;
    font-weight:600;
    transition:.2s;
}

#ai-message a:hover{
    opacity:.85;
    transform:translateY(-1px);
}

#ai-label{
    display:none;
    background:#4CAF50;
    color:#fff;
    padding:10px 16px;
    border-radius:30px;
    font-size:14px;
    font-weight:bold;
    cursor:pointer;
    box-shadow:0 3px 10px rgba(0,0,0,.2);
}

#ai-header{
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}

.ai-title {
    color: #28a745;
    font-weight: bold;
}

#ai-close{
    position: absolute;
    right: 0;
    width:28px;
    height:28px;
    border:none;
    border-radius:50%;
    color:#fff;
    background:#4CAF50;
    font-size:18px;
    font-weight:700;
    cursor:pointer;
}

#typing-ai.closed #ai-chat,
#typing-ai.closed #ai-character{
    display:none;
}

#typing-ai.closed #ai-label{
    display:block;
}
	
@media (max-width:768px){

    #typing-ai{
        position:fixed;
        right:20px;
        bottom:20px;
        z-index:9999;
    }

    #ai-label{
        display:block;
    }

    #ai-character,
    #ai-chat{
        display:none;
    }

    #typing-ai.open #ai-character{
        display:block;
        width:80px;
        margin:0 auto 10px;
    }

    #typing-ai.open #ai-chat{
        display:block;
        position:absolute;
        right:0;
        bottom:0;
        width:300px;
        max-width:90vw;
        background:#fff;
        border-radius:16px;
        box-shadow:0 4px 20px rgba(0,0,0,.15);
        padding:12px;
    }

    #typing-ai.open #ai-label{
        display:none;
    }
	
    #ai-message{
        font-size:14px;
        padding:12px;
        line-height:1.6;
    }

    #ai-input{
        flex:1;
        font-size:16px;
    }
}

