 * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
           font-family: Vazirmatn, sans-serif;
            background: #f5f5f5;
            min-height: 100vh;
        }

        header {
            background: #2c3e50;
            color: white;
            padding: 20px;
            text-align: center;
        }

        header h1 {
            font-size: 1.8rem;
        }

        /* صفحه اصلی - گرید پست‌ها */
        #posts-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            padding: 30px;
            max-width: 1400px;
            margin: 0 auto;
        }

        .post-card {
            background: white;
            border-radius: 10px;
            padding: 15px;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }

        .post-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 20px rgba(0,0,0,0.15);
        }

        .post-thumb {
            width: 100%;
            height: 120px;
            overflow: hidden;
            border-radius: 8px;
            margin-bottom: 12px;
        }

        .post-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s;
        }

        .post-card:hover .post-thumb img {
            transform: scale(1.05);
        }

        .post-card h3 {
            color: #2c3e50;
            font-size: 1rem;
            text-align: center;
        }

        /* صفحه مطالعه پست */
        #post-view {
            display: none;
            max-width: 800px;
            margin: 0 auto;
            padding: 30px;
        }

        #post-view.active {
            display: block;
        }

        #posts-grid.hidden {
            display: none;
        }

        .back-btn {
            background: #3498db;
            color: white;
            border: none;
            padding: 10px 25px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 1rem;
            margin-bottom: 20px;
        }

        .back-btn:hover {
            background: #2980b9;
        }

        #post-content {
            background: white;
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            line-height: 1.8;
        }

        #post-content h1 {
            color: #2c3e50;
            border-bottom: 2px solid #3498db;
            padding-bottom: 10px;
            margin-bottom: 20px;
        }

        #post-content h2, #post-content h3 {
            color: #34495e;
            margin: 20px 0 10px;
        }

        #post-content p {
            margin-bottom: 15px;
            color: #444;
        }

        #post-content code {
            background: #f4f4f4;
            padding: 2px 6px;
            border-radius: 3px;
            font-family: monospace;
        }

        #post-content pre {
            background: #2c3e50;
            color: #ecf0f1;
            padding: 15px;
            border-radius: 5px;
            overflow-x: auto;
            margin: 15px 0;
        }

        #post-content pre code {
            background: none;
            color: inherit;
        }

        #post-content img {
            max-width: 100%;
            border-radius: 5px;
        }

        #post-content a {
            color: #3498db;
        }

        .loading {
            text-align: center;
            padding: 50px;
            color: #666;
        }

        .error {
            text-align: center;
            padding: 50px;
            color: #e74c3c;
        }

        /* ریسپانسیو */
        @media (max-width: 1200px) {
            #posts-grid { grid-template-columns: repeat(3, 1fr); }
        }
        @media (max-width: 900px) {
            #posts-grid { grid-template-columns: repeat(2, 1fr); }
        }
        @media (max-width: 600px) {
            #posts-grid { grid-template-columns: 1fr; }
        }