/* --- UI/UX Modernization: Glassmorphism, Neumorphism, Responsive, Animation --- */

body {
    display: flex;
    flex-direction: row;
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #282a36 0%, #44475a 100%);
    color: #f8f8f2;
    min-height: 100vh;
    transition: background 0.5s;
    position: relative;
    overflow-x: hidden;
}

.dracula-stars-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.dracula-star {
    position: absolute;
    background: linear-gradient(135deg, #f8f8f2 60%, #bd93f9 100%);
    border-radius: 50%;
    box-shadow: 0 0 8px 2px #bd93f9, 0 0 2px 0 #ff79c6;
    transition: opacity 0.3s;
    will-change: left, top, opacity;
    pointer-events: none;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background: rgba(46,46,62,0.85);
    box-shadow: 0 8px 32px 0 rgba(44,44,60,0.37);
    backdrop-filter: blur(8px);
    border-radius: 0 24px 24px 0;
    padding: 24px 16px;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1), box-shadow 0.3s;
    transform: translateX(0);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    scrollbar-width: none; /* Ẩn thanh cuộn trên Firefox */
    -ms-overflow-style: none; /* Ẩn thanh cuộn trên IE 10+ */
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE/Edge */
}
.sidebar.hide {
    transform: translateX(-100%);
    box-shadow: none;
}
.sidebar.show {
    transform: translateX(0);
    box-shadow: 0 8px 32px 0 rgba(44,44,60,0.37);
}
@media (min-width: 901px) {
    .sidebar {
        transform: translateX(0) !important;
        box-shadow: 0 8px 32px 0 rgba(44,44,60,0.37);
    }
    .sidebar.hide {
        transform: translateX(0) !important;
        box-shadow: 0 8px 32px 0 rgba(44,44,60,0.37);
    }
    .sidebar.show {
        transform: translateX(0) !important;
        box-shadow: 0 8px 32px 0 rgba(44,44,60,0.37);
    }
}
.sidebar::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    display: none !important;
}

