:root {
    --bg: #ffffff;
    --text: #111111;
    --muted: #666666;
    --surface: #ffffff;
    --surface-2: #f7f8fb;
    --border: rgba(128, 128, 128, 0.35);
    --accent: #ff8c00;
}

body {
    background: var(--bg);
    color: var(--text);
    transition: none;
    overflow-x: hidden;
}

html.dark-mode-preload body {
    background: #0e1217;
    color: #e8ecf1;
}

body.theme-ready {
    transition: background-color 0.14s linear, color 0.14s linear;
}

body.dark-mode {
    --bg: #0e1217;
    --text: #e8ecf1;
    --muted: #b7c0cc;
    --surface: #151b22;
    --surface-2: #1b2330;
    --border: rgba(255, 255, 255, 0.16);
    --accent: #ffad42;
}

body.dark-mode header,
body.dark-mode footer,
body.dark-mode .section-slider-div,
body.dark-mode .main-section-C-div-item,
body.dark-mode .main-section-form form,
body.dark-mode .main-section-B-form,
body.dark-mode .collab-form,
body.dark-mode .auth-card {
    background: var(--surface);
    border-color: var(--border) !important;
}

body.dark-mode p,
body.dark-mode label,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode a,
body.dark-mode span,
body.dark-mode li,
body.dark-mode div,
body.dark-mode button,
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    color: var(--text);
}

body.dark-mode .main-section-A-divr-divP p,
body.dark-mode .main-section-B p,
body.dark-mode .collab-hero-text p,
body.dark-mode .auth-brand p {
    color: var(--muted) !important;
}

body.dark-mode .section-slider-div h2 {
    color: var(--text) !important;
}

body.dark-mode .section-slider-div p {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--muted) !important;
}

body.dark-mode .main-section-quastions {
    background: linear-gradient(180deg, #1f3045 0%, #162333 100%);
    border: 1px solid var(--border);
}

body.dark-mode .main-section-quastions > h2 {
    color: #f6f9ff !important;
}

body.dark-mode .main-section-quastions > div {
    background: var(--surface);
    border: 1px solid var(--border);
}

body.dark-mode .main-section-quastions > div p {
    color: var(--muted) !important;
}

body.dark-mode .main-section-comments h2 {
    color: var(--text) !important;
    border-bottom-color: var(--border);
}

body.dark-mode .main-section-comments-div-item {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

body.dark-mode .main-section-comments-div-item:hover {
    border-color: var(--accent);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

body.dark-mode .main-section-comments-div-item > div div {
    border-bottom-color: var(--border);
}

body.dark-mode .main-section-comments-div-item > div div h3 {
    color: var(--text) !important;
}

body.dark-mode .main-section-comments-div-item > div p {
    color: var(--muted) !important;
}

body.dark-mode .comments-swiper .swiper-button-next,
body.dark-mode .comments-swiper .swiper-button-prev {
    background-color: var(--surface);
    color: var(--accent);
    border: 1px solid var(--border);
}

body.dark-mode .main-section-form-divA textarea,
body.dark-mode .main-section-form-divB > div input {
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--text) !important;
}

body.dark-mode .form-human-check label {
    color: var(--muted) !important;
}

body.dark-mode .main-section-form-divA > div label,
body.dark-mode .main-section-form-divB > div label {
    color: var(--text) !important;
}

body.dark-mode .auth-tabs .tab-btn {
    background: #1c2531;
    border: 1px solid var(--border);
    color: #c9d2de !important;
}

body.dark-mode .auth-tabs .tab-btn:hover {
    border-color: var(--accent);
    color: #eef3f8 !important;
}

body.dark-mode .auth-tabs .tab-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #1a1205 !important;
    box-shadow: 0 10px 22px rgba(255, 173, 66, 0.28);
}

body.dark-mode .footer-section-divr-buttons-r button {
    background: var(--surface-2);
    border: 1px solid var(--border);
}

body.dark-mode .footer-section-divr-buttons-r button a {
    color: var(--text) !important;
}

body.dark-mode .footer-section-divr-buttons-r button:nth-child(1) {
    background: #f5a623;
    border-color: #f5a623;
    box-shadow: 0 6px 18px rgba(245, 166, 35, 0.35);
}

body.dark-mode .footer-section-divr-buttons-r button:nth-child(1) a {
    color: #1a1205 !important;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: transparent;
}

body.dark-mode .footer-section-divr-buttons-r button:nth-child(2) {
    background: var(--accent);
    border-color: transparent;
}

body.dark-mode .footer-section-divr-buttons-r button:nth-child(2) a {
    color: #1a1205 !important;
    font-weight: 700;
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background: var(--surface-2);
    border-color: var(--border) !important;
}

.site-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}

.site-control-btn {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 999px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}

.site-control-btn:hover {
    border-color: var(--accent);
}

.theme-icon-sun {
    color: #f4b400;
}

.theme-icon-moon {
    color: #cfd8e3;
}

.header-div-menu a.is-active {
    color: #ff8c00 !important;
    font-family: vazir-bold, vazir, sans-serif;
    position: relative;
}

.header-div-menu a.is-active::after {
    content: "";
    position: absolute;
    right: 0;
    left: 0;
    bottom: -8px;
    height: 3px;
    border-radius: 999px;
    background: #ff8c00;
}

body.dark-mode .header-div-menu a.is-active {
    color: #ffad42 !important;
}

body.dark-mode .header-div-menu a.is-active::after {
    background: #ffad42;
}

body:not(.dark-mode) .section-menu-bars-divB a,
body:not(.dark-mode) .section-menu-bars-divB a span {
    color: #ffffff !important;
}

body.dark-mode .section-menu-bars {
    background-color: #121a24;
}

body.dark-mode .section-menu-bars-divB a,
body.dark-mode .section-menu-bars-divB a span {
    color: #e8ecf1 !important;
}

body.dark-mode .section-menu-bars-divB a img,
body.dark-mode .section-menu-bars-divA img {
    filter: brightness(0) invert(1);
}

body:not(.dark-mode) .form-file-alert-box {
    background: #ffffff;
    border: 2px solid #ffd8c2;
}

body:not(.dark-mode) .form-file-alert-title {
    color: #bf360c !important;
}

body:not(.dark-mode) .form-file-alert-text {
    color: #1f2937 !important;
}

body.dark-mode .form-file-alert-box {
    background: #151b22;
    border: 1px solid var(--border);
}

body.dark-mode .form-file-alert-title {
    color: #ffb26b !important;
}

body.dark-mode .form-file-alert-text {
    color: #e8ecf1 !important;
}
