* { margin: 0; padding: 0; box-sizing: border-box; } html, body { height: 100%; overflow-x: hidden; overflow-y: auto; } body { display: flex; align-items: center; justify-content: center; font-family: 'Segoe UI', sans-serif; /*overflow: hidden;*/ overflow-x: hidden; overflow-y: auto; height: 100vh; width: 100vw; position: relative; cursor: pointer; background-size: cover; background-position: 50% 50%; /* 30% ngang, 70% dọc */ background-repeat: no-repeat; transition: background-image 1s ease-in-out; } canvas { position: absolute; top: 0; left: 0; z-index: 0; } .message { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); color: white; font-size: 18px; z-index: 10; transition: opacity 0.5s ease; } .hide { opacity: 0; } .overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); /* Màu phủ đen 40% */ z-index: -1; } #background-video { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; object-fit: cover; z-index: -2; filter: brightness(0.3); transition: transform 0.3s ease; } /*#cardContainer { transition: transform 0.3s ease-out, box-shadow 0.4s ease; will-change: transform; transform-style: preserve-3d; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25); /* tăng chiều sâu */ /*border-radius: 16px; } /* Hover: glow + slight lift */ /*#cardContainer:hover { transform: rotateY(8deg) rotateX(4deg) scale(1.02); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 255, 200, 0.4); }*/ /*.card-glow { background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)); padding: 10px; border-radius: 30px; box-shadow: 0 0 10px #38bdf8, 0 0 20px #f472b6, 0 0 40px #4ade80; box-shadow: 0 0 20px #818cf8, 0 0 40px #facc15, 0 0 80px #22d3ee; animation: pulse 2.5s ease-in-out infinite; } @keyframes pulse { 0%, 100% { filter: drop-shadow(0 0 10px #38bdf8); } 50% { filter: drop-shadow(0 0 20px #f472b6); } }*/ #cardContainer { position: relative; border-radius: 16px; padding: 20px; background: rgba(0, 0, 0, 0.1); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25); transition: transform 0.3s ease-out, box-shadow 0.4s ease; will-change: transform; transform-style: preserve-3d; cursor: pointer; /* biến CSS cho vị trí chuột */ --mouse-x: 50%; --mouse-y: 50%; /* biến cho màu cầu vồng */ --color1: #38bdf8; --color2: #f472b6; --color3: #4ade80; --color4: #facc15; --color5: #818cf8; --color6: #22d3ee; /* Mặc định không hiện viền màu */ box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25); } #cardContainer:hover { transform: rotateY(8deg) rotateX(4deg) scale(1.02); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25), /* 6 vòng sáng theo chuột, giảm dần mờ dần to dần */ /* Mỗi vòng có offset theo vị trí chuột */ /* position tính theo phần trăm (về pixel sẽ tự động) */ calc(var(--mouse-x) * 1%) calc(var(--mouse-y) * 1%) 8px 2px var(--color1), calc(var(--mouse-x) * 1.5%) calc(var(--mouse-y) * 1.5%) 16px 6px var(--color2), calc(var(--mouse-x) * 2%) calc(var(--mouse-y) * 2%) 24px 12px var(--color3), calc(var(--mouse-x) * 2.5%) calc(var(--mouse-y) * 2.5%) 36px 18px var(--color4), calc(var(--mouse-x) * 3%) calc(var(--mouse-y) * 3%) 48px 24px var(--color5), calc(var(--mouse-x) * 3.5%) calc(var(--mouse-y) * 3.5%) 60px 30px var(--color6); } /* Thêm glow nhẹ cho phần text bên trong */ .card-glow { background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)); padding: 10px; border-radius: 30px; box-shadow: 0 0 10px #38bdf8, 0 0 20px #f472b6, 0 0 40px #4ade80; animation: pulse 2.5s ease-in-out infinite; } @keyframes pulse { 0%, 100% { filter: drop-shadow(0 0 10px #38bdf8); } 50% { filter: drop-shadow(0 0 20px #f472b6); } } .container { display: flex; justify-content: center; align-items: center; height: 100vh; /* Chiếm toàn bộ chiều cao */ width: 100vw; /* Chiếm toàn bộ chiều rộng */ position: relative; z-index: 2; /* cao hơn video nền */ } .card { position: relative; margin: 0 auto; /* Căn giữa theo chiều ngang */ box-sizing: border-box; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(18px); border-radius: 25px; padding: 75px; text-align: center; width: 600px; max-width: 90vw; } .avatar { width: 130px; height: 130px; border-radius: 50%; border: 4px solid white; box-shadow: 0 0 20px white; animation: spin 10s linear infinite; } @keyframes spin { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } } h2 { color: #fff; margin-top: 20px; font-size: 28px; } p { color: #cbd5e1; margin-top: 20px; font-size: 18px; } .socials { margin-top: 25px; display: flex; justify-content: center; gap: 25px; } .socials a { font-size: 30px; color: #fff; transition: transform 0.3s, color 0.3s; } .socials a:hover { color: #38bdf8; transform: scale(1.2); } .sound-control { position: absolute; bottom: 30px; right: 30px; z-index: 3; } .volume-wrapper { position: relative; } .volume-slider { position: absolute; bottom: 40px; right: -10px; transform: rotate(-90deg); width: 80px; opacity: 0; transition: opacity 0.3s ease; } .volume-wrapper:hover .volume-slider { opacity: 1; } .sound-btn { background: rgba(255, 255, 255, 0.1); border: none; color: #fff; font-size: 24px; padding: 10px; border-radius: 50%; cursor: pointer; transition: background 0.3s; } .sound-btn:hover { background: rgba(255, 255, 255, 0.2); } .ripple-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; z-index: 999; } .ripple { position: absolute; width: 20px; height: 20px; border-radius: 50%; transform: scale(1); opacity: 1; animation: rippleEffect 0.8s ease-out forwards; } @keyframes rippleEffect { 0% { transform: scale(1); opacity: 0.6; } 50% { transform: scale(15); opacity: 0.3; } 100% { transform: scale(25); opacity: 0; } } .discord-profile-box { position: relative; display: flex; align-items: center; background: rgba(255, 255, 255, 0.1); border-radius: 30px; padding: 24px; margin: 24px auto; width: 440px; max-width: 95%; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25); backdrop-filter: blur(12px); transition: all 0.4s ease; cursor: pointer; } .discord-profile-box:hover { background: rgba(255, 255, 255, 0.15); box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4); transform: translateY(-2px) scale(1.01); } .status-indicator { position: absolute; bottom: 0px; right: 0px; font-size: 20px; width: 28px; /* tăng size để viền rộng hơn */ height: 28px; background: rgba(255, 255, 255, 0.6); display: flex; align-items: center; justify-content: center; border-radius: 50%; backdrop-filter: blur(5px); /*box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);*/ border: 3px solid white; /* viền trắng dày hơn */ color: transparent; /* ẩn icon mặc định, dùng JS đổi màu */ transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease; cursor: default; } .status-dot { display: none; /* ẩn chấm nhỏ đi */ } /* Animation when hovering entire profile */ .discord-profile-box:hover .status-indicator { transform: scale(1.15) rotate(3deg); background: rgba(0, 0, 0, 0.35); box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); } .discord-info h3 { margin: 0; font-size: 18px; font-weight: bold; color: white; text-shadow: 0 0 5px rgba(0, 0, 0, 0.5); } .discord-status { display: inline-block; margin-top: 4px; font-size: 13px; padding: 2px 10px; border-radius: 999px; font-weight: 500; transition: background 0.3s ease, color 0.3s ease; } .discord-status.online { color: #43b581; } .discord-status.idle { color: #faa61a; } .discord-status.dnd { color: #f04747; } .discord-status.offline { color: #747f8d; } .avatar-container { position: relative; width: 70px; /* bằng với avatar để dễ đặt status */ height: 70px; margin-right: 16px; /* trùng với margin của avatar */ } .discord-avatar { width: 70px; height: 70px; border-radius: 50%; border: 3px solid white; box-shadow: 0 0 8px rgba(255, 255, 255, 0.6), 0 4px 6px rgba(0, 0, 0, 0.3); background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), transparent 70%); transition: transform 0.3s ease, box-shadow 0.3s ease; } .discord-avatar:hover { transform: scale(1.1) rotate(3deg); box-shadow: 0 0 12px rgba(255, 255, 255, 0.8), 0 6px 10px rgba(0, 0, 0, 0.4); } .thought-bubble { position: absolute; top: -40px; left: -30%; transform: translateX(-10%); background: #eef2f7; padding: 8px 12px; border-radius: 12px; font-size: 13px; color: #333; line-height: 1.4; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); max-width: 300px; /* rộng hơn cho ~30 ký tự mỗi dòng */ min-width: 150px; z-index: 20; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; text-overflow: ellipsis; white-space: normal; word-break: break-word; transition: background 0.3s ease, box-shadow 0.3s ease; animation: bubbleFloat 3.2s ease-in-out infinite; /* Hiệu ứng glow nhẹ */ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 0 8px rgba(94, 147, 255, 0.3); animation: bubbleFloat 3.2s ease-in-out infinite, glowPulse 4s ease-in-out infinite; } /* Chấm lớn trên */ .thought-dot.dot-top { position: absolute; width: 18px; /* To hơn */ height: 18px; border-radius: 50%; background: #eef2f7; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); top: -10px; /* Nằm ngay dưới ghi chú, để bị ghi chú che 1 phần */ right: 55px; /* Cạnh ghi chú */ z-index: 5; animation: dotBounce 2.5s ease-in-out infinite; } /* Chấm nhỏ dưới */ .thought-dot.dot-bottom { position: absolute; width: 12px; /* Nhỏ hơn */ height: 12px; border-radius: 50%; background: #eef2f7; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); top: 12px; /* Nằm ngay trên avatar */ right: 62px; /* Nằm sát avatar hơn */ z-index: 3; animation: dotBounce 2s ease-in-out infinite; animation-delay: 0.3s; /* Để chấm nhỏ chạy lệch pha cho tự nhiên */ } /* Animations */ @keyframes bubbleFloat { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-4px); opacity: 0.85; } } @keyframes dotBounce { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-2px); opacity: 0.7; } } /* Khi hover thì tăng glow */ .thought-bubble:hover { box-shadow: 0 4px 15px rgba(94, 147, 255, 0.6), 0 0 30px rgba(94, 147, 255, 0.7); background: #f0f5ff; transition: box-shadow 0.4s ease, background 0.4s ease; } /* Các dot vẫn giữ như cũ, bạn có thể thêm chút glow nếu muốn */ .thought-dot.dot-top, .thought-dot.dot-bottom { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 0 6px rgba(94, 147, 255, 0.4); transition: box-shadow 0.3s ease; } .thought-dot.dot-top:hover, .thought-dot.dot-bottom:hover { box-shadow: 0 4px 12px rgba(94, 147, 255, 0.7), 0 0 18px rgba(94, 147, 255, 0.9); } @media (max-width: 768px) { .card { padding: 40px; width: 90%; } .avatar { width: 90px; height: 90px; } h2 { font-size: 22px; } p { font-size: 16px; } .socials a { font-size: 24px; } .discord-profile-box { width: 90%; padding: 16px; flex-direction: column; align-items: center; text-align: center; } .avatar-container { margin-right: 0; margin-bottom: 12px; } .discord-avatar { width: 60px; height: 60px; } .status-indicator { width: 22px; height: 22px; } .sound-control { bottom: 15px; right: 15px; } } /* Điều chỉnh background và layout cho thiết bị nhỏ */ @media (max-width: 768px) { /* Đảm bảo loa không bị che hoặc ra ngoài màn hình */ .volume-button { bottom: 20px !important; right: 20px !important; scale: 1.2; /* Tăng nhẹ kích thước cho dễ bấm */ z-index: 999; } } /* Khi thiết bị nhỏ (điện thoại), thu nhỏ video một chút */ @media (max-width: 768px) { #background-video { transform: scale(1); /* Nhỏ lại 5% */ } } /* Nền mờ phủ toàn trang */ .message-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(40, 42, 54, 0.85); backdrop-filter: blur(8px); z-index: 998; cursor: pointer; animation: fadeInOverlay 0.3s ease forwards; } .message-overlay.hide { animation: fadeOutOverlay 0.3s ease forwards; } /* Popup chính giữa */ .message-popup { position: fixed; top: 50vh; left: 50vw; transform: translate(-50%, -50%) scale(1); background: linear-gradient(135deg, #282a36, #44475a); box-shadow: 0 0 15px rgba(88, 101, 242, 0.8); padding: 30px 25px; border-radius: 15px; width: 90%; max-width: 550px; /* max chiều ngang */ max-height: 90vh; /* max chiều cao 80% viewport height */ z-index: 999; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; color: #f8f8f2; user-select: none; animation: popupShow 0.3s ease forwards; } /* Responsive cho thiết bị nhỏ */ @media screen and (max-width: 600px) { .message-popup { max-width: 90vw; max-height: 70vh; /* nhỏ hơn chút để vừa màn hình */ padding: 20px 15px; width: 95vw; } } @media screen and (max-width: 360px) { .message-popup { max-width: 100vw; max-height: 60vh; /* giảm tiếp chiều cao */ padding: 15px 10px; width: 100vw; border-radius: 10px; } } /* Nội dung bên trong */ .popup-content h3 { margin-bottom: 20px; font-weight: 600; text-align: center; color: #50fa7b; text-shadow: 0 0 8px #50fa7b; } /* Input và textarea */ .popup-content input, .popup-content textarea { resize: none; width: 100%; background: #3b3e58; border: none; border-radius: 10px; padding: 12px 15px; margin-bottom: 15px; font-size: 15px; color: #f8f8f2; box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.1); transition: box-shadow 0.3s ease, background-color 0.3s ease, transform 0.25s ease; position: relative; overflow: hidden; } .popup-content textarea { max-height: 150px; /* chiều cao tối đa */ overflow-y: auto; /* cuộn dọc khi nội dung dài */ } .popup-content input { /* giữ nguyên hoặc có thể để resize: none */ resize: none; overflow: hidden; /* input không cần scroll */ } /* Placeholder */ .popup-content input::placeholder, .popup-content textarea::placeholder { color: #bfbfbf; font-style: italic; transition: color 0.3s ease; } /* Focus hiệu ứng */ .popup-content input:focus, .popup-content textarea:focus { outline: none; background: #44475a; box-shadow: 0 0 12px #6272a4, 0 0 20px #6272a4aa; transform: scale(1.03); color: #f8f8f2; } /* Placeholder khi focus */ .popup-content input:focus::placeholder, .popup-content textarea:focus::placeholder { color: #8fb3ff; } /* Button gửi */ .popup-content button { width: 100%; padding: 12px; background: #6272a4; border: none; border-radius: 12px; color: #f8f8f2; font-weight: 700; font-size: 16px; cursor: pointer; box-shadow: 0 0 10px #6272a4; transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease; user-select: none; } /* Hover button */ .popup-content button:hover { background: #7083c6; box-shadow: 0 0 16px #7083c6, 0 0 24px #7083c6aa; transform: scale(1.05); } /* Thông báo trạng thái */ #formStatus { margin-top: 12px; font-size: 13px; text-align: center; min-height: 18px; color: #f8f8f2; user-select: text; text-shadow: 0 0 5px rgba(0, 0, 0, 0.5); } .message-popup.hide { animation: popupHide 0.3s ease forwards; } /* Animation fade + scale đơn giản */ @keyframes fadeInOverlay { from { opacity: 0; } to { opacity: 1; } } @keyframes fadeOutOverlay { from { opacity: 1; } to { opacity: 0; } } @keyframes popupShow { from { opacity: 0; transform: translate(-50%, -50%) scale(0.85); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } } @keyframes popupHide { from { opacity: 1; transform: translate(-50%, -50%) scale(1); } to { opacity: 0; transform: translate(-50%, -50%) scale(0.85); } } .custom-image-uploader { width: 100%; max-width: 600px; /* Tăng max-width lên 600px */ background: linear-gradient(135deg, #383a59, #2f3145); border: 2px dashed #8be9fd; border-radius: 12px; padding: 15px; cursor: pointer; transition: background 0.3s, border-color 0.3s, max-width 0.3s ease; margin-bottom: 15px; position: relative; box-shadow: 0 0 10px rgba(139, 233, 253, 0.15); } /* Khi có ảnh hoặc video */ .custom-image-uploader.has-image { max-width: 600px; padding: 15px 20px; } /* Hover trạng thái */ .custom-image-uploader:hover { background: #44475a; border-color: #50fa7b; box-shadow: 0 0 12px rgba(80, 250, 123, 0.25); } /* Text upload */ #uploadText { color: #bfbfbf; font-size: 13px; font-style: italic; text-align: center; display: block; user-select: none; } /* Container info file */ .file-info { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 0; } /* Chi tiết file */ .file-details { font-size: 13px; color: #f8f8f2; line-height: 1.5; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } .file-details strong { font-size: 14px; color: #8be9fd; display: block; margin-bottom: 2px; text-shadow: 0 0 5px rgba(139, 233, 253, 0.2); } /* Ảnh preview vẫn to */ .file-info img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; box-shadow: 0 0 8px rgba(255, 255, 255, 0.05); transition: transform 0.25s ease; } .file-info img:hover { transform: scale(1.05); } /* Preview video */ .file-info video { width: 120px; /* nhỏ hơn ảnh */ height: 90px; object-fit: cover; border-radius: 8px; box-shadow: 0 0 8px rgba(255, 255, 255, 0.05); } /* Responsive cho màn hình dưới 768px (tablet, điện thoại lớn) */ @media screen and (max-width: 768px) { .custom-image-uploader { max-width: 90vw; /* Chiếm 90% chiều rộng viewport */ padding: 12px 15px; } .custom-image-uploader.has-image { max-width: 90vw; padding: 12px 15px; } } /* Responsive cho màn hình nhỏ hơn 480px (điện thoại nhỏ) */ @media screen and (max-width: 480px) { .custom-image-uploader { max-width: 95vw; /* Chiếm gần hết chiều rộng màn hình */ padding: 10px 12px; } .custom-image-uploader.has-image { max-width: 95vw; padding: 10px 12px; } } /* Nếu muốn cực nhỏ như điện thoại dưới 360px */ @media screen and (max-width: 360px) { .custom-image-uploader { max-width: 100vw; padding: 8px 10px; border-radius: 10px; } .custom-image-uploader.has-image { max-width: 100vw; padding: 8px 10px; border-radius: 10px; } } /* Overlay nền mờ */ #musicOverlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.7); display: none; z-index: 1000; } #musicPopup { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 600px; max-width: 95vw; max-height: 80vh; background: #fff; border-radius: 12px; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35); padding: 25px 30px; flex-direction: column; box-sizing: border-box; overflow: hidden; z-index: 1100; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; display: none; } .popup-content { flex: 1 1 auto; display: flex; flex-direction: column; overflow: hidden; } .search-group.horizontal { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; } .search-input { padding: 12px 20px; border: 1.8px solid #ddd; border-radius: 30px; font-size: 16px; box-sizing: border-box; } .search-input:focus { outline: none; border-color: #4285F4; box-shadow: 0 0 8px rgba(66, 133, 244, 0.5); } .search-btn { padding: 12px 25px; background-color: #4285F4; border: none; border-radius: 30px; color: #fff; font-weight: 600; cursor: pointer; font-size: 16px; transition: background-color 0.3s ease; } .search-btn:hover { background-color: #357ae8; } #musicResults { flex-grow: 1; /* Chiếm hết phần còn lại */ max-height: 300px; overflow-y: auto; padding: 10px; border: 1px solid #eee; background: #fafafa; border-radius: 8px; box-shadow: inset 0 0 8px #f0f0f0; margin-bottom: 15px; display: none; /* ẩn mặc định */ } #musicResults::-webkit-scrollbar { width: 6px; } #musicResults::-webkit-scrollbar-thumb { background-color: #ccc; border-radius: 4px; } #musicResults:hover::-webkit-scrollbar-thumb { background-color: #999; } #musicResults > div > div { padding: 8px 12px; border-radius: 8px; transition: background-color 0.2s ease; } #musicResults > div > div:hover { background-color: #e6f0ff; } #musicResults img { width: 48px; height: 36px; object-fit: cover; border-radius: 4px; } #nowPlaying { flex-shrink: 0; margin-top: 10px; font-size: 12px; font-weight: 600; color: #222; display: flex; align-items: center; gap: 8px; max-width: 100%; /* hoặc một max-width cụ thể */ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #musicProgressContainer { flex-shrink: 0; margin: 10px 0; } #musicProgress { -webkit-appearance: none; appearance: none; width: 100%; height: 1px; background: linear-gradient(to right, #f00 var(--progress, 0%), #e0e0e0 0%); border: none; outline: none; cursor: pointer; border-radius: 10px; } #musicProgress::-webkit-slider-thumb { -webkit-appearance: none; width: 0; height: 0; background: transparent; border: none; } #musicProgress::-moz-range-thumb { width: 0; height: 0; border: none; background: transparent; } #musicProgress::-moz-range-track { height: 2px; background: transparent; } #musicProgress::-moz-range-progress { background-color: #f00; height: 2px; } .btn-return { flex-shrink: 0; margin-top: auto; /* luôn đẩy nút về đáy */ padding: 12px 20px; border: none; border-radius: 30px; background-color: #f44336; color: white; font-weight: 600; cursor: pointer; width: 100%; transition: background-color 0.3s ease; font-size: 16px; } .btn-return:hover { background-color: #d32f2f; }