/* --- ANIMATED HAMBURGER MENU (3 GẠCH) --- */
.hamburger-menu { width: 22px; height: 16px; position: relative; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; margin-left: 2px; }
.hamburger-menu .bar { width: 100%; height: 2px; background: #fff; border-radius: 2px; transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); transform-origin: center; }
.hamburger-menu.open .bar:nth-child(1) { transform: translateY(7px) rotate(135deg); background: var(--accent-pink); box-shadow: 0 0 8px var(--accent-pink); }
.hamburger-menu.open .bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-menu.open .bar:nth-child(3) { transform: translateY(-7px) rotate(-135deg); background: var(--accent-pink); box-shadow: 0 0 8px var(--accent-pink); }
@media (max-width: 600px) { .hamburger-menu { width: 20px; height: 14px; } .hamburger-menu.open .bar:nth-child(1) { transform: translateY(6px) rotate(135deg); } .hamburger-menu.open .bar:nth-child(3) { transform: translateY(-6px) rotate(-135deg); } }

/* --- SIDE DRAWER MENU CHÍNH --- */
.menu-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.3s; z-index: 998; }
.menu-overlay.active { opacity: 1; pointer-events: auto; }

.side-drawer { position: fixed; top: 0; right: 0; width: 280px; height: 100vh; background: rgba(18, 18, 20, 0.85); backdrop-filter: blur(40px) saturate(200%); -webkit-backdrop-filter: blur(40px) saturate(200%); border-left: 1px solid rgba(255, 255, 255, 0.1); padding: 80px 20px 90px; transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.25, 1, 0.2, 1); z-index: 999; display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(0,0,0,0.5); overflow-y: auto; }
.side-drawer.active { transform: translateX(0); }
.side-drawer::-webkit-scrollbar { width: 4px; }
.side-drawer::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

.drawer-nav { display: flex; flex-direction: column; gap: 8px; }
.drawer-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 12px; color: #fff; text-decoration: none; font-size: 16px; font-weight: 500; cursor: pointer; background: transparent; border: 1px solid transparent; transform: translateX(30px); opacity: 0; transition: all 0.3s ease; position: relative; overflow: hidden; }
.side-drawer.active .drawer-item { transform: translateX(0); opacity: 1; }
/* Tạo hiệu ứng các thẻ bay vào so le nhau */
.side-drawer.active .drawer-item:nth-child(1) { transition-delay: 0.1s; } .side-drawer.active .drawer-item:nth-child(2) { transition-delay: 0.15s; } .side-drawer.active .drawer-item:nth-child(3) { transition-delay: 0.2s; } .side-drawer.active .drawer-item:nth-child(4) { transition-delay: 0.25s; } .side-drawer.active .drawer-item:nth-child(5) { transition-delay: 0.3s; } .side-drawer.active .drawer-item:nth-child(6) { transition-delay: 0.35s; } .side-drawer.active .drawer-item:nth-child(7) { transition-delay: 0.4s; }

.drawer-item:hover { background: rgba(255, 255, 255, 0.08); padding-left: 24px; box-shadow: inset 4px 0 0 var(--accent-blue), 0 0 15px rgba(10, 132, 255, 0.15); }
.drawer-item .chevron { width: 16px; height: 16px; fill: #8e8e93; transition: transform 0.3s, fill 0.3s; }
.drawer-item:hover .chevron { fill: var(--accent-blue); transform: translateX(3px); filter: drop-shadow(0 0 5px var(--accent-blue)); }
.menu-bottom-group { margin-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.05); padding-top: 10px; }

/* --- SUB-MENU (ACCORDION STYLE) --- */
.drawer-item.has-submenu.active { background: rgba(10, 132, 255, 0.1); border-color: rgba(10, 132, 255, 0.2); box-shadow: inset 4px 0 0 var(--accent-blue); }
.drawer-item.has-submenu.active .chevron { transform: rotate(90deg); fill: var(--accent-blue); filter: drop-shadow(0 0 5px var(--accent-blue)); }
.submenu { display: flex; flex-direction: column; gap: 4px; max-height: 0; overflow: hidden; opacity: 0; transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); margin-left: 12px; border-left: 1px solid rgba(255,255,255,0.1); padding-left: 10px; }
.submenu.active { max-height: 600px; opacity: 1; margin-top: 5px; margin-bottom: 10px; }

.submenu-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; color: #d1d1d6; text-decoration: none; font-size: 15px; font-weight: 500; transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); position: relative; }
.submenu-item:hover { background: rgba(255, 255, 255, 0.1); color: #fff; transform: translateX(8px); box-shadow: inset 3px 0 0 var(--accent-purple), 0 0 15px rgba(191, 90, 242, 0.15); }

/* SOCIAL ICON ANIMATION */
@keyframes iconBreathe { 0% { transform: translateY(0px) scale(1); filter: drop-shadow(0 0 2px rgba(255,255,255,0.2)); } 100% { transform: translateY(-2px) scale(1.05); filter: drop-shadow(0 0 10px rgba(255,255,255,0.7)); } }
.social-icon { width: 22px; height: 22px; flex-shrink: 0; border-radius: 5px; animation: iconBreathe 2s infinite alternate ease-in-out; transition: filter 0.3s; }
.submenu-item:hover .social-icon { filter: drop-shadow(0 0 15px #fff) brightness(1.2); }

/* GIAO DIỆN TÀI KHOẢN (TRONG MENU) */
.account-preview { display: flex; align-items: center; gap: 12px; flex: 1; }
.account-avatar { width: 38px; height: 38px; border-radius: 50%; display: flex; justify-content: center; align-items: center; position: relative; transition: all 0.3s; background: #3a3a3c; }
.account-avatar svg { width: 20px; height: 20px; fill: #fff; }
.account-status-dot { position: absolute; bottom: 0; right: 0; width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(18, 18, 20, 0.85); background-color: #8e8e93; }
.account-info { display: flex; flex-direction: column; }
.account-name { font-size: 16px; font-weight: 700; color: #fff; line-height: 1.2; }
.account-role { font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-top: 2px; }
.logged-in .account-avatar { background: linear-gradient(135deg, #4facfe, #00f2fe); box-shadow: 0 0 15px rgba(0, 242, 254, 0.4); }
.logged-in .account-status-dot { background-color: var(--accent-green); animation: pulse-green 1.5s infinite; }
