/* Shared Header and Navigation Styles for Hifex Trader */

/* CSS Variables */
 :root {
    --primary-blue: #1e40af;
    --secondary-blue: #3b82f6;
    --accent-blue: #60a5fa;
    --light-blue: #93c5fd;
    --dark-navy: #0f172a;
    --navy: #1e293b;
    --slate: #334155;
    --light-color: #ffffff;
    --glass-white: rgba(255, 255, 255, 0.1);
    --glass-blue: rgba(59, 130, 246, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --success-color: #10b981;
    --error-color: #ef4444;
    --blue-gradient: linear-gradient(135deg, #1e40af, #3b82f6, #60a5fa);
    --surface-glass: rgba(30, 41, 75, 0.6);
    --card-glass: rgba(255, 255, 255, 0.05);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

body {
    background: var(--dark-navy);
    color: var(--light-color);
    overflow-x: hidden;
    font-weight: 400;
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* Animated Particle Background */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: var(--dark-navy);
}

/* Main Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 8px 0;
    height: 60px;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    height: 100%;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-icon {
    cursor: pointer;
    font-size: 24px;
    color: var(--light-color);
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
}

.menu-icon:hover {
    background: var(--glass-white);
    color: var(--accent-blue);
}

.logo {
    font-size: 24px;
    font-weight: 800;
    background: var(--blue-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.account-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--glass-white);
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    margin-right: 15px;
}

.balance-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--glass-white);
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.account-label {
    font-size: 14px;
    color: var(--light-blue);
    font-weight: 500;
}

.account-value {
    font-size: 16px;
    color: var(--light-color);
    font-weight: 700;
}

.balance-label {
    font-size: 14px;
    color: var(--light-blue);
    font-weight: 500;
}

.balance-value {
    font-size: 16px;
    color: var(--light-color);
    font-weight: 700;
}

.nav-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.status-indicators {
    display: flex;
    gap: 12px;
    align-items: center;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--glass-white);
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.status-item:hover {
    background: var(--glass-blue);
    transform: translateY(-2px);
}

.status-label {
    font-size: 10px;
    color: var(--light-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--blue-gradient);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.6);
}

.login-btn i {
    font-size: 16px;
}

.account-select {
    background: var(--glass-white);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--light-color);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
}

.account-select:hover {
    background: var(--glass-blue);
    border-color: var(--accent-blue);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--error-color);
    position: relative;
    box-shadow: 0 0 10px var(--error-color);
    animation: statusPulse 2s infinite;
}

.status-dot.connected {
    background: var(--success-color);
    box-shadow: 0 0 10px var(--success-color);
}

.status-dot::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 1px solid currentColor;
    background: radial-gradient(circle, currentColor 0%, transparent 70%);
    opacity: 0.3;
    animation: statusRipple 2s infinite;
}

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

@keyframes statusRipple {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Side Navigation */
.side-navbar {
    width: 80px;
    height: calc(100vh - 60px);
    background: var(--surface-glass);
    backdrop-filter: blur(40px);
    border-right: 1px solid var(--glass-border);
    position: fixed;
    top: 60px;
    left: 0;
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 122, 255, 0.1);
}

.side-navbar.active {
    width: 250px;
}

.side-navbar ul {
    list-style: none;
    padding: 20px 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.side-navbar ul li {
    position: relative;
    margin: 8px 12px;
    padding: 16px 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 16px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.side-navbar ul li .initial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--glass-blue);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--light-color);
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.side-navbar ul li .initial i {
    font-size: 18px;
}

.side-navbar ul li .initial::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.side-navbar ul li:hover .initial::before {
    left: 100%;
}

.side-navbar ul li .text {
    display: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--light-color);
    margin-left: 15px;
    white-space: nowrap;
}

.side-navbar.active ul li {
    justify-content: flex-start;
    padding: 16px 20px;
}

.side-navbar.active ul li .text {
    display: block;
}

.side-navbar ul li:hover {
    background: var(--glass-blue);
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.2);
}

.side-navbar ul li:hover .initial {
    background: var(--primary-blue);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.4);
}

/* Tooltip for collapsed sidebar */
.side-navbar:not(.active) ul li {
    position: relative;
}

.side-navbar:not(.active) ul li::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--glass-blue);
    color: var(--light-color);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.side-navbar:not(.active) ul li:hover::after {
    opacity: 1;
    visibility: visible;
    left: 70px;
}

/* Responsive Design */
@media (max-width: 768px) {
.nav-container {
padding: 0 8px;
height: 50px;
}

.nav-left {
gap: 4px;
}

.logo {
font-size: 14px;
white-space: nowrap;
}

.nav-center {
display: flex;
gap: 8px;
}

.account-display {
padding: 4px 8px;
margin-right: 4px;
}

.account-label, .balance-label {
font-size: 8px;
}

.account-value, .balance-value {
font-size: 9px;
font-weight: 600;
}

.nav-center {
display: flex;
gap: 6px;
}

.account-display {
padding: 4px 8px;
margin-right: 4px;
}

.account-label, .balance-label {
font-size: 8px;
}

.account-value, .balance-value {
font-size: 9px;
font-weight: 600;
}

.balance-display {
padding: 4px 8px;
}

.nav-actions {
gap: 8px;
}

.login-btn {
padding: 6px 10px;
font-size: 10px;
}

.account-select {
padding: 4px 8px;
font-size: 10px;
min-width: 80px;
}

.status-item {
padding: 4px 6px;
}

.status-label {
font-size: 8px;
}

.status-dot {
width: 8px;
height: 8px;
}

.side-navbar {
width: 60px;
}

.side-navbar ul li {
padding: 12px 8px;
justify-content: center;
}

.side-navbar ul li .initial {
width: 36px;
height: 36px;
font-size: 12px;
display: flex;
align-items: center;
justify-content: center;
}

.side-navbar ul li .initial i {
font-size: 16px;
}

.side-navbar ul li .text {
display: none;
}
}

