@font-face {
            font-family: 'YekanBakh';
            src: url('../font/YekanBakh-Thin.woff2') format('woff2');
            font-weight: 100;
            font-display: swap;
        }

        @font-face {
            font-family: 'YekanBakh';
            src: url('../font/YekanBakh-Light.woff2') format('woff2');
            font-weight: 300;
            font-display: swap;
        }

        @font-face {
            font-family: 'YekanBakh';
            src: url('../font/YekanBakh-Regular.woff2') format('woff2');
            font-weight: 400;
            font-display: swap;
        }

        @font-face {
            font-family: 'YekanBakh';
            src: url('../font/YekanBakh-Bold.woff2') format('woff2');
            font-weight: 600;
            font-display: swap;
        }

        :root {
            --primary: #4849E8;
            --primary-light: #6869FF;
            --primary-dark: #3C3DF2;
            --bg-primary: #121212;
            --bg-secondary: #141414;
                --bg-tertiary: #181818;
            --text-primary: #e9ecef;
            --text-secondary: #ced4da;
            --border-color: #444;
            --radius-md: 8px;
            --radius-lg: 12px;
            --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
            --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
            --nav-bg: rgba(30, 30, 30, 0.8);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: YekanBakh;
            font-weight: 300;
        }

body {
    color: var(--text-primary);
    background-color: #0a0a0a;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 15px 15px;
    direction: rtl;
}
        
        
        header {
    background: var(--bg-secondary);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    z-index: 10;
    backdrop-filter: blur(8px);
    overflow:auto;
}

.header-content {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items:center;
}
        
        
        .logo-section {
    display: flex;
    gap: 10px;
    align-items: center;
}

.logo-section img {
    width:50px;
}

.logo-section h1 {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu {
    display: flex;
    gap: 10px;
}

.menu a {
    text-decoration: none;
    color: white;
    padding: 8px 14px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
        display:flex;
    gap:5px;
}

.menu button {
    color: white;
    padding: 8px 14px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    display:flex;
    gap:5px;
    width:auto;
    margin:0;
}

.menu button:hover , .menu a:hover {
    background:#4849e8;
}

/* Popup overlay */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.3s ease;
    z-index: 10;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Popup box */
.popup-box {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    text-align: right;
    color: var(--text-primary);
    transform: translateY(-20px);
    animation: slideDown 0.3s ease forwards;
}

.tools-link {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin:20px 0;
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.popup-box a {
    padding: 8px 0;
    color: white;
    background: var(--bg-tertiary);
    text-decoration: none;
    transition: 0.2s;
    border-radius: 10px;
    padding: 10px 20px;
    display: flex;
    gap: 10px;
    flex-direction: row-reverse;
    justify-content: space-between;
}

.close-popup {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    border: none;
    border-radius: 6px;
    background: var(--primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: 0.3s;
}
.close-popup:hover {
    background: var(--primary-light);
}

        
        

        .container {
            margin: 0 auto;
            height: 100%;
            display: flex;
            flex-direction: column;
            padding:20px;
        }

        .head-tools {
            display: flex;
            flex-shrink: 0;
            margin-bottom: 20px;
        }

        .head-family {
            display: flex;
            align-items: center;
        }

        .back-btn {
            background: #3a3a3a;
            color: white;
            border: 0px solid var(--border-color);
            padding: 13px 20px 13px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            transition: background 0.3s ease;
            display: flex;
            gap: 10px;
        }

        .back-btn:hover {
            background: #4a4a4a;
        }

        .search-container {
            padding: 0 20px;
            min-width: 500px;
        }

        .search-wrapper {
            position: relative;
        }

        .search-input {
            width: 100%;
            padding: 12px 50px 12px 20px;
            background: var(--bg-secondary);
            border: 0px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 16px;
            transition: all 0.3s ease;
            font-family: YekanBakh;
            font-weight: 300;
            direction: rtl;
        }

        .search-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(72, 73, 232, 0.2);
        }

        .search-icon {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-secondary);
            font-size: 20px;
            display: flex;
        }

        /* Main content area with slides */
        .content-area {
            flex: 1;
            position: relative;
            overflow: hidden;
            min-height: 0;
        }

        .slides-container {
            height: 100%;
            overflow-y: scroll;
            scroll-snap-type: y mandatory;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            -ms-overflow-style: none;
            position: relative;
            margin-bottom:100px;
        }

        .slides-container::-webkit-scrollbar {
            display: none;
        }

        .slide {
            height: 100%;
            scroll-snap-align: start;
            scroll-snap-stop: always;
            overflow-y: auto;
            padding: 20px;
            display: flex;
            flex-direction: column;
        }

.slide-navigation {
    position: fixed;
    right: 30px;
    bottom: 30px;
    display: flex;
    flex-direction: row;
    gap: 12px;
    z-index: 50;
    background: rgb(16 16 16 / 80%);
    backdrop-filter: blur(8px);
    padding: 16px;
    border-radius: 40px;
    box-shadow: var(--shadow-lg);
}
.nav-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-dot:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.nav-dot.active {
    background: var(--primary);
    border-color: var(--primary-light);
    color: white;
}

        /* Grid layouts */
        .families-grid, .icons-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
            gap: 15px;
            width: 100%;
            height: fit-content;
        }

        .families-grid {
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        }

