/**
 * ==========================================
 *  JUTALOMPONT - HEADER & NAVIGATION STYLES
 *  2025 Modern Premium Edition
 * ==========================================
 * 
 * Ez a fájl a header és navigáció stílusait tartalmazza.
 * Változók a design-system.css-ből jönnek.
 * 
 * STRUKTÚRA:
 * 1. Navbar alapok
 * 2. Brand/Logo
 * 3. Navigációs linkek
 * 4. Dropdown menük
 * 5. User actions (jobb oldal)
 * 6. Mobile/Responsive
 * 7. Animációk
 */

/* ============================================
   NAVBAR BASE
   ============================================ */
.navbar {
    background: var(--jp-navbar-bg, rgba(255, 255, 255, 0.95));
    border-bottom: 1px solid var(--jp-border);
    padding: 0.35rem 0;
    min-height: 72px;
    transition: all 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--jp-z-sticky, 200);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.navbar > .container,
.navbar > .container-fluid {
    height: 100%;
    display: flex;
    align-items: center;
}

.navbar.scrolled {
    box-shadow: var(--jp-shadow-xl);
    background: var(--jp-navbar-bg, rgba(255, 255, 255, 0.98));
}

[data-bs-theme="dark"] .navbar {
    --jp-navbar-bg: rgba(15, 23, 42, 0.95);
}

/* ============================================
   BRAND / LOGO
   ============================================ */
.navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    background: var(--jp-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    margin-right: 2rem;
    flex-shrink: 0;
    text-decoration: none;
}

.navbar-brand i {
    font-size: 1.5rem;
    background: var(--jp-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   TOGGLER (Mobile)
   ============================================ */
.navbar-toggler {
    border: 1px solid var(--jp-border);
    padding: 0.5rem;
    border-radius: 8px;
    color: var(--jp-text);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%236366f1' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================
   MAIN NAVIGATION
   ============================================ */
.navbar-nav.nav-main {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-link {
    color: var(--jp-text) !important;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 0.55rem 0.95rem !important;
    border-radius: var(--jp-radius-md, 8px);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--jp-primary) !important;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 6px;
    height: 3px;
    border-radius: 999px;
    background: transparent;
    transition: all 0.2s ease;
    opacity: 0;
}

.nav-link:hover::after,
.nav-link.active::after {
    background: var(--jp-primary);
    opacity: 1;
}

.nav-link i {
    font-size: 0.85rem;
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
}

/* ============================================
   DROPDOWN MENUS
   ============================================ */
.dropdown-menu {
    background: var(--jp-bg-card);
    border: 1px solid var(--jp-border);
    border-radius: var(--jp-radius-xl, 12px);
    box-shadow: var(--jp-shadow-xl, 0 10px 40px rgba(0, 0, 0, 0.15));
    padding: 0.5rem;
    margin-top: 0 !important;
    min-width: 200px;
    opacity: 0;
    transform: scale(0.95) translateY(-5px);
    transform-origin: top center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: block !important;
    visibility: hidden;
    pointer-events: none;
}

/* Invisible bridge */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
}

.dropdown-menu.show,
.nav-item.dropdown:hover > .dropdown-menu,
.dropdown:hover > .dropdown-menu {
    opacity: 1;
    transform: scale(1) translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.nav-item.dropdown,
.dropdown {
    position: relative;
}

@media (min-width: 992px) {
    .nav-item.dropdown:hover > .dropdown-toggle,
    .dropdown:hover > .dropdown-toggle {
        color: var(--jp-primary) !important;
    }
}

/* Dropdown Items */
.dropdown-item {
    color: var(--jp-text);
    padding: 0.6rem 1rem;
    border-radius: var(--jp-radius-md, 8px);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--jp-primary);
}

.dropdown-item i {
    width: 1.25rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--jp-text-muted);
}

.dropdown-item:hover i {
    color: var(--jp-primary);
}

.dropdown-header {
    color: var(--jp-text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.5rem 1rem 0.25rem;
}

.dropdown-divider {
    border-color: var(--jp-border);
    margin: 0.35rem 0;
}

/* Mega Menu */
.dropdown-mega {
    position: static !important;
}

.mega-menu {
    width: 100%;
    max-width: 1200px;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-top: 0.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--jp-border);
    background: var(--jp-bg);
}

[data-bs-theme="dark"] .mega-menu {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.mega-menu .dropdown-header {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: normal;
    padding: 0.5rem 0 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid var(--jp-border);
}

.mega-menu .list-unstyled {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mega-menu .dropdown-item {
    padding: 0.625rem 0.875rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mega-menu .dropdown-item:hover {
    background: var(--jp-bg-secondary);
    transform: translateX(4px);
    padding-left: 1rem;
}

.mega-menu .dropdown-item i {
    width: 1.5rem;
    font-size: 0.95rem;
}

@media (min-width: 1200px) {
    .mega-menu {
        padding: 2rem !important;
    }
}

/* ============================================
   USER ACTIONS (Right Side)
   ============================================ */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    padding-left: 1rem;
}

/* Points Badge */
.points-badge {
    background: var(--jp-gradient);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: var(--jp-radius-full, 50px);
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    height: 38px;
    white-space: nowrap;
}

.points-badge i {
    font-size: 0.9rem;
}

/* Wallet Badge */
.wallet-badge {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    padding: 0.5rem 1rem;
    border-radius: var(--jp-radius-full, 50px);
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(16, 185, 129, 0.25);
    height: 38px;
    white-space: nowrap;
}

[data-bs-theme="dark"] .wallet-badge {
    color: #34d399;
    background: rgba(16, 185, 129, 0.15);
}

.wallet-badge i {
    font-size: 0.9rem;
}

/* Notification Icons */
.nav-icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--jp-radius-full, 50%);
    background: var(--jp-bg-secondary);
    border: 1px solid var(--jp-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--jp-text-muted);
    text-decoration: none;
}

.nav-icon-btn:hover {
    border-color: var(--jp-primary);
    color: var(--jp-primary);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.15);
}

