        /* --- هدر --- */
        header {
            background-color: var(--primary-green);
            color: white;
            padding: 15px 5%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 1000;
        }

        .header-spacer { width: 30px; }

        .text-header {
            font-size: 1.5rem;
            font-weight: bold;
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
        }

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1100;
}

.hamburger span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: white;
    border-radius: 3px;
}

/* --- سایدبار و منو --- */
.sidebar {
    position: fixed;
    top: 0;
    right: -280px;
    width: 250px;
    height: 100%;
    background-color: var(--primary-green);
    box-shadow: -5px 0 15px rgba(0,0,0,0.3);
    transition: 0.4s ease-in-out;
    z-index: 1050;
    display: flex;
    flex-direction: column;
}

.sidebar.active { right: 0; }

/* بخش بالایی سایدبار (تغییر یافته برای قرارگیری در یک خط) */
.sidebar-header {
    display: flex;
    flex-direction: row-reverse; /* معکوس کردن برای قرارگیری ضربدر در چپ و ماه در راست */
    justify-content: space-between; /* چسباندن به دو طرف */
    align-items: center; /* تراز عمودی در یک خط */
    padding: 15px 20px;
    width: 100%;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2.2rem;
    cursor: pointer;
    line-height: 1;
}

/* --- استایل‌های دکمه اختصاصی ماه و خورشید (کد شما) --- */
.tdnn {
    cursor: pointer;
    font-size: 12%; /* کمی کوچکتر برای قرارگیری بهتر در کنار ضربدر */
    position: relative;
    height: var(--toggleHeight);
    width: var(--toggleWidth);
    border-radius: var(--toggleHeight);
    transition: all 500ms ease-in-out;
    background: var(--bgColor--night);
}

.tdnn.day-bg { background: #FFBF71; }

.moon {
    position: absolute;
    display: block;
    border-radius: 50%;
    transition: all 400ms ease-in-out;
    top: 3em;
    left: 3em;
    transform: rotate(-75deg);
    width: var(--toggleBtnRadius);
    height: var(--toggleBtnRadius);
    background: var(--bgColor--night);
    box-shadow: 
        3em 2.5em 0 0em var(--mooncolor) inset,
        rgba(255, 255, 255, 0.1) 0em -7em 0 -4.5em,
        rgba(255, 255, 255, 0.1) 3em 7em 0 -4.5em,
        rgba(255, 255, 255, 0.1) 2em 13em 0 -4em,
        rgba(255, 255, 255, 0.1) 6em 2em 0 -4.1em,
        rgba(255, 255, 255, 0.1) 8em 8em 0 -4.5em,
        rgba(255, 255, 255, 0.1) 6em 13em 0 -4.5em,
        rgba(255, 255, 255, 0.1) -4em 7em 0 -4.5em,
        rgba(255, 255, 255, 0.1) -1em 10em 0 -4.5em;
}

.moon.sun-shape {
    top: 4.5em;
    left: 18em;
    transform: rotate(0deg);
    width: 7em;
    height: 7em;
    background: #fff;
    box-shadow: 3em 3em 0 5em #fff inset,
        0 -5em 0 -2.7em #fff,
        3.5em -3.5em 0 -3em #fff,
        5em 0 0 -2.7em #fff,
        3.5em 3.5em 0 -3em #fff,
        0 5em 0 -2.7em #fff,
        -3.5em 3.5em 0 -3em #fff,
        -5em 0 0 -2.7em #fff,
        -3.5em -3.5em 0 -3em #fff;
}

/* لینک‌های منو */
.sidebar ul {
    list-style: none;
    margin: 0;
}

.sidebar ul li a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    display: block;
    padding: 8px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 1040;
}

.overlay.active { display: block; }