.family-card {
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}


        .family-card:hover {
            transform: translateY(-5px);
            border-color: #304FFF;
        }

        .family-preview {
            height: 120px;
            background: #171717;
            display: grid;
            align-items: center;
            justify-content: center;
            padding: 10px;
            grid-template-columns: 1fr 1fr 1fr;
            justify-items: center;
        }

        .family-preview svg {
            width: 35px;
            height: 35px;
            margin: 0 5px;
        }

        .family-name {
            padding: 15px;
            text-align: center;
            font-size: 16px;
            color: #ffffff;
            font-weight: 500;
        }

.icon-card {
    border-radius: var(--radius-md);
    padding: 10px;
    cursor: pointer;
    transition: transform 0.2s;
    text-align: center;
    border: 2px solid transparent;
    display: flex;
}

.icon-card svg {
    width: 50px;
    height: 50px;
}

        .icon-card:hover {
            transform: translateY(-3px);
            border-color: var(--primary);
        }

        .icon-card.active {
            border-color: var(--primary);
            background: var(--bg-tertiary);
        }

.icon-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

        .family-info {
            font-size: 12px;
            color: var(--text-secondary);
            margin-top: 5px;
            display:none;
        }

        .search-no-results {
            text-align: center;
            padding: 40px;
            color: var(--text-secondary);
            font-size: 16px;
            grid-column: 1 / -1;
        }

        /* Loading indicator */
        .slide-loading {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 100;
            display: none;
            flex-direction:column;
        }

        .slide-loading.active {
            display: flex;
        }

        .loading-spinner {
            width: 50px;
            height: 50px;
            border: 3px solid var(--border-color);
            border-top-color: var(--primary-light);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* Editor Panel */
        .editor-panel {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--bg-tertiary);
            border-top: 2px solid var(--primary);
            padding: 20px;
            transform: translateY(100%);
            transition: transform 0.3s;
            z-index: 200;
            max-height: 70vh;
            overflow-y: auto;
            min-height: 450px;
        }

        .editor-panel.active {
            transform: translateY(0);
            box-shadow: var(--shadow-lg);
        }

        .panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid var(--border-color);
        }

        .panel-title {
            font-size: 18px;
            font-weight: 600;
        }

        .close-btn {
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 24px;
            cursor: pointer;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .close-btn:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .editor-content {
            display: flex;
            gap: 20px;
        }

        .preview-section {
            text-align: center;
        }

        .preview-box {
            width: 150px;
            height: 150px;
            background: var(--bg-secondary);
            border-radius: var(--radius-md);
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 20px;
            background-color: #0a0a0a;
            background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
            background-size: 15px 15px;
        }

        .controls-section {
            display: flex;
            flex-direction: column;
            gap: 20px;
            flex: 1;
        }

        .control-group {
            background: var(--bg-secondary);
            padding: 15px;
            border-radius: var(--radius-md);
        }

        .group-title {
            margin-bottom: 15px;
            color: var(--primary-light);
            font-size: 16px;
        }

        .control-row {
            display: flex;
            align-items: center;
            margin-bottom: 10px;
        }

        .control-row:last-child {
            margin-bottom: 0;
        }

        .control-label {
            width: 120px;
            font-size: 14px;
            color: var(--text-secondary);
        }

        .color-input {
            width: 40px;
            height: 40px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            background: none;
        }

        .slider {
            flex: 1;
            height: 6px;
            -webkit-appearance: none;
            background: linear-gradient(to right, #666, var(--primary));
            border-radius: 3px;
            margin: 0 15px;
        }

        .slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: var(--primary-light);
            cursor: pointer;
        }

        .value-display {
            width: 50px;
            text-align: center;
            font-size: 14px;
            background: var(--bg-primary);
            padding: 5px;
            border-radius: 4px;
        }

        .code-section {
            grid-column: 1 / -1;
            background: var(--bg-secondary);
            padding: 15px;
            border-radius: var(--radius-md);
        }

        .code-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

        .code-title {
            font-size: 16px;
        }

        .code-actions {
            display: flex;
            gap: 8px;
        }

        .action-code-btn {
            background: var(--primary);
            border-radius: 4px;
            padding: 6px 12px;
            border: none;
            color: white;
            cursor: pointer;
            font-size: 14px;
        }

        .action-code-btn:hover {
            background: var(--primary-dark);
        }

        .code-box {
            background: var(--bg-primary);
            padding: 15px;
            border-radius: var(--radius-md);
            font-family: 'Courier New', monospace;
            font-size: 12px;
            line-height: 1.4;
            overflow-x: auto;
            white-space: pre-wrap;
        }
        
        
        /* استایل نوار اسکرول - نسخه ساده */

/* برای کل صفحه */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* برای فایرفاکس */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-secondary);
}

        /* Responsive */
        @media (max-width: 768px) {
            .editor-content {
                flex-direction: column;
            }
            
            .search-container {
                padding: 0px;
                min-width: 100%;
            }

            .head-family {
                align-items: flex-start;
                flex-direction: column;
                width: 100%;
                gap: 10px;
            }
            
            .search-input {
                padding: 12px 20px 12px 50px;
            }

            .families-grid {
                justify-content: center;
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            }

            .slide-navigation {
                right: 15px;
                padding: 12px 6px;
            }
        }