.nav-icon-btn i {
    font-size: 1rem;
}

.nav-icon-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--jp-danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: var(--jp-radius-full, 50px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    animation: pulse-badge 2s infinite;
    transition: var(--jp-transition-base);
}

.nav-icon-badge.active {
    animation: pulse-badge-active 0.6s ease-out;
}

@keyframes pulse-badge-active {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Currency Selector Button - Clean circular icon style */
.currency-selector-btn {
    position: relative;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: var(--jp-radius-full, 50%);
    background: var(--jp-bg-secondary);
    border: 1px solid var(--jp-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--jp-text-muted);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: -0.5px;
}

.currency-selector-btn:hover {
    border-color: var(--jp-primary);
    color: var(--jp-primary);
    background: rgba(99, 102, 241, 0.1);
}

.currency-selector-btn::after {
    /* Hide Bootstrap dropdown arrow */
    display: none !important;
}

.currency-selector-btn .currency-code {
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: -0.3px;
}

/* Currency Dropdown Menu */
.currency-dropdown {
    min-width: 140px;
    border-radius: var(--jp-radius-lg, 12px);
    border: 1px solid var(--jp-border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    padding: 0.5rem;
}

.currency-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--jp-radius-md, 8px);
    font-weight: 500;
}

.currency-dropdown .dropdown-item .currency-symbol {
    width: 24px;
    text-align: center;
    font-weight: 700;
}

.currency-dropdown .dropdown-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--jp-primary);
}

/* Notification Wrapper - ensures consistent styling */
.notification-wrapper {
    position: relative;
    display: inline-flex;
}

/* XP Level Badge */
.xp-level-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--jp-radius-full, 50px);
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--jp-secondary);
    height: 38px;
    white-space: nowrap;
}

