/* تعریف فونت‌ها */
@font-face {
    font-family: 'Mikhak';
    src: url('../fonts/Mikhak-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mikhak';
    src: url('../fonts/Mikhak-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    /* تم تاریک (پیش‌فرض) */
    --bg-color: #0a0a0c;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #6366f1;
    --shadow: rgba(0, 0, 0, 0.5);
    --blur: 15px;
}

[data-theme="light"] {
    /* تم روشن */
    --bg-color: #f0f2f5;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --accent: #4f46e5;
    --shadow: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Mikhak', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow: hidden;
    transition: background-color 0.5s ease;
    direction: rtl;
}

/* پس‌زمینه سه بعدی */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* ویوپورت */
#viewport {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

/* سکشن‌ها */
.section {
    position: absolute;
    width: 90%;
    max-width: 900px;
    height: 75vh;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 8px 32px var(--shadow);
    opacity: 0;
    transform: translateX(-100vw) scale(0.8) rotateY(20deg);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow-y: auto;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.section.active {
    opacity: 1;
    transform: translateX(0) scale(1) rotateY(0deg);
    pointer-events: all;
    z-index: 10;
}

.section.prev {
    transform: translateX(100vw) scale(0.8) rotateY(-20deg);
    opacity: 0;
}

/* اسکرول بار */
.section::-webkit-scrollbar {
    width: 6px;
}

.section::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

/* تایپوگرافی */
h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--accent);
}

p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1rem;
}

/* گرید */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
    width: 100%;
}

/* کارت‌ها */
.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 25px;
    border-radius: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.2);
}

.card-icon {
    margin-bottom: 15px;
    color: var(--accent);
    width: 40px;
    height: 40px;
}

/* نمونه کارها */
.work-item {
    overflow: hidden;
}

.work-img {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 15px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.work-item:hover .work-img {
    transform: scale(1.05);
}

.work-item h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

/* فیلترها */
.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 8px 18px;
    border-radius: 25px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tag.active,
.filter-tag:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* فرم‌ها */
input, textarea, select {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.2);
    color: var(--text-primary);
    outline: none;
    font-size: 0.95rem;
    transition: all 0.3s;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.full-width {
    width: 100%;
}

button.submit {
    background: var(--accent);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    font-size: 1rem;
    transition: all 0.3s;
}

button.submit:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

/* آمار */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
    padding: 25px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: all 0.3s;
}

.stat-item:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 5px;
}

.stat-item p {
    margin: 0;
    font-size: 0.9rem;
}

/* سوشال */
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.social-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    text-decoration: none;
}

.social-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-5px) scale(1.1);
}

.social-btn i {
    width: 28px;
    height: 28px;
}

/* دکمه تم */
.theme-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* منوی پایین */
nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 25, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 10px 15px;
    border-radius: 40px;
    display: flex;
    gap: 10px;
    z-index: 100;
    box-shadow: 0 10px 30px var(--shadow);
}

.nav-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-btn.active {
    background: var(--accent);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

.nav-btn:hover:not(.active) {
    background: var(--glass-border);
    color: var(--text-primary);
}

/* ریسپانسیو */
@media screen and (max-width: 768px) {
    .section {
        width: 92%;
        height: 78vh;
        padding: 25px 20px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-item h3 {
        font-size: 2rem;
    }

    .filters {
        gap: 8px;
    }

    .filter-tag {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    nav {
        width: 95%;
        padding: 8px 12px;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
    }

    .social-btn {
        width: 50px;
        height: 50px;
    }
}

