:root {
    --forest-primary: #2d5a27;
    --forest-primary-light: #4a7c59;
    --forest-primary-dark: #1e3a1a;
    --forest-secondary: #52c41a;
    --forest-accent: #73d13d;
    --forest-text: #2f2f2f;
    --forest-text-light: #666;
    --forest-text-lighter: #999;
    --forest-bg: #ffffff;
    --forest-bg-light: #f6f8f6;
    --forest-border: #e8f5e8;
    --forest-shadow: rgba(45, 90, 39, 0.1);
    --forest-shadow-dark: rgba(45, 90, 39, 0.15);
}

body.forest-dark {
    --forest-primary: #4a7c59;
    --forest-primary-light: #6ba06f;
    --forest-primary-dark: #2d5a27;
    --forest-secondary: #73d13d;
    --forest-accent: #95de64;
    --forest-text: #e8e8e8;
    --forest-text-light: #b8b8b8;
    --forest-text-lighter: #888;
    --forest-bg: #1a1a1a;
    --forest-bg-light: #2a2a2a;
    --forest-border: #333;
    --forest-shadow: rgba(0, 0, 0, 0.3);
    --forest-shadow-dark: rgba(0, 0, 0, 0.5);
}

.forest-header {
    background: var(--forest-bg);
    border-bottom: 2px solid var(--forest-border);
    box-shadow: 0 2px 20px var(--forest-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.forest-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: var(--forest-primary);
    box-shadow: 0 4px 30px var(--forest-shadow-dark);
}

body.forest-dark .forest-header.scrolled {
    background: rgba(26, 26, 26, 0.95);
}

.forest-header.hidden {
    transform: translateY(-100%);
}

.forest-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 75px;
    position: relative;
}

.forest-brand {
    flex-shrink: 0;
    z-index: 2;
}

.forest-brand-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--forest-text);
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 12px;
}

.forest-brand-link:hover {
    transform: translateY(-2px);
    background: var(--forest-bg-light);
}

.forest-logo {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--forest-primary) 0%, var(--forest-primary-light) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 15px var(--forest-shadow);
    position: relative;
    overflow: hidden;
}

.forest-logo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.forest-brand-link:hover .forest-logo::before {
    opacity: 1;
    transform: rotate(45deg) translate(50%, 50%);
}

.forest-logo i {
    font-size: 26px;
    z-index: 1;
}

.forest-brand-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.forest-site-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--forest-text);
    line-height: 1.2;
    margin: 0;
    letter-spacing: -0.5px;
}

.forest-site-desc {
    font-size: 13px;
    color: var(--forest-text-light);
    line-height: 1.2;
    margin: 0;
    font-weight: 400;
}

.forest-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.forest-nav-list2 {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.forest-nav-item {
    position: relative;
}

.forest-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: var(--forest-text);
    text-decoration: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.forest-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(45, 90, 39, 0.1), transparent);
    transition: left 0.5s ease;
}

.forest-nav-link:hover::before {
    left: 100%;
}

.forest-nav-link:hover {
    background: var(--forest-bg-light);
    color: var(--forest-primary);
    border-color: var(--forest-border);
    box-shadow: 0 4px 15px var(--forest-shadow);
}

.forest-nav-link.active {
    background: var(--forest-primary);
    color: #fff;
    border-color: var(--forest-primary);
    box-shadow: 0 4px 20px var(--forest-shadow-dark);
}

.forest-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--forest-primary);
    border-radius: 50%;
    box-shadow: 0 2px 8px var(--forest-shadow);
}

.forest-nav-link i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.forest-nav-link:hover i {
    transform: scale(1.1);
}

.forest-nav-text {
    font-weight: 500;
    letter-spacing: 0.3px;
}

.forest-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.forest-theme-toggle {
    width: 44px;
    height: 44px;
    background: var(--forest-bg-light);
    border: 2px solid var(--forest-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--forest-text);
}

.forest-theme-toggle:hover {
    background: var(--forest-primary);
    color: #fff;
    border-color: var(--forest-primary);
    transform: scale(1.05);
    box-shadow: 0 4px 15px var(--forest-shadow);
}

.forest-theme-toggle i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.forest-theme-toggle:hover i {
    transform: rotate(180deg);
}