.sidebar .balance, .tools, .contact {
    font-size: 1.1rem;
    color: #bd93f9;
    padding: 12px 0;
    border-radius: 8px;
    margin-bottom: 8px;
    font-weight: 500;
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 12px;
}
.logo img {
    max-width: 240px;
    height: 112px;
    border-radius: 16px;
    box-shadow: none;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
@media (max-width: 600px) {
    .logo img {
        max-width: 160px;
        height: 76px;
    }
}

.menu1 a, .menu2 a {
    display: block;
    padding: 12px 18px;
    color: #f8f8f2;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    margin: 6px 0;
    background: rgba(68,71,90,0.15);
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(44,44,60,0.07);
}
.menu1 a:hover, .menu2 a:hover {
    background: rgba(189,147,249,0.18);
    color: #ff79c6;
    box-shadow: 0 4px 16px rgba(189,147,249,0.12);
}
.menu1 a.active, .menu2 a.active {
    background: rgba(80,250,123,0.18);
    color: #50fa7b;
}

/* Glassmorphism for popup */
.popup, .popup-active, .promo-popup {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(40,42,54,0.55);
    backdrop-filter: blur(8px);
    z-index: 2000;
    animation: fadeIn 0.5s;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.popup-content, .popup-active-content, .promo-content {
    background: rgba(68,71,90,0.85);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(44,44,60,0.37);
    padding: 32px 24px;
    width: 90vw;
    max-width: 500px;
    text-align: center;
    position: relative;
    animation: slideUp 0.5s;
}
@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.popup-content .close, .close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 22px;
    cursor: pointer;
    color: #ff5555;
    background: none;
    border: none;
    transition: color 0.2s;
}
.popup-content .close:hover, .close-btn:hover {
    color: #ff79c6;
}

.popup-content input[type="number"], .popup-content select {
    width: 90%;
    padding: 12px;
    margin-top: 16px;
    border-radius: 12px;
    border: none;
    background: rgba(68,71,90,0.25);
    color: #f8f8f2;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(44,44,60,0.07);
}

.popup-content button, .btn-active, .btn-close, .promo-btn, .profile-btn {
    background: linear-gradient(135deg, #bd93f9 0%, #ff79c6 100%);
    color: #282a36;
    border: none;
    border-radius: 16px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    margin: 12px 0 0 0;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(189,147,249,0.12);
    transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
}
.popup-content button:hover, .btn-active:hover, .promo-btn:hover, .profile-btn:hover {
    background: linear-gradient(135deg, #50fa7b 0%, #ff79c6 100%);
    color: #fff;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 32px rgba(80,250,123,0.18);
}
.btn-close {
    background: linear-gradient(135deg, #ff5555 0%, #ff79c6 100%);
    color: #fff;
}
.btn-close:hover {
    background: linear-gradient(135deg, #ff79c6 0%, #ff5555 100%);
}

/* --- Popup mua hàng đẹp hơn, combobox Dracula --- */
#popup .popup-content {
    background: rgba(68,71,90,0.95);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(189,147,249,0.18);
    padding: 36px 28px 28px 28px;
    max-width: 400px;
    animation: fadeInCard 0.7s;
    border: 1.5px solid #bd93f9;
}
#popup .popup-content h2 {
    color: #ff79c6;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 18px;
}
#popup .popup-content p, #popup .popup-content label {
    color: #bd93f9;
    font-size: 1.08rem;
}
#packageSelect {
    width: 100%;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1.5px solid #ff79c6;
    background: #282a36;
    color: #ff79c6;
    font-size: 1.08rem;
    font-weight: 600;
    margin: 18px 0 12px 0;
    box-shadow: 0 2px 8px rgba(189,147,249,0.10);
    transition: border 0.3s, box-shadow 0.3s;
    appearance: none;
}
#packageSelect:focus {
    border: 1.5px solid #bd93f9;
    box-shadow: 0 4px 16px rgba(189,147,249,0.18);
    outline: none;
    color: #ff79c6;
}
#packageSelect option {
    background: #44475a;
    color: #ff79c6;
    font-weight: 600;
}
/* --- End popup mua hàng đẹp Dracula --- */

/* Card neumorphism + glassmorphism */
.product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(68,71,90,0.85);
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(44,44,60,0.17);
    padding: 24px 16px;
    text-align: center;
    width: 100%;
    max-width: 300px;
    min-width: 220px;
    margin: 0 !important;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: fadeInCard 0.7s;
}
@keyframes fadeInCard {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.product-card:hover {
    transform: scale(1.04) translateY(-6px);
    box-shadow: 0 16px 32px rgba(189,147,249,0.18);
}

.product-img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 220px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(189,147,249,0.15);
    margin-bottom: 12px;
    transition: transform 0.3s;
}
.product-card:hover .product-img {
    transform: scale(1.08);
}

/* --- Fix product-img aspect ratio for mobile --- */
@media (max-width: 900px) {
    .product-img {
        height: auto !important;
        max-width: 220px !important;
        width: 100% !important;
        object-fit: contain !important;
    }
}
@media (max-width: 600px) {
    .product-img {
        height: auto !important;
        max-width: 180px !important;
        width: 100% !important;
        object-fit: contain !important;
    }
}

