:root {
    --bg-deep: #02040a;
    --accent-glow: #3b82f6;
    --accent-secondary: #8b5cf6;
    
    --glass-surface: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.15);
    
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    
    --ease-elastic: cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    display: flex;
    perspective: 1000px;
}

/* === TŁO I PARALAKSA === */
.parallax-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.aurora-glow {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    height: 60vh;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, rgba(139, 92, 246, 0.1) 40%, rgba(0,0,0,0) 70%);
    filter: blur(80px);
    opacity: 0.8;
    animation: pulseAurora 8s infinite alternate;
}

.grid-floor {
    position: absolute;
    bottom: -20%;
    left: -50%;
    width: 200%;
    height: 50%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    transform: perspective(500px) rotateX(60deg);
    mask-image: linear-gradient(to top, black, transparent);
    -webkit-mask-image: linear-gradient(to top, black, transparent);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.4;
}
.orb-1 { width: 300px; height: 300px; background: #3b82f6; top: 10%; left: 20%; }
.orb-2 { width: 400px; height: 400px; background: #8b5cf6; bottom: 10%; right: 10%; }

/* === UI LAYER === */
.ui-container {
    position: relative;
    z-index: 10;
    display: flex;
    width: 100%;
    height: 100%;
}

/* Sidebar */
.sidebar {
    width: 80px;
    height: 100%;
    background: rgba(10, 10, 15, 0.3);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 0;
    transition: 0.3s;
}

.logo-box {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #fff, #a5b4fc);
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #000;
    font-size: 28px;
    margin-bottom: 50px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    position: relative;
}

.logo-box::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    z-index: -1;
    border-radius: 14px;
    opacity: 0.5;
    filter: blur(5px);
}

.nav-item {
    width: 44px;
    height: 44px;
    margin-bottom: 15px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-size: 20px;
    transition: all 0.3s var(--ease-elastic);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.nav-label {
    display: none;
}

/* Mobile: Nav items should be full width with text */
@media (max-width: 768px) {
    .sidebar > div[style*="flex:1"] {
        flex: 1;
        min-height: 20px;
    }
    
    .nav-item {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 0 16px;
        width: 100%;
        height: 48px;
    }
    
    .nav-item i {
        flex-shrink: 0;
        width: 28px;
        text-align: center;
        font-size: 24px;
    }
    
    .nav-label {
        display: block;
        margin-left: 16px;
        font-size: 18px;
        font-weight: 600;
        color: #e2e8f0;
        transition: color 0.3s;
        white-space: nowrap;
        letter-spacing: -0.3px;
    }
    
    .nav-item:hover .nav-label,
    .nav-item.active .nav-label {
        color: #fff;
    }
    
    .nav-item.logout-item {
        margin-top: 20px;
        background: rgba(220, 38, 38, 0.1);
        border-color: rgba(220, 38, 38, 0.3);
    }
    
    .nav-item.logout-item .nav-label {
        color: rgba(220, 38, 38, 0.9);
    }
    
    .nav-item.logout-item:hover {
        background: rgba(220, 38, 38, 0.15);
        border-color: rgba(220, 38, 38, 0.5);
    }
    
    .nav-item.logout-item:hover .nav-label {
        color: rgba(220, 38, 38, 1);
    }
}

.nav-item:hover:not(.logout-item) { color: #fff; background: var(--glass-surface); box-shadow: 0 0 15px rgba(59, 130, 246, 0.1); }
.nav-item.active { color: #fff; background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2)); border: 1px solid rgba(139, 92, 246, 0.3); }

.nav-item button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: inherit;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: inherit;
    font-family: inherit;
}

/* Logout button specific styling */
.nav-item.logout-item {
    color: rgba(220, 38, 38, 0.8) !important;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.nav-item.logout-item button,
.nav-item.logout-item i {
    color: rgba(220, 38, 38, 0.8) !important;
}

.nav-item.logout-item:hover {
    color: rgba(220, 38, 38, 1) !important;
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.5);
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.2);
}

.nav-item.logout-item:hover button,
.nav-item.logout-item:hover i {
    color: rgba(220, 38, 38, 1) !important;
}

/* === MAIN STAGE === */
.main-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    transform-style: preserve-3d;
    position: relative;
}

@keyframes pulseAurora { 
    0% { opacity: 0.5; transform: translateX(-50%) scale(1); } 
    100% { opacity: 0.8; transform: translateX(-50%) scale(1.1); } 
}

@keyframes slideInRight { 
    to { transform: translateX(0); opacity: 1; } 
}

@keyframes slideInUp { 
    to { transform: translateY(0); opacity: 1; } 
}

/* === LOGIN BUTTON (Bottom Right) === */
.login-button-bottom {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    text-decoration: none;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    transition: all 0.3s var(--ease-elastic);
    z-index: 1000;
    border: none;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.login-button-bottom:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 35px rgba(139, 92, 246, 0.6);
}

.login-button-bottom:active {
    transform: translateY(0) scale(1);
}

.login-button-bottom i {
    font-size: 18px;
}

/* === HAMBURGER MENU === */
.hamburger-menu {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Mobile menu header - hidden on desktop */
.mobile-menu-header {
    display: none;
}

.hamburger-menu:hover {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.hamburger-menu.active {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mobile-menu-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* === RESPONSIVE WEB DESIGN === */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    .main-stage {
        width: 100%;
        padding: 30px 20px;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .parallax-wrapper {
        position: fixed;
    }
    
    /* Show hamburger menu */
    .hamburger-menu {
        display: flex;
    }
    
    /* Full-screen mobile menu */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        flex-direction: column;
        padding: 60px 30px 40px 30px;
        border: none;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        background: rgba(2, 4, 10, 0.98);
        backdrop-filter: blur(40px);
        box-shadow: none;
        overflow-y: auto;
        justify-content: flex-start;
        align-items: center;
    }
    
    .sidebar.show {
        transform: translateY(0);
    }
    
    .sidebar::-webkit-scrollbar {
        width: 4px;
    }
    
    .sidebar::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 4px;
    }
    
    /* Hide standalone logo-box on mobile, show header instead */
    .sidebar > .logo-box:not(.mobile-menu-header .logo-box) {
        display: none;
    }
    
    .mobile-menu-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        max-width: 400px;
        margin-bottom: 50px;
        padding: 0 10px;
    }
    
    .mobile-menu-header .logo-box {
        width: 56px;
        height: 56px;
        font-size: 28px;
        margin-bottom: 0;
        margin-right: 0;
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.25);
    }
    
    .mobile-menu-title {
        flex: 1;
        font-size: 24px;
        font-weight: 700;
        color: #fff;
        margin: 0;
        text-align: center;
        letter-spacing: -0.5px;
    }
    
    .mobile-menu-close {
        width: 48px;
        height: 48px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        color: #fff;
        font-size: 24px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }
    
    .mobile-menu-close:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        transform: rotate(90deg);
    }
    
    .sidebar > div[style*="flex:1"] {
        flex: 1;
        min-height: 40px;
    }
    
    .nav-item {
        width: 100%;
        max-width: 400px;
        height: 64px;
        font-size: 24px;
        margin-bottom: 16px;
        margin-right: 0;
        justify-content: flex-start;
        padding: 0 24px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.08);
        transition: all 0.3s ease;
    }
    
    .nav-item:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.15);
        transform: translateX(4px);
    }
    
    .nav-item.active {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
        border-color: rgba(139, 92, 246, 0.4);
    }
    
    .main-stage {
        padding: 20px 15px;
        width: 100%;
        min-height: calc(100vh - 60px);
        margin-left: 0;
    }
    
    .ui-container {
        flex-direction: column;
    }
    
    .aurora-glow {
        width: 100vw;
        height: 50vh;
    }
    
    .orb-1,
    .orb-2 {
        width: 200px;
        height: 200px;
    }
    
    .login-button-bottom {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .hamburger-menu {
        width: 44px;
        height: 44px;
        font-size: 22px;
        top: 15px;
        left: 15px;
    }
    
    .sidebar {
        padding: 80px 20px 30px 20px;
    }
    
    .mobile-menu-header {
        margin-bottom: 40px;
    }
    
    .mobile-menu-header .logo-box {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    .mobile-menu-title {
        font-size: 20px;
    }
    
    .mobile-menu-close {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
    
    .nav-item {
        height: 56px;
        max-width: 100%;
        padding: 0 20px;
        margin-bottom: 14px;
    }
    
    .nav-item i {
        width: 24px;
        font-size: 22px;
    }
    
    .nav-label {
        font-size: 16px;
        margin-left: 14px;
    }
    
    .main-stage {
        padding: 15px 10px;
    }
    
    .login-button-bottom {
        bottom: 15px;
        right: 15px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .login-button-bottom i {
        font-size: 16px;
    }
}

/* Extra Small Mobile (max-width: 360px) */
@media (max-width: 360px) {
    .hamburger-menu {
        width: 40px;
        height: 40px;
        font-size: 20px;
        top: 12px;
        left: 12px;
    }
    
    .sidebar {
        padding: 70px 16px 24px 16px;
    }
    
    .mobile-menu-header {
        margin-bottom: 35px;
    }
    
    .mobile-menu-header .logo-box {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
    
    .mobile-menu-title {
        font-size: 18px;
    }
    
    .mobile-menu-close {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .nav-item {
        height: 52px;
        padding: 0 18px;
        margin-bottom: 12px;
    }
    
    .nav-item i {
        width: 22px;
        font-size: 20px;
    }
    
    .nav-label {
        font-size: 15px;
        margin-left: 12px;
    }
}