.forest-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: var(--forest-bg-light);
    border: 2px solid var(--forest-border);
    border-radius: 12px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.forest-menu-toggle:hover {
    background: var(--forest-primary);
    border-color: var(--forest-primary);
    transform: scale(1.05);
}

.forest-menu-line {
    width: 20px;
    height: 2px;
    background: var(--forest-text);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.forest-menu-toggle:hover .forest-menu-line {
    background: #fff;
}

.forest-menu-toggle.active .forest-menu-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.forest-menu-toggle.active .forest-menu-line:nth-child(2) {
    opacity: 0;
}

.forest-menu-toggle.active .forest-menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.forest-mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.forest-mobile-nav.active {
    visibility: visible;
    opacity: 1;
}

.forest-mobile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    transition: opacity 0.3s ease;
}

.forest-mobile-panel {
    display: flex;
    flex-direction: column;
    margin-left: auto;
    background: var(--forest-bg);
}

.forest-mobile-nav.active .forest-mobile-panel {
    transform: translateX(0);
}

.forest-mobile-header {
    padding: 25px 20px;
    background: linear-gradient(135deg, var(--forest-primary) 0%, var(--forest-primary-light) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.forest-mobile-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: forestMobileGlow 4s ease-in-out infinite;
}

@keyframes forestMobileGlow {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.forest-mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1;
}

.forest-mobile-brand i {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.95);
}

.forest-mobile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.forest-mobile-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.forest-mobile-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.2;
}

.forest-mobile-close {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
    z-index: 1;
}

.forest-mobile-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.forest-mobile-close i {
    font-size: 16px;
}

.forest-mobile-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.forest-mobile-menu {
    padding: 20px 0 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: inherit;
    color: inherit;
    scrollbar-width: thin;
    scrollbar-color: var(--forest-primary) var(--forest-bg-light);
}

.forest-mobile-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    color: var(--forest-text);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--forest-border);
    position: relative;
    overflow: hidden;
}

.forest-mobile-item::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--forest-bg-light), transparent);
    transition: left 0.4s ease;
}

.forest-mobile-item:hover::before {
    left: 100%;
}

.forest-mobile-item:hover {
    background: var(--forest-bg-light);
    color: var(--forest-primary);
    padding-left: 25px;
}

.forest-mobile-item.active {
    background: linear-gradient(135deg, var(--forest-primary) 0%, var(--forest-primary-light) 100%);
    color: #fff;
    border-left: 4px solid var(--forest-accent);
}

.forest-mobile-item:last-child {
    border-bottom: none;
}