.xp-level-badge .level-num {
    background: var(--jp-secondary);
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.xp-progress-mini {
    width: 40px;
    height: 4px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.xp-progress-mini .progress-fill {
    height: 100%;
    background: var(--jp-secondary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Theme Toggle */
.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: var(--jp-radius-full, 50%);
    background: var(--jp-bg-secondary);
    border: 1px solid var(--jp-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--jp-text);
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--jp-primary);
    color: var(--jp-primary);
    background: rgba(99, 102, 241, 0.1);
}

.theme-toggle i {
    font-size: 0.95rem;
}

/* ============================================
   USER DROPDOWN
   ============================================ */
.user-dropdown {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.3rem;
    padding-right: 0.75rem;
    border-radius: var(--jp-radius-full, 50px);
    background: var(--jp-bg-secondary);
    border: 1px solid var(--jp-border);
    cursor: pointer;
    transition: all 0.2s ease;
    height: 42px;
}

.user-dropdown:hover {
    border-color: var(--jp-primary);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--jp-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-info .name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--jp-text);
}

.user-info .role {
    font-size: 0.7rem;
    color: var(--jp-text-muted);
}

.user-dropdown .fa-chevron-down {
    font-size: 0.65rem;
    color: var(--jp-text-muted);
    margin-left: 0.25rem;
}

/* User Avatar Dropdown Menu */
.user-avatar-dropdown {
    min-width: 280px;
    max-width: 320px;
    padding: 0.5rem;
}

.user-avatar-dropdown .user-profile-card {
    padding: 1rem;
    margin: 0 0 0.5rem 0;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.user-avatar-dropdown .user-avatar-lg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--jp-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--jp-primary);
}

.user-avatar-dropdown .user-avatar-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar-dropdown .user-details h6 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--jp-text);
    margin-bottom: 0.15rem;
}

.user-avatar-dropdown .user-details .user-email {
    font-size: 0.75rem;
    color: var(--jp-text-muted);
    word-break: break-all;
}

.user-avatar-dropdown .xp-progress-section {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--jp-border);
}

.user-avatar-dropdown .xp-progress-section .xp-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--jp-text-muted);
    margin-bottom: 0.35rem;
}

.user-avatar-dropdown .xp-progress-section .progress {
    height: 5px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.user-avatar-dropdown .xp-progress-section .progress-bar {
    background: var(--jp-gradient);
}

.user-avatar-dropdown .dropdown-section {
    padding: 0.25rem 0;
}

.user-avatar-dropdown .section-label {
    display: block;
    padding: 0.5rem 1rem 0.35rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--jp-text-muted);
}

/* ============================================
   RESPONSIVE - Mobile & Tablet
   ============================================ */
@media (max-width: 1199px) {
    .navbar {
        height: auto;
        padding: 0.6rem 0;
    }
    
    .navbar > .container,
    .navbar > .container-fluid {
        flex-wrap: wrap;
    }
    
    .navbar-collapse {
        background: var(--jp-bg-card);
        padding: 0.85rem;
        border-radius: var(--jp-radius-xl, 12px);
        margin-top: 0.85rem;
        border: 1px solid var(--jp-border);
        box-shadow: var(--jp-shadow-lg);
    }
    
    .navbar-nav.nav-main {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }
    
    .navbar-nav.nav-main .nav-link {
        padding: 0.75rem 1rem !important;
        justify-content: flex-start;
    }
    
    .navbar-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        margin: 0.85rem 0 0 0;
        padding: 0.85rem 0 0 0;
        border-top: 1px solid var(--jp-border);
        width: 100%;
    }
    
    .points-badge, 
    .wallet-badge {
        width: 100%;
        justify-content: center;
        height: 44px;
    }
    
    .theme-toggle {
        width: 100%;
        border-radius: 10px;
        height: 44px;
    }
    
    .navbar-actions .btn {
        width: 100%;
        height: 44px;
    }
    
    /* Static dropdowns inside collapsed menu */
    .navbar-collapse .dropdown-menu {
        position: static !important;
        transform: none !important;
        border: none;
        box-shadow: none;
        background: rgba(99, 102, 241, 0.05);
        margin: 0.25rem 0;
        padding: 0.5rem;
    }
    
    /* User dropdown stays positioned correctly */
    .navbar > .container-fluid .dropdown .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        right: 1.5rem !important;
        left: auto !important;
        transform: none !important;
        margin-top: 0.5rem !important;
        min-width: 260px;
        max-width: calc(100vw - 3rem);
        z-index: 1050;
    }
}

