﻿.cyber-grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 200vw;
    height: 200vh;
    background-image: linear-gradient(rgba(88, 166, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(88, 166, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: cyber-grid-move 20s linear infinite;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

@keyframes cyber-grid-move {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(50px) translateZ(-200px);
    }
}

.colorful-bg {
    position: fixed;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle at 20% 20%, rgba(0, 210, 255, 0.18), transparent 40%), radial-gradient(circle at 80% 30%, rgba(255, 0, 255, 0.14), transparent 45%), radial-gradient(circle at 50% 80%, rgba(0, 255, 128, 0.10), transparent 50%);
    filter: blur(30px);
    pointer-events: none;
    z-index: -3;
    opacity: 1;
}

.cyber-header-enhanced {
    background: linear-gradient(to right, #020024, #090979, #00d4ff);
    background-size: 200% 200%;
    animation: cyber-gradient-shift 10s ease infinite;
    border-bottom: 1px solid rgba(88, 166, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 100;
    position: relative;
    overflow: hidden;
}

@keyframes cyber-gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.header-content {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2;
}

.header-icon {
    font-size: 1.8rem;
    color: #fff;
    filter: drop-shadow(0 0 5px #00d2ff);
}

.pulse-icon {
    animation: cyber-slow-spin 10s linear infinite;
}

@keyframes cyber-slow-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.header-title {
    margin: 0;
    font-size: 1.5rem;
    text-transform: uppercase;
}

.gradient-text-enhanced {
    background: linear-gradient(135deg, #00d2ff, #3a7bd5, #bc8cff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    letter-spacing: 1px;
    filter: drop-shadow(0 0 8px rgba(0, 210, 255, 0.6));
}

.layout-container {
    display: flex;
    height: calc(100vh - 60px);
    width: 100%;
    position: relative;
}

.desktop-sidebar {
    width: 280px;
    min-width: 280px;
    border-right: 1px solid rgba(88, 166, 255, 0.1);
    background: rgba(13, 17, 23, 0.8);
    height: 100%;
    overflow: hidden;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.sidebar-cyber-effect {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(0, 210, 255, 0.12), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.body-content {
    flex-grow: 1;
    height: 100%;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 10;
    background: radial-gradient(circle at center, rgba(22, 33, 62, 0.8) 0%, rgba(13, 17, 23, 0.2) 80%);
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 100px;
}

.cyber-side-decoration {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, rgba(0, 210, 255, 1), transparent);
    opacity: 0.7;
    z-index: -1;
    pointer-events: none;
}

.cyber-side-decoration.left.outer {
    left: 10px;
}

.cyber-side-decoration.right.outer {
    right: 10px;
}

.cyber-side-decoration.left.inner {
    left: 16px;
    opacity: 0.4;
}

.cyber-side-decoration.right.inner {
    right: 16px;
    opacity: 0.4;
}

.mobile-bottom-nav {
    display: none;
}

.desktop-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 28px;
    color: rgba(230, 237, 243, 0.6);
    font-size: 0.75rem;
    border-top: 1px solid rgba(88, 166, 255, 0.15);
    background: rgba(13, 17, 23, 0.55);
    backdrop-filter: blur(10px);
}

.desktop-nav-container {
    padding-top: 20px;
    height: 100%;
}

.desktop-nav-link {
    white-space: nowrap !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    padding: 10px 1rem;
    color: #d7d7d7;
    text-decoration: none !important;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.desktop-nav-link .icon {
    margin-right: 8px;
    font-size: 1.1rem;
    transition: transform 0.3s;
}

.desktop-nav-link.active {
    color: #58a6ff;
    background: rgba(255,255,255,0.05);
    border-left: 3px solid #58a6ff;
}

.desktop-nav-link:hover {
    color: #58a6ff;
    text-decoration: none !important;
}

.nav-separator {
    height: 1px;
    background-color: rgba(255,255,255,0.1);
    margin: 15px 2rem;
}

.user-profile-item {
    padding: 10px 0;
    color: #d7d7d7;
    text-align: center;
}

.user-profile-content {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    margin-right: 10px;
    position: relative;
    font-size: 1rem;
}

.status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background-color: #2ea043;
    border: 2px solid #161b22;
    border-radius: 50%;
}

.logout-link {
    text-align: center;
    margin-top: 5px;
}

.logout-link span {
    font-size: 0.8rem;
    cursor: pointer;
    color: #8b949e;
}

.logout-link:hover span {
    color: #ff7b72 !important;
    text-decoration: underline;
}

.mobile-nav-container {
    width: 100%;
    height: 100%;
    background: #0d1117;
    border-top: 1px solid #30363d;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.5);
}

.mobile-nav {
    display: flex;
    height: 100%;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-link {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #8b949e;
    text-decoration: none !important;
    font-size: 0.75rem;
    position: relative;
    transition: all 0.2s ease;
}

.mobile-nav-link .icon {
    font-size: 1.2rem;
    margin-bottom: 3px;
}

.mobile-nav-link.active {
    color: #58a6ff;
}

.mobile-profile-menu {
    position: fixed;
    bottom: 74px;
    left: 10px;
    right: 10px;
    padding: 20px;
    z-index: 300;
}

.close-btn-mobile {
    position: absolute;
    top: 8px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 1.3rem;
    color: #8b949e;
    cursor: pointer;
}

.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 250;
}

.inline-badge {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: #da3633;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

@media (max-width: 768px) {
    .layout-container {
        height: calc(100vh - 60px - 64px);
    }

    .desktop-sidebar {
        display: none;
    }

    .mobile-bottom-nav {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        z-index: 200;
    }

    .body-content {
        padding: 14px;
    }

    .desktop-footer {
        display: none;
    }
}

.cyber-side-decoration {
    position: fixed;
    top: 60px;
    bottom: 0;
    pointer-events: none;
    z-index: 5;
}

.outer {
    width: 1px;
    background: rgba(88, 166, 255, 0.1);
}

.cyber-side-decoration.left.outer {
    left: 15px;
}

.cyber-side-decoration.right.outer {
    right: 15px;
}

.outer::after {
    content: '';
    position: absolute;
    top: -100px;
    left: 0;
    width: 2px;
    height: 150px;
    background: linear-gradient(to bottom, transparent, #00d2ff, transparent);
    box-shadow: 0 0 20px #00d2ff;
    animation: data-stream 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.cyber-side-decoration.right.outer::after {
    animation-delay: 1.5s;
}

@keyframes data-stream {
    0% {
        top: -20%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    100% {
        top: 120%;
        opacity: 0;
    }
}

.inner {
    width: 40px;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 0V40 M0 20H40' stroke='rgba(88, 166, 255, 0.1)' stroke-width='1'/%3E%3C/svg%3E");
    opacity: 0.3;
    mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

.cyber-side-decoration.left.inner {
    left: 30px;
    border-right: 1px solid rgba(0, 210, 255, 0.2);
    animation: circuit-flash 2s infinite alternate;
}

.cyber-side-decoration.right.inner {
    right: 30px;
    border-left: 1px solid rgba(0, 210, 255, 0.2);
    animation: circuit-flash 2s infinite alternate-reverse;
}

@keyframes circuit-flash {
    0% {
        opacity: 0.1;
    }

    100% {
        opacity: 0.4;
        text-shadow: 0 0 10px #00d2ff;
    }
}