.forest-mobile-icon {
    width: 40px;
    height: 40px;
    background: var(--forest-bg-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.forest-mobile-item:hover .forest-mobile-icon {
    background: var(--forest-primary);
    color: #fff;
    transform: scale(1.1);
}

.forest-mobile-item.active .forest-mobile-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.forest-mobile-icon i {
    font-size: 18px;
    color: var(--forest-primary);
    transition: color 0.3s ease;
}

.forest-mobile-item:hover .forest-mobile-icon i,
.forest-mobile-item.active .forest-mobile-icon i {
    color: #fff;
}

.forest-mobile-label {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.forest-mobile-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.forest-mobile-subtitle {
    font-size: 12px;
    color: var(--forest-text-light);
    line-height: 1.3;
}

.forest-mobile-item.active .forest-mobile-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.forest-mobile-arrow {
    font-size: 14px !important;
    color: var(--forest-text-lighter);
    transition: all 0.3s ease;
}

.forest-mobile-item:hover .forest-mobile-arrow {
    color: var(--forest-primary);
    transform: translateX(3px);
}

.forest-mobile-item.active .forest-mobile-arrow {
    color: rgba(255, 255, 255, 0.8);
}

.forest-mobile-footer {
    padding: 20px;
    border-top: 1px solid var(--forest-border);
    background: var(--forest-bg-light);
}

.forest-mobile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.forest-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: var(--forest-bg);
    border-radius: 12px;
    border: 1px solid var(--forest-border);
    transition: all 0.3s ease;
}

.forest-stat-item:hover {
    background: var(--forest-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--forest-shadow);
}

.forest-stat-item i {
    font-size: 20px;
    color: var(--forest-primary);
    transition: color 0.3s ease;
}

.forest-stat-item:hover i {
    color: #fff;
}

.forest-stat-item span {
    font-size: 12px;
    color: var(--forest-text-light);
    font-weight: 500;
    transition: color 0.3s ease;
}

.forest-stat-item:hover span {
    color: rgba(255, 255, 255, 0.9);
}

.forest-stat-item strong {
    font-size: 18px;
    font-weight: 700;
    color: var(--forest-text);
    transition: color 0.3s ease;
}

.forest-stat-item:hover strong {
    color: #fff;
}

@media (max-width: 1024px) {
    .forest-header-container {
        padding: 0 15px;
    }

    .forest-nav-list2 {
        gap: 4px;
    }

    .forest-nav-link {
        padding: 10px 16px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .forest-header-container {
        height: 65px;
        padding: 0 15px;
    }

    .forest-logo {
        width: 45px;
        height: 45px;
    }

    .forest-logo i {
        font-size: 22px;
    }

    .forest-site-name {
        font-size: 20px;
    }

    .forest-site-desc {
        font-size: 12px;
    }

    .forest-nav {
        display: none;
    }

    .forest-menu-toggle {
        display: flex;
    }

    .forest-theme-toggle {
        width: 40px;
        height: 40px;
    }

    .forest-theme-toggle i {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .forest-header-container {
        height: 60px;
        padding: 0 10px;
    }

    .forest-brand-link {
        gap: 10px;
    }

    .forest-logo {
        width: 40px;
        height: 40px;
    }

    .forest-logo i {
        font-size: 20px;
    }

    .forest-site-name {
        font-size: 18px;
    }

    .forest-site-desc {
        font-size: 11px;
    }

    .forest-tools {
        gap: 8px;
    }

    .forest-theme-toggle,
    .forest-menu-toggle {
        width: 36px;
        height: 36px;
    }

    .forest-mobile-panel {
        max-width: 100vw;
    }

    .forest-mobile-header {
        padding: 20px 15px;
    }

    .forest-mobile-name {
        font-size: 16px;
    }

    .forest-mobile-item {
        padding: 15px;
    }

    .forest-mobile-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 320px) {
    .forest-header-container {
        padding: 0 8px;
    }

    .forest-brand-link {
        gap: 8px;
    }

    .forest-site-name {
        font-size: 16px;
    }

    .forest-site-desc {
        display: none;
    }
}

@media (prefers-contrast: high) {

    .forest-nav-link,
    .forest-mobile-item {
        border: 2px solid var(--forest-primary);
    }

    .forest-nav-link:hover,
    .forest-mobile-item:hover {
        border-color: var(--forest-accent);
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .forest-mobile-header::before {
        display: none;
    }
}

@media print {
    .forest-header {
        position: static;
        box-shadow: none;
        border-bottom: 2px solid #000;
    }

    .forest-tools,
    .forest-mobile-nav {
        display: none !important;
    }

    .forest-nav {
        display: none;
    }
}

.forest-brand-link:focus,
.forest-nav-link:focus,
.forest-theme-toggle:focus,
.forest-menu-toggle:focus,
.forest-mobile-close:focus,
.forest-mobile-item:focus {
    outline: 2px solid var(--forest-accent);
    outline-offset: 2px;
}

.forest-mobile-content::-webkit-scrollbar {
    width: 6px;
}

.forest-mobile-content::-webkit-scrollbar-track {
    background: var(--forest-bg-light);
}

.forest-mobile-content::-webkit-scrollbar-thumb {
    background: var(--forest-primary);
    border-radius: 3px;
}

.forest-mobile-content::-webkit-scrollbar-thumb:hover {
    background: var(--forest-primary-dark);
}

.forest-header,
.forest-mobile-panel,
.forest-nav-link,
.forest-mobile-item {
    will-change: transform;
    backface-visibility: hidden;
}

.forest-header *,
.forest-mobile-nav * {
    box-sizing: border-box;
}

::selection {
    background: var(--forest-accent);
    color: #fff;
}

::-moz-selection {
    background: var(--forest-accent);
    color: #fff;
}