@media (max-width: 767px) {
    body {
        padding-top: 70px;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-brand i {
        font-size: 1.3rem;
    }
    
    .user-avatar-dropdown {
        min-width: 260px;
        max-width: calc(100vw - 2rem);
    }
}

/* Hide user info on smaller screens */
@media (min-width: 1200px) and (max-width: 1450px) {
    .nav-link i {
        margin-right: 0 !important;
        font-size: 1.1rem;
    }
    .nav-link {
        padding: 0.6rem 0.75rem !important;
    }
    .navbar-actions {
        gap: 0.4rem;
    }
    .points-badge, .wallet-badge {
        padding: 0.5rem 0.75rem;
    }
    .user-info {
        display: none !important;
    }
}

/* Desktop hover dropdowns */
@media (min-width: 1200px) {
    .dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
        animation: fadeInUp 0.2s ease forwards;
    }
    
    .navbar-nav .dropdown-menu {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .navbar-nav .dropdown:hover > .dropdown-menu {
        animation: fadeInUpCentered 0.2s ease forwards;
    }
    
    .dropdown:hover > .dropdown-menu::before {
        content: '';
        position: absolute;
        top: -10px;
        left: 0;
        width: 100%;
        height: 10px;
    }
    
    .dropdown-menu-end {
        right: 0;
        left: auto;
    }
}

/* ============================================
   BALANCE FLASH ANIMATIONS
   ============================================ */
@keyframes balanceGlow {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
    25% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 5px rgba(16, 185, 129, 0.4);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 30px 8px rgba(16, 185, 129, 0.6);
    }
    75% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 5px rgba(16, 185, 129, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes balanceGlowRed {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
    25% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 5px rgba(239, 68, 68, 0.4);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 30px 8px rgba(239, 68, 68, 0.6);
    }
    75% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 5px rgba(239, 68, 68, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

@keyframes balanceTextPop {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.15);
        color: #10b981;
    }
    100% {
        transform: scale(1);
    }
}

@keyframes balanceTextPopRed {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.15);
        color: #ef4444;
    }
    100% {
        transform: scale(1);
    }
}

@keyframes balanceShine {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.points-badge.balance-flash,
.wallet-badge.balance-flash {
    animation: balanceGlow 0.5s ease-out;
    position: relative;
    z-index: 1000;
}

.points-badge.balance-flash.losing,
.wallet-badge.balance-flash.losing {
    animation: balanceGlowRed 0.5s ease-out;
}

.points-badge.balance-flash span:last-child,
.wallet-badge.balance-flash span:last-child {
    animation: balanceTextPop 0.4s ease-out;
    display: inline-block;
}

.points-badge.balance-flash.losing span:last-child,
.wallet-badge.balance-flash.losing span:last-child {
    animation: balanceTextPopRed 0.4s ease-out;
}

.points-badge.balance-flash::after,
.wallet-badge.balance-flash::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: balanceShine 0.5s ease-out;
    pointer-events: none;
}

.points-badge.balance-flash.losing::after,
.wallet-badge.balance-flash.losing::after {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(239, 68, 68, 0.3) 50%,
        transparent 100%
    );
}

/* Floating +X Indicator */
.balance-gain-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
    animation: gainPop 1.5s ease-out forwards;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
    pointer-events: none;
}

/* Floating -X Indicator (piros) */
.balance-loss-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
    animation: lossPop 1.5s ease-out forwards;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    pointer-events: none;
}

@keyframes gainPop {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.5);
    }
    15% {
        opacity: 1;
        transform: translateY(-5px) scale(1.2);
    }
    30% {
        transform: translateY(-3px) scale(1);
    }
    80% {
        opacity: 1;
        transform: translateY(-15px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-25px) scale(0.8);
    }
}

@keyframes lossPop {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.5);
    }
    15% {
        opacity: 1;
        transform: translateY(-5px) scale(1.2);
    }
    30% {
        transform: translateY(-3px) scale(1);
    }
    80% {
        opacity: 1;
        transform: translateY(-15px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-25px) scale(0.8);
    }
}

