/* Header Styles - Minimal Version */

:root {
    --header-bg: #0d6efd;
    --header-text: #ffffff;
    --header-hover: rgba(255, 255, 255, 0.1);
}


/* Navbar */

.navbar {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-height: 60px;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.95) 0%, rgba(0, 86, 179, 0.95) 100%) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar.scrolled {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.98) 0%, rgba(0, 86, 179, 0.98) 100%) !important;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
}

.navbar-brand:hover {
    transform: translateY(-1px);
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}


/* Logo rotation animation - Elegant subtle rotation with scale */

.navbar-logo {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center center;
    will-change: transform;
    display: inline-block;
}


/* Option 1: Subtle rotation (15-20 degrees) - Recommended */

.navbar-brand:hover .navbar-logo {
    animation: logoRotateSubtle 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes logoRotateSubtle {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(18deg) scale(1.08);
    }
    100% {
        transform: rotate(0deg) scale(1);
    }
}


/* Option 2: Full 360° spin (uncomment to use instead) */


/*
.navbar-brand:hover .navbar-logo {
    animation: logoSpinBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes logoSpinBounce {
    0% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(90deg) scale(1.08);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    75% {
        transform: rotate(270deg) scale(1.08);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}
*/

.navbar-brand i {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.navbar-brand:hover i {
    transform: scale(1.1) rotate(5deg);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0.375rem;
    margin: 0 0.25rem;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0.375rem;
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-link.active::before {
    opacity: 1;
}


/* User Avatar */

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}


/* Dropdown Menu */

.dropdown-menu {
    border: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    margin-top: 0.5rem;
    border-radius: 0.5rem;
    z-index: 1050 !important;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar {
    z-index: 1030;
    position: relative;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0.25rem;
    margin: 0.125rem 0.5rem;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

.dropdown-header {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
    padding: 0.5rem 1rem;
}


/* Main Content */

.main-content {
    /* min-height: calc(100vh - 60px); */
    background-color: #f5f7fa;
    padding-top: 2rem;
    padding-bottom: 2rem;
}


/* Header Balance & Deposit Styles */

.header-balance-wrapper {
    display: flex;
    align-items: center;
    font-size: 12px;
    /* padding: 0.25rem 0.75rem; */
    /* background: rgba(255, 255, 255, 0.15); */
    /* border-radius: 0.375rem; */
    /* backdrop-filter: blur(10px); */
    transition: all 0.2s ease;
}

.header-balance-wrapper:hover {
    background: rgba(255, 255, 255, 0.084);
}

.balance-text {
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-block;
}


/* Balance animation effects */

.balance-text.balance-animating {
    color: #ffd700 !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    transform: scale(1.05);
}

.balance-text.balance-updated {
    animation: balancePulse 0.6s ease;
}

@keyframes balancePulse {
    0% {
        transform: scale(1);
        color: inherit;
    }
    50% {
        transform: scale(1.1);
        color: #4ade80;
        text-shadow: 0 0 15px rgba(74, 222, 128, 0.6);
    }
    100% {
        transform: scale(1);
        color: inherit;
    }
}

.deposit-btn-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.deposit-btn-header:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.deposit-btn-header i {
    font-size: 1rem;
}

.deposit-text {
    font-weight: 600;
}


/* Desktop/Mobile Section Visibility */

.desktop-user-section {
    display: flex;
}

.balance-section-mobile {
    display: none;
}

.deposit-user-section-mobile {
    display: none;
}

.user-menu-items-mobile {
    display: none;
}

.user-menu-list-mobile {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.user-menu-item-mobile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: white;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
}

.user-menu-item-mobile:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
}

.user-menu-item-mobile i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.user-avatar-mobile {
    color: white;
    font-weight: 500;
}

.user-email-mobile {
    text-align: center;
}

.balance-section-mobile {
    display: none;
}

.deposit-user-section-mobile {
    display: none;
}


/* Responsive Design for Balance & Deposit */

@media (max-width: 991px) {
    .navbar-nav {
        margin-top: 1rem;
    }
    .nav-link {
        margin: 0.25rem 0;
    }
    /* Hide desktop sections */
    .desktop-user-section {
        display: none !important;
    }
    /* Show mobile sections */
    .balance-section-mobile {
        display: block !important;
        width: 100%;
        margin-bottom: 1rem;
    }
    .deposit-user-section-mobile {
        display: block !important;
        width: 100%;
        margin-bottom: 1rem;
    }
    .user-menu-items-mobile {
        display: block !important;
        width: 100%;
    }
    /* Balance wrapper mobile - Full width, centered */
    .header-balance-wrapper-mobile {
        width: 100%;
        display: flex;
        justify-content: center;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 0.5rem;
        backdrop-filter: blur(10px);
        margin-bottom: 0.5rem;
    }
    /* Deposit and user section mobile - Full width, side by side */
    .deposit-user-section-mobile>div {
        width: 100%;
        display: flex;
        gap: 0.75rem;
        padding: 0.5rem;
    }
    .deposit-btn-header-mobile {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    .user-avatar-mobile {
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        overflow: hidden;
        flex-shrink: 0;
    }
    .user-avatar-mobile img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .balance-text {
        font-size: 1.2rem;
        font-weight: 600;
    }
    .deposit-text {
        display: inline;
        font-weight: 600;
    }
    /* User menu list mobile */
    .user-menu-list-mobile {
        width: 100%;
        padding: 1.25rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 0.5rem;
        margin-top: 0.5rem;
    }
    .user-info-mobile {
        text-align: center;
    }
    .user-name-mobile {
        font-size: 1.1rem;
    }
    .user-menu-item-mobile {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.875rem 1rem;
        color: white;
        text-decoration: none;
        border-radius: 0.375rem;
        transition: all 0.2s ease;
        margin-bottom: 0.5rem;
        font-weight: 500;
    }
    .user-menu-item-mobile:hover {
        background: rgba(255, 255, 255, 0.2);
        color: white;
        text-decoration: none;
        transform: translateX(5px);
    }
    .user-menu-item-mobile.text-danger:hover {
        background: rgba(220, 53, 69, 0.2);
        color: #ff6b6b !important;
    }
    .user-menu-item-mobile i {
        width: 24px;
        text-align: center;
        font-size: 1.2rem;
    }
}

@media (max-width: 767px) {
    /* Mobile: Compact display */
    .header-balance-wrapper {
        padding: 0.375rem 0.625rem;
        font-size: 0.85rem;
    }
    .deposit-btn-header {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
    .deposit-text {
        display: inline;
    }
    .balance-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 575px) {
    /* Extra small: Show icon only for deposit button */
    /* .deposit-text có thể ẩn text nếu cần */
    .deposit-btn-header {
        padding: 0.5rem;
        min-width: 40px;
        justify-content: center;
    }
    .header-balance-wrapper {
        padding: 0.375rem 0.5rem;
    }
    .balance-text {
        font-size: 0.85rem;
    }
    /* Ensure balance is always visible */
    #header-balance {
        font-size: 0.85rem !important;
    }
}


/* Loading State */

.navbar-loading {
    opacity: 0.6;
    pointer-events: none;
}


/* ===========================================
   GLOBAL BODY STYLES
   =========================================== */

body {
    background-color: #f5f7fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}