.product-title {
    font-size: 1.3rem;
    margin: 12px 0;
    color: #ff79c6;
    font-weight: 600;
}
.product-prices {
    margin: 12px 0;
}
.price-option {
    font-size: 0.97em;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.old-price {
    text-decoration: line-through;
    color: #ff5555;
    font-size: 0.9em;
    margin-left: 8px;
    margin-right: 4px;
    opacity: 0.7;
}
.new-price {
    color: #50fa7b;
    font-weight: bold;
    font-size: 1.1em;
    margin-right: 4px;
}
.unit {
    color: #bd93f9;
    font-size: 0.95em;
    font-weight: 500;
}
.product-desc {
    color: #f8f8f2;
    font-size: 1rem;
    margin: 10px 0 0 0;
    opacity: 0.95;
    min-height: 48px;
}

.buy-button, .detail-button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    margin: 8px 4px;
    background: linear-gradient(135deg, #6272a4 0%, #bd93f9 100%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(44,44,60,0.07);
    transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
}
.buy-button:hover, .detail-button:hover {
    background: linear-gradient(135deg, #50fa7b 0%, #ff79c6 100%);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 8px 32px rgba(80,250,123,0.18);
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

/* --- Fix main-content horizontal alignment: center content, reduce right gap --- */
.main-content {
    align-items: flex-start;
    justify-content: flex-start;
    margin-left: 250px;
    margin-right: 0;
    width: calc(100vw - 250px);
    box-sizing: border-box;
    padding: 32px 32px;
    display: flex;
    flex-direction: column;
    /* Bỏ max-width và margin: auto để không căn giữa trang */
}
@media (max-width: 900px) {
    .main-content {
        margin-left: 0;
        width: 100vw;
        padding: 8px;
        align-items: center;
        padding-top: 90px !important;
    }
    .user-icon-container {
        z-index: 101;
        position: fixed;
        top: 12px;
        right: 18px;
    }
    .sidebar-toggle {
        z-index: 200;
        position: fixed;
        top: 18px;
        left: 18px;
    }
}
@media (max-width: 600px) {
    .main-content {
        padding-top: 50px !important;
    }
}

/* --- Set grid gap for product-card, no margin, for even spacing --- */
.product-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px !important;
    justify-items: center;
    align-items: stretch;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
}
.product-card {
    margin: 0 !important;
}
@media (min-width: 1600px) {
    .product-container {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1800px;
    }
    .product-card {
        max-width: 320px;
        padding: 28px 18px;
    }
}
@media (min-width: 1800px) {
    .product-container {
        grid-template-columns: repeat(4, 1fr);
        max-width: 2000px;
    }
    .product-card {
        max-width: 320px;
        padding: 32px 22px;
    }
}
@media (min-width: 2000px) {
    .product-container {
        grid-template-columns: repeat(5, 1fr);
        max-width: 2000px;
    }
    .product-card {
        max-width: 300px;
        padding: 32px 22px;
    }
}
@media (max-width: 1200px) {
    .product-container {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 900px) {
    .product-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .product-card {
        max-width: 95vw;
        min-width: 0;
    }
    .product-img {
        height: 140px;
    }
}
@media (max-width: 600px) {
    .product-container {
        grid-template-columns: 1fr;
    }
    .product-card {
        max-width: 98vw;
        min-width: 0;
    }
    .product-img {
        height: 110px;
    }
}

/* Sidebar toggle button for mobile/tablet */
.sidebar-toggle {
    display: none;
}
@media (max-width: 900px) {
    .sidebar {
        width: 80vw;
        max-width: 320px;
        border-radius: 0 24px 24px 0;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(.4,0,.2,1), box-shadow 0.3s;
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 100;
        display: flex;
        flex-direction: column;
    }
    .sidebar.show {
        transform: translateX(0);
        box-shadow: 0 8px 32px 0 rgba(44,44,60,0.37);
    }
    .sidebar-toggle {
        display: flex !important;
        position: fixed;
        top: 18px;
        left: 18px;
        z-index: 200;
        background: linear-gradient(135deg, #bd93f9, #ff79c6);
        color: #fff;
        border: none;
        border-radius: 50%;
        width: 44px;
        height: 44px;
        box-shadow: 0 4px 16px rgba(189,147,249,0.18);
        cursor: pointer;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        transition: background 0.3s, box-shadow 0.3s;
    }
}
@media (min-width: 901px) {
    .sidebar-toggle {
        display: none !important;
    }
    .sidebar {
        width: 250px;
        border-radius: 0 24px 24px 0;
        transform: translateX(0);
        transition: transform 0.3s cubic-bezier(.4,0,.2,1), box-shadow 0.3s;
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 100;
        display: flex;
        flex-direction: column;
    }
    .sidebar.hide {
        transform: translateX(-100%);
        box-shadow: none;
    }
}

/* Responsive layout */
@media (max-width: 1200px) {
    .sidebar {
        width: 200px;
        padding: 16px 8px;
    }
    .product-card {
        max-width: 260px;
        padding: 18px 8px;
    }
    .main-content {
        max-width: 98vw;
        padding: 18px 8px;
    }
    .product-container {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 900px) {
    body {
        flex-direction: column;
    }
    .main-content {
        max-width: 100vw;
        padding: 12px;
        margin: 0 auto;
    }
    .product-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .product-card {
        max-width: 95vw;
    }
    body.sidebar-open {
        overflow: hidden;
    }
}
@media (max-width: 600px) {
    .sidebar {
        padding: 8px 2px;
        font-size: 0.95rem;
        width: 95vw;
        max-width: 98vw;
    }
    .logo img {
        max-width: 160px;
        height: 76px;
    }
    .product-card {
        max-width: 98vw;
        padding: 12px 4px;
    }
    .popup-content, .popup-active-content, .promo-content {
        max-width: 98vw;
        padding: 18px 6px;
    }
    .buy-button, .detail-button, .btn-active, .btn-close, .promo-btn, .profile-btn {
        font-size: 0.95rem;
        padding: 10px 12px;
    }
    .product-container {
        grid-template-columns: 1fr;
    }
}

/* Fade-in for table, popup-message, etc. */
.table-container, .popup-message {
    animation: fadeIn 0.7s;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Custom scrollbar for sidebar */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: #bd93f9 #282a36;
}
.sidebar::-webkit-scrollbar {
    width: 8px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: #bd93f9;
    border-radius: 8px;
}
.sidebar::-webkit-scrollbar-track {
    background: #282a36;
}

/* User icon neumorphism */
.user-icon-container {
    position: absolute;
    top: 18px;
    right: 32px;
    z-index: 101;
    position: fixed;
    top: 18px;
    right: 32px;
    z-index: 101;
    display: flex;
    align-items: center;
}
@media (max-width: 900px) {
    .user-icon-container {
        right: 18px;
        top: 12px;
    }
}
.user-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(189,147,249,0.18);
    cursor: pointer;
    border: 2px solid #bd93f9;
    transition: box-shadow 0.2s, border 0.2s;
}
.user-icon:hover {
    box-shadow: 0 4px 16px rgba(255,121,198,0.22);
    border: 2px solid #ff79c6;
}

.user-menu {
    position: absolute;
    top: 60px;
    right: 0;
    min-width: 220px;
    background: linear-gradient(135deg, rgba(68,71,90,0.95), rgba(189,147,249,0.85));
    box-shadow: 0 8px 32px 0 rgba(80,250,123,0.18);
    border-radius: 18px;
    border: 1px solid rgba(189,147,249,0.18);
    backdrop-filter: blur(12px);
    z-index: 100;
    display: none;
    flex-direction: column;
    padding: 18px 0 10px 0;
    animation: fadeInMenu 0.4s;
}
.user-menu.show {
    display: flex;
}
@keyframes fadeInMenu {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(189,147,249,0.12);
}
.username {
    color: #bd93f9;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 2px;
}
.role {
    color: #8be9fd;
    font-size: 0.95rem;
    font-weight: 500;
}
.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    color: #f8f8f2;
    text-decoration: none;
    font-weight: 600;
    border-radius: 12px;
    margin: 2px 12px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    font-size: 1rem;
}
.menu-item i {
    font-size: 1.1rem;
    color: #bd93f9;
    transition: color 0.2s;
}
.menu-item:hover {
    background: linear-gradient(90deg, #ff79c6 0%, #bd93f9 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255,121,198,0.12);
}
.menu-item:hover i {
    color: #fff;
}
@media (max-width: 600px) {
    .user-menu {
        top: 48px;
        min-width: 160px;
        padding: 10px 0 6px 0;
    }
    .menu-item {
        padding: 8px 12px;
        font-size: 0.95rem;
    }
}

/* Table glassmorphism */
.table-container {
    background: rgba(40,42,54,0.85);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(44,44,60,0.17);
    padding: 24px;
    margin: 24px 0;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
thead th {
    color: #bd93f9;
    background: rgba(68,71,90,0.85);
    padding: 14px;
    border-radius: 8px;
    font-weight: bold;
}
tbody tr {
    background: rgba(68,71,90,0.65);
    color: #f8f8f2;
    border-radius: 8px;
    transition: background 0.3s;
}
tbody tr:hover {
    background: rgba(189,147,249,0.18);
}
td {
    padding: 12px;
    border-bottom: 1px solid #6272a4;
    text-align: center;
}

/* Popup message glassmorphism */
.popup-message {
    position: fixed;
    top: 60px;
    right: 24px;
    background: rgba(80,250,123,0.85);
    color: #282a36;
    padding: 14px 24px;
    border-radius: 16px;
    z-index: 3000;
    font-weight: bold;
    box-shadow: 0 4px 16px rgba(80,250,123,0.18);
    animation: fadeIn 0.7s, fadeOut 4s 3.5s forwards;
}
@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-10px); }
}

/* Submenu glassmorphism */
.submenu-chromedriver {
    display: none;
    position: fixed;
    left: 260px;
    top: 0;
    width: 220px;
    background: rgba(58,58,74,0.85);
    padding: 14px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(189,147,249,0.12);
    animation: fadeIn 0.4s;
}
.submenu-chromedriver.active {
    display: block;
}
.submenu-chromedriver a {
    display: block;
    padding: 12px;
    color: #f8f8f2;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 6px;
    background: rgba(68,71,90,0.15);
    transition: background 0.3s, color 0.3s;
}
.submenu-chromedriver a:hover {
    background: rgba(189,147,249,0.18);
    color: #ff79c6;
}

/* Profile button neumorphism */
.profile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #bd93f9, #ff79c6);
    color: #f8f8f2;
    font-weight: bold;
    border: none;
    border-radius: 30px;
    padding: 14px 24px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    margin: 28px auto;
    width: 85%;
    box-shadow: 0 4px 16px rgba(189,147,249,0.18);
    text-align: center;
}
.profile-btn:hover {
    background: linear-gradient(135deg, #ff79c6, #bd93f9);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 32px rgba(255,121,198,0.18);
    color: #fff;
}
.profile-btn i {
    font-size: 20px;
}

/* --- Profile Form: Simple Dracula Theme --- */
.profile-info {
    background: #282a36;
    border-radius: 16px;
    box-shadow: none;
    border: 1.5px solid #44475a;
    padding: 28px 18px 18px 18px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
    animation: fadeInCard 0.7s;
    transition: box-shadow 0.3s, background 0.3s;
    overflow: hidden;
    flex: 1 1 320px;
    width: 100%;
    max-width: 620px;
    min-width: 0;
}
@keyframes glassPulse {
    0% { box-shadow: 0 4px 18px 0 rgba(80,250,123,0.10), 0 2px 8px rgba(189,147,249,0.10); }
    100% { box-shadow: 0 8px 32px 0 rgba(189,147,249,0.18), 0 4px 16px rgba(80,250,123,0.14); }
}
.profile-info .form-group {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 10px 0;
    /* border-bottom: 1px solid #44475a; */
    background: none;
    border-radius: 0;
    box-shadow: none;
    flex-wrap: nowrap;
    
}
.profile-info label {
    font-size: 1rem;
    color: #bd93f9;
    width: 160px;
    min-width: 160px;
    max-width: 160px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: color 0.3s;
    flex-shrink: 0;
    white-space: normal;
    overflow: visible;
    word-break: break-word;
}
.profile-info input {
    flex: 1 1 0;
    width: auto;
    max-width: none;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #44475a;
    background: #44475a;
    color: #f8f8f2;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: none;
    outline: none;
    transition: border 0.3s, background 0.3s;
}
.profile-info input:focus {
    border: 1px solid #bd93f9;
    background: #3c3f51;
}
.profile-info input[readonly], .profile-info input[disabled] {
    opacity: 0.85;
    cursor: not-allowed;
    background: #44475a;
    color: #bd93f9;
}
.profile-info .button-wrapper {
    width: auto;
    max-width: none;
    display: flex;
    justify-content: flex-end;
    margin-top: 0;
    flex: 1;
}
.profile-info #regenerate-token {
    background: linear-gradient(90deg, #bd93f9 0%, #ff79c6 100%);
    color: #282a36;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(189,147,249,0.10);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 0;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
    position: relative;
    overflow: hidden;
}
.profile-info #regenerate-token:hover {
    background: linear-gradient(90deg, #ff79c6 0%, #bd93f9 100%);
    color: #fff;
    box-shadow: 0 6px 24px rgba(189,147,249,0.14);
    transform: translateY(-2px) scale(1.04);
}
.profile-info i {
    color: #bd93f9;
    font-size: 1.1em;
    margin-right: 4px;
    vertical-align: middle;
    transition: color 0.3s;
}
@media (max-width: 700px) {
    .profile-info {
        padding: 10px 2px 6px 2px;
        border-radius: 10px;
        gap: 10px;
        max-width: 98vw;
    }
    .profile-info .form-group {
        gap: 0;
        padding: 8px 0;
        border-radius: 0;
        flex-wrap: nowrap;
    }
    .profile-info label {
        width: 100px;
        min-width: 100px;
        max-width: 100px;
        font-size: 0.95rem;
        white-space: normal;
        overflow: visible;
        word-break: break-word;
    }
    .profile-info input {
        padding: 7px 6px;
        border-radius: 6px;
        font-size: 0.95rem;
    }
    .profile-info .button-wrapper {
        max-width: 98vw;
    }
    .profile-info #regenerate-token {
        font-size: 0.95rem;
        padding: 7px 8px;
        border-radius: 6px;
    }
}
@keyframes fadeInCard {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
/* --- End Profile Form --- */

/* --- End UI/UX Modernization --- */

.profile-container.glass {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 32px;
    flex-wrap: wrap;
}
.affiliate-invoices {
    flex: 1 1 320px;
    min-width: 280px;
    max-width: 600px;
    margin-top: 0;
}
@media (max-width: 900px) {
    .profile-container.glass {
        flex-direction: column;
        gap: 18px;
        align-items: center;
    }
    .profile-info, .affiliate-invoices {
        max-width: 98vw;
        min-width: 0;
        width: 100%;
    }
}

.commission-chart {
    height: auto;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
}
.commission-chart canvas {
    height: auto !important;
    min-height: 220px;
    max-height: 400px;
    width: 100% !important;
    image-rendering: auto !important;
    background: transparent;
}
@media (max-width: 900px) {
    .commission-chart, .commission-chart canvas {
        min-height: 180px;
        height: auto !important;
        max-height: 220px;
    }
}

.product-page-title {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    display: block;
    font-weight: 700;
    font-size: 2.3rem;
    text-transform: uppercase;
    background: linear-gradient(90deg, #bd93f9 0%, #ff79c6 50%, #50fa7b 100%);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    letter-spacing: 2px;
    line-height: 1.2;
    filter: none;
    animation: gradientMove 2.5s linear infinite alternate;
}
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* Table styles from base.html (Dracula theme) */
.table-container {
    background-color: #282a36;
    border-radius: 8px;
    flex: 1;
    /* padding đã có */
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.table-title {
    color: #f993df;
    font-size: 40px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
}
.dracula-table {
    width: 100%;
    color: #f8f8f2;
    border-collapse: separate;
    border-spacing: 0 10px;
}
.dracula-table thead {
    background-color: transparent;
    text-align: center;
}
.dracula-table th {
    background-color: #44475a;
    color: #bd93f9;
    padding: 10px 15px;
    text-align: center;
    border-radius: 3px;
    font-weight: bold;
}
.dracula-table td {
    padding: 10px;
    background-color: #3c3f51;
    border-bottom: 1px solid #44475a;
}
.dracula-table tr:nth-child(even) {
    background-color: #3c3f51;
}
.dracula-table tr:hover td {
    background-color: #6272a4;
}
.no-key, .status-warning {
    color: #ff5555;
    font-weight: bold;
}
.status-active {
    color: #50fa7b;
}
.no-transaction-message {
    text-align: center;
    color: #ff79c6;
    padding: 20px;
    font-style: italic;
}
.btn-download, .btn-edit, .btn-renew {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-right: 10px;
}
.btn-edit { margin-right: 0; }
.btn-download i { font-size: 20px; color: #50fa7b; }
.btn-edit i { font-size: 20px; color: #ffea00; }
.btn-renew i { font-size: 20px; color: #8be9fd; }
.btn-download:hover i, .btn-edit:hover i, .btn-renew:hover i { color: #ff79c6; }

/* Popup active styles */
.popup-active {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}
.popup-active-content {
    background-color: #44475a;
    border-radius: 8px;
    padding: 20px;
    width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.key_active[type="text"] {
    background-color: #ffffff;
    color: #000000;
    border: none;
    border-radius: 4px;
    padding: 10px;
    width: 100%;
    margin-bottom: 15px;
    box-sizing: border-box;
}

/* QR styles */
.qr-note {
    background-color: #44475a;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 900px;
    box-sizing: border-box;
}
.qr-note p {
    font-size: 16px;
    line-height: 1.6;
}
.qr-container {
    background-color: #6272a4;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}
.qr-container img {
    max-width: 40%;
    border-radius: 8px;
}
.note {
    background-color: #bd93f9;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    font-weight: bold;
}
.qr-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
}
@media (max-width: 700px) {
    .qr-content {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
    .qr-content img {
        max-width: 220px;
        width: 100%;
        height: auto;
    }
    .account-info {
        width: 100%;
        text-align: center;
    }
}
.qr-content img {
    max-width: 350px;
    height: auto;
    border: 1px solid #ccc;
}
.account-info {
    text-align: left;
}
.account-info p {
    margin: 5px 0;
    font-size: 20px;
}

/* Animation for popup-message */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* --- UI/UX Modernization for index.html (copied from index.html, prioritized) --- */
.hr-glass {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, #bd93f9 0%, #ff79c6 100%);
    margin: 0 0 24px 0;
    border-radius: 8px;
    opacity: 0.7;
}
.neumorph {
    box-shadow: 0 4px 16px rgba(189,147,249,0.12), 0 1.5px 4px #fff2 inset;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #bd93f9 0%, #ff79c6 100%);
    color: #282a36;
    font-weight: 600;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
}
.neumorph:hover {
    background: linear-gradient(135deg, #50fa7b 0%, #ff79c6 100%);
    color: #fff;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 32px rgba(80,250,123,0.18);
}
.fade-card {
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInCard 0.7s forwards;
}
.popup-btn-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 18px;
}
/* --- End UI/UX Modernization for index.html --- */

.recharge-main-content {
    width: 100%;
    max-width: 100vw;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}
@media (max-width: 800px) {
    .recharge-main-content {
        max-width: 100%;
        padding: 0 8px;
    }
}
.captcha-main-content,
.facebookservice-main-content,
.gmailservice-main-content,
.mailservice-main-content,
.history-main-content,
.profile-main-content {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
}
@media (max-width: 800px) {
    .captcha-main-content,
    .facebookservice-main-content,
    .gmailservice-main-content,
    .mailservice-main-content,
    .history-main-content,
    .profile-main-content {
        max-width: 100vw;
        padding: 0 8px;
    }
}
.table-scroll-x {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-container {
    /* ...existing styles... */
    overflow-x: auto;
    min-width: 0;
}
@media (max-width: 700px) {
    .table-container {
        min-width: 0;
        padding: 8px;
    }
    .dracula-table {
        min-width: 600px;
        width: 100%;
    }
}

/* Sidebar menu items appear one by one on reload */
.sidebar .menu1 a,
.sidebar .menu2 a,
.sidebar .profile-btn,
.sidebar .tools,
.sidebar .contact,
.sidebar .logo,
.sidebar .balance {
    opacity: 0;
    transform: translateY(30px);
    animation: sidebarFadeIn 0.6s forwards;
}

.sidebar .logo { animation-delay: 0.1s; }
.sidebar .balance { animation-delay: 0.2s; }
.sidebar .menu1 a:nth-child(1) { animation-delay: 0.3s; }
.sidebar .menu1 a:nth-child(2) { animation-delay: 0.4s; }
.sidebar .menu1 a:nth-child(3) { animation-delay: 0.5s; }
.sidebar .menu1 a:nth-child(4) { animation-delay: 0.6s; }
.sidebar .menu1 a:nth-child(5) { animation-delay: 0.7s; }
.sidebar .menu1 a:nth-child(6) { animation-delay: 0.8s; }
.sidebar .menu1 a:nth-child(7) { animation-delay: 0.9s; }
.sidebar .tools { animation-delay: 1.0s; }
.sidebar .menu2 a:nth-child(1) { animation-delay: 1.1s; }
.sidebar .contact { animation-delay: 1.2s; }
.sidebar .menu2 a:nth-child(2) { animation-delay: 1.3s; }
.sidebar .menu2 a:nth-child(3) { animation-delay: 1.4s; }
.sidebar .menu2 a:nth-child(4) { animation-delay: 1.5s; }
.sidebar .profile-btn { animation-delay: 1.6s; }

@keyframes sidebarFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


#popupMessage {
    position: fixed;
    top: 12px;
    right: 18px;
    left: auto;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
}

.popup-message {
    background: linear-gradient(90deg, #50fa7b 0%, #bd93f9 100%);
    color: #282a36;
    font-weight: 600;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(80,250,123,0.12);
    padding: 14px 18px;
    max-width: 90vw;
    width: auto;
    margin: 8px 0;
    text-align: center;
    font-size: 1rem;
    z-index: 2001;
    position: relative;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.4s, transform 0.4s;
    pointer-events: auto;
}

.popup-message.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.popup-message.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

@media (max-width: 600px) {
    #popupMessage {
        top: 8px;
        right: 8px;
        left: auto;
        align-items: flex-end;
    }
    .popup-message {
        max-width: 98vw;
        padding: 10px 8px;
        font-size: 0.95rem;
    }
}


.promo-content {
    position: relative;
    border-radius: 18px;
    padding: 32px 42px;
    overflow: hidden;
}

/* Viền gradient tím chuyển động nhẹ */
.promo-content::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
    padding: 2px;
    background: linear-gradient(135deg,
        #bd93f9,
        #8be9fd,
        #ff79c6,
        #bd93f9);
    background-size: 300% 300%;
    animation: borderFlow 5s ease infinite;
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Hiệu ứng di chuyển ánh sáng trên viền */
@keyframes borderFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