/* Enhanced balance badge on gain */
.points-badge.gaining,
.wallet-badge.gaining {
    animation: balancePulse 0.6s ease-out;
}

/* Enhanced balance badge on loss (piros) */
.points-badge.losing,
.wallet-badge.losing {
    animation: balancePulseRed 0.6s ease-out;
}

@keyframes balancePulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
    }
    25% { 
        transform: scale(1.08);
        box-shadow: 0 0 25px 8px rgba(34, 197, 94, 0.5);
    }
    50% { 
        transform: scale(1.12);
        box-shadow: 0 0 35px 12px rgba(34, 197, 94, 0.6);
    }
    75% { 
        transform: scale(1.08);
        box-shadow: 0 0 25px 8px rgba(34, 197, 94, 0.5);
    }
}

@keyframes balancePulseRed {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
    }
    25% { 
        transform: scale(1.08);
        box-shadow: 0 0 25px 8px rgba(239, 68, 68, 0.5);
    }
    50% { 
        transform: scale(1.12);
        box-shadow: 0 0 35px 12px rgba(239, 68, 68, 0.6);
    }
    75% { 
        transform: scale(1.08);
        box-shadow: 0 0 25px 8px rgba(239, 68, 68, 0.5);
    }
}

/* Points counter animation */
.points-badge span:last-child,
.wallet-badge span:last-child {
    display: inline-block;
    transition: transform 0.3s ease;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUpCentered {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

/* ============================================
   SCROLLBAR (Global)
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--jp-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--jp-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--jp-text-muted);
}

/* ============================================
   SCROLL PROGRESS INDICATOR
   ============================================ */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    z-index: 10000;
}

.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--jp-primary), #8b5cf6, #ec4899);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
    transition: width 0.1s ease-out;
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ============================================
   HEADER VIP BADGE
   ============================================ */
.header-vip-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.6rem;
    color: white;
    animation: vipGlow 2s ease-in-out infinite;
}

@keyframes vipGlow {
    0%, 100% { box-shadow: 0 0 5px currentColor; }
    50% { box-shadow: 0 0 15px currentColor; }
}

/* ============================================
   HEADER STREAK BADGE
   ============================================ */
.header-streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0.4rem;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 10px;
    animation: streakFlame 0.5s ease-in-out infinite;
}

.header-streak-badge i {
    font-size: 0.55rem;
}

@keyframes streakFlame {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ============================================
   DAILY BONUS QUICK BUTTON
   ============================================ */
.daily-bonus-quick-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: bonusPulseGlow 2s ease-in-out infinite;
}

.daily-bonus-quick-btn:hover {
    transform: scale(1.1);
    color: white;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.5);
}

.daily-bonus-pulse {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 12px;
    height: 12px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--jp-bg);
    animation: dailyBonusPulse 1s infinite;
}

@keyframes bonusPulseGlow {
    0%, 100% { box-shadow: 0 2px 10px rgba(34, 197, 94, 0.3); }
    50% { box-shadow: 0 2px 20px rgba(34, 197, 94, 0.5); }
}

@keyframes dailyBonusPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

/* ============================================
   ENHANCED USER DROPDOWN PROFILE
   ============================================ */
.user-profile-card {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.04));
    border-radius: 12px;
    margin: 0.5rem;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.user-avatar-lg {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--jp-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.user-avatar-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details h6 {
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--jp-text);
    font-size: 1rem;
}

.user-email {
    font-size: 0.75rem;
    color: var(--jp-text-secondary);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xp-progress-section {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(99, 102, 241, 0.15);
}

.xp-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--jp-text-secondary);
    margin-bottom: 0.5rem;
}

