@font-face {
    font-family: 'Arya';
    src: url('resources/tnof/Arya-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Arya';
    src: url('resources/tnof/Arya-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

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

:root {
    /* Fonts */
    --font-main: 'Arya', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Light Mode Colors */
    --accent: #3ecb1ebf;
    --accent-darker: #32a86fbf;
    --bg-color: #ffffff;
    --text-main: #000000;
    --text-secondary: rgba(0, 0, 0, 0.7);
    --text-muted: rgba(0, 0, 0, 0.5);
    
    /* UI Colors - Light Mode */
    --border-color: rgba(0, 0, 0, 0.1);
    --blur-container-bg: rgba(255, 255, 255, 0.4);
    --blur-container-bg-two: rgba(255, 255, 255, 0.6);
    --blur-container-bg-three: rgba(255, 255, 255, 0.8);
    --nav-hover: rgba(0, 0, 0, 0.05);
    --nav-active: rgba(62, 203, 30, 0.2);
    --nav-active-darker: rgba(50, 168, 111, 0.2);
    
    /* Backgrounds */
    --bg-main: url('resources/MAIN.svg');
}

body.dark-mode {
    /* Dark Mode Colors */
    --bg-color: #000000;
    --text-main: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    /* UI Colors - Dark Mode */
    --border-color: rgba(255, 255, 255, 0.1);
    --blur-container-bg: rgba(0, 0, 0, 0.4);
    --blur-container-bg-two: rgba(0, 0, 0, 0.6);
    --blur-container-bg-three: rgba(0, 0, 0, 0.8);
    --nav-hover: rgba(255, 255, 255, 0.05);
}

html, body {
    width: 100%;
    min-height: 100vh;
}

html {
    background-color: var(--bg-color);
    transition: background-color 0.3s ease;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    transition: color 0.3s ease;
}

#app {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-color);
    transition: background-color 0.3s ease;
}

.background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: var(--bg-main);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    transform: scale(1);
    pointer-events: none;
    opacity: 0.3;
}

.texture-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* .texture-light {
    background-image: url('resources/wall-light.svg');
}

.texture-dark {
    background-image: url('resources/wall-dark.svg');
    opacity: 0;
}

body.dark-mode .texture-light {
    opacity: 0;
}

body.dark-mode .texture-dark {
    opacity: 0.5;
} */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 16rem;
    height: 100vh;
    background: var(--blur-container-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    z-index: 200;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, rgba(62, 203, 30, 0.03) 0%, transparent 50%, rgba(62, 203, 30, 0.02) 100%);
    pointer-events: none;
    opacity: 0.5;
}

.sidebar-header {
    padding: .5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
}

.sidebar-logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.03em;
    flex: 1;
    transition: all 0.3s ease;
}

.sidebar-logo .green-i {
    color: var(--accent);
    text-shadow: 0 0 20px rgba(0, 255, 135, 0.3);
}

.theme-toggle-btn {
    width: 2rem;
    height: 2rem;
    background: none;
    border: none;
    border-radius: .5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--text-main);
}

.theme-toggle-btn:hover {
    background: var(--nav-hover);
    transform: scale(1.05);
}

.theme-toggle-btn .moon-icon {
    display: none;
}

body.dark-mode .theme-toggle-btn .sun-icon {
    display: none;
}

body.dark-mode .theme-toggle-btn .moon-icon {
    display: block;
}

.sidebar-nav {
    flex: 1;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    position: relative;
    z-index: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.25rem .5rem;
    margin: 0 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    transition: all 0.2s ease;
    position: relative;
    border-radius: 0.2rem;
    cursor: pointer;
}

.nav-item:hover {
    color: var(--text-main);
    background: var(--nav-hover);
}

.nav-item.active {
    color: var(--accent-darker);
    background: var(--nav-active);
}

.nav-subitem {
    margin-left: 1.5rem;
    padding-left: 1.5rem;
    font-size: 0.9rem;
}

.nav-subitem .nav-icon svg {
    width: 20px;
    height: 20px;
}

.nav-expandable {
    position: relative;
}

.nav-expand-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    opacity: 0.6;
}

.nav-expand-btn:hover {
    opacity: 1;
}

.nav-expandable.expanded .nav-expand-btn {
    transform: rotate(180deg);
}

.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-submenu.expanded {
    max-height: 500px;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.sidebar-footer {
    padding: 1rem 0 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    position: relative;
    z-index: 1;
}

#logout-btn {
    color: rgba(255, 68, 68, 0.8);
}

#logout-btn:hover {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

#content {
    position: relative;
    width: calc(100% - 16rem);
    max-width: none;
    min-height: 100vh;
    margin-left: 16rem;
    padding: 1rem;
    z-index: 10;
}

/* Mobile Floating Nav */
.mobile-navbar {
    display: none;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
}

.mobile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--blur-container-bg-three);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    min-width: 250px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-dropdown.show {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}

.mobile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    border-radius: 0.5rem;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.mobile-dropdown-item:hover {
    background: var(--nav-hover);
}

.mobile-dropdown-item svg {
    flex-shrink: 0;
}

.nav-toggle {
    display: flex;
    align-items: center;
    background: var(--blur-container-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    max-width: 95vw;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

.nav-toggle::-webkit-scrollbar {
    display: none;
}

.nav-toggle {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.toggle-indicator {
    position: absolute;
    height: calc(100% - 12px);
    background: var(--accent);
    border-radius: 50px;
    z-index: 1;
    transition: left 0.15s ease-out, width 0.15s ease-out;
}

.toggle-indicator.bounce {
    animation: bounce 0.25s ease-out;
}

@keyframes bounce {
    0% { transform: scale(1, 1); }
    30% { transform: scale(1.25, 0.75); }
    50% { transform: scale(0.85, 1.15); }
    75% { transform: scale(1.1, 0.9); }
    100% { transform: scale(1, 1); }
}

.toggle-item {
    position: relative;
    z-index: 2;
    background: none;
    border: none;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    flex-shrink: 0;
    font-family: var(--font-main);
}

.toggle-item:hover {
    color: var(--text-main);
}

.toggle-item.active {
    color: #fff;
}

.toggle-item svg {
    stroke: var(--text-secondary);
    transition: stroke 0.3s ease;
}

.toggle-item:hover svg {
    stroke: var(--text-main);
}

.toggle-item.active svg {
    stroke: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .mobile-navbar {
        display: block;
    }
    
    #content {
        margin-left: 0;
        padding: 6rem 1rem 2rem;
    }

    #content {
        width: 100%;
    }
}

@media (min-width: 769px) {
    .mobile-navbar {
        display: none;
    }
    
    .sidebar {
        display: flex;
    }
}
