:root {
    /* رنگ‌های تم روشن */
    --light-bg: #f8f9fa;
    --light-text: #333333;
    --light-card: #ffffff;
    --light-border: #e0e0e0;
    --light-accent: #3498db;
    --light-header: #2c3e50;

    /* رنگ‌های تم تاریک */
    --dark-bg: #121212;
    --dark-text: #e0e0e0;
    --dark-card: #1e1e1e;
    --dark-border: #2d2d2d;
    --dark-accent: #64b5f6;
    --dark-header: #121212;

    /* متغیرهای فعلی */
    --bg: var(--light-bg);
    --text: var(--light-text);
    --card: var(--light-card);
    --border: var(--light-border);
    --accent: var(--light-accent);
    --header: var(--light-header);
}

@font-face {
    font-family: iranSans;
    src: url(./IRANSansWeb\(FaNum\)_Bold.ttf) format(ttf),
        url(./IRANSansWeb\(FaNum\)_Bold.eot) format(eoy),
        url(./IRANSansWeb\(FaNum\)_Bold.woff) format(woff);
}

body {
    font-family: 'IRANSans', 'Poppins', sans-serif;
    font-size: .9rem;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
    line-height: 1.6;
}

/* دکمه تغییر تم */
.theme-switch {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

input:checked+.slider {
    background-color: var(--accent);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

header {
    background: var(--card);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 1px 9px 10px rgb(0 0 0 / 13%);
    flex-direction: row;
}

.logo {
    display: flex;
    gap: 2px;
    flex-direction: row-reverse;
    justify-content: center;
    align-items: flex-start;
}

.logo img {
    height: 31px;
}

.logo h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--accent);
}

/* منوی اصلی */
.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.main-nav a:hover {
    color: var(--accent);
}

/* محتوای اصلی */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

h2 {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
    margin-top: 40px;
}

.step {
    background-color: var(--card);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
}

.step-number {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    margin-left: 10px;
    font-weight: bold;
}

.screenshot {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 5px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.note {
    background-color: rgba(0, 0, 0, 0.05);
    border-right: 4px solid var(--accent);
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 5px 5px 0;
}

code {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
}


@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    .main-nav ul {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .container {
        padding: 1rem;
    }

    header {
        flex-direction: row-reverse;
        justify-content: flex-end;
    }
}

body.dark-mode {
    --bg: var(--dark-bg);
    --text: var(--dark-text);
    --card: var(--dark-card);
    --border: var(--dark-border);
    --accent: var(--dark-accent);
    --header: var(--dark-header);
}

body.dark-mode .note {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode code {
    background-color: rgba(255, 255, 255, 0.1);
}

.switch {
    font-size: 17px;
    position: relative;
    display: inline-block;
    width: 4em;
    height: 2.2em;
    border-radius: 30px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #2a2a2a;
    transition: 0.4s;
    border-radius: 30px;
    overflow: hidden;
}

.slider:before {
    position: absolute;
    content: "";
    height: 1.2em;
    width: 1.2em;
    border-radius: 20px;
    left: 0.5em;
    bottom: 0.5em;
    transition: 0.4s;
    transition-timing-function: cubic-bezier(0.81, -0.04, 0.38, 1.5);
    box-shadow: inset 8px -4px 0px 0px #fff;
}

.switch input:checked+.slider:before {
    transform: translateX(1.8em);
    box-shadow: inset 15px -4px 0px 15px #ffcf48;
}

.star {
    background-color: #fff;
    border-radius: 50%;
    position: absolute;
    width: 5px;
    transition: all 0.4s;
    height: 5px;
}

.star_1 {
    left: 2.5em;
    top: 0.5em;
}

.star_2 {
    left: 2.2em;
    top: 1.2em;
}

.star_3 {
    left: 3em;
    top: 0.9em;
}

.switch input:checked~.slider .star {
    opacity: 0;
}

.cloud {
    width: 3.5em;
    position: absolute;
    bottom: -1.4em;
    left: -1.1em;
    opacity: 0;
    transition: all 0.4s;
}

.switch input:checked~.slider .cloud {
    opacity: 1;
}

.hero-logo:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 0 10px 20px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text);
    margin: 5px 0;
    transition: all 0.3s ease;
}

#close {
    border: none;
    background: none;
    width: 50px;
    top: 20px;
    position: absolute;
    left: 20px;
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    #close {
        display: block;
    }

    .main-nav li {
        border-bottom: 1px solid var(--border);
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--card);
        box-shadow: -5px 0 20px 2px rgb(0 0 0 / 57%);
        transition: right 0.3s ease;
        padding-top: 80px;
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 20px;
    }

    .main-nav li {
        padding-bottom: 8px;
        margin-bottom: 10px;
    }
}