.xp-progress-section .progress {
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.xp-progress-section .progress-bar {
    background: var(--jp-gradient);
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* ============================================
   NAVBAR SCROLL STATE
   ============================================ */
.navbar.scrolled {
    background: var(--jp-navbar-bg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.navbar.scrolled .navbar-brand {
    font-size: 1.25rem;
}

.navbar.scrolled .user-avatar {
    width: 34px !important;
    height: 34px !important;
}

/* ============================================
   ENHANCED MOBILE MENU
   ============================================ */
@media (max-width: 1199.98px) {
    .navbar-collapse {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--jp-bg);
        padding: 1.5rem;
        overflow-y: auto;
        transform: translateX(-100%);
        opacity: 0;
        transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }
    
    .navbar-collapse.show {
        transform: translateX(0);
        opacity: 1;
    }
    
    .navbar-collapse .navbar-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .navbar-collapse .nav-link {
        padding: 1rem 1.25rem !important;
        border-radius: 12px;
        font-size: 1rem;
    }
    
    .navbar-collapse .nav-link:hover {
        background: rgba(99, 102, 241, 0.1);
    }
    
    .navbar-collapse .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none;
        border: none;
        background: rgba(99, 102, 241, 0.05);
        margin: 0.5rem 0;
        padding: 0.5rem;
        border-radius: 12px;
    }
    
    .navbar-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
        padding: 1.5rem 0;
        border-top: 1px solid var(--jp-border);
        margin-top: 1rem;
    }
    
    .quick-action-btn {
        width: 44px;
        height: 44px;
    }
    
    .mega-menu {
        width: 95%;
        max-width: none;
        left: 50% !important;
        transform: translateX(-50%) !important;
        padding: 1rem !important;
    }
    
    .mega-menu .row {
        --bs-gutter-x: 1rem;
    }
    
    .mega-menu .col-lg-3 {
        margin-bottom: 1.5rem;
    }
}

/* ============================================
   BOTTOM NAVIGATION (Mobile)
   ============================================ */
@media (max-width: 767.98px) {
    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--jp-bg);
        border-top: 1px solid var(--jp-border);
        padding: 0.5rem 0;
        z-index: 1000;
        display: flex;
        justify-content: space-around;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    
    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        padding: 0.5rem 1rem;
        text-decoration: none;
        color: var(--jp-text-muted);
        transition: all 0.2s ease;
        border-radius: 12px;
        min-width: 60px;
    }
    
    .bottom-nav-item.active {
        color: var(--jp-primary);
        background: rgba(99, 102, 241, 0.1);
    }
    
    .bottom-nav-item i {
        font-size: 1.25rem;
    }
    
    .bottom-nav-item span {
        font-size: 0.7rem;
        font-weight: 500;
    }
    
    /* Body padding bottom for mobile nav */
    body {
        padding-bottom: 70px;
    }
}

/* ============================================
   DARK MODE ENHANCEMENTS
   ============================================ */
[data-bs-theme="dark"] .user-profile-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.08));
    border-color: rgba(99, 102, 241, 0.25);
}

[data-bs-theme="dark"] .xp-progress-section {
    border-color: rgba(99, 102, 241, 0.25);
}

[data-bs-theme="dark"] .scroll-progress-container {
    background: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .daily-bonus-pulse {
    border-color: rgba(15, 23, 42, 0.95);
    background: var(--jp-danger);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

/* ============================================
   SEARCH MODAL
   ============================================ */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.search-modal.show {
    opacity: 1;
    visibility: visible;
}

.search-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.search-modal-container {
    position: relative;
    width: 90%;
    max-width: 700px;
    background: var(--jp-bg);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--jp-border);
    transform: translateY(-20px);
    transition: transform 0.2s ease;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.search-modal.show .search-modal-container {
    transform: translateY(0);
}

.search-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--jp-border);
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 1rem;
    color: var(--jp-text-muted);
    pointer-events: none;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--jp-border);
    border-radius: 12px;
    background: var(--jp-bg-secondary);
    color: var(--jp-text);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--jp-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-clear-btn {
    position: absolute;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--jp-text-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-clear-btn:hover {
    background: var(--jp-bg-secondary);
    color: var(--jp-text);
}

.search-close-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--jp-border);
    border-radius: 8px;
    background: var(--jp-bg-secondary);
    color: var(--jp-text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.search-close-btn:hover {
    background: var(--jp-bg);
    border-color: var(--jp-primary);
    color: var(--jp-primary);
}

.search-results-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    max-height: calc(80vh - 100px);
}

