phanquocdat123's picture
Create style.css
c7cdaa0 verified
Raw History Blame Contribute Delete
4.15 kB
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background-color: #f7f8fa; margin: 0; display: flex; flex-direction: column; height: 100vh; overflow: hidden;
}
header {
background: linear-gradient(135deg, #ff4757, #ff6b81);
color: white; padding: 15px; text-align: center; font-weight: bold;
font-size: 1.1rem; letter-spacing: 0.5px;
box-shadow: 0 2px 10px rgba(255, 71, 87, 0.3);
z-index: 10;
}
#chat-box {
flex: 1; overflow-y: auto; padding: 15px; display: flex;
flex-direction: column; gap: 12px; scroll-behavior: smooth;
background-image: radial-gradient(#e0e0e0 0.5px, transparent 0.5px);
background-size: 20px 20px;
}
/* Tin nhắn chung */
.msg {
max-width: 85%; padding: 12px 16px; border-radius: 18px;
font-size: 15px; line-height: 1.5; word-wrap: break-word;
position: relative; animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.user {
background: linear-gradient(135deg, #ff6b81, #ff4757);
color: white; align-self: flex-end; border-bottom-right-radius: 4px;
box-shadow: 0 3px 8px rgba(255, 71, 87, 0.2);
}
.bot {
background-color: white; color: #1c1e21; align-self: flex-start;
border-bottom-left-radius: 4px; box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
/* Hệ thống Nút bấm */
.btn-select, .btn-category {
display: inline-block; width: auto; min-width: 100px;
padding: 10px 18px; border-radius: 25px; margin: 6px 4px 2px 0;
cursor: pointer; font-weight: bold; font-size: 13px;
transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
text-align: center; border: none;
}
.btn-red { background: #ff4757; color: white; box-shadow: 0 3px 6px rgba(255, 71, 87, 0.2); }
.btn-green { background: #2ecc71; color: white; box-shadow: 0 3px 6px rgba(46, 204, 113, 0.2); }
/* Tìm class này trong code CSS của Đạt nhen */
.btn-category {
display: inline-block;
padding: 2px 10px; /* Giảm padding (trên-dưới 2px, trái-phải 10px) */
min-width: 40px; /* Giảm độ rộng tối thiểu xuống */
height: 28px; /* Cố định chiều cao cho nút tròn đều */
line-height: 24px; /* Căn giữa chữ theo chiều dọc */
border-radius: 15px; /* Giữ độ bo tròn */
text-align: center;
font-size: 13px; /* Chỉnh cỡ chữ vừa phải */
margin: 3px; /* Khoảng cách giữa các nút */
border: 1px solid #ff4757; /* Màu viền đỏ của Đạt */
background: white;
color: #ff4757;
cursor: pointer;
}
/* Thêm hiệu ứng khi di chuột vào cho chuyên nghiệp */
.btn-category:hover {
background: #ff4757;
color: white;
}
.btn-select:active, .btn-category:active { transform: scale(0.92); opacity: 0.9; }
/* Khu vực nhập liệu */
#input-area {
background: white; padding: 12px 15px; display: flex;
align-items: center; gap: 10px; border-top: 1px solid #eee;
padding-bottom: env(safe-area-inset-bottom);
}
input {
flex: 1; height: 45px; border: 1px solid #f1f2f6; background: #f8f9fa;
border-radius: 22px; padding: 0 20px; font-size: 16px; outline: none;
transition: all 0.3s;
}
input:focus { border-color: #ff4757; background: #fff; box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1); }
button#send-btn {
background: #ff4757; color: white; border: none;
width: 45px; height: 45px; border-radius: 50%; cursor: pointer;
display: flex; align-items: center; justify-content: center;
transition: 0.3s;
}
button#send-btn:hover { transform: scale(1.05) rotate(-5deg); }
/* Hiệu ứng đang gõ */
.typing { font-style: italic; color: #999; font-size: 13px; padding-left: 5px; }
/* Form chốt đơn */
.msg-form {
background: #fff; border: 2px solid #ff4757; padding: 15px;
border-radius: 15px; margin: 10px 0; clear: both;
}
.msg-form input { margin-bottom: 8px; border: 1px solid #ddd; }