@media (max-width: 480px) {
.main-nav {
height: auto;
min-height: 40px;
padding: 1px 0;
}

.nav-container {
padding: 1px 6px;
flex-wrap: wrap;
gap: 1px;
justify-content: space-between;
align-items: flex-start;
height: 100%;
box-sizing: border-box;
}

.nav-left {
order: 1;
flex: 0 0 auto;
gap: 4px;
display: flex;
align-items: center;
}

.menu-icon {
font-size: 16px;
padding: 2px;
}

.logo {
font-size: 11px;
font-weight: 700;
}

.nav-center {
order: 3;
width: 100%;
display: flex;
justify-content: center;
gap: 4px;
margin-top: 1px;
flex-wrap: nowrap;
}

.account-display, .balance-display {
background: var(--glass-white);
border: 1px solid var(--glass-border);
border-radius: 6px;
padding: 1px 4px;
backdrop-filter: blur(10px);
flex: 1;
min-width: 100px;
max-width: 120px;
text-align: center;
}

.account-label, .balance-label {
font-size: 7px;
display: block;
margin-bottom: 0px;
}

.account-value, .balance-value {
font-size: 8px;
font-weight: 700;
display: block;
}

.balance-display {
padding: 1px 4px;
}

.nav-actions {
order: 2;
flex: 0 0 auto;
gap: 2px;
display: flex;
align-items: center;
}

.login-btn {
padding: 2px 6px;
font-size: 8px;
gap: 1px;
}

.login-btn i {
font-size: 9px;
}

.account-select {
padding: 2px 4px;
font-size: 8px;
min-width: 65px;
}

.status-indicators {
gap: 2px;
}

.status-item {
padding: 2px 4px;
}

.status-label {
font-size: 8px;
}

.status-dot {
width: 8px;
height: 8px;
}

.side-navbar {
width: 50px;
}

.side-navbar ul li {
padding: 8px 4px;
justify-content: center;
}

.side-navbar ul li .initial {
width: 30px;
height: 30px;
font-size: 10px;
display: flex;
align-items: center;
justify-content: center;
}

.side-navbar ul li .initial i {
font-size: 14px;
}

.side-navbar ul li .text {
display: none;
    }
}

@media (max-width: 360px) {
    .main-nav {
        height: auto;
        min-height: 35px;
        padding: 1px 0;
    }
    
    .nav-container {
        padding: 1px 4px;
        flex-wrap: wrap;
        gap: 1px;
        justify-content: space-between;
        align-items: flex-start;
        height: 100%;
        box-sizing: border-box;
    }
    
    .nav-left {
        order: 1;
        flex: 0 0 auto;
        gap: 2px;
        display: flex;
        align-items: center;
    }
    
    .menu-icon {
        font-size: 14px;
        padding: 1px;
    }
    
    .logo {
        font-size: 9px;
        font-weight: 800;
    }
    
    .nav-center {
        order: 3;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 1px;
        margin-top: 1px;
        align-items: center;
    }
    
    .account-display, .balance-display {
        background: var(--glass-white);
        border: 1px solid var(--glass-border);
        border-radius: 4px;
        padding: 1px 3px;
        backdrop-filter: blur(10px);
        width: 100%;
        max-width: 130px;
        text-align: center;
        margin: 0;
    }
    
    .account-label, .balance-label {
        font-size: 6px;
        display: block;
        margin-bottom: 0px;
    }
    
    .account-value, .balance-value {
        font-size: 7px;
        font-weight: 700;
        display: block;
    }
    
    .nav-actions {
        order: 2;
        flex: 0 0 auto;
        gap: 1px;
        display: flex;
        align-items: center;
    }
    
    .login-btn {
        padding: 1px 3px;
        font-size: 6px;
        gap: 1px;
        border-radius: 6px;
    }
    
    .login-btn i {
        font-size: 7px;
    }
    
    .account-select {
        font-size: 6px;
        padding: 1px 3px;
        min-width: 50px;
        border-radius: 4px;
    }
    
    .status-indicators {
        gap: 1px;
    }
    
    .status-item {
        padding: 1px 2px;
        border-radius: 4px;
    }
    
    .status-label {
        font-size: 6px;
    }
    
    .status-dot {
        width: 6px;
        height: 6px;
    }
    
    .side-navbar {
        width: 45px;
    }
    
    .side-navbar ul li {
        padding: 6px 3px;
        margin: 2px 3px;
    }
    
    .side-navbar ul li .initial {
        width: 24px;
        height: 24px;
        font-size: 8px;
    }
    
    .side-navbar ul li .initial i {
        font-size: 12px;
    }
    
    .side-navbar ul li .text {
        display: none;
}
}