.connection-status {
    margin: 40px 0;
    padding: 20px;
    background-color: var(--card);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.status-box {
    margin: 30px 0;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid;
}

.status-box.connected {
    border-left-color: #2ecc71;
    background-color: rgb(46 204 113 / 13%);
}

.status-box.disconnected {
    border-left-color: #e74c3c;
    background-color: rgb(231 76 60 / 16%);
}

.status-box h3 {
    margin-top: 0;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
}

.badge.success {
    background-color: #2ecc71;
    color: white;
}

.badge.error {
    background-color: #e74c3c;
    color: white;
}

.screenshot {
    max-width: 100%;
    border: 1px solid var(--accent);
    border-radius: 13px;
    margin: 15px 0;
    box-shadow: 0px 0px 12px rgb(0 0 0 / 64%);
}

.status-details {
    margin-top: 15px;
}

.ready-status {
    color: #2ecc71;
    font-weight: bold;
}

.connecting-status {
    color: #e67e22;
    font-weight: bold;
}

.btn-example {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.note {
    padding: 12px;
    border-radius: 5px;
    margin: 15px 0;
    display: flex;
    align-items: flex-start;
}

.note.warning {
    background-color: rgba(230, 126, 34, 0.1);
    border-right: 3px solid #e67e22;
}

.note i {
    margin-left: 8px;
    color: #e67e22;
}

@media (max-width: 768px) {
    .status-box {
        padding: 15px;
    }
}

/* footer */
.site-footer {
    background-color: var(--card);
    color: var(--text-light);
    padding: 2rem 1rem;
    font-family: 'IRANSans', Tahoma, sans-serif;
    border-top: 1px solid var(--border);
    margin-top: 3rem;
    box-shadow: 0 0 20px #00000014;
    border-radius: 13px 13px 0 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.8;
}

.footer-hero {
    font-weight: bold;
    color: var(--accent);
}

.footer-link {
    color: var(--accent-light);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    padding: 0 3px;
}

.footer-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.footer-separator {
    color: var(--text-secondary);
    margin: 0 10px;
    font-weight: 300;
}

.footer-credits {
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.heart {
    color: #ff4757;
    animation: heartbeat 1.5s infinite;
    display: inline-block;
}

.footer-heart {
    color: var(--text-light);
    font-size: 0.9rem;
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.1);
    }

    50% {
        transform: scale(1);
    }

    75% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* رسپانسیو */
@media (max-width: 768px) {
    .footer-message p {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-separator {
        display: none;
    }
}

a[href="https://hamidreza82m.github.io/"] {
    font-size: .7rem;
}

.important-note {
    background-color: rgba(52, 152, 219, 0.1);
    border-right: 4px solid var(--accent);
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
}

.note-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.note-header i {
    font-size: 1.5rem;
    color: var(--accent);
    margin-left: 10px;
}

.note-header h3 {
    margin: 0;
    color: var(--accent);
}

.server-examples {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 20px 0;
}

.server-case {
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.connect {
    background: rgb(46 204 113 / 13%);
}

.disconnect {
    background: rgb(231 76 60 / 16%);
    ;
}

.case-label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

.server-pair {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.device {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 10px;
}

.device i {
    font-size: 2rem;
    color: var(--text);
    margin-bottom: 5px;
}

.connection-arrow {
    color: var(--accent);
    font-size: 1.5rem;
    padding: 0 20px;
}

.connection-arrow.error {
    color: #e74c3c;
}

@media (max-width: 768px) {
    .server-pair {
        flex-direction: column;
    }

    .connection-arrow {
        padding: 15px 0;
        transform: rotate(90deg);
    }
}

[data-aos] {
    transition: all 0.6s ease;
}

[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

[data-aos="fade-down"] {
    opacity: 0;
    transform: translateY(-30px);
}

[data-aos="fade-down"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

[data-aos="zoom-in"] {
    opacity: 0;
    transform: scale(0.9);
}

[data-aos="zoom-in"].aos-animate {
    opacity: 1;
    transform: scale(1);
}

[data-aos="flip-left"] {
    transform: perspective(1000px) rotateY(-90deg);
    opacity: 0;
    backface-visibility: hidden;
}

[data-aos="flip-left"].aos-animate {
    transform: perspective(1000px) rotateY(0);
    opacity: 1;
}

@media (max-width: 480px) {

    [data-aos="fade-up"],
    [data-aos="fade-right"],
    [data-aos="fade-left"] {
        opacity: 0;
        transform: translateY(30px);
    }

    [data-aos="fade-up"].aos-animate,
    [data-aos="fade-right"].aos-animate,
    [data-aos="fade-left"].aos-animate {
        opacity: 1;
        transform: translateY(0);
    }
}