.search-empty-state,
.search-loading,
.search-error {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--jp-text-muted);
}

.search-empty-state i,
.search-error i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
    display: block;
}

.search-empty-state kbd {
    background: var(--jp-bg-secondary);
    border: 1px solid var(--jp-border);
    border-radius: 4px;
    padding: 0.125rem 0.375rem;
    font-size: 0.75rem;
    font-family: monospace;
}

.search-section {
    margin-bottom: 1.5rem;
}

.search-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--jp-text-muted);
    margin-bottom: 0.75rem;
    padding: 0 0.5rem;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.search-result-item {
    border-radius: 8px;
    transition: background 0.2s ease;
}

.search-result-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--jp-text);
    transition: all 0.2s ease;
}

.search-result-item:hover .search-result-link {
    background: var(--jp-bg-secondary);
    transform: translateX(4px);
}

.search-result-link i {
    width: 2rem;
    text-align: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
}

.search-result-title {
    font-weight: 600;
    color: var(--jp-text);
    margin-bottom: 0.125rem;
}

.search-item-desc {
    color: var(--jp-text-muted);
    font-size: 0.85rem;
}

.search-trigger-btn {
    position: relative;
}

/* ============================================
   QUICK ACTIONS TOOLBAR
   ============================================ */
.quick-actions-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-action-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--jp-text-muted);
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Ugyanaz a szín mint a friends ikon */
.quick-action-btn i {
    font-size: 1rem;
    position: relative;
    z-index: 2;
    color: var(--jp-text-muted);
    font-weight: 600;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    line-height: 1;
}

.quick-action-btn:hover {
    border-color: var(--jp-primary);
    color: var(--jp-primary);
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.25);
}

.quick-action-btn:hover i {
    color: var(--jp-primary);
}

.quick-action-btn .progress-indicator {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    z-index: 1;
    border: 2px solid #ffffff;
}

.daily-bonus-btn {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 193, 7, 0);
    }
}

/* Dark mode specific styles */
[data-bs-theme="dark"] .quick-action-btn {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .quick-action-btn i {
    color: #e2e8f0 !important;
    font-weight: 600;
    font-size: 1rem;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    line-height: 1;
}

[data-bs-theme="dark"] .quick-action-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--jp-primary);
    color: var(--jp-primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

[data-bs-theme="dark"] .quick-action-btn:hover i {
    color: var(--jp-primary) !important;
}

[data-bs-theme="dark"] .quick-action-btn .progress-indicator {
    border-color: rgba(15, 23, 42, 0.95);
}

/* Progress indicator dark mode fix */
[data-bs-theme="dark"] .daily-tasks-btn .progress-indicator {
    background: conic-gradient(
        rgba(99, 102, 241, 0.9) var(--progress, 0%), 
        transparent var(--progress, 0%)
    );
    border-color: rgba(15, 23, 42, 0.95);
}

[data-bs-theme="dark"] .daily-bonus-btn {
    animation: pulse-glow-dark 2s infinite;
}

@keyframes pulse-glow-dark {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.6);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 193, 7, 0);
    }
}

/* Notification badge on quick action buttons */
.quick-action-btn .nav-icon-badge,
.quick-action-btn .daily-bonus-pulse {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 14px;
    height: 14px;
    padding: 0 4px;
    background: var(--jp-danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
    border: 2px solid #ffffff;
    z-index: 10;
}

[data-bs-theme="dark"] .quick-action-btn .nav-icon-badge,
[data-bs-theme="dark"] .quick-action-btn .daily-bonus-pulse {
    border-color: rgba(15, 23, 42, 0.95);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.7);
}

/* User Profile Card in Dropdown */
.user-profile-card {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.05));
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.user-quick-stats {
    padding-top: 0.75rem;
    border-top: 1px solid var(--jp-border);
}

.user-quick-stats .d-flex {
    font-size: 0.875rem;
}

.user-quick-stats strong {
    color: var(--jp-text);
    font-weight: 600;
}