:root {
    /* حالت روشن (پیش‌فرض) */
    --primary-color: #2d3748;
    --accent-color: #1a365d;
    --accent-light: #2a4365;
    --accent-dark: #2c5282;
    --success-color: #2f855a;
    --warning-color: #c05621;
    --background-color: #e2e8f0;
    --subtle-bg: #cbd5e0;
    --text-color: #2d3748;
    --border-color: #a0aec0;
    --dots-color: rgba(44, 82, 130, 0.2);
    --main-bg: rgba(226, 232, 240, 0.95);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --footer-text: #4a5568;
}

html.dark {
    /* حالت تاریک */
    --primary-color: #ecf0f1;
    --accent-color: #3498db;
    --accent-light: #173347;
    --accent-dark: #5dade2;
    --success-color: #2ecc71;
    --warning-color: #f1c40f;
    --background-color: #1a1a1a;
    --subtle-bg: #2c3e50;
    --text-color: #f5f5f5;
    --border-color: #2c3e50;
    --dots-color: rgba(52, 152, 219, 0.15);
    --main-bg: rgba(26, 26, 26, 0.8);
    --shadow-color: rgba(0, 0, 0, 0.2);
    --footer-text: #bbb;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Vazirmatn', system-ui, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 0;
    font-weight: 300;
    max-width: 800px;
    margin: 0 auto;
    background-image: 
        radial-gradient(var(--dots-color) 1px, transparent 1px), 
        radial-gradient(var(--dots-color) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
    background-attachment: fixed;
    transition: background-color 0.3s ease, color 0.3s ease;
}

header {
    text-align: center;
    padding: 5rem 1rem 3rem;
    position: relative;
    overflow: hidden;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    transform: translateX(-50%);
    border-radius: 3px;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--primary-color);
    text-shadow: 1px 1px 0 var(--background-color);
    letter-spacing: -0.5px;
    transition: color 0.3s ease;
}

main {
    padding: 0 2rem 5rem;
    background-color: var(--main-bg);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    box-shadow: 0 5px 30px var(--shadow-color);
    margin: 0 1rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

main h3 {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--subtle-bg);
    border-radius: 8px;
    border-right: 4px solid var(--accent-color);
    text-align: justify;
    font-weight: 400;
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: all 0.3s ease;
}

main h3:hover {
    transform: translateX(-5px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.category-list {
    margin-bottom: 5rem;
}

.category-list > section:first-child {
    margin-top: 2rem;
}

.category {
    margin-bottom: 4rem;
    position: relative;
}

.category:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -2rem;
    right: 0;
    width: 50px;
    height: 1px;
    background-color: var(--border-color);
    transition: background-color 0.3s ease;
}

.category-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: inline-block;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    position: relative;
    transition: color 0.3s ease;
}

.category-title::before {
    content: '';
    position: absolute;
    right: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: var(--accent-dark);
    transition: width 0.3s ease, background-color 0.3s ease;
}

.category:hover .category-title::before {
    width: 100%;
}

.app-list {
    list-style-type: none;
    margin-right: 1.5rem;
}

.app-item {
    margin-bottom: 1.2rem;
    position: relative;
    transition: transform 0.2s ease;
    padding-right: 1.2rem;
}

.app-item::before {
    content: "•";
    position: absolute;
    right: 0;
    color: var(--accent-color);
    opacity: 0.7;
    transition: color 0.3s ease;
}

.app-item:hover {
    transform: translateX(-5px);
}

.app-link {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.app-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: width 0.3s ease, background-color 0.3s ease;
}

.app-link:hover {
    color: var(--accent-dark);
}

.app-link:hover::after {
    width: 100%;
}

footer {
    text-align: center;
    padding: 3rem 1rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    color: var(--footer-text);
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, color 0.3s ease;
}

footer p {
    position: relative;
    transition: transform 0.3s ease;
}

footer p:hover {
    transform: translateY(-2px);
}

/* برای نمایش تنوع بیشتر رنگی در هر دسته‌بندی */
.category:nth-child(1) .category-title {
    border-color: var(--accent-color);
}

.category:nth-child(2) .category-title {
    border-color: var(--success-color);
}

.category:nth-child(3) .category-title {
    border-color: var(--warning-color);
}

/* دکمه تغییر حالت تاریک/روشن */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--subtle-bg);
    color: var(--text-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px var(--shadow-color);
    z-index: 100;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle i {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    body {
        padding: 0 1rem;
        background-size: 30px 30px;
    }
    
    header {
        padding: 3rem 0 2rem;
    }

    header h1 {
        font-size: 1.4rem;
    }
    
    main {
        padding: 1.5rem 1.5rem 3rem;
        margin: 0;
    }
    
    .category {
        margin-bottom: 3rem;
    }

    .theme-toggle {